Tutorials › Statistical Methods for Single-Cell RNA Sequencing › Calibration of Component-Wise Abundance Tests

Differential Abundance and Compositional Effects · Tutorial 547 of 700

Calibration of Component-Wise Abundance Tests

Use design-matched simulations to check whether component-wise abundance p-values and multiplicity-adjusted discoveries behave as intended.

Advanced 12 min read

What You'll Learn

  • Define empirical null calibration and estimate a component-wise type I error rate.
  • Build simulations that preserve donor-level sampling and compositional dependence.
  • Compare how donor count, cell yield, and overdispersion affect test behavior.
  • Distinguish marginal type I error from false-discovery rate after multiple testing.
  • Interpret Monte Carlo uncertainty and recognize simulation designs that can mislead.

Why Calibration Needs to Be Checked

A component-wise abundance analysis tests each cell type separately, even though the proportions of all types in a sample must sum to one. A test can appear reasonable for one component while producing p-values that are too small under its null hypothesis, or while interacting poorly with the multiplicity procedure across components. Calibration asks whether the reported evidence behaves as its nominal probabilities imply.

This matters especially when the independent experimental units are donors, but each donor contributes many cells. Cells from one donor are not independent biological replicates. Increasing the number of cells may improve the measurement of that donor’s composition, but it does not create more independent donors. Overdispersion between donors and dependence among components can therefore make a cell-level analysis look more certain than the design supports.

Definition: A test is null calibrated when, under the null hypothesis and the assumptions of the test, its p-value \(p\) is super-uniform: for every \(t\) between 0 and 1, \(P(p \leq t) \leq t\). A test’s empirical type I error rate at level \(\alpha\) is the proportion of simulated null tests with \(p \leq \alpha\). A rate above \(\alpha\) indicates anti-conservative behavior at that threshold; a rate below \(\alpha\) indicates conservative behavior.

For a simulation, let \(C_{ik}\) be the count of cell type \(k\) from donor \(i\), let \(N_i\) be that donor’s total cell yield, and let \(\pi_{ik}\) be the underlying proportion for that donor. There are \(K\) components, and their proportions satisfy \(\sum_{k=1}^{K}\pi_{ik}=1\). A null simulation for a two-group comparison sets the group-level abundance distributions equal for the component or components being tested. The simulation should still include realistic donor-to-donor variation and the same sampling structure intended for the analysis.

Designing a Useful Calibration Simulation

A useful simulation reproduces the features that matter for the planned analysis: the number of donors per group, the distribution of cell yields, the number of components, the null or non-null effects, and the dependence structure among component counts. One standard way to represent extra donor-to-donor variability is a Dirichlet-multinomial model. In one parameterization, a donor’s probability vector is drawn from a Dirichlet distribution with mean vector \(\boldsymbol{\pi}\) and concentration \(\kappa\), then the donor’s counts are drawn from a multinomial distribution conditional on that vector. Smaller \(\kappa\) gives greater between-donor variation; as \(\kappa\) grows, the model approaches multinomial sampling with a fixed probability vector.

The components remain dependent: if one component’s share rises, the shares available to other components must collectively fall. A beta-binomial model for one component versus the rest can represent extra variation in that component’s proportion, but separately fitting such models does not remove the compositional dependence across the collection of tests. The simulation should preserve that dependence when evaluating multiple-testing behavior.

Set up at least two kinds of simulation. Under the global null, no component differs between groups; this evaluates the joint behavior when every test is null. Under partial alternatives, specify effects for some components while leaving the others null; this permits assessment of false discoveries among a mixture of true and false nulls. Vary one design feature at a time when possible, so changes in performance can be attributed to donor count, cell yield, or overdispersion rather than to several simultaneous changes.

1
Specify the data-generating process.
Choose the number of donors, group allocation, cell yields, component proportions, and a dependence or overdispersion model. State which components have null effects.
2
Simulate complete studies.
Generate donor-level count vectors, preserving the fact that component counts within a donor share a total. Do not treat simulated cells as independent replicates when the analysis uses donors as the experimental units.
3
Apply the planned analysis unchanged.
Fit the chosen component-wise tests and apply the intended multiplicity procedure in every simulated study, including any covariate adjustment or pairing used in practice.
4
Summarize calibration and discoveries.
Across studies, estimate null rejection rates, inspect the p-value distribution, and calculate false-discovery summaries. Quantify Monte Carlo uncertainty so simulation noise is not mistaken for a real defect.

Worked Example: Estimating a Null Rejection Rate

Suppose a hypothetical simulation generates 1,000 independent studies under a null hypothesis for one component. The planned test rejects at \(\alpha=0.05\) in 74 studies. The empirical type I error rate is

$$ \widehat{P}(p \leq 0.05) = \frac{74}{1000} = 0.074. $$

The estimated rate is 7.4%, above the nominal 5%. It is important to consider Monte Carlo uncertainty before concluding that the test is miscalibrated. Treating the rejection indicators as Bernoulli observations, the estimated Monte Carlo standard error is

$$ SE = \sqrt{\frac{0.074(1-0.074)}{1000}} \approx 0.00828. $$

This standard error describes simulation noise in the estimated rejection rate, not uncertainty about a biological effect. The estimate is about 2.9 standard errors above 0.05, which is evidence of anti-conservative behavior in this simulated setting. The conclusion is limited to the data-generating assumptions and test implementation used; it does not establish that the method will behave the same way under every study design.

What to Measure Across Components

For a particular component whose null hypothesis is true, estimate its type I error rate across simulated studies. If null status differs by component, pool only the p-values for true nulls when estimating the marginal null rejection rate. Report the number of simulated null tests as well as the estimated rate, because rates from a small simulation are imprecise. A p-value histogram or empirical cumulative distribution can reveal broad departures from uniformity, but neither replaces a numerical estimate at thresholds relevant to the intended analysis.

When many component-wise hypotheses are tested, calibration also concerns the discoveries after multiplicity adjustment. For a simulated study, let \(R\) be the number of rejected hypotheses and \(V\) the number of rejected hypotheses that were actually null. Define the false-discovery proportion as \(V/\max(R,1)\). The false-discovery rate (FDR) is the expectation of this proportion over repeated studies. It is not the proportion of all tested hypotheses that are false, nor is it generally the ratio of total false rejections to total rejections after pooling studies.

Justification: Under the global null, every rejection is false, so \(V=R\). Therefore \(V/\max(R,1)\) equals 1 when \(R>0\) and 0 when \(R=0\). Taking expectations gives \(\mathrm{FDR}=P(R>0)\) under the global null. Thus, in that setting, the FDR is the probability of at least one false discovery across the tested components.

For partial alternatives, calculate the false-discovery proportion separately in each simulated study and then average those values. This targets FDR directly. Also report power or the true-discovery proportion if it is relevant, but do not trade away calibration silently: a method that rejects more often may have greater power and a larger false-discovery rate.

Worked Example: Changing Donor Count, Yield, and Overdispersion

Consider a hypothetical simulation with eight components and a global null. In each scenario, 5,000 studies are generated, and the same two-group analysis is applied: a pooled-cell binomial test for each component and a donor-aware beta-binomial test for each component, followed by the Benjamini–Hochberg procedure at \(q=0.05\). The table gives illustrative simulation results; it is not a claim about any particular dataset or software implementation. Here, \(\rho\) denotes a setting that increases with donor-to-donor overdispersion.

ScenarioDonors (per group)Cells per donor\(\rho\)Pooled-binomial null rejection rateBeta-binomial null rejection rateBH FDR
Baseline62000.050.1130.0510.053
More donors202000.050.1060.0500.048
Higher yield61,0000.050.1270.0520.055
More overdispersion62000.150.1880.0540.052

For the baseline, the pooled-binomial rejection rate is estimated as 11.3%, while the beta-binomial rate is 5.1%. The pooled-cell test’s apparent precision is not supported by this simulated donor-level variation. Increasing cell yield while holding the six donors per group fixed does not solve the problem; in this illustration the pooled-binomial rejection rate increases to 12.7%. By contrast, adding donors gives more independent biological replication. The beta-binomial rates remain near 5% across these scenarios, but this result is conditional on the simulated model and the test’s fitting assumptions.

Because all eight null hypotheses are true, the BH FDR in each scenario is also the probability of at least one BH rejection. The baseline estimate of 0.053 means that 5.3% of simulated studies had at least one discovery under this global null. That value is an empirical result, not a guarantee of control in other dependence structures or parameter settings. A fuller calibration study would repeat these comparisons over a range of compositions, donor allocations, yields, and overdispersion levels.

Worked Example: Computing FDR Under Partial Alternatives

Suppose four hypothetical simulated studies each test six components. In every study, two components truly differ between groups and four are null. After multiplicity adjustment, the numbers of discoveries and false discoveries are as follows: Study 1 has \(R=2\), \(V=1\); Study 2 has \(R=1\), \(V=0\); Study 3 has \(R=2\), \(V=2\); and Study 4 has \(R=0\), \(V=0\).

The four false-discovery proportions are

$$ \frac{1}{2}, \quad \frac{0}{1}, \quad \frac{2}{2}, \quad \frac{0}{1} = 0.5,\;0,\;1,\;0. $$

The estimated FDR is the mean of the study-specific proportions:

$$ \widehat{\mathrm{FDR}} = \frac{0.5 + 0 + 1 + 0}{4} = 0.375. $$

There were 3 false discoveries among 5 total discoveries, giving \(3/5=0.6\). That pooled ratio is not the estimated FDR: it weights studies with more discoveries more heavily, whereas FDR averages the false-discovery proportion across studies. This example also shows why a small number of simulated studies can produce a noisy FDR estimate.

Comparisons, Diagnostics, and Limits

Calibration simulation complements, rather than replaces, analytic methods. A binomial model can be a useful reference when its sampling assumptions are appropriate, but treating cells as independent when donors are the replicates can understate uncertainty. A beta-binomial model accommodates extra variation for one component versus the rest; joint models such as the Dirichlet-multinomial or logistic-normal approach represent dependence among components more directly. A component-wise method may still be convenient, but its marginal p-value calibration and its multiple-testing behavior should be evaluated separately.

Multiplicity procedures also rely on conditions. For example, the Benjamini–Hochberg procedure has standard FDR control under independent test statistics and under certain forms of positive dependence. Compositional constraints can induce dependence, and the direction and structure need not satisfy those conditions automatically. Simulation is a practical way to examine the procedure under a specified dependence model; it does not prove control outside that model. Permutation-based assessment is another option when the design permits valid label exchangeability, but it likewise depends on the randomization or exchangeability assumptions being appropriate.

Useful warning signs include a null rejection rate materially above \(\alpha\), an excess of very small p-values in null simulations, or an FDR estimate above the target in scenarios where control is intended. Check that the simulated group labels, donor structure, covariates, and multiplicity adjustment match the analysis plan. Also examine whether rates change sharply as cell yield rises while donor count stays fixed, or as overdispersion increases. A result that looks calibrated only at one convenient parameter setting is not a broad calibration assessment.

Simulation results have limits. They inherit the assumptions chosen for the data-generating process, and a misspecified simulation can provide reassurance that does not transfer to the study. Monte Carlo error can obscure modest departures from nominal rates. Finally, good calibration for observed relative proportions does not establish calibration for absolute cell numbers or remove biases in cell capture and annotation. Calibration answers a specific question: how the planned testing procedure behaves when data follow the simulated design and model.

Common Mistake

Wrong reasoning: “There are thousands of cells, so the test has thousands of independent observations; if its p-values are small, the component is well calibrated.” This confuses cell yield with independent biological replication and ignores donor-level variability and compositional dependence.

Correction: Simulate the donor as the experimental unit, generate the within-donor cell counts under a stated compositional model, and evaluate both marginal null rejection rates and the FDR after the planned adjustment. More cells per donor and more donors are different design changes, so vary and report them separately.

Key takeaway: Calibration is a property of a test under a specified data-generating process, not a universal label. Evaluate component-wise p-values and adjusted discoveries across realistic null and partial-alternative simulations, with donor count, cell yield, overdispersion, and dependence represented explicitly.

Check Your Understanding

Answer each question, then compare with the solutions.

  1. In 2,000 null simulations, a component is rejected 126 times at \(\alpha=0.05\). What is the empirical type I error rate, and is it above or below nominal?
  2. Why can increasing cells per donor fail to correct anti-conservative inference when donor count is fixed?
  3. Under the global null, explain why FDR equals the probability of at least one rejection.
  4. In three partial-alternative simulations, the false-discovery proportions are 0, 0.5, and 1. Compute the estimated FDR.

Solutions. (1) The rate is \(126/2000=0.063\), or 6.3%, which is above the nominal 5%. (2) Additional cells can improve estimation of each donor’s proportion, but they do not add independent donors; donor-to-donor variation and dependence remain. (3) Under the global null, every rejection is false, so \(V=R\) and the false-discovery proportion is 1 if \(R>0\) and 0 otherwise. Its expectation is therefore \(P(R>0)\). (4) The estimate is \((0+0.5+1)/3=0.5\), or 50%.

Clinical Biostats