Pick a scenario; every slider stays editable.
The helix shows 36 bases of the reference at the cursor (strand A) and the paired strand B. A thick, mismatched rung is a called variant. Click a chromosome on the right display to jump there.
Bars: measured share of bases at each depth. Line: Poisson with the same mean (Lander-Waterman). The pile at zero above the curve is hard-to-map repeat DNA.
The science
Reads and coverage. A sequencer reads short random pieces (reads) of length L. With N reads on a genome of G bases the mean depth is c = N L / G. Lander and Waterman (1988): per-base depth is roughly Poisson, so a fraction e-c of bases is never read: 5 % at 3x, 0.005 % at 10x.
Errors and quality. Each base call carries a Phred score Q = -10 log10(perr); Q30 means 1 error in 1000. Here the error rate climbs from 0.5x to 1.5x of the slider value along the read, as on real instruments.
Mapping. Reads are located with a seed-and-extend aligner: exact k-mer seeds from a hash index vote for a position, then the mismatches are counted. If two places fit almost equally well (a repeat), the mapping quality is set to 0 and such reads are dropped by the MAPQ filter. A Smith-Waterman local alignment (match +2, mismatch -3, gap -4) is shown for one read to illustrate what real aligners do when indels occur; the pipeline itself only plants single-base changes.
Calling. At each base with pileup depth d and observed alleles, the likelihood of hom-ref, het (each read drawn 50:50) and hom-alt genotypes is the product over reads of p(b | genotype) with p = 1 - e for the matching allele and e/3 otherwise, using each base own Phred error. QUAL is 10 log10 of the best variant likelihood over hom-ref plus a 1:1000 prior (-30). A call needs QUAL above the threshold and depth above the minimum.
Why recall falls at low coverage. A heterozygous site shows its alt allele on about half of the reads, so with Poisson depth some sites have too few alt reads (or none). The expected detection probability is the sum over depth of Pois(d; c) Binom(a; d, 1/2) where the likelihood ratio passes the threshold; the sweep experiment plots it against the simulation.
Honest simplifications. A synthetic random genome (no real biology, no codons or genes), one strand and one chromosome cut into 8 for display, substitutions only (no indels, no structural variants), no PCR duplicates or GC bias, uniform read start sites, a single global error model and a caller much simpler than GATK or bcftools. Educational use only; not for clinical interpretation.