The Batch You Cannot Correct
Zetobit Bioinformatics Insight Series · No. 13
The Batch You Cannot Correct
Batch correction is a statistical procedure, not a time machine. When technical batch aligns with biological group, no algorithm recovers the separation — it only obscures which one you are measuring.
A client sends a cohort. Fifty tumors, fifty normals, RNA-seq. The tumors were collected first, extracted in March, sequenced on one flow cell. The normals arrived in June, extracted by a different technician, sequenced on another. The analyst opens the counts, runs a PCA, and finds the first component splits the samples cleanly in two.
That component is real. It is also uninterpretable — because the thing it separates is simultaneously tumor versus normal and March versus June. There is no operation on the count matrix that can tell you which. The information required to distinguish them was never collected.
This is the fact that most discussions of batch effects manage to avoid stating plainly. Batch correction is presented as a preprocessing hurdle: pick the right method, apply it, proceed. But the methods are not the interesting part. The design is. And by the time the data reaches a bioinformatician, the design is already fixed.
The mechanism
Where the artifact enters
Batch effects arise because high-throughput measurements are not neutral readouts of biology. They are the joint product of biology and the conditions under which the assay was performed — laboratory environment, reagent lots, operator, instrument, and the calendar date on which the sample happened to be processed1. Each of these introduces systematic, correlated shifts across thousands of features at once.
Considered alone, this is a nuisance: added variance, reduced power, wider confidence intervals. Annoying, tractable, and honest. The failure mode is different in kind. It occurs when the batch variable is correlated with the outcome of interest, at which point technical shift becomes indistinguishable from biological difference and produces conclusions that are not merely imprecise but wrong1.
The distinction matters because the two situations call for opposite responses. Unconfounded batch effects are a variance problem: model them, absorb them, accept the power cost. Confounded batch effects are an identifiability problem: no amount of modeling recovers a parameter the data cannot separate.
The correction paradox
What ComBat actually does to your p-values
ComBat and its descendants are used almost reflexively. They also carry a documented failure mode that is rarely disclosed in methods sections. When study groups are unevenly distributed across batches, genuine group differences generate apparent batch differences — and the adjustment then removes part of the biological signal, or, worse, inflates confidence in what remains2.
The mechanism is not exotic. Batch correction is a two-step procedure: estimate a batch mean (and, in ComBat's case, a batch variance) from all the samples in that batch, subtract it, then hand the adjusted matrix to a downstream test that assumes independent observations. But every adjusted value in a batch is now a function of every other value in that batch — the residuals are correlated, and a downstream model that ignores this correlation underestimates residual error and returns artificially small p-values3. The inflation grows as the design becomes more unbalanced3.
The published demonstration is uncomfortable. In a reanalysis of a real expression dataset, a ComBat-based pipeline reported over a thousand differentially expressed probesets where an alternative treatment — batch as a fixed effect, technical replicates averaged — recovered eleven4. Two defensible analyses of the same data differed by two orders of magnitude in the size of the answer.
The effect is not confined to expression arrays. In simulated methylation data, ComBat correction of randomly generated samples produced substantial numbers of FDR- and Bonferroni-significant false positives in both unbalanced and balanced designs, with the count rising sharply as more batch factors were corrected; larger sample sizes reduced but did not eliminate the effect5. The tool is not defective. It is being asked to do something the data cannot support.
The operational distinction
Absorb, adjust, or abandon
A useful discipline is to classify every study by what its design permits before choosing a method, rather than choosing a method and hoping the design cooperates.
| Regime | Diagnostic | Defensible action | What fails |
|---|---|---|---|
| Orthogonal | Each group is represented in each batch in roughly equal proportion | Include batch as a covariate in the design matrix; fit one model | Nothing structural. Power cost only. |
| Collinear | Groups present in all batches, but proportions differ substantially | One-step model with batch term; report the collinearity; widen inference | Two-step correction followed by a naïve test. This is where FPR inflates. |
| Confounded | At least one batch contains only one group | Report the confound. Do not estimate the effect. Re-sequence a bridging subset. | Every method. Including the ones that appear to work. |
~ batch + condition — and let the model estimate both simultaneously. Correction-then-test is a convenience that costs calibration. Reserve corrected matrices for visualization and clustering, where no p-value is being claimed.
Design is the only correction
What to do before the library prep
The uncomfortable implication of everything above is that the highest-leverage bioinformatics decision in an omics study is made months before any bioinformatician sees a FASTQ. It is the allocation of samples to batches.
- Randomize within stratum, don't randomize globally. Simple randomization on a small cohort produces confounded allocations by chance with non-trivial probability. Stratify on the primary contrast — and on the covariates you already know you will need to adjust for — then randomize within each stratum.
- Never let collection order become processing order. Retrospective cohorts almost always arrive time-ordered, and time is the most efficient confounder available: it correlates with reagent lot, protocol drift, instrument service, and often with disease severity and treatment era.
- Bridge every batch. A small number of technical replicates — the same biological material, processed in every batch — converts an unidentifiable batch parameter into an estimable one. This is the single cheapest insurance in the entire workflow, and it is routinely skipped.
- Record the batch variables you think are irrelevant. Extraction date, kit lot, operator, plate position, flow cell, freeze-thaw count. The cost of recording them is zero. The cost of discovering, after the fact, that plate row explains PC2 is the study.
The honest summary
Two claims that are not the same
A batch-corrected result licenses one of two statements, and they are separated by the study design, not by the software:
The observed difference between groups is not attributable to the batch structure we recorded. This is defensible when the design is orthogonal, the batch term sits in the model, and the collinearity is reported.
The observed difference between groups is biological. This is a stronger claim, and a confounded design cannot support it — no matter how clean the corrected PCA looks. The PCA looks clean because the correction was told which axis to flatten. That is the algorithm doing what it was asked, not evidence that the artifact was ever separable from the signal.
Good bioinformatics does not conceal this. It surfaces the design table before the volcano plot, states which of the two claims the data can support, and — when the answer is neither — says so early enough that a bridging run is still affordable.
Designing a study, or inheriting one?
Zetobit reviews cohort design, batch allocation, and analysis plans for clinical and translational omics programs — before data generation, or in triage after. We tell you what your design can and cannot answer.
Start a conversation →References
- Leek, J.T., Scharpf, R.B., Bravo, H.C., Simcha, D., Langmead, B., Johnson, W.E., Geman, D., Baggerly, K. & Irizarry, R.A. Tackling the widespread and critical impact of batch effects in high-throughput data. Nature Reviews Genetics 11, 733–739 (2010). doi:10.1038/nrg2825
- Nygaard, V., Rødland, E.A. & Hovig, E. Methods that remove batch effects while retaining group differences may lead to exaggerated confidence in downstream analyses. Biostatistics 17(1), 29–39 (2016). doi:10.1093/biostatistics/kxv027
- Li, T., Zhang, Y., Patil, P. & Johnson, W.E. Overcoming the impacts of two-step batch effect correction on gene expression estimation and inference. Biostatistics 24(3), 635–652 (2023). doi:10.1093/biostatistics/kxab039
- Towfic, F., Kusko, R. & Zeskind, B. Letter to the Editor response: Nygaard et al. Biostatistics 18(2), 197–199 (2017). doi:10.1093/biostatistics/kxw031
- Zindler, T., Frieling, H., Neyazi, A., Bleich, S. & Friedel, E. Simulating ComBat: how batch correction can lead to the systematic introduction of false positive results in DNA methylation microarray studies. BMC Bioinformatics 21, 271 (2020). doi:10.1186/s12859-020-03559-6

