...
| Expand |
|---|
| Please take me through all of the steps... |
|---|
| Please take me through all of the steps... |
|---|
|
| Code Block |
|---|
module load bowtie
bowtie-build NC_017544.1.fasta NC_017544.1
|
Now create a bowtie_commands file that looks like this using nano or another text editor: | Code Block |
|---|
bowtie -p 3 -S NC_017544.1 SRR034450.fastq -S SRR034450.sam
bowtie -p 3 -S NC_017544.1 SRR034451.fastq -S SRR034451.sam
bowtie -p 3 -S NC_017544.1 SRR034452.fastq -S SRR034452.sam
bowtie -p 3 -S NC_017544.1 SRR034453.fastq -S SRR034453.sam
| | Expand |
|---|
Why did we choose -p 3? | Why did we choose -p 3? |
There Remember that there are 12 processors per node on Lonestar, so we might as well choose to use 3 for each of the 4 jobs with the -p 3 option. Create the launcher script and run it: | Warning |
|---|
Remember that you cannot qsub from within an idev shell! |
| Code Block |
|---|
module load python
launcher_creator.py -n bowtie -q development -c bowtie_commands -t 0:30:00
qsub bowtie.sge
|
|
expand |
Convert Bowtie output to BAM
Create a new samtools_commands file so that you convert all of these files from SAM to sorted and indexed BAM all at one time by using qsub.
Linux expert tip: you can string together commands all on one line, so that they are sent to the same core one after another by separating them on the line with &&.
Note the use of the variable $FILE, by which we set a variable's value int he first part of the line and use it over and over in the latter part of the line. This is a mini use of shell scripting.
| Code Block |
|---|
| title | Contents of samtools_commands file |
|---|
|
FILE=SRR034450 && samtools import NC_017544.1.fasta $FILE.sam $FILE.unsorted.bam && samtools sort $FILE.unsorted.bam $FILE && samtools index $FILE.bam
FILE=SRR034451 && samtools import NC_017544.1.fasta $FILE.sam $FILE.unsorted.bam && samtools sort $FILE.unsorted.bam $FILE && samtools index $FILE.bam
FILE=SRR034452 && samtools import NC_017544.1.fasta $FILE.sam $FILE.unsorted.bam && samtools sort $FILE.unsorted.bam $FILE && samtools index $FILE.bam
FILE=SRR034453 && samtools import NC_017544.1.fasta $FILE.sam $FILE.unsorted.bam && samtools sort $FILE.unsorted.bam $FILE && samtools index $FILE.bam
|
Create a new launcher script and submit this new job to the queue. Be sure you have samtools loaded as the node that your job launches on will inherit your current environment, including whatever modules you have loaded:
| Code Block |
|---|
module load samtools
|
| Expand |
|---|
| I'd like to see the commands for this qsub... |
|---|
| I'd like to see the commands for this qsub... |
|---|
|
| Code Block |
|---|
launcher_creator.py -n samtools -q development -j samtools_commands -t 0:30:00
qsub samtools.sge
|
|
...