User Tools

Site Tools


mkatari-bioinformatics-august-2013-more-slurm

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
mkatari-bioinformatics-august-2013-more-slurm [2014/06/09 08:06] mkatarimkatari-bioinformatics-august-2013-more-slurm [2014/06/09 08:19] (current) mkatari
Line 37: Line 37:
  
 The single quote (not the apostraphe, on the US keyboard it is located to the left of 1) can be used to capture command line results. Here we get a list of fasta files that start with the word test and store it in the variable $FILES. Notice that $FILES is not just one string, but an array of files returned as a result to the ls command. Then we start a loop and work with one file at a time. At each iteration of the for loop the file name will be stored in the variable $INPUT.  The single quote (not the apostraphe, on the US keyboard it is located to the left of 1) can be used to capture command line results. Here we get a list of fasta files that start with the word test and store it in the variable $FILES. Notice that $FILES is not just one string, but an array of files returned as a result to the ls command. Then we start a loop and work with one file at a time. At each iteration of the for loop the file name will be stored in the variable $INPUT. 
 +
 +The code stays the same. Note that we will echo the entire sbatch script and redirect it into a new sbatch script. Also note that in order for the double quotes to be used as double quotes and not as closure to our echo's double quote we use the escape character \. The escape character tells the shell to interpret any special characters as regular characters. 
 +
 +The code below will create a new sbatch file for each fasta file and then at then submit the jobs. Very useful if you are working on hundred and thousands of files.
  
 <code> <code>
mkatari-bioinformatics-august-2013-more-slurm.1402301212.txt.gz · Last modified: 2014/06/09 08:06 by mkatari