Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Burrow-Wheeler Aligner

Octocat-spinner-32 .gitignore Added Makefile.bak and bwamem-lite to .gitignore March 13, 2013
Octocat-spinner-32 COPYING Imported from my local bwa repository, the master repository. January 13, 2011
Octocat-spinner-32 ChangeLog Update to the latest modfication 0.5.9rc1-2. Update ChangeLog January 13, 2011
Octocat-spinner-32 Makefile dev-465: a new output format for read overlap April 08, 2014
Octocat-spinner-32 NEWS r455: release bwa-0.7.8 March 31, 2014
Octocat-spinner-32 QSufSort.c removed a few unused variables February 23, 2013
Octocat-spinner-32 QSufSort.h move bwt_gen/* to the root directory October 20, 2011
Octocat-spinner-32 README.md r439: expose mem_opt_t::max_matesw February 19, 2014
Octocat-spinner-32 bamlite.c Removed more dependencies on utils.h May 03, 2013
Octocat-spinner-32 bamlite.h Removed more dependencies on utils.h May 03, 2013
Octocat-spinner-32 bntseq.c r713: a bug in retrieving ref seq on rev April 14, 2014
Octocat-spinner-32 bntseq.h dev-472: get rid of bwa_fix_xref() April 10, 2014
Octocat-spinner-32 bwa.1 r455: release bwa-0.7.8 March 31, 2014
Octocat-spinner-32 bwa.c dev-472: get rid of bwa_fix_xref() April 10, 2014
Octocat-spinner-32 bwa.h dev-472: get rid of bwa_fix_xref() April 10, 2014
Octocat-spinner-32 bwamem.c dev-473: added a few assertions April 10, 2014
Octocat-spinner-32 bwamem.h dev-472: get rid of bwa_fix_xref() April 10, 2014
Octocat-spinner-32 bwamem_extra.c dev-475: -F outputs unit score, not raw score April 10, 2014
Octocat-spinner-32 bwamem_pair.c r705: pairing performed on one chr only April 10, 2014
Octocat-spinner-32 bwape.c fix duplicate PG lines in bwape and bwase January 05, 2014
Octocat-spinner-32 bwase.c fix duplicate PG lines in bwape and bwase January 05, 2014
Octocat-spinner-32 bwase.h removed color-space support February 12, 2013
Octocat-spinner-32 bwaseqio.c Removed more dependencies on utils.h May 03, 2013
Octocat-spinner-32 bwt.c Reduce dependency on utils.h - new malloc wrapping scheme. May 02, 2013
Octocat-spinner-32 bwt.h Fixed clang compiling warnings March 16, 2014
Octocat-spinner-32 bwt_gen.c Removed more dependencies on utils.h May 03, 2013
Octocat-spinner-32 bwt_lite.c Fixed clang compiling warnings March 16, 2014
Octocat-spinner-32 bwt_lite.h Fixed clang compiling warnings March 16, 2014
Octocat-spinner-32 bwtaln.c r397: multi changes/bugfixes to bwa-backtrack May 24, 2013
Octocat-spinner-32 bwtaln.h r397: multi changes/bugfixes to bwa-backtrack May 24, 2013
Octocat-spinner-32 bwtgap.c r397: multi changes/bugfixes to bwa-backtrack May 24, 2013
Octocat-spinner-32 bwtgap.h r397: multi changes/bugfixes to bwa-backtrack May 24, 2013
Octocat-spinner-32 bwtindex.c Reduce dependency on utils.h - new malloc wrapping scheme. May 02, 2013
Octocat-spinner-32 bwtsw2.h r132: optionally copy FASTA/Q comment to SAM October 26, 2012
Octocat-spinner-32 bwtsw2_aux.c Reduce dependency on utils.h - new malloc wrapping scheme. May 02, 2013
Octocat-spinner-32 bwtsw2_chain.c Reduce dependency on utils.h - new malloc wrapping scheme. May 02, 2013
Octocat-spinner-32 bwtsw2_core.c Reduce dependency on utils.h - new malloc wrapping scheme. May 02, 2013
Octocat-spinner-32 bwtsw2_main.c Ensure exit status of 1 if given invalid options or index files are n… April 29, 2013
Octocat-spinner-32 bwtsw2_pair.c Reduce dependency on utils.h - new malloc wrapping scheme. May 02, 2013
Octocat-spinner-32 example.c Reduce dependency on utils.h - new malloc wrapping scheme. May 02, 2013
Octocat-spinner-32 fastmap.c dev-469: fixed wrong command line prompt April 09, 2014
Octocat-spinner-32 is.c Removed more dependencies on utils.h May 03, 2013
Octocat-spinner-32 kbtree.h Reduce dependency on utils.h - new malloc wrapping scheme. May 02, 2013
Octocat-spinner-32 khash.h Reduce dependency on utils.h - new malloc wrapping scheme. May 02, 2013
Octocat-spinner-32 kopen.c Reduce dependency on utils.h - new malloc wrapping scheme. May 02, 2013
Octocat-spinner-32 kseq.h Reduce dependency on utils.h - new malloc wrapping scheme. May 02, 2013
Octocat-spinner-32 ksort.h Reduce dependency on utils.h - new malloc wrapping scheme. May 02, 2013
Octocat-spinner-32 kstring.c Reduce dependency on utils.h - new malloc wrapping scheme. May 02, 2013
Octocat-spinner-32 kstring.h Reduce dependency on utils.h - new malloc wrapping scheme. May 02, 2013
Octocat-spinner-32 ksw.c dev-460: disallow a cigar 20M2D2I30M in extension April 04, 2014
Octocat-spinner-32 ksw.h dev-448: different ins/del penalties March 28, 2014
Octocat-spinner-32 kthread.c use kthread for multi-threading November 02, 2013
Octocat-spinner-32 kvec.h Reduce dependency on utils.h - new malloc wrapping scheme. May 02, 2013
Octocat-spinner-32 main.c r713: a bug in retrieving ref seq on rev April 14, 2014
Octocat-spinner-32 malloc_wrap.c Reduce dependency on utils.h - new malloc wrapping scheme. May 02, 2013
Octocat-spinner-32 malloc_wrap.h Reduce dependency on utils.h - new malloc wrapping scheme. May 02, 2013
Octocat-spinner-32 pemerge.c Reduce dependency on utils.h - new malloc wrapping scheme. May 02, 2013
Octocat-spinner-32 qualfa2fq.pl Imported from my local bwa repository, the master repository. January 13, 2011
Octocat-spinner-32 utils.c Reduce dependency on utils.h - new malloc wrapping scheme. May 02, 2013
Octocat-spinner-32 utils.h Reduce dependency on utils.h - new malloc wrapping scheme. May 02, 2013
Octocat-spinner-32 xa2multi.pl Bugfix: reverse (complement) sequence and phred string if alternative… September 07, 2011
README.md

Getting started

git clone https://github.com/lh3/bwa.git
cd bwa; make
./bwa index ref.fa
./bwa mem ref.fa read-se.fq.gz | gzip -3 > aln-se.sam.gz
./bwa mem ref.fa read1.fq read2.fq | gzip -3 > aln-pe.sam.gz

Introduction

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 the support of long reads and chimeric 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.

For all the algorithms, BWA first needs to construct the FM-index for the reference genome (the index command). Alignment algorithms are invoked with different sub-commands: aln/samse/sampe for BWA-backtrack, bwasw for BWA-SW and mem for the BWA-MEM algorithm.

Availability

BWA is released under GPLv3. The latest souce code is freely available at github. Released packages can be downloaded at SourceForge. After you acquire the source code, simply use make to compile and copy the single executable bwa to the destination you want. The only dependency of BWA is zlib.

Seeking helps

The detailed usage is described in the man page available together with the source code. You can use man ./bwa.1 to view the man page in a terminal. The HTML version of the man page can be found at the BWA website. If you have questions about BWA, you may sign up the mailing list and then send the questions to bio-bwa-help@sourceforge.net. You may also ask questions in forums such as BioStar and SEQanswers.

Citing BWA

  • Li H. and Durbin R. (2009) Fast and accurate short read alignment with Burrows-Wheeler transform. Bioinformatics, 25, 1754-1760. [PMID: 19451168]. (if you use the BWA-backtrack algorithm)

  • Li H. and Durbin R. (2010) Fast and accurate long-read alignment with Burrows-Wheeler transform. Bioinformatics, 26, 589-595. [PMID: 20080505]. (if you use the BWA-SW algorithm)

  • Li H. (2013) Aligning sequence reads, clone sequences and assembly contigs with BWA-MEM. arXiv:1303.3997v2 [q-bio.GN]. (if you use the BWA-MEM algorithm or the fastmap command, or want to cite the whole BWA package)

Please note that the last reference is a preprint hosted at arXiv.org. I do not have plan to submit it to a peer-reviewed journal in the near future.

Something went wrong with that request. Please try again.