Skip to content

Docs CSC now features an automatic Finnish translation. Click here for more information.

Warning!

Puhti and Mahti computing services have been decommissioned and no new jobs are accepted or executed on its compute nodes. Puhti and Mahti login nodes and storage services are planned to remain available until 15 October 2026. Clean up unnecessary files and move any data you need to keep by 31 August 2026. See the Roihu data migration guide for instructions on transferring your data to Roihu.

Bowtie2

Bowtie2 is an ultrafast, memory-efficient short read aligner. It aligns short DNA sequences (reads) to the human genome at a rate of over 25 million 35-bp reads per hour. Bowtie2 indexes the genome with a Burrows-Wheeler index to keep its memory footprint small: typically about 2.2 GB for the human genome (2.9 GB for paired-end).

There are two versions of Bowtie available: Bowtie2 and Bowtie. The more recent Bowtie2 program differs significantly from its ancestor Bowtie. For example the command line options are different for these two tools.

License

Free to use and open source under GNU GPLv3.

Available

  • Roihu: 2.5.4, via the bio-apps module.

Usage

Bowtie2 is part of the bio-apps collection on Roihu. Load the bio-apps module tree and then the Bowtie2 module:

module load bio-apps/v202603
module load bowtie2/2.5.4

In a typical Bowtie2 run, you first need to index the reference genome with the bowtie2-build command. You should do this in a scratch directory instead of your home directory. For example:

bowtie2-build genome.fa genome

When the reference genome has been indexed, the actual alignment job can be launched with the bowtie2 command. For example, for single end reads, this could be done with the command:

bowtie2 -x genome -U reads.fq -S output.sam

For paired end data, the minimal Bowtie2 syntax is:

bowtie2 -x genome -1 first_read_set.fq -2 second_read_set.fq -S output.sam

Example batch script

bowtie and bowtie2 jobs should be run as batch jobs. Below is a sample batch job script for running a Bowtie2 paired-end alignment on Roihu. The recent Bowtie2 versions scale well, so you can effectively use up to 16 cores in your batch job.

#!/bin/bash
#SBATCH --job-name=bowtie2
#SBATCH --output=output_%j.txt
#SBATCH --error=errors_%j.txt
#SBATCH --account=<project>
#SBATCH --partition=small
#SBATCH --time=04:00:00
#SBATCH --nodes=1
#SBATCH --ntasks=1
#SBATCH --cpus-per-task=16
#SBATCH --mem-per-cpu=1000M

module load bio-apps/v202603
module load bowtie2/2.5.4

bowtie2-build genome.fasta genome
bowtie2 -p $SLURM_CPUS_PER_TASK -x genome -1 reads_1.fq -2 reads_2.fq -S output.sam

In the batch job example above one task (--ntasks=1) is executed. The Bowtie2 job uses 16 cores (--cpus-per-task=16) with a total of 16 GB of memory. The maximum duration of the job is four hours (--time=04:00:00). All the cores are assigned from one computing node (--nodes=1). Replace <project> with your CSC project (for example project_2001234).

You can submit the batch job file to the batch job system with the command:

sbatch batch_job_file.sh

See creating a batch job script for Roihu for more information about running batch jobs.

References

When you use Bowtie2, please cite:

Langmead B, Salzberg S. Fast gapped-read alignment with Bowtie 2. Nature Methods. 2012, 9:357-359.

Support

CSC Service Desk

More information

More information about Bowtie2 can be found from the Bowtie2 home page.