Skip to content

Instantly share code, notes, and snippets.

@grero
Created May 23, 2012 01:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save grero/2772818 to your computer and use it in GitHub Desktop.
Save grero/2772818 to your computer and use it in GitHub Desktop.
#use this command to submit a bunch of jobs decoding a tetrode data set, in this case P442g0002. {1..35} iterates over the number of highpass files. A wrapper job is submitted that waits for all the compute jobs to finish, then issues an email notifying me that the jobs finishes
echo "P442g0002 done\!" | qsub -j y -V -N hmmDecodeP442g2 -o $HOME/tmp -m e -M roger.herikstad@gmail.com -hold_jid `for i in {1..35}; do echo "cd $PWD;/opt/cluster/tmp/run_hmm_decode.sh /Applications/MATLAB_R2010a.app/ hmmsort/P442g0002 10000 1e-20 SourceFile highpass/P442_highpass.$( printf %.4d $i ) DescriptorFile P442_descriptor.txt hdf5 save Group 2" | qsub -j y -V -N hmmdecodeP442g2_${i} -o $HOME/tmp/; done | awk '{print $3}' | paste -s -d "," -`
#same as above except loops through groups and checks for already computed data
for g in {1..4}; do echo "P443g000$g done\!" | qsub -j y -V -N hmmDecodeP443g$g -o $HOME/tmp -m e -M roger.herikstad@gmail.com -hold_jid `for i in {1..605}; do test -e hmmsort/P443_g$( printf %.4d $g ).$( printf %.4d $i ).mat || echo "cd $PWD;/opt/cluster/tmp/run_hmm_decode.sh /Applications/MATLAB_R2010a.app/ hmmsort/P443g000$g 10000 1e-20 SourceFile highpass/P443_highpass.$( printf %.4d $i ) DescriptorFile P443_descriptor.txt hdf5 save Group $g" | qsub -j y -V -N hmmdecodeP443g${g}_${i} -o $HOME/tmp/; done | awk '{print $3}' | paste -s -d "," -`; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment