Genome Sequencing Coverage

Reads pile up on a circular genome: Poisson depth, e^-c gaps and the k-fold share.

Switch to 2D

Presets

Playback

Genome and reads

A small circular genome stands in for a real one; only the ratios G, L and c matter for the formulas.

Assembly and depth threshold

Overlap needed to join two reads, and the depth k used for the k-fold share.

Sequencing speed

Actions

Add reads by hand or finish the run.

Camera

Quality

Layers

Model checks

The science

What is being modelled

Sequencing machines read a genome in many short pieces called reads. Each read has length L bases and starts at a random place. The genome here is a circular toy genome of G bases (a bacterial chromosome is a ring; a real one is thousands of times longer, but the formulas only depend on the ratios below). With N reads the mean depth (coverage) is c = N L / G: on average, each base is covered by c reads. This is exactly true: adding up the depth of every base always gives N L.

Poisson depth and the uncovered fraction

If read starts are uniform and independent, a given base is covered by a read when that read starts in the L positions before it, so the depth of one base is Binomial(N, L/G), which for large G is Poisson with mean c: P(depth = j) = e^-c c^j / j!. The share of bases with no read at all is e^-c (exactly (1 - L/G)^N). At 1x about 37 % of the genome is missed, at 5x 0.67 %, at 10x 0.0045 %. To cover a fraction f you need c = -ln(1 - f): 4.6x for 99 %, 9.2x for 99.99 %.

Lander-Waterman gaps and contigs

Following Lander and Waterman (1988), a stretch of reads that overlap is a contig; between contigs lie gaps. A gap starts after a read only if no other read starts in the next L bases, which has probability e^-c, so the expected number of gaps is N e^-c = (G/L) c e^-c. This curve is not monotonic: it peaks at c = 1 (many short islands) and then falls as islands merge. Gap lengths are exponential with mean L/c; contigs are longer, with mean (L/c)(e^c - 1). If an assembler needs two reads to overlap by at least a fraction theta of L, a read is the end of a contig when the next start is more than L(1 - theta) bases away, giving N e^-c(1 - theta) contigs. The page also shows the exact discrete counts, G[(1 - D/G)^N - (1 - (D+1)/G)^N], with D = L(1 - theta).

How deep is deep enough? The k-fold fraction

Many uses need each base seen at least k times (to tell a real variant from a read error, for instance). The share of bases at depth k or more is the Poisson tail P(X >= k) = 1 - sum_{j. The page computes this three ways (a Poisson sum, a numerical integral and the exact binomial) and compares them with the simulation. With a mean of 30x some bases still fall below 20x because of Poisson spread: the standard deviation is the square root of c.

The checks on this page

The checks run on a separate 20 kb ring (larger if L is large) with your read length, threshold and target depth, 40 independent replicate runs per check, fixed seeds and a 4-standard-error tolerance. They test: the difference-array depth against per-read per-base marking, the conservation law sum of depth = N L, the agreement of two different gap counts, the uncovered fraction, the gap and contig-end counts, the depth distribution against the exact binomial (and its variance-to-mean ratio, exactly 1 - L/G, which is Poisson's 1 in the large-genome limit), and the k-fold tail. Gap statistics are checked at no more than 3.5x because above about 8x gaps have essentially vanished.

Simplifications (please read)

Real sequencing is not uniform: GC-rich and repetitive regions are covered unevenly, so real depth varies more than Poisson and needs more reads for the same completeness. Reads here have one fixed length, no sequencing errors, no paired ends, no duplicates, no chimeras, and a read is assumed to be placeable wherever it falls. Repeats longer than L cannot be resolved in real assemblies even at high coverage; here they do not exist. The genome is a small circle so there are no ends. The rates and sizes in the presets are illustrative. This is an educational model of random coverage, not a clinical or diagnostic tool and not medical advice. Reference: E. S. Lander and M. S. Waterman, "Genomic mapping by fingerprinting random clones: a mathematical analysis", Genomics 2 (1988) 231-239.

What to try
  1. Start the default run and watch the towers grow. The first graph follows the straight line log10(e^-c); while the green and cyan rings are not yet above most towers, red flags mark the gaps that remain.
  2. Choose Low-pass 1x: about 37 % of the genome is never read. Look at the third graph: the number of gaps peaks near c = 1 and then falls.
  3. Choose Draft 5x and compare the uncovered fraction with e^-5 = 0.67 %. Then press Finish the run now.
  4. Choose Very short reads (50 bases): for the same depth you need many more reads, but the uncovered fraction is almost the same. What changes is how long the gaps are (L / c).
  5. Choose Strict assembler and slide the overlap needed from 0 to 60 %: the number of contigs rises because fewer neighbouring reads count as overlapping.
  6. Choose Clinical-style 30x, then move the threshold k: the fraction of the genome at 20x or more is still below 100 % even though the mean is 30x.
  7. Press New random seed or restart with another genome length: the Poisson curve stays, only the random scatter changes.
Loading Blender model...
Uncovered fraction versus mean depth (log scale)
Depth of each base versus Poisson
Gaps and contigs versus mean depth (Lander-Waterman)
Depth along the genome
Made with 🟠 Blender · Three.js