Skip to content

Bowtie2

Bowtie2 is an ultra fast and memory-efficient tool for aligning sequencing reads to long reference sequences.

Bowtie2 is available as a module on Apocrita.

Usage

To run the default version of Bowtie2, simply load the bowtie2 module:

$ module load bowtie2
$ bowtie2 -h

Usage:   bowtie2 [options]* -x <bt2-idx> {-1 <m1> -2 <m2> | -U <r> |
         --interleaved <i>} -S [<sam>]

For full usage documentation, run bowtie2 -h.

Example job

Serial jobs

Here is an example job running on 1 core and 1GB of memory:

#!/bin/bash
#$ -cwd
#$ -j y
#$ -pe smp 1
#$ -l h_rt=1:0:0
#$ -l h_vmem=1G

module load bowtie2

# Prepare example genomes in <inputDir>
# Output is stored in <outputDir>
bowtie2-build <inputDir> <outputDir>
bowtie2-inspect <outputDir>

Here is an example job running on 2 cores and 2GB of memory:

Core Usage

To ensure that Bowtie2 uses the correct number of cores, the --threads ${NSLOTS} option should be used on commands that support it. Please note that using more than 8 or 10 cores is usually of limited benefit.[3]

#!/bin/bash
#$ -cwd
#$ -j y
#$ -pe smp 2
#$ -l h_rt=1:0:0
#$ -l h_vmem=1G

module load bowtie2

# Prepare example genomes in <inputDir>
# Output is stored in <outputDir>
bowtie2-build --threads ${NSLOTS} <inputDir> <outputDir>
bowtie2-inspect <outputDir>

References

[1] Bowtie2 GitHub
[2] Bowtie2 example
[3] Benchmarking Bowtie2 Threading