Bowtie 2 is an ultrafast and memory-efficient tool for aligning sequencing reads to long reference sequences. You can find more information about Bowtie2 here.
First we we must load the bowtie2 module. The easiest way to do the is to add it to your
.bashrc file, by including its load command.
module load bowtie2
In your home directory add a location to store the files to process in the example.
razor-l3:jokinsey:~$ mkdir BOWTIE-JOBS
Navigate into the directory and copy the necessary files from the examples in the bowtie2 application.
azor-l3:jokinsey:~$ cd BOWTIE-JOBS/ razor-l3:jokinsey:~/BOWTIE-JOBS$ cp /share/apps/bowtie2/bowtie2-2.2.3/example/reference/lambda_virus.fa . razor-l3:jokinsey:~/BOWTIE-JOBS$ cp /share/apps/bowtie2/bowtie2-2.2.3/example/reads/reads_1.fq .
PBS script in your
$HOME/BOWTIE-JOBS/ directory to run the example that has all of the information listed below.
#!/bin/bash #PBS -q tiny12core #PBS -N bowtie2 #PBS -l nodes=1:ppn=12 #PBS -j oe #PBS -m abe #PBS -M email@example.com #PBS -l walltime=00:05:00 cd $PBS_O_WORKDIR cp lambda_virus.fa /scratch/$PBS_JOBID cp reads_1.fq /scratch/$PBS_JOBID cd /scratch/$PBS_JOBID bowtie2-build lambda_virus.fa lambda_virus bowtie2 -x lambda_virus -U reads_1.fq -S eg1.sam mv lambda_virus* eg1.sam $PBS_O_WORKDIR/
PBS script above copies the unindexed
FASTA file for the lambda virus and the
FASTAQ file containing the unpaired reads for the lambda phage to the
/scratch/$PBS_JOBID directory where we will run the computation.
bowtie2-build line will output files that represent the index for the Lambda phage reference genome. The line below that runs the bowtie2 aligner, and outputs the alginments to a
SAM file called
eg1.sam. Then the output lambda_virus index files and the alignment results stored in the
eg1.sam file, are moved to the
$PBS_O_WORKDIR directory where the job was submitted from.
Submit the job to the queue.
razor-l3:jokinsey:~/BOWTIE-JOBS$ qsub bowtie2.pbs
More information on how to interpret a
SAM file can be found here