From MetaCentrum
Jump to navigation Jump to search


BWA is a software package for mapping low-divergent sequences against a large reference genome, such as the human genome. It consists of three algorithms: BWA-backtrack, BWA-SW and BWA-MEM. The first algorithm is designed for Illumina sequence reads up to 100bp, while the rest two for longer sequences ranged from 70bp to 1Mbp. BWA-MEM and BWA-SW share similar features such as long-read support and split alignment, but BWA-MEM, which is the latest, is generally recommended for high-quality queries as it is faster and more accurate. BWA-MEM also has better performance than BWA-backtrack for 70-100bp Illumina reads.


The full BWA package is distributed under GNU General Public License version 3 as it uses source codes from BWT-SW which is covered by GPL. Sorting, hash table, BWT and IS libraries are distributed under the MIT license.

  • If you use the short-read alignment component, please cite the following paper:
    • Li H. and Durbin R. (2009) Fast and accurate short read alignment with Burrows-Wheeler transform. Bioinformatics, 25, 1754-60. [PMID: 19451168]
  • If you use the long-read component (BWA-SW), please cite:
    • Li H. and Durbin R. (2010) Fast and accurate long-read alignment with Burrows-Wheeler transform. Bioinformatics. [PMID: 20080505]


Upcoming modulesystem change alert!

Due to large number of applications and their versions it is not practical to keep them explicitly listed at our wiki pages. Therefore an upgrade of modulefiles is underway. A feature of this upgrade will be the existence of default module for every application. This default choice does not need version number and it will load some (usually latest) version.

You can test the new version now by adding a line

source /cvmfs/

to your script before loading a module. Then, you can list all versions of bwa and load default version of bwa as

module avail bwa/ # list available modules
module load bwa   # load (default) module

If you wish to keep up to the current system, it is still possible. Simply list all modules by

module avail bwa

and choose explicit version you want to use.

1. Running the application -- Interactive mode:

  • ask the scheduler for an interactive job having a single node and a desired number of processors (ppn attribute) reserved
$ qsub -I -l nodes=1:ppn=X -l mem=Yg
Note: Do not forget to apppropriately set the amount of requested memory (mem attribute) and/or another job requirements.
  • load the Moses module
$ module add bwa-0.7.3a
  • prepare the configuration and the input files and run the computation
$ bwa [index|samse|sampe] <options>          # just single-threaded versions
$ bwa [aln|bwasw] -t $PBS_NUM_PPN <options>  # ALN and BWASW support multi-threaded/parallel processing

2. Running the application -- Batch mode:

  • prepare the job description script -- use a general skeleton supplemented by the following lines:
# load the BWA module
module add bwa-0.7.3a

# run the computation
bwa [index|samse|sampe] <options>          # just single-threaded versions
bwa [aln|bwasw] -t $PBS_NUM_PPN <options>  # ALN and BWASW support multi-threaded/parallel processing
  • pass the job description file to the scheduler together with (at least) the requested number of processors and requested amount of memory
$ qsub -l nodes=1:ppn=X -l mem=Yg