Bowtie2

Bowtie2

Overview

Bowtie2 is an ultrafast and memory-efficient tool for aligning sequencing reads to long reference sequences. It is particularly good at aligning reads of about 50 up to 100s or 1,000s of characters, and particularly good at aligning to relatively long (e.g. mammalian) genomes.

Bowtie2 supports gapped, local, and paired-end alignment modes. It works with a variety of popular read formats including FASTQ, QSEQ, and FASTA.

Enabling the Software

Load Bowtie2 using the command:

module load bowtie2
Note: As you cannot have multiple conda environments active at once, do not load this environment in addition to another conda linked module or local environment.

Version Information

If you prefer to use a specific version of the software, specify the version with the command:

module load bowtie2/<version>

Currently installed versions:

  • 2.5.4 (default)
Note: If you need a different version, you may create a local installation within your home directory/project space, or contact HPC Support to request the creation of a new module.

Basic Usage

After loading the module, you can run Bowtie2 using the following basic syntax:

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

Key Parameters

Parameter Description
-x <bt2-idx> Path to the index for the reference genome
-1 <m1> File with mate 1 reads (paired-end)
-2 <m2> File with mate 2 reads (paired-end)
-U <r> File with unpaired reads (single-end)
-S <sam> Output SAM file (default: stdout)

Common Options

Option Description
-p/--threads <int> Number of parallel search threads (default: 1)
--local Local alignment; ends might be soft clipped
--end-to-end End-to-end alignment (default)
-k <int> Report up to <int> alignments per read
Important: For optimal performance on the SeaWulf cluster, we recommend using the -p option to match the number of threads you've requested in your job script.

Examples

Single-end Alignment

bowtie2 -p 8 -x /path/to/reference/genome -U sample.fastq -S output.sam

Aligns single-end reads from sample.fastq to the reference genome using 8 threads.

Example Job Script

#!/bin/bash
#SBATCH --job-name=bowtie2_align
#SBATCH --output=bowtie2_align_%j.out
#SBATCH --error=bowtie2_align_%j.err
#SBATCH --time=24:00:00
#SBATCH --nodes=1
#SBATCH -p short-40core
#SBATCH --ntasks=40

# Load the Bowtie2 module
module load bowtie2

# Define input and output files
INDEX="/path/to/reference/genome"
READS1="/path/to/sample_1.fastq"
READS2="/path/to/sample_2.fastq"
OUTPUT="/path/to/output.sam"

# Run Bowtie2 with the same number of threads as requested CPUs
bowtie2 -p $SLURM_CPUS_PER_TASK \ -x $INDEX \ -1 $READS1 \ -2 $READS2 \ -S $OUTPUT

Documentation

Official Documentation

Complete manual with all available options and detailed explanations.

Bowtie2 Manual

Release Notes

Information about the latest features and changes in Bowtie2.

Release Notes

Source Code

GitHub repository for the Bowtie2 project.

GitHub Repository

Support

SeaWulf HPC Support

For issues related to running Bowtie2 on the SeaWulf cluster, please contact the HPC support team:

Bowtie2 Community Support

For questions specific to the Bowtie2 software: