Skip to content

Instantly share code, notes, and snippets.

@vsoch
Last active Nov 4, 2019
Embed
What would you like to do?
Testing run.sh script for Snakemake
#!/bin/bash
BUCKET="${1}"
BLOB="${2}"
JOBSCRIPT="${3}"
mkdir -p /workdir
cd /workdir
echo "bucket: $BUCKET"
echo "blob: $BLOB"
echo "jobscript: $JOBSCRIPT"
# Retrieve download script
wget -O /download.py https://gist.githubusercontent.com/vsoch/84886ef6469bedeeb9a79a4eb7aec0d1/raw/181499f8f17163dcb2f89822079938cbfbd258cc/download.py
chmod +x /download.py
# Download to /tmp, extract to /workdir (WORKDIR)
python /download.py download "${BUCKET}" "${BLOB}" /tmp/workdir.tar.gz
tar -xzvf /tmp/workdir.tar.gz
/bin/bash "${JOBSCRIPT}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment