Skip to content

Instantly share code, notes, and snippets.

@akkornel
Created May 4, 2017 20:32
Show Gist options
  • Save akkornel/9d0b4ae61b0e5bd46fa06600bf6a1af0 to your computer and use it in GitHub Desktop.
Save akkornel/9d0b4ae61b0e5bd46fa06600bf6a1af0 to your computer and use it in GitHub Desktop.
Singularity runscript for the Quake Lab's Mr. Workflow
#!/bin/bash
if [ $# -eq 0 ]; then
echo 'Hello! This is the Mr. Workflow runscript.'
echo 'Please run this again, with either "NextSeq" or "MiSeq" as the next parameter.'
echo 'That will run either the NextSeq workflow script, or the MiSeq workflow script.'
echo 'For example (if the container is called "container.img"):'
echo ' ./container.img nextseq scan path/to/runfolders'
echo ' ./container.img miseq deliver path/to/a/runfolder'
exit 0
fi
case "${1,,}" in
miseq)
shift
exec /workflow/bbox-workflow-miseq $*
;;
nextseq)
shift
exec /workflow/bbox-workflow-nextseq $*
;;
*)
echo "I'm sorry; I didn't recognize what you want me to do."
echo "Please make 'nextseq' or 'miseq' the first argument, before anything else (like 'run' or 'scan')."
echo 'Thanks!'
exit 1
;;
esac
# Nothing should ever reach here!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment