Last active
May 5, 2018 21:21
-
-
Save sahilseth/ad69c010f9ad2ae6f571 to your computer and use it in GitHub Desktop.
bioawk/flowr tutorial
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# install this cool tools from Heng Li (https://github.com/lh3/bioawk) | |
brew install bioawk | |
# information regarding exit_code: | |
# - NA: not started yet | |
# show lines where job started and had errors | |
bioawk -tc hdr '{if($exit_code!=0 && $started=="TRUE") print $jobname, $cmd, $exit_code}' flow_details.txt | |
# show lines which did not start | |
bioawk -tc hdr '{if($started=="FALSE") print $jobname, $cmd, $exit_code}' flow_details.txt | |
# started, but have not finished yet (no exit status yet) | |
bioawk -tc hdr '{if($started=="TRUE" && $exit_code==-1) print $jobname, $cmd, $exit_code}' flow_details.txt | |
# get the 3rd column, cut -f3 and re-submit the jobs | |
jobs=$(bioawk -tc hdr '{if($exit_code!=0 && $started=="TRUE") print $jobname, $cmd, $exit_code}' flow_details.txt | cut -f2) | |
echo $jobs | |
# this will work, provided there were no pre requisite jobs | |
for j in $jobs; do bsub < $j; done | |
# END |
Author
sahilseth
commented
Aug 7, 2017
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment