# Mean sequencing depth and Poisson coverage fractions from a read count

`ngs_coverage_depth` · Runs: On the server · Level: Checked against a reference: Illumina Technical Note 770-2011-022's worked example (depth 6.3, P(Y=3) and the uncovered fraction at the note's precision), and mpmath's regularized upper gamma on the tail cases

Works out mean sequencing depth from a read count, with modelled coverage fractions.

Research and education software; not medical advice, and not for diagnosis or treatment decisions. It computes from the inputs it receives. It does not check the person's data, design or sample.

[Catalogue](https://www.drybench.com/mcp/catalogue) / [Genomics](https://www.drybench.com/mcp/catalogue/genomics)

[Ask your assistant](https://www.drybench.com/mcp/connect)

```cite
Mean sequencing depth and Poisson coverage fractions from a read count (ngs_coverage_depth), Drybench MCP server 1.0.0; ngs-coverage-depth@2.0.0 (Checked against a reference); https://www.drybench.com/mcp/tools/ngs-coverage-depth
```

## What it is

Returns mean depth C = LN/G from a read count, with the Lander-Waterman Poisson coverage fractions as a model. Use when checking what depth a run or a lane gives, and what share of bases reaches a depth. Not for reads needed for a target depth: use \`ngs\_reads\_required\`. readCountBasis (reads or read pairs) and every unit are required; refuses a read longer than the genome.

Field: [Sequencing and genomics](https://www.drybench.com/mcp/catalogue/genomics).

## What it does

**You give**

- `genomeSize` (required): Haploid genome or target region size. Must be above 0 bp.
- `readLength` (required): Length of one read (a 2 x 150 run has 150 bp reads). Must be above 0 bp.
- `readCount` (required): Number of reads, or of read pairs, as readCountBasis says. Must be at least 1.
- `readCountBasis` (required): Whether read counts are single reads or read pairs (a pair is two reads). Required, never assumed.
- `depthThresholds` (required): Depths at which to report the Poisson fraction of bases at that depth or more.
- `duplicateFraction`: Fraction of reads that are duplicates, removed before depth; applied only when stated. Must be at least 0 and below 1. Optional.

and 1 more, listed below

No request is recorded for this tool.

**Limits**

- Research arithmetic for planning sequencing libraries and runs and for genomic coordinate bookkeeping; it does arithmetic on the inputs it receives, and does not measure the library, the instrument or the data.
- Mean depth is arithmetic and counts every read as usable unless duplicate and usable fractions are stated; overlapping mates count twice.
- The Poisson fractions are a model, not a measurement: they assume reads land uniformly and independently (Lander and Waterman 1988, cited through Illumina note 770-2011-022; the paper is unread).
- No measured prediction error is available.
- Real libraries are overdispersed (GC content, mappability, duplicates, paired mates placed together), so the fraction reaching a depth is usually lower, and the uncovered fraction usually higher, than this model gives.
- The expected gap count is not reported.
- Every computed number a reply returns, other than an integer or an exact decimal, is rounded once to 12 significant figures: to the nearest, a change of at most 5 × 10⁻¹² of its value, except that a lower bound is rounded down and an upper bound up, a change of less than 1 × 10⁻¹¹; the method computes, and decides any pass or fail, on the unrounded value.

**It will not answer when**

- the read length exceeds the genome or target size.

### Every input, with its units

7 inputs

- `genomeSize` (required): Haploid genome or target region size. Must be above 0 bp.
- `readLength` (required): Length of one read (a 2 x 150 run has 150 bp reads). Must be above 0 bp.
- `readCount` (required): Number of reads, or of read pairs, as readCountBasis says. Must be at least 1.
- `readCountBasis` (required): Whether read counts are single reads or read pairs (a pair is two reads). Required, never assumed.
- `depthThresholds` (required): Depths at which to report the Poisson fraction of bases at that depth or more.
- `duplicateFraction`: Fraction of reads that are duplicates, removed before depth; applied only when stated. Must be at least 0 and below 1. Optional.
- `usableFraction`: Fraction of the reads left after duplicates that count (e.g. on target, mapped); applied only when stated. Must be above 0 and at most 1. Optional.

### Every refusal, with its code

1 refusal

| Code | When |
| --- | --- |
| `READ_LONGER_THAN_GENOME` | the read length exceeds the genome or target size. |

## The calculation

The method's equations, constants and worked example.

### [Mean sequencing depth from a read count, with Lander–Waterman Poisson coverage fractions](https://www.drybench.com/methods/m/ngs-coverage-depth/2.0.0)

`ngs-coverage-depth@2.0.0`

**Equation 1**

```text
C = L × N_used / G (C = LN/G, Illumina 770-2011-022 p. 1)
N_used = N × (2 if read pairs) × (1 − d) × u, d and u applied only when stated: the ×2 for read pairs is implied by the note's calculator text only, and (1 − d)u is the record's own construction
G is the haploid genome length, or the length of a defined target (p. 1)
kb, Mb and Gb are 10^3, 10^6 and 10^9 bp (decimal)
inputs are read as the exact value of their shortest decimal, and READ_LONGER_THAN_GENOME is decided on that value, while meanDepth, readsUsed and the Poisson fractions are in double precision
order of checks: the kit's checks of each argument (missing, number, unit, range), then READ_LONGER_THAN_GENOME, then the Poisson series
```

| Symbol | Meaning |
| --- | --- |
| `C` | mean depth, x |
| `L` | length of one read, bp |
| `N` | read count in the stated basis |
| `G` | genome or target size, bp |
| `d` | duplicate fraction |
| `u` | usable fraction of the reads left after duplicates |

Source 1.

**Equation 2**

```text
P(depth = y) = C^y e^-C / y!
uncovered fraction = e^-C, log10 uncovered fraction = -C / ln 10, uncovered length = G e^-C
P(depth ≥ k) = Σ_{y≥k} P(y), summed as Σ_{y≥k} t_y / Σ_y t_y with t_y = P(y)/P(mode), so neither tail cancels (this ratio-sum tail is the record's own construction)
the note also estimates the gap count as N·e^−C (p. 2, with no minimum overlap), withheld in this version: its printed 378,000 uses the uncovered fraction rounded to 0.2 %, where the model gives about 347,000
```

| Symbol | Meaning |
| --- | --- |
| `y` | depth at a base |
| `k` | threshold depth |

Source 1.

A model of nature: it predicts a measurement and can be wrong for your sample. No prediction error is available.

**Worked example**

Worked example: one case of ngs-coverage-depth\@2.0.0, from its inputs through each step to the answer. Values are written as a person writes them; the working carries more digits, so your own figure may differ in the last digit shown.

**Inputs**

- genomeSize = 3000000000 bp
- readLength = 100 bp
- readCount = 189000000
- readCountBasis = reads
- depthThresholds\[0\] = 1
- depthThresholds\[1\] = 4
- depthThresholds\[2\] = 10

**Steps**

1. C = 6.3 x, from readLength, readCount, genomeSize; by equation 1; gives result.meanDepth.
2. u = 0.0018363048, from C; by equation 2; gives result.model.uncoveredFraction.

The working, as the case writes it:

```text
C = (100 bp)(189 x 10^6)/(3 x 10^9 bp) = 6.3, as printed. The note's P(Y=3) = 0.077 matches the unrounded 0.076527 at three places. Its P(Y<=3) = 0.077 + 0.036 + 0.012 + 0.002 = 0.127 is a sum of terms each rounded to three places
the unrounded value is 0.126374 (rounds to 0.126): it does not match and is not asserted (Drybench ruling, 10 November 2026, ruling 2). Uncovered 0.2 % matches the unrounded 0.1836 % at the note's precision. The note's 6,000,000 bp and 378,000 gaps use 0.2 % first
unrounded 5.509e6 bp and 347,062 (gaps are withheld from 1.0.0).
```

**Answer**

- result.meanDepth = 6.3 x
- result.model.uncoveredFraction = 0.0018363048

Where these values came from: the source's own worked example, Illumina Technical Note 770-2011-022 (Pub. No. 770-2011-022, current as of 1 December 2014), page 1 'Coverage Equation' (C = LN/G; C = (100 bp)(189e6)/(3e9 bp) = 6.3) and page 2 (Poisson P(Y=y) = C^y e^-C / y!; P(Y=3), P(Y\<=3), the uncovered fraction), read in full 10 November 2026; Illumina Technical Note 770-2011-022 (current as of 1 December 2014), page 1 'Coverage Equation' and page 2 (Poisson), read in full 10 November 2026.

At build the tool returned this answer within the tolerance the file states: mean depth and reads relative 1e-15 (near zero: absolute 1e-24 below 1e-9, in x for depth and 1 for reads and depth thresholds); Poisson fractions and lengths relative 1e-12 (exact below 1e-300, where values are withheld); log10 values absolute 1e-9; statuses, codes, units, counts and withheld rules exact.

Who worked this case: not recorded.

## Sources

1. Illumina Technical Note: Sequencing, "Estimating Sequencing Coverage", Pub. No. 770-2011-022 Used for: Mean sequencing depth from a read count, with Lander–Waterman Poisson coverage fractions. At: equation Coverage Equation C = LN/G and the Poisson P(Y = y) = C^y e^-C / y!, p. 1 to 2. **Read in full, 11 November 2026**

Read by AI-assisted sessions. No person has checked these readings.

## How it is checked

**Level:** Checked against a reference.

**Checked against:** Our own exact-arithmetic script and a hand-worked case; the source's own worked example, CPython standard library (fractions, decimal), 3.13.18.

**Cases:** No case set is linked to this version.

**Not checked:** Lander and Waterman 1988 itself (unread: the Poisson model is cited through Illumina's note); the fit of the Poisson model to any real library (overdispersion); targeted panels' on-target rates beyond the stated usable fraction.

No independent scientist has yet reviewed this.

### Changes to its methods

1 change

- [14 November 2026, ngs-coverage-depth\@2.0.0](https://www.drybench.com/methods/corrections#2026-11-14-ngs-coverage-depth200-1): In 2.0.0 each value below 1e-300 is withheld with its own reason: the tail fraction's says it is not given in log form, and the uncovered length's names genomeSize. expectedGaps stays withheld, with a reason that names the note's estimate N·e^−C. The record lists the three withholdings, the decimal reading of inputs, the unit factors and the order of checks.
