Why replicate structure matters
A gene’s counts vary for several reasons. Reads are sampled from a finite library; cell capture and library preparation can differ across preparations; and expression can genuinely differ among biological samples. These sources can all produce variation in observed counts, but they are not interchangeable. A design with repeated sequencing of one library can assess a different part of the measurement process than a design with independently collected biological samples.
The key question is therefore not simply how many replicates were measured, but what was replicated and at what stage? Replicate structure determines which sources of variation can be estimated and which remain bundled together. In this tutorial, comparisons concern the same gene and, where relevant, the same cell type. Counts must be interpreted on a comparable scale, with sequencing exposure and other relevant differences accounted for.
What each design can reveal
A within-library technical replicate might be produced by sequencing aliquots of the same prepared library separately. If the aliquots are comparable and sequencing is independent, differences between their counts reflect sequencing and sampling variation, along with any technical differences introduced after the split. They do not reveal variation in cell capture or library preparation that occurred before the split: both aliquots share that history. Splitting one library across lanes is therefore not equivalent to preparing two independent libraries.
Independent cell captures from the same specimen include more of the workflow. They can reveal variability associated with capturing cells and processing separate preparations, as well as downstream technical and sampling noise. But they share the biological source. Differences between captures do not, by themselves, estimate variation among donors or animals.
Biological replicates allow estimation of variation among biological units, provided the units are independently sampled and the design is not confounded with batch or another systematic difference. If each biological sample is processed only once, between-sample variation combines genuine biological differences with capture, preparation, and measurement variation. Replication within samples can help distinguish these components.
| Design | What is repeated? | Variation it can help reveal | What it cannot isolate by itself |
|---|---|---|---|
| Within-library technical repeats | Measurement of the same prepared library | Sequencing and post-split measurement variation | Variation introduced before the split; biological variation |
| Independent cell captures | Separate captures or preparations from the same biological sample | Capture and preparation variation, plus downstream noise | Variation among biological samples |
| Biological replicates | Independent donors, animals, or other biological units | Variation among biological units, in addition to technical variation | Biological variation separated from technical variation unless the design also includes technical replication |
A nested view of count variation
For a fixed gene, a useful conceptual design has biological sample \(b\), independent capture \(c\) within that sample, and technical repeat \(t\) within that capture. Let \(Y_{bct}\) denote a count or a count-derived measurement on a common exposure-adjusted scale. A simple variance-components description is
Here \(\mu\) is the overall mean; \(B_b\) represents deviation associated with biological sample \(b\); \(C_{bc}\) represents additional variation associated with capture \(c\) within sample \(b\); \(T_{bct}\) represents technical differences between repeated measurements; and \(\varepsilon_{bct}\) represents residual count-sampling variation not otherwise separated. This is a conceptual additive model, not a claim that raw counts are normally distributed. In count data, the mean and sampling variance depend on exposure and abundance, and a count model such as a Poisson or negative binomial model may be appropriate.
If the components are centered, mutually independent, and have finite variances, then their variances add:
The independence and common-scale conditions matter. For example, systematic batch effects shared by all technical repeats in one batch are not independent repeat-to-repeat noise. Likewise, a higher sequencing depth can raise raw counts without indicating higher expression. Variance comparisons therefore require a design and analysis that account for exposure, batch, and other relevant differences.
Why nested replication helps separate sources
A balanced nested design can use differences at each level to learn about distinct components. Technical repeats within the same capture share the biological sample and capture, so their variability informs the within-capture component. Capture means within a biological sample vary due to capture-level differences and measurement noise. Biological-sample means vary due to biological differences as well as uncertainty remaining in those means.
The principle follows from the variance of an average. Suppose each capture has \(m\) independent technical measurements with variance \(\sigma_T^2+\sigma_{\varepsilon}^2\). The average of those measurements has technical-plus-residual variance \((\sigma_T^2+\sigma_{\varepsilon}^2)/m\). Averaging can reduce independent measurement noise, but it does not remove a capture effect shared by all repeats.
This conditional result assumes the technical and residual deviations are independent across repeats and have the same variance. If repeated measurements share a technical effect, the covariance between repeats is not zero, and averaging reduces variance less than this formula suggests. The design identifies variance components only to the extent that each relevant level has replication and the model’s assumptions are reasonable.
Worked Example: Two Sequencing Splits From One Library
Suppose one prepared library is divided into two equal aliquots and independently sequenced. For a gene, the split counts are 48 and 52 reads. Assume the split counts are conditioned on a fixed total of 100 reads for this gene across the two aliquots, with equal sequencing allocation and no systematic difference between aliquots. Then the count in the first split has a binomial sampling model with \(n=100\) and \(p=0.5\).
The expected count in the first split is \(np=100(0.5)=50\), and its variance is \(np(1-p)=100(0.5)(0.5)=25\), giving a standard deviation of \(\sqrt{25}=5\) reads. The observed difference between the split counts is \(52-48=4\) reads. That difference is compatible with ordinary allocation variation on this scale; it is not, by itself, evidence of a biological difference.
This comparison assesses variation arising at or after the library split under the stated assumptions. It cannot assess cell-capture differences or library-preparation variation before the split, because both aliquots share those steps. The fixed-total, equal-allocation assumption is important: unequal aliquot sizes or sequencing depths would require an exposure-adjusted comparison rather than this simple binomial calculation.
Worked Example: Independent Captures From One Specimen
Imagine three independent captures from the same specimen, each measured at comparable cell number and sequencing exposure. A gene has counts 6, 10, and 14. Treat these as illustrative counts on a common scale and use a Poisson mean-variance benchmark for the sampling component. The captures are independent preparations, but they share the same biological source.
The mean is \(\bar{x}=(6+10+14)/3=10\) counts. The sample variance is \(s^2=[(6-10)^2+(10-10)^2+(14-10)^2]/(3-1)=(16+0+16)/2=16\) counts squared. Under a Poisson benchmark with mean 10, the expected sampling variance is 10 counts squared. A simple method-of-moments estimate of additional between-capture variance is therefore \(16-10=6\) counts squared.
This estimate is only a rough diagnostic: with three captures, the sample variance is highly uncertain, and the Poisson benchmark may not describe all count variation. The estimate does not establish that the extra variation is biological, because the captures came from the same specimen. It is evidence, at most, of variation beyond the specified Poisson sampling benchmark across these preparations.
Worked Example: Biological Samples With Replicated Captures
Suppose two biological samples each have two independent captures, measured on a common exposure-adjusted scale. For one gene, sample A has capture values 8 and 12; sample B has values 18 and 22. This small hypothetical dataset illustrates the distinction between within-sample and between-sample variation. It is not enough to support a stable variance estimate.
The capture means are \((8+12)/2=10\) for A and \((18+22)/2=20\) for B. The grand mean is \((8+12+18+22)/4=15\). The sample variance of the two capture means is \([(10-15)^2+(20-15)^2]/(2-1)=50\) counts squared.
Within each sample, the two capture values differ from their sample mean by \(-2\) and \(2\). Across both samples, the sum of squared within-sample deviations is \(4+4+4+4=16\). With \(2(2-1)=2\) within-sample degrees of freedom, the pooled within-sample variance is \(16/2=8\) counts squared. Under a simple balanced random-intercept model, the variance of a sample mean due to within-sample variation is \(8/2=4\). A rough method-of-moments estimate of between-sample variance is thus \(50-4=46\) counts squared.
The estimate indicates that the two sample means are far apart relative to the within-sample variation in this toy dataset. It does not prove that the difference is biological: batch, donor characteristics, cell composition, or other confounding could explain it. With only two biological samples, the estimate is especially unstable. More independent biological replicates are needed for a dependable estimate of population-level biological variability.
Diagnostics, limitations, and common mistakes
Before interpreting replicate variation, check what was actually replicated and whether comparisons are on a comparable scale. Record whether samples share a library, capture, specimen, or biological unit. Check sequencing depth, cell number, library quality, and batch allocation. Differences in these factors can create apparent variation or obscure real variation. For count data, inspect whether the mean-variance pattern is consistent with the assumed count model; the earlier material on negative binomial dispersion provides context for variation beyond a Poisson benchmark.
A variance component at a higher level can be difficult to estimate when there are few independent units. Estimates may be near zero, highly uncertain, or sensitive to a single sample. A negative method-of-moments estimate can arise from sampling variability; it is not a meaningful negative variance. Constrained estimation may report zero, but that does not prove the component is absent. Replicate design and uncertainty should be reported alongside any point estimate.
- Counting cells as biological replicates. Cells from one donor share biological context and are not independent biological units for inference about a population of donors. Treating them as such can make uncertainty appear too small.
- Counting sequencing lanes as independent samples. Lanes from the same library share upstream preparation. They can assess some sequencing variation but cannot replace independent captures or biological replicates.
- Calling all between-capture variation biological. Independent captures from one specimen also differ in capture and preparation. Their variation is not a direct estimate of between-donor variation.
- Comparing raw counts at unequal depth. A larger count may reflect greater sequencing exposure rather than greater abundance. Use a suitable count model or exposure adjustment before attributing differences to a variance component.
- Assuming replication alone guarantees identification. A design needs replication at the levels whose components are to be separated, and those levels must not be perfectly confounded with batch or condition.
The main alternative to a nested variance-components analysis is to summarize data at one level—for example, aggregate cells within each biological sample—and analyze those summaries. This can be a sensible way to preserve the biological sample as the unit of replication, but it combines cell-capture and technical variation unless those levels are separately replicated. A hierarchical count model can represent nested levels directly, but it requires adequate replication and defensible distributional assumptions. Neither approach can recover a component that the design does not distinguish.
Check Your Understanding
Answer each question, then compare with the brief solutions.
- A prepared library is sequenced on two lanes. Which sources of variation can the lane comparison help assess, and which can it not assess?
- Four captures from one donor show different counts for a gene. Can their variability estimate variation among donors? Why or why not?
- In a balanced design, each capture has four independent technical measurements with variance 12 counts squared. What is the variance of their average due to this component?
- Why is it not valid to claim that 500 cells from one donor provide 500 independent biological replicates?
Solutions. 1. It can help assess sequencing and other post-split measurement variation, but not variation from cell capture, library preparation, or biology that occurred before the split. 2. No. The captures share one donor; their differences can reflect capture and preparation as well as downstream noise, but they do not reveal between-donor variation. 3. Under independence, the variance is \(12/4=3\) counts squared. 4. Cells from one donor share biological context, so they are not independent draws of biological units; treating them as independent donor-level replicates exaggerates the effective replication.