Run Bowtie2 on the Cluster¶
module avail bowtie2to see all the available versions of Bowtie2 on the cluster
- Load Bowtie2 with
module load bowtie2/<your version>
- Run Bowtie2 with
bowtie2 -x <.genomes file> -U <.fq file> -S <allignment .sam file>. Bowtie2 has many options and can be ruSBATCHn many ways. The line above is simply a general template. When you login on the head node, load Bowtie2 and type
bowtie2. A more detailed explanation on all the possible run options should appear.
SBATCH script, you must load Bowtie2 before you run Bowtie2
Example SBATCH Script¶
#!/bin/bash #SBATCH -J bowtie2Test #SBATCH -A [Account] #SBATCH -N 2 --ntasks-per-node=8 #SBATCH -t 2 #SBATCH -q inferno #SBATCH -o Report-%bt2Result.out cd $SLURM_SUBMIT_DIR module load bowtie2/2.4.2 bowtie2 -x <.genomes file> -U <.fq file> -S <allignment .sam file>
#SBATCHdirectives are standard, requesting 2 hours of walltime and 2 nodes with 8 cores per node.
$SLURM_SUBMIT_DIRis simply a variable that represents the directory you submit the SBATCH script from. Make sure the
.sam, and any other files you need are in the same directory you put the
SBATCHscript in. This line tells the cluster to enter this directory where you have stored the
SBATCHscript, and look for all the files for the job. If you use
$SLURM_SUBMIT_DIR, you need to have all your files in the same folder as your
SBATCHscript otherwise the cluster won't be able to find the files it needs.
- Output Files, will also show up in the same directory as the
module load bowtie2/2.4.2loads Bowtie2
bowtie2 -x <.genomes file> -U <.fq file> -S <allignment .sam file>runs Bowtie2. Again, this is just a general template. This line will vary based on what you are running.
Submit Job & Check Job Status¶
- Make sure you're in the directory that contains the
.samfile, and any other files you need.
- Submit as normal, with
sbatch <SBATCH script name>. In this case
sbatch bowtie2.SBATCHor whatever you called the
SBATCHscript. You can name the
SBATCHscripts whatever you want, just keep the
.SBATCHat the end
- Check job status with
squeue -u username3sbatch, replacing "username3" with your gt username
- You can delete the job with
scancel 22182721, replacing the number with the jobid returned after running sbatch
- All files created will be in the same folder where your
SBATCHscript is (same directory you ran
.outfile will be found here as well. It contains the results of the job, as well as diagnostics and a report of resources used during the job. If the job fails or doesn't produce the result you were hoping for, the
.outfile is a great debugging tool.
- You can transfer the resulting files off the cluster using scp or a file transfer service