Why Cell Composition Matters
A methylation array measures DNA from a sample containing many cells. If the proportions of cell types differ between samples, their bulk methylation values can differ even when methylation within every cell type is unchanged. This is one reason a bulk methylation contrast does not, by itself, identify a cell-intrinsic change.
For example, blood samples can contain different proportions of immune-cell types. If those cell types have different methylation levels at a CpG site, a change in their relative abundance changes the measured bulk value. The key task here is to understand that mixture, estimate proportions when suitable reference data are available, and judge what an adjustment based on those estimates can establish.
At a CpG site, let \(\beta_k\) denote the methylation level in cell type \(k\), on the beta-value scale, and let \(y\) denote the bulk beta value. A useful first-order mixture model is \(y=\sum_{k=1}^{K}\pi_k\beta_k+\varepsilon\), where \(\varepsilon\) represents measurement and model error. The model treats the bulk value as a weighted average of cell-type-specific values. It is an approximation: the weights should reflect each cell type's contribution to the assayed DNA, and array signal behavior must be sufficiently comparable across cell types.
This mixing equation is naturally expressed on the beta scale. M values are log ratios, so a weighted average of cell-type M values generally does not equal the M value of the mixed sample. For deconvolution, one therefore uses beta-scale reference signatures and bulk beta values, after appropriate sample-level processing.
Worked Example: A Composition Shift Mimics a Methylation Difference
Suppose a hypothetical CpG has methylation level \(0.80\) in cell type A and \(0.20\) in cell type B, in both study groups. In group 1, the DNA contributions are 75% A and 25% B; in group 2, they are 25% A and 75% B. Assume the mixture model applies and ignore measurement error.
For group 1, the bulk value is
For group 2, it is
The bulk difference is \(0.65-0.35=0.30\), or 30 percentage points on the beta scale. Yet the assumed methylation levels within A and within B are identical between groups. The entire bulk difference follows from composition. Thus a bulk contrast alone cannot distinguish a change in cell proportions from a change within cell types.
Estimating Proportions From Reference Markers
Reference-based deconvolution uses methylation profiles measured in purified or otherwise well-characterized cell types. It compares the observed values at selected marker CpGs with the cell-type reference values. Markers are useful when their methylation levels differ across the cell types to be separated and are sufficiently stable in the study population.
The constraints encode the meaning of proportions. Without the sum-to-one constraint, the fitted coefficients need not represent a composition; without nonnegativity, a least-squares fit can assign a negative fraction to a cell type. In real analyses the optimization is usually numerical. The following small example can be solved directly.
Worked Example: Estimating Two Cell-Type Proportions
Suppose three hypothetical markers have reference values \(R_A=(0.90,0.20,0.80)\) for cell type A and \(R_B=(0.10,0.70,0.30)\) for cell type B. A bulk sample has values \(y=(0.58,0.40,0.60)\). Assume these two types are the complete mixture, the references are applicable, and marker errors have equal variance. Write \(\pi\) for the proportion of A, so the proportion of B is \(1-\pi\).
At each marker, the fitted value is \(R_{jB}+\pi(R_{jA}-R_{jB})\). The unconstrained least-squares minimizer is
The marker differences are \((0.80,-0.50,0.50)\), and the observed values minus the B references are \((0.48,-0.30,0.30)\). Therefore,
This is within the allowed interval \([0,1]\), so the constrained estimate is 0.600 for A and \(1-0.600=0.400\) for B. Substitution gives fitted marker values \(0.60(0.90)+0.40(0.10)=0.58\), \(0.60(0.20)+0.40(0.70)=0.40\), and \(0.60(0.80)+0.40(0.30)=0.60\). They match the observed values, so the residuals are all zero in this constructed example.
Why the Estimate Can Be Identifiable
An estimate is only meaningful if the reference profiles distinguish the cell types. For two types, each marker contributes information about their proportion through the difference \(R_{jA}-R_{jB}\). If all these differences are zero, no marker changes with the mixture and the data cannot tell the proportions apart. More generally, with several cell types, reference columns must be sufficiently distinct over the chosen markers; strongly similar profiles make estimates unstable even if they are not exactly identical.
The two-type formula above follows by minimizing a quadratic. To see why, set \(d_j=R_{jA}-R_{jB}\) and \(z_j=y_j-R_{jB}\). The residual at marker \(j\) is \(z_j-\pi d_j\), so the sum of squared residuals is \(Q(\pi)=\sum_j(z_j-\pi d_j)^2\). Differentiating and setting the derivative to zero gives \(-2\sum_j d_j(z_j-\pi d_j)=0\), hence \(\hat{\pi}=\sum_j d_jz_j/\sum_jd_j^2\), provided \(\sum_jd_j^2>0\). The simplex constraints then require restricting the solution to valid proportions; for two types this means truncating an out-of-range unconstrained solution to the appropriate boundary.
With more cell types, the same idea becomes constrained least squares over the simplex. Its fit depends on the geometry of the reference profiles: if one reference profile can be approximated by a mixture of others, the corresponding proportions may be difficult to separate. A good residual fit does not by itself prove that the selected cell types are complete or correctly specified.
Worked Example: Standardizing to a Common Composition
Consider two hypothetical groups with two cell types. In group 0, cell-type-specific beta values are \(0.70\) for A and \(0.20\) for B, and the proportion of A is \(0.40\). In group 1, the corresponding values are \(0.80\) and \(0.25\), and the proportion of A is \(0.60\). Assume for this illustration that these cell-specific values and proportions are known without error and that the mixture model holds.
The observed bulk values are
The raw bulk difference is \(0.58-0.40=0.18\). To compare the groups at a common composition, choose 50% A and 50% B for both. The standardized values are \(0.50(0.70)+0.50(0.20)=0.45\) for group 0 and \(0.50(0.80)+0.50(0.25)=0.525\) for group 1. Their difference is \(0.525-0.45=0.075\). Under these assumptions, standardization removes the part attributable to the groups' different proportions, while retaining the difference associated with their distinct cell-specific values.
This calculation is an illustration of what composition adjustment aims to separate; in practice the cell-specific values are not generally known from bulk data. Estimated proportions alone do not reveal all cell-type-specific methylation levels.
Using Estimates and Checking Their Limits
Estimated proportions can be used to describe sample heterogeneity, to compare observed composition across groups, or as covariates in an analysis of bulk methylation. Another possibility is to standardize predictions to a chosen common composition, when the model and data support that target. These procedures answer related but distinct questions. A composition-adjusted bulk comparison is not automatically an estimate of a causal effect or a direct measurement of methylation change within a particular cell type.
Reference-based adjustment depends on several substantive assumptions. The reference panel must include the important contributing cell types, its methylation profiles must apply to the study samples, and the markers must distinguish the represented types. The mixture model must be an adequate description of the measured beta values. In addition, proportion estimates have uncertainty; treating them as exact covariates can understate uncertainty in later analyses.
A major design limitation occurs when group membership and cell composition are nearly or perfectly aligned. If all samples in one group have one composition and all samples in another have a different composition, the data may not contain enough independent variation to separate group differences from composition differences. Adjustment cannot manufacture information that the study design did not collect. Interpretation also depends on the scientific target: if a group-associated change in cell composition is itself part of the phenomenon of interest, removing it changes the question rather than simply correcting a nuisance.
Diagnostics should ask whether the fitted mixture is plausible, not just whether an optimizer returned numbers. Examine whether estimates lie on boundaries, whether marker residuals are large or systematically patterned, and whether estimated proportions are implausibly variable or strongly dependent on the marker set. Repeating estimation with a defensible alternative marker subset or reference panel can reveal sensitivity. Such checks do not establish that the references are correct, but disagreement is a warning that conclusions may depend on modeling choices.
| Approach | What it uses | Important limitation |
|---|---|---|
| Reference-based estimation | Reference methylation profiles for specified cell types | Can be biased if references, markers, or cell-type coverage do not match the samples |
| Reference-free estimation | Patterns of variation among the bulk samples, without fixed cell-type signatures | Latent patterns may not map uniquely to named cell types or proportions |
| Direct cell counting or sorting | Measured cell counts, or methylation assayed in separated populations | Requires suitable specimens and measurements; counts may not equal DNA contributions exactly |
These approaches are not interchangeable. A reference-based estimate is interpretable in terms of the cell types represented by its panel, while reference-free patterns can capture unanticipated variation but may be harder to label. Direct measurement can provide valuable independent information, although it has its own measurement and sampling limitations. Where feasible, external cell counts or sorted-cell data can help assess whether a reference-based estimate is credible.
Common Mistakes
- Calling a bulk difference cell-intrinsic. Different proportions can produce a bulk contrast even when each cell type has unchanged methylation. The correction is to distinguish the observed bulk value from cell-type-specific values.
- Averaging M values as if they were mixture proportions. The log-ratio transformation is nonlinear. Use beta-scale mixture reasoning for the reference-based calculation.
- Assuming fitted proportions prove the reference is correct. A numerical solution can exist even with omitted cell types or mismatched reference profiles. Inspect fit, residuals, and sensitivity to reasonable marker choices.
- Interpreting adjustment as automatic removal of confounding. Adjustment is conditional on the model, estimates, and study design. If group and composition are inseparable in the data, a regression cannot distinguish their contributions reliably.
Check Your Understanding
Answer each question, then compare your reasoning with the solutions below.
- At a CpG, cell types A and B have beta values 0.70 and 0.10. A sample is 30% A and 70% B. What bulk beta value does the two-type mixture model predict?
- Why can two cell-type proportions not be estimated from markers if the two reference profiles are identical at every selected marker?
- A two-cell-type unconstrained estimate of the proportion of A is 1.08. What constraint matters, and what does a boundary estimate imply?
- Why does adjusting bulk methylation for estimated proportions not necessarily estimate a causal or cell-intrinsic effect?
Solutions. 1. The predicted value is \((0.30)(0.70)+(0.70)(0.10)=0.21+0.07=0.28\). 2. Identical reference profiles give no marker signal that changes with the mixture, so different proportions produce the same expected marker values; the proportions are not identifiable from those markers. 3. The proportion must be nonnegative and no greater than one, with the two proportions summing to one. The constrained estimate is at the boundary, 1.00 for A and 0 for B. A boundary result can reflect a genuinely extreme composition, but it can also warn of poor references, noise, or a sample outside the modeled mixture. 4. The estimate relies on correct reference profiles, adequate cell-type coverage, and an appropriate mixture model; it may also be uncertain. If group and composition are inseparable, the data cannot distinguish their contributions, and adjustment does not establish causation or a within-cell change.