bwa-mem3

August 6, 2026 · View on GitHub

CI codecov Bioconda Documentation License

bwa-mem3 is a short-read aligner derived from bwa-mem2, carrying correctness fixes, performance improvements, and new features (methylation alignment, shared-memory index, mimalloc allocator) maintained by Fulcrum Genomics.

Compatibility with bwa-mem2 and bwa. On the default path bwa-mem3 reproduces bwa-mem2's alignments — same FLAG, RNAME, POS, MAPQ, CIGAR, AS, XS — on the wgs-5M, wes-5M and hic-1M cells re-measured after the parity work landed (22.5 M records, hg38, x86/AVX2, with the AVX2 and arm64/NEON builds byte-identical to each other on all three); there the SAM stream differs only by two additive tags (MQ:i, which upstream bwa also emits, and HN:i, which is bwa-mem3-only) and the header block (a default @HD, the @PG line, and @SQ enrichment read from a .hdr/.dict sidecar the upstreams ignore). For a byte-identical alignment-record stream pass --compat=bwa-mem2 to match bwa-mem2 v2.2.1, or --compat=bwa-mem to match bwa 0.7.19, leaving only the @PG line naming bwa-mem3; the two upstreams differ from each other on every mated record, so the targets are not interchangeable. --compat=bwa-mem is validated on 322,978,938 alignment records across two reference builds, on hosts spanning AVX2, AVX-512 and NEON. The opt-in speed levers are deliberate exceptions and are not output-compatible — --fast, and separately --rescue-skip and --seed-order local-longest, which --fast does not enable; --compat and --fast are mutually exclusive. See Equivalence with bwa-mem2 for the field-by-field comparison, the full per-PR audit, and the exact datasets each claim is scoped to.

By default bwa-mem3 keeps bwa-mem2's command-line defaults, so it drops into an existing pipeline unchanged. For the fastest configuration — and what each recommended deviation from the bwa defaults trades for speed — see Settings profiles: bwa drop-in vs recommended.

Full documentation: https://bwa-mem3.readthedocs.io

Install

The recommended way to install bwa-mem3 is via bioconda:

mamba install -c bioconda bwa-mem3
bwa-mem3 version

Prebuilt packages are available for linux-64, linux-aarch64, and osx-arm64.

Build from source

git clone --recursive https://github.com/fg-labs/bwa-mem3.git
cd bwa-mem3
make
./bwa-mem3 version

See the installation guide for prerequisites and architecture-specific notes.

License

MIT. See the License page in the docs.

Citation

Please cite the bwa-mem2 paper (Vasimuddin Md et al., IPDPS 2019). See the Citation page for BibTeX.

Issues / contributing

File issues and pull requests on fg-labs/bwa-mem3.