BWA-MEM2_MEM(1)

πŸ“¦
version 2.3 Β· 3 versions
, in ubuntu stonking

πŸ’– BWA-MEM2_MEM(1) β€” bestie edition πŸ’–

okay so this is the manual for bwa-mem2_mem, living in the BWA-MEM2_MEM(1) zone of your friendly neighbourhood User Commands section. sequence alignment that eats and leaves no crumbs. periodt. 🧬✨


🌸 NAME 🌸

bwa-mem2_mem β€” Sequence alignment using Burrows-Wheeler Transform

like. it aligns sequences. using a Burrows-Wheeler Transform. that's the whole vibe. πŸ‘‘


✨ SYNOPSIS ✨

bwa-mem2 mem [options] <idxbase> <in1.fq> [in2.fq]

that's it that's the incantation. options first, then your idxbase, then in1.fq, and if you're doing paired-end you also hand it in2.fq. slay. πŸ’…


πŸ¦‹ DESCRIPTION πŸ¦‹

okay so when you run this, it goes looking to launch executable and starts yapping at you like this β€” and yes, bestie, this is literally what the man page says, i'm not making it up:

Looking to launch executable
"/build/bwa-mem2-VE1xDF/bwa-mem2-2.3+ds/./bwa-mem2.avx2", simd = .avx2
Launching executable
"/build/bwa-mem2-VE1xDF/bwa-mem2-2.3+ds/./bwa-mem2.avx2"
----------------------------- Executing in AVX2 mode!!
----------------------------- * SA compression enabled with xfactor: 8

the double AVX2 announcement? iconic. it's giving main character energy fr fr. πŸŽ€


πŸ”₯ OPTIONS πŸ”₯

Algorithm options:

  • -o STR β€” Output SAM file name
  • -t INT β€” number of threads [1]
  • -k INT β€” minimum seed length [19]
  • -w INT β€” band width for banded alignment [100]
  • -d INT β€” off-diagonal X-dropoff [100]
  • -r FLOAT β€” look for internal seeds inside a seed longer than {-k} * FLOAT [1.5]
  • -y INT β€” seed occurrence for the 3rd round seeding [20]
  • -c INT β€” skip seeds with more than INT occurrences [500]
  • -D FLOAT β€” drop chains shorter than FLOAT fraction of the longest overlapping chain [0.50]
  • -W INT β€” discard a chain if seeded bases shorter than INT [0]
  • -m INT β€” perform at most INT rounds of mate rescues for each read [50]
  • -S β€” skip mate rescue
  • -o β€” output file name missing
  • -P β€” skip pairing; mate rescue performed unless -S also in use

Scoring options:

  • -A INT β€” score for a sequence match, which scales options -TdBOELU unless overridden [1]
  • -B INT β€” penalty for a mismatch [4]
  • -O INT[,INT] β€” gap open penalties for deletions and insertions [6,6]
  • -E INT[,INT] β€” gap extension penalty; a gap of size k cost {-O} + {-E}*k [1,1]
  • -L INT[,INT] β€” penalty for 5'- and 3'-end clipping [5,5]
  • -U INT β€” penalty for an unpaired read pair [17]

Input/output options:

  • -p β€” smart pairing (ignoring in2.fq)
  • -R STR β€” read group header line such as '@RG\tID:foo\tSM:bar' [null]
  • -H STR/FILE β€” insert STR to header if it starts with @; or insert lines in FILE [null]
  • -j β€” treat ALT contigs as part of the primary assembly (i.e. ignore <idxbase>.alt file)
  • -5 β€” for split alignment, take the alignment with the smallest coordinate as primary
  • -q β€” don't modify mapQ of supplementary alignments
  • -K INT β€” process INT input bases in each batch regardless of nThreads (for reproducibility) []
  • -v INT β€” verbose level: 1=error, 2=warning, 3=message, 4+=debugging [3]
  • -T INT β€” minimum score to output [30]
  • -h INT[,INT] β€” if there are <INT hits with score >80% of the max score, output all in XA [5,200]
  • -a β€” output all alignments for SE or unpaired PE
  • -C β€” append FASTA/FASTQ comment to SAM output
  • -V β€” output the reference FASTA header in the XR tag
  • -Y β€” use soft clipping for supplementary alignments
  • -M β€” mark shorter split hits as secondary
  • -I FLOAT[,FLOAT[,INT[,INT]]] β€” specify the mean, standard deviation (10% of the mean if absent), max (4 sigma from the mean if absent) and min of the insert size distribution. FR orientation only. [inferred]
Note: Please read the man page for detailed description of the command line and options.

like, yes bestie, i know, the man page is telling you to read the man page. we love a self-aware moment. 😭🫢


and that's the whole thing!! no cap, every flag accounted for, nothing skipped, all facts intact. go forth and align. πŸ’œπŸŒˆβ­

this was bwa-mem2 mem version 2.3+ds, dated February 2026 β€” ty for coming to my ted talk, ily, byeee πŸŽ€βœ¨πŸ‘‘

πŸ“¦ where this page comes from