Skip to content

Instantly share code, notes, and snippets.

@timothyjlaurent
Created August 15, 2013 23:45
Show Gist options
  • Save timothyjlaurent/6246010 to your computer and use it in GitHub Desktop.
Save timothyjlaurent/6246010 to your computer and use it in GitHub Desktop.
How to process arbitrarily named files with Sun Grid Engine. Prior to this I would rename the files something numeric so that Q SUb could detect it... This was also very annoying because SGE doesn't like prepending 0's... This gets around all of that and allowing you to process any pattern of files with SGE without renaming
cd ${fastaDir}
fs=(`ls *.fa`)
i=$(expr ${SGE_TASK_ID} - 1)
f=${fs[$i]}
process $f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment