Tutorials › Statistical Methods for Single-Cell RNA Sequencing › Selecting a Reference Batch for MNN Integration

Integration Methods and Their Benchmarking · Tutorial 163 of 700

Selecting a Reference Batch for MNN Integration

Learn to select an MNN reference by balancing usable cell numbers, representation of shared states, and batch quality rather than choosing the largest batch automatically.

Advanced 12 min read

What You'll Learn

  • Calculate the probability that a sampled batch contains at least one cell from a target state.
  • Distinguish state presence from having enough cells to support local MNN neighborhoods.
  • Account for cell usability and state-specific quality when comparing candidate references.
  • Use a transparent pairwise support score to compare references across multiple batches.
  • Recognize why a high coverage score cannot establish that biological states are truly shared.
  • Identify when reference choice cannot resolve confounding or missing-state problems.

Why the Reference Batch Matters

In multi-batch MNN integration, the reference batch is the batch against which other batches are aligned in the chosen feature space. The earlier material on extending MNN correction across multiple batches establishes the pairwise-alignment context: a reference choice determines which batch participates in each alignment, and therefore which cells and states must provide a useful comparison. Choosing the largest batch may help with sampling, but size alone does not show that the batch contains the shared states needed for alignment or that its cells are of adequate quality.

Reference selection is best treated as a design and sensitivity question, not as a universal rule that identifies one optimal batch. A useful comparison asks whether each candidate has enough usable cells in the states expected to be shared, whether other batches also represent those states, and whether conclusions change when a different plausible reference is used. None of these checks proves that an MNN pair is biologically valid; they assess whether the data offer a reasonable basis for attempting the alignment.

Coverage, Usable Cells, and Pairwise Support

Definition: Let \(n_b\) be the number of sampled cells in batch \(b\), and let \(\pi_s\) be the prevalence of state \(s\) among cells sampled from the target population. Under independent sampling, the number \(C_{bs}\) of sampled cells from state \(s\) follows \(C_{bs}\sim\operatorname{Binomial}(n_b,\pi_s)\). The probability that the batch contains at least one such cell is \(1-(1-\pi_s)^{n_b}\). This is a presence probability, not a guarantee of adequate local-neighborhood support.

The binomial model assumes that cells are sampled independently and that the state prevalence is the same for the cells represented by the model. In practice, cells from one donor, tissue region, or library may be correlated, and a sample’s observed state proportions may differ from the target population. The formula is therefore a planning calculation under stated assumptions, not a correction for sampling design or a claim that every batch has the same composition.

Quality can be included as a simple planning assumption. Suppose a cell from state \(s\) has probability \(q_{bs}\) of being usable for the intended alignment, independently of other cells. Then the probability that any sampled cell is both from state \(s\) and usable is \(\pi_s q_{bs}\), and the number of usable state-\(s\) cells is binomial with that probability. This model is deliberately limited: quality may depend on state, library, or processing, and a single retention probability cannot represent every failure mode.

$$ U_{bs}\sim\operatorname{Binomial}(n_b,\pi_s q_{bs}),\qquad P(U_{bs}\geq 1)=1-(1-\pi_s q_{bs})^{n_b}. $$

A single cell is generally not enough to establish useful local geometry. If a planning exercise specifies a minimum of \(m_s\) usable cells for state \(s\), the relevant probability is

$$ P(U_{bs}\geq m_s)= \sum_{k=m_s}^{n_b} {n_b\choose k}(\pi_s q_{bs})^k(1-\pi_s q_{bs})^{n_b-k}. $$

The choice of \(m_s\) depends on the method’s neighborhood settings, state heterogeneity, and the analysis goal; there is no universal threshold that makes an alignment valid. These calculations help compare sampling opportunity, while the later assessment of MNN match quality must evaluate the actual matches.

Worked Example: Presence of a Rare State

Suppose a target state has prevalence \(\pi_s=0.005\), and two hypothetical batches contain \(n_1=200\) and \(n_2=800\) independently sampled cells. Assume every sampled cell is usable, so \(q_{1s}=q_{2s}=1\). Calculate the chance that each batch contains at least one target-state cell.

For the 200-cell batch,

$$ P(C_{1s}\geq1)=1-(1-0.005)^{200} =1-0.995^{200}\approx 1-0.3670=0.6330. $$

For the 800-cell batch,

$$ P(C_{2s}\geq1)=1-0.995^{800} \approx 1-0.01813=0.9819. $$

Under these assumptions, the larger batch is much more likely to contain at least one target-state cell. Neither result says that the batch has enough cells to define a local neighborhood: the calculation concerns presence only. It also relies on the specified 0.5% prevalence, not on an arbitrary probability assigned to each batch.

Comparing Candidate References

A candidate reference must be considered in relation to the batches it will be paired with. A large reference that lacks a shared state cannot support alignment of that state; a smaller reference may be more useful if it represents the relevant states and has adequate quality. Conversely, broad state coverage in the reference cannot compensate for a target batch that lacks the same state. The practical unit of comparison is therefore the pair, repeated across the batches that need alignment.

One transparent planning summary is a capped pairwise support score. Let \(u_{bs}\) be the expected usable count of state \(s\) in batch \(b\), \(m_s\) a prespecified planning count, and \(w_s\) a nonnegative importance weight across the states being considered, with \(\sum_s w_s=1\). Define

$$ A_{ri}=\sum_s w_s\min\left(1,\frac{\min(u_{rs},u_{is})}{m_s}\right). $$

Here \(A_{ri}\) is a planning score between zero and one for candidate reference \(r\) paired with batch \(i\). The inner minimum makes the less-represented member of each pair the bottleneck; the cap prevents counts far above the planning threshold from dominating the score. A candidate can be summarized by its smallest \(A_{ri}\) across the other batches, so the weakest planned pair is visible. This is a deliberately chosen decision aid, not a standard MNN statistic, probability of correct alignment, or substitute for examining the data. The weights and thresholds must be justified by the analysis goal and reported.

Worked Example: Selecting a Reference by Its Weakest Pair

Three hypothetical batches have the following expected usable counts for two shared states. Let state A have weight \(w_A=0.8\), state B have weight \(w_B=0.2\), and set \(m_A=m_B=10\). These expected counts already reflect the quality assumptions used in this planning comparison.

BatchUsable state A cellsUsable state B cells
R11002
R24015
R3520

For R1 paired with R2, the state-specific capped supports are \(\min(1,40/10)=1\) for A and \(\min(1,2/10)=0.2\) for B. Thus \(A_{R1,R2}=0.8(1)+0.2(0.2)=0.84\). R1 paired with R3 gives \(0.8\min(1,5/10)+0.2\min(1,2/10)=0.8(0.5)+0.2(0.2)=0.44\).

For R2 paired with R3, the supports are \(\min(1,5/10)=0.5\) for A and \(\min(1,15/10)=1\) for B, so \(A_{R2,R3}=0.8(0.5)+0.2(1)=0.60\). The R2–R1 score is 0.84, as calculated above. The weakest-pair summaries are therefore 0.44 for R1, 0.60 for R2, and 0.44 for R3. Under this explicitly stated score, R2 is the preferred reference because its weakest planned pair has the largest support score.

This result depends on the chosen weights and thresholds. If state B were essential rather than lower-weight, the planning priorities could change. The score does not establish that the states are biologically shared, that the local geometry is appropriate, or that the MNN vectors will be accurate.

Quality, Assumptions, and a Short Derivation

The presence formula follows directly from the probability of no representation. For each sampled cell, the probability of not being a usable cell from state \(s\) is \(1-\pi_s q_{bs}\). Under independent sampling, the probability that all \(n_b\) cells fail to be usable state-\(s\) cells is the product of these probabilities. Taking the complement gives the probability of at least one usable cell:

$$ P(U_{bs}\geq1)=1-P(U_{bs}=0) =1-(1-\pi_s q_{bs})^{n_b}. $$

The derivation also exposes the assumptions. If state membership is clustered, cells are not independent; if quality differs within the state, one \(q_{bs}\) may be inadequate; if the state is absent from the biological sample, increasing \(n_b\) cannot create it. In those cases, the binomial calculation can be overconfident or irrelevant. For a state-specific quality concern, estimate or bound \(q_{bs}\) separately rather than applying a high overall quality rate to every state.

Worked Example: How Quality Changes State Coverage

Two hypothetical candidate references each contain 500 sampled cells. A shared state has prevalence \(\pi_s=0.01\) in the sampled population. Assume independent sampling, but suppose the probability that a cell from this state is usable is \(q_{1s}=0.9\) in the first candidate and \(q_{2s}=0.5\) in the second. Calculate the probability of at least one usable target-state cell.

For candidate 1, the per-cell probability of being a usable target-state cell is \(0.01(0.9)=0.009\). Therefore,

$$ P(U_{1s}\geq1)=1-(1-0.009)^{500} =1-0.991^{500}\approx1-0.010885=0.989115\approx0.9891. $$

For candidate 2, the per-cell probability is \(0.01(0.5)=0.005\), so

$$ P(U_{2s}\geq1)=1-(1-0.005)^{500} =1-0.995^{500}\approx1-0.08157=0.9184. $$

The first candidate has higher modeled coverage despite equal total cell numbers. The calculation does not imply that 98.91% or 91.84% of its cells are usable; these are probabilities, under the assumed model, of at least one usable cell from this particular state.

Diagnostics, Alternatives, and Limitations

Before committing to a reference, compare candidate batches using the same feature space, state definitions, quality criteria, and planning thresholds. Check whether the proposed shared states are supported by study design and biological knowledge, and report the observed counts alongside any model-based probabilities. A large discrepancy between expected and observed counts is a reason to revisit the prevalence or quality assumptions. Inspect whether conclusions are sensitive to plausible alternative references; strong dependence on one candidate signals that the integration result needs cautious interpretation.

Common selection strategies answer different questions:

StrategyPotential advantageMain limitation
Choose the largest batchOften increases the chance of sampling cells from low-prevalence states.Does not ensure state coverage, usable quality, or compatibility with every target batch.
Choose the batch with broadest expected state coverageCan favor a reference that represents more of the planned shared biology.Broad coverage alone may overlook weak pairwise support or a poor-quality state.
Compare pairwise support across candidate referencesMakes the weakest reference-to-target comparison explicit.Depends on chosen states, weights, and thresholds; it remains a planning heuristic.
Repeat integration with several plausible referencesReveals whether conclusions are reference-sensitive.Does not resolve missing states, confounding, or invalid shared-state assumptions.

No reference-selection calculation can identify a condition effect that is confounded with batch, or establish that two visually similar populations are the same biological state. Those are design and identifiability questions. Nor does a high support score guarantee valid MNNs: state prevalence may be misspecified, cells may be correlated, and batch effects may distort local geometry. Reference selection should be reported as a choice based on stated criteria, with sensitivity to alternatives, rather than as proof that integration has succeeded.

Common Mistake

Common mistake: “The batch has hundreds of cells, so a rare state must be represented.” The conclusion does not follow without specifying the state prevalence and sampling model. Under independent sampling, the chance of at least one state-\(s\) cell is \(1-(1-\pi_s)^{n_b}\); it can be small when \(\pi_s\) is very low, and presence still does not guarantee enough cells for local alignment. Calculate coverage using defensible assumptions, and distinguish that planning probability from evidence about actual MNN match quality.

Check Your Understanding

Answer each question using the assumptions stated. Short solutions are included so the calculations can be checked.

  1. A state has prevalence 0.02, and 100 cells are independently sampled with no quality loss. What is the chance of at least one cell from the state?
  2. Why is the probability of at least one target-state cell not the same as the probability of adequate MNN neighborhood support?
  3. Two batches have equal size, but one has lower state-specific usability \(q_{bs}\). Which quantity in the coverage calculation changes?
  4. What does a weakest-pair support score of 0.8 mean, and what does it not mean?
  5. Give one reason why trying several plausible reference batches is useful and one reason it cannot solve every integration problem.

Solutions. (1) \(1-(1-0.02)^{100}=1-0.98^{100}\approx1-0.1326=0.8674\), or about 86.74%. (2) Presence requires only one cell; useful local support may require multiple cells with appropriate geometry, and the binomial presence calculation evaluates neither neighborhood validity nor match accuracy. (3) The per-cell probability \(\pi_s q_{bs}\) changes; lower \(q_{bs}\) lowers modeled coverage when other quantities are fixed. (4) It is the value of the stated, capped planning score for the weakest candidate-reference pair under the specified states, weights, and thresholds. It is not an 80% probability of a correct alignment. (5) Repeating with plausible references reveals sensitivity to the choice; it cannot create an unobserved state or resolve batch-condition confounding.

Clinical Biostats