Bowtie / BWA Indexing Engine

FM-Index & BWT Backward Search

Interactive exploration of the Burrows-Wheeler Transform (BWT), LF-mapping, and Ferragina & Manzini (FM) backward search — the sub-linear indexing framework powering Bowtie and BWA.

Presets:
Presets:
Ready (0/3)
Reference Sequence (0-indexed):Highlighted letters indicate resolved match positions
BWT & Suffix Array TableHover row in L for LF-mapping
Row iSA[i]FL (BWT)Suffix String
Count Table C[c]Count of chars < c
Occurrences Matrix Occ(c, i)Occurrences in L[0..i-1]

How Bowtie & BWA Use the FM-Index

Instead of storing the multi-gigabase human genome in raw sequence form, modern aligners index it using the FM-Index. Because each backward step uses simple array lookups in $C$ and $Occ$, query searching executes in $O(|P|)$ time, entirely independent of the genome's size.

The LF-Mapping Property

The fundamental theorem of the BWT: the $i$-th occurrence of character $c$ in the Last column $L$ corresponds to the exact same occurrence of character $c$ in the First column $F$. This enables exact backward traversal without reconstructing the original text.

Sub-linear Memory & Sampling

In production aligners (like Bowtie), $Occ$ values and the Suffix Array are sampled at regular intervals (e.g. every 32 or 64 positions). This reduces the memory footprint of the 3-billion-base human genome to under 2.5 GB of RAM.