Technical Variation & Confounders

Technical variation can enter at any point in the experimental design, often long before any software is involved. The table below outlines common sources organized by where they occur.

Why systematic variation is a real problem

Individual technical differences are often unavoidable. The danger is when technical variation is correlated with your biological groups. When this happens, it becomes indistinguishable from the signal you are trying to measure.

NoteA census analogy

Imagine two cities with similar geography, climate, and population size. Two census takers are each sent to one city to record occupants’ last names by knocking on doors.

  • Census Taker A goes out on a rainy, cold Monday morning.
  • Census Taker B goes out on a clear 70°F evening.

The data come back and City A appears to have more Johnsons than City B. But is that a real demographic difference, or does the Johnson family simply work outside the home and was not there to answer the door on a Monday morning?

The same logic applies to microbiome studies. If control samples are processed in one batch and treated samples in another, if different primers are used for cases versus controls, or if pre-treatment samples are collected in one building and post-treatment samples in another, there is no way to separate biological signal from technical variation.

To mitigate these issues, it is important that we stratify these variables, or spread them evenly across biological groups, when we can and at least keep record of them in cases in which we cannot. This allows us to check for their influence and, if necessary, adjust for them in our analyses downstream. While adjusting for every variable is not possible, we definitely cannot adjust for anything that was not recorded.

Common sources of technical variation

Stage Variable Why it matters
Collection Site / facility Different hospital wings, clinics, or rooms have different ambient microbiomes, cleaning protocols, and personnel practices. Two “healthy controls” from different sites can differ for purely logistical reasons.
Collection Swab type Affects how much biomass is recovered and which taxa adhere.
Collection Time of day Oral and gut communities shift measurably across the day.
Collection Time to storage A sample left at room temperature for 2 hours before freezing looks different from one frozen immediately.
Transport & Storage Temperature excursions Differential cell lysis during shipping: some taxa are more fragile than others. A common hidden variable in multi-site studies.
Transport & Storage Storage duration Communities degrade over time; longer storage selectively depletes fragile taxa.
DNA Extraction Kit manufacturer Different kits lyse cells with different efficiency. Gram-positive bacteria are notoriously difficult to break open, so kit choice directly shapes which taxa appear in your data.
DNA Extraction Operator variability Even the same kit in the same lab can produce different yields depending on who runs it and when.
Library Preparation Primer choice Determines which region of the 16S gene is amplified, creating systematic biases toward certain taxa and blind spots for others.
Library Preparation PCR cycles More cycles introduce more chimeric sequences and amplification artifacts.
Sequencing Sequencing depth Total reads per sample varies across samples and runs, directly affecting detection of low-abundance taxa.
Sequencing Multiplexing How many samples share a run affects per-sample depth.
Sequencing Read type Short vs. long read and single vs. paired-end affect taxonomic resolution.

This is a non-comprehensive list. The key point: by the time data reaches your analysis pipeline, it carries the fingerprints of every decision made upstream.

CautionMitigating batch effects

Here you can see what a set of samples run in two batches looks like when the researcher does and does not confound the treatment group with batch. These are dimension reduction plots that indicate one sample per point. The closer the points are together, the more similar they are. Ideally, we see separation of points by their biological groups (second plot) but not by the batch they were run in (first plot). This indicates that there seems to be a biological difference between treatment and control samples that is not explained by batch processing differences.

Here is a brief example of how to check for batch effects in R using the phyloseq package. This assumes you have a phyloseq object called physeq with sample metadata that includes a “batch” variable and a “treatment” variable.

library(phyloseq)

ord <- ordinate(physeq, method = "PCoA", distance = "bray")

plot_ordination(physeq, ord, color = "variable_of_interest")

See the phyloseq ordination tutorial for further options.

The key principle: balance your treatment groups across batches. If every case is extracted in January and every control in February, you will never be able to separate the effect of your treatment from the effect of processing date.