Reads needed for a target mean sequencing depth
ngs_reads_required
Works out the reads or read pairs needed for a target mean depth, per sample and in total.
- Runs
- On the server
- Level
- Checked against a reference: Illumina 770-2011-022's printed example (6.3x from 189 million 100 bp reads on 3 Gb), run in reverse
What it is
Returns the reads or read pairs needed for a target mean depth, N = CG/L, exact and whole, per sample and in total. Use when planning how much sequencing a genome, panel or set of equal samples needs. Not for the depth a read count gives: use `ngs_coverage_depth`; for samples weighted in one pool use `ngs_pooling_plan`, one call per group of equal samples. readCountBasis and every unit are required; refuses a read longer than the genome.
Field: Sequencing and 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.targetDepth(required): Target mean depth. Must be above 0 x.readCountBasis(required): Whether read counts are single reads or read pairs (a pair is two reads). Required, never assumed.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.
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.
- Reads for a target mean depth only, on the haploid genome or target length: a diploid size doubles the count; coverage is uneven, so more reads are needed for every base to reach that depth, and this tool does not estimate how many; every read is counted as usable unless duplicate and usable fractions are stated, so without them the count is a lower bound.
- 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.
- a reported whole count (reads, or read pairs when pairs are asked for), per sample or in total (samples × the per-sample ceiling), is above 2^53 − 1 = 9007199254740991, the largest n for which n and n + 1 are both exact.
Every input, with its units7 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.targetDepth(required): Target mean depth. Must be above 0 x.readCountBasis(required): Whether read counts are single reads or read pairs (a pair is two reads). Required, never assumed.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.sampleCount: Number of samples, each needing the same depth of the same genome. Must be at least 1. If absent: 1, echoed as not stated.
Every refusal, with its code2 refusals
| Code | When |
|---|---|
READ_LONGER_THAN_GENOME | the read length exceeds the genome or target size. |
READS_ABOVE_RANGE | a reported whole count (reads, or read pairs when pairs are asked for), per sample or in total (samples × the per-sample ceiling), is above 2^53 − 1 = 9007199254740991, the largest n for which n and n + 1 are both exact. |
The calculation
The method's equations, constants and worked example.
N = C × G / (L × f) (C = LN/G, Illumina 770-2011-022 p. 1, solved for N)
f = (1 − d) × u, read pairs = N / 2 and total whole = samples × ceil(N per sample) are the record's own construction
kb, Mb and Gb are 10^3, 10^6 and 10^9 bp (decimal)
every input is read as the exact value of its shortest decimal, and N, its ceiling and READS_ABOVE_RANGE are decided on that exact value
order of checks: the kit's checks of each argument (missing, number, unit, range), then READ_LONGER_THAN_GENOME, then READS_ABOVE_RANGE
| Symbol | Meaning |
|---|---|
N | reads needed |
C | target mean depth, x |
G | the haploid genome length, or the length of a defined target (Illumina 770-2011-022 p. 1), bp |
L | length of one read, bp |
d | duplicate fraction, 0 when not stated |
u | usable fraction, 1 when not stated |
samples | number of samples, 1 when not stated |
Source 1.
A definition, not a model: the equation states what the quantity means. A different convention gives a different number.
Worked example
Worked example: one case of ngs-reads-required@1.1.1, 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 = 3 Gb
- readLength = 100 bp
- targetDepth = 6.3 x
- readCountBasis = reads
Steps
- N = 1.89e8, from targetDepth, genomeSize, readLength; by the equation above; gives result.perSample.readsNeeded.
The working, as the case writes it:
the source's printed example run in reverse (Illumina 770-2011-022 p. 1): N = C G / L = 6.3 x 3e9 bp / 100 bp = 189,000,000 reads, exactly, since 189e6 x 100 / 3e9 = 6.3 (worked by hand by the raising builder, 14 November 2026)
Answer
result.perSample.readsNeeded = 1.89e8
Where these values came from: our own exact-arithmetic script and a hand-worked case; the second implementation's run(arguments).
At build the tool returned this answer within the tolerance the file states: relative 1e-15 on reads (near zero: absolute 1e-15 below 1); whole counts, statuses, codes and strings exact.
Sources
Illumina Technical Note: Sequencing, "Estimating Sequencing Coverage", Pub. No. 770-2011-022
Used for: Reads needed for a target mean sequencing depth. 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
How it is checked
- Level
Checked against a reference.
- Checked against
Our own exact-arithmetic script and a hand-worked case.
- Cases
No case set is linked to this version.
- Not checked
How many more reads give every base the target depth (not estimated); per-sample yield in a multiplexed run.
Changes to its methods0 changes
No change is logged for these method versions.