Why Use Technical Controls for Batch Adjustment?
When samples are processed in different batches, observed differences can combine biological variation with technical shifts. A technical control provides a reference: if the same material is measured in each batch, a difference between its batch means is evidence of a technical shift on the measurement scale being analyzed. This offers a direct way to estimate batch offsets without using the distribution of the study samples themselves.
The method in this tutorial is a feature-by-feature additive adjustment. It is useful when controls are comparable across batches and an additive batch effect is plausible on the chosen scale. It does not establish that every batch effect is additive, nor can it resolve a design in which biological groups and batches are completely confounded.
Model, Assumptions, and Adjustment
For a biological sample, write the measurement model as
where \(\mu_{ij}\) is the sample's value absent the batch shift, and \(\epsilon_{ij}\) is measurement error with mean zero under the model. Choose batch 1 as the reference and set \(\delta_{j1}=0\). For a common technical control with feature value \(\theta_j\), its measurements satisfy
where \(r\) indexes control replicates in batch \(b\). The value \(\theta_j\) is constant across batches, but need not be known. If there are \(m_{jb}\) control replicates, let \(\bar Y^{(C)}_{jb}\) be their mean. Estimate the offset relative to the reference batch by
Then adjust every sample measured in batch \(b\) by subtracting that feature's estimated offset:
This procedure relies on substantive conditions. Controls must represent the same material across batches, or have known expected values that permit batch deviations to be calculated. Each relevant batch needs controls, the controls must be measured on a comparable scale and protocol, and an additive shift must be a reasonable description for each feature. The adjustment also assumes that the control-derived shift applies to study samples in that batch. In particular, it does not accommodate a technical effect that changes with sample type unless that interaction is explicitly modeled.
Worked Example: Estimating and Applying One Feature's Offset
Suppose a hypothetical study measures one feature in two batches. The same reference material is run twice in each batch. Its control values are 10 and 12 units in batch 1, and 14 and 16 units in batch 2. A biological sample has value 20 units in batch 1; another has value 27 units in batch 2. Assume the reference material is comparable between batches and an additive shift is suitable for this feature.
The control means are
Taking batch 1 as the reference gives \(\hat{\delta}_{j1}=0\) and
The batch 1 biological measurement remains \(20-0=20\) units. The batch 2 measurement becomes \(27-4=23\) units. Thus the estimated technical shift is four units, and the adjusted batch 2 value is 23 units on the reference-batch scale. This calculation does not show that the two biological samples should have equal values: they are different samples, and their biological values may differ.
Why the Control Difference Estimates a Batch Offset
The control calculation follows directly from the model. For a common control, the mean in batch \(b\) is \(\theta_j+\delta_{jb}\) plus mean measurement error. Subtracting the reference-batch mean cancels the common control value:
where the last equality uses \(\delta_{j1}=0\). Hence the estimated difference targets the batch offset relative to batch 1. The argument requires the control's expected value to be the same in both batches and measurement errors to have mean zero. More replicates can reduce the sampling variability of the control means, but they cannot correct a mismatch in control material or an invalid additive model.
If controls have different known target values, compare each observed control value with its own target rather than treating the controls as interchangeable. For example, if control type \(c\) has known target \(\theta_{jc}\), calculate its residual \(Y^{(C)}_{jcb}-\theta_{jc}\). Averaging these residuals within batch estimates that batch's offset, provided the controls share the same additive batch shift. The target values must be on the same analysis scale as the measurements.
Worked Adjustment Across Two Omics Blocks
Worked Example: Adjusting Multiple Features Separately
Consider a hypothetical matched study with one transcript feature and one metabolite feature measured in three batches. For each feature, two replicates of the same control material are measured in each batch. The following table gives those control observations and one biological sample value from each of batches 2 and 3.
| Feature | Batch 1 control | Batch 2 control | Batch 3 control | Batch 2 biological sample | Batch 3 biological sample |
|---|---|---|---|---|---|
| Transcript feature (units) | 99, 101 | 109, 111 | 93, 95 | 130 | 88 |
| Metabolite feature (units) | 19, 21 | 16, 18 | 25, 27 | 31 | 30 |
For the transcript feature, the control means are \((99+101)/2=100\), \((109+111)/2=110\), and \((93+95)/2=94\). The offsets relative to batch 1 are therefore
The adjusted biological values are \(130-10=120\) units in batch 2 and \(88-(-6)=94\) units in batch 3. A negative estimated offset means that the control was lower in batch 3 than in the reference batch, so subtracting the negative offset increases the sample value.
For the metabolite feature, the control means are 20, 17, and 26 units. Its offsets are \(0\), \(17-20=-3\), and \(26-20=6\) units. The biological values adjust to \(31-(-3)=34\) units in batch 2 and \(30-6=24\) units in batch 3. Each feature receives its own offset; the transcript offset is not applied to the metabolite feature. Likewise, each omics block should be calibrated on its own feature scale rather than using a single block-wide shift.
Residual Batch Structure and Control Contrasts
After adjustment, recalculate control means on the adjusted scale. For each feature, the mean control value in batch \(b\) becomes \(\bar Y^{(C)}_{jb}-\hat{\delta}_{jb}\). Under this procedure, that mean equals the reference control mean exactly when the offset is estimated from the same control mean. This is an arithmetic property of the calculation, not an independent validation that the batch effect has been removed. When controls are split into replicates or held-out control measurements are available, examine whether the correction also aligns those independent measurements.
Inspect replicate variability as well as means. A mean shift can be corrected by an additive offset, but a batch may also change measurement variability or produce outlying control observations. Compare control distributions, replicate ranges, and feature-wise residuals across batches. A remaining systematic pattern suggests the additive shift is insufficient; a large increase in apparent similarity is not by itself proof of successful correction.
A shared offset preserves a within-batch contrast between two control types. If their raw values are \(Y^{(C)}_{j,c_1,b}\) and \(Y^{(C)}_{j,c_2,b}\), then
The common subtraction cancels. This is a useful check when control types have known contrasts, such as a low and a high reference level. It is not a general guarantee that every biological contrast will be preserved: the offset is only valid for study samples if the technical shift estimated from controls applies to them.
Worked Example: Checking a Known Control Contrast
Suppose a hypothetical feature has two control types with known targets of 5 and 9 units. In batch 1, their observed means are 5 and 9; in batch 2, they are 8 and 12. Assume the same additive shift applies to both control types and to the study samples.
The batch 2 residuals from the targets are \(8-5=3\) and \(12-9=3\) units, so the estimated batch 2 offset is 3 units. After adjustment, the control values are \(8-3=5\) and \(12-3=9\) units. Before adjustment, the contrast is \(12-8=4\) units; after adjustment, it is \(9-5=4\) units. The known contrast is retained, while both control levels are returned to their target values. If the residuals had instead been 3 and 6 units, a single common offset could not align both targets; that pattern would call the shared additive-shift assumption into question.
Alternatives, Diagnostics, and Limitations
Control-based calibration is most compelling when suitable controls are measured in every batch and represent the same relevant measurement process as the study samples. Covariate-preserving linear batch adjustment and ComBat are alternatives when adjustment is estimated from study data under their respective modeling assumptions. Unlike direct calibration, those approaches do not require the same known reference material in every batch; they also rely on modeling choices and adequate separation of batch from biological covariates. The earlier material on covariate-preserving linear batch adjustment and empirical-Bayes batch adjustment with ComBat develops those approaches.
Use the following checks to decide whether the control-based result is credible:
- Control coverage: confirm that each batch has controls for every feature being adjusted. A missing batch control leaves its offset unidentified by this direct procedure.
- Control consistency: compare replicate observations and, where available, independent control types. Conflicting estimated shifts may indicate control mismatch, outliers, or a batch-by-control interaction.
- Residual structure: compare adjusted control distributions across batches, including their spread, not only their means. Check whether residual differences remain systematic.
- Biological preservation: inspect known control contrasts and relevant biological summaries. Inferences should not rely solely on the same control values used to calculate offsets.
- Confounding: determine whether biological groups are represented across batches. If all cases are in one batch and all controls in another, a control-derived technical correction does not by itself identify the biological group difference.
A common mistake is to interpret disappearance of control-mean differences as independent evidence that batch correction worked. If the offset was calculated as the control mean difference, the corrected control means match by construction. The correction has not independently tested whether the controls were representative, whether study samples shared the same shift, or whether variability and other batch patterns were removed. A second mistake is to subtract the same offset from every feature in an omics block: offsets are feature-specific, and their magnitude and direction can differ.
Check Your Understanding
Answer each question, then compare your reasoning with the solutions below.
- A feature's control mean is 30 units in the reference batch and 35 units in a second batch. What offset is estimated for the second batch, and how is a second-batch sample value of 42 adjusted?
- Why can a control-mean match after adjustment fail to provide independent evidence that the adjustment is adequate?
- Two known control levels differ by 7 units in a batch. What happens to this contrast when the same offset is subtracted from both levels?
- Name two conditions required for control-derived offsets to be applied credibly to biological samples.
Solutions. (1) The offset is \(35-30=5\) units, and the adjusted value is \(42-5=37\) units. (2) If the offset was calculated from those same control means, their agreement after correction is guaranteed by the calculation; it does not independently assess control representativeness or other batch effects. (3) The contrast remains 7 units because the common offset cancels when the adjusted values are subtracted. (4) Examples include comparable control material across batches, controls in each batch, a plausible additive shift on the analysis scale, and a technical shift that applies similarly to controls and biological samples.