Why Compare QC at the Sample Level?
A pooled set of cells can look acceptable even when one sample has unusually low counts, a high mitochondrial fraction, or a low cell-call rate. Conversely, two samples can have different distributions for reasons that do not indicate a processing failure: they may differ in sequencing depth, cell-type composition, or genuine biology. Sample-level diagnostics make those differences visible before a single threshold is applied across all cells.
The aim is not to declare a sample “good” or “bad” from one number. It is to identify patterns that warrant investigation, describe which samples contribute to those patterns, and consider plausible technical and biological explanations. A shifted distribution is evidence of a difference to explain, not by itself proof of its cause.
Set Up Comparable Summaries
Before comparing values, confirm that sample labels and QC metrics are attached to the intended cells, using the sample metadata and count-matrix structure correctly. Confirm also that the same gene annotation and metric definitions were used for each sample. For example, mitochondrial fractions are not directly comparable if different mitochondrial gene sets were used.
For each sample, examine distributions rather than relying on a single mean. Medians and interquartile ranges are useful summaries when QC metrics are skewed or have long upper tails. Side-by-side boxplots or empirical distribution plots can show both shifts in the center and changes in spread or tail behavior. Counts and detected-gene numbers are often displayed on a logarithmic axis to make their wide ranges easier to compare; the plotted scale should be stated so a visual distance is not mistaken for an additive difference.
A useful comparison records the number of called cells in each sample alongside the distributions. A distribution among called cells is conditional on the cell-calling decision: it does not describe the barcodes that were not called. Cell-call rates require their own denominator, defined consistently across samples—for example, the number of candidate barcodes evaluated by the same procedure. If the candidate sets were defined differently, a difference in rates may reflect that difference rather than sample quality.
Worked Example: Finding a Shift in QC Metric Distributions
Suppose two hypothetical samples have the following summaries among called cells. Sample A has 1,000 cells, median UMI count 5,200 (interquartile range 3,100–8,100), median detected-gene count 1,450 (950–2,100), and median mitochondrial fraction 6.2% (3.1%–11.4%). Sample B has 950 cells, median UMI count 1,800 (900–3,600), median detected-gene count 720 (430–1,150), and median mitochondrial fraction 18.0% (10.0%–29.0%).
For UMI counts, the ratio of the medians is \(5200/1800=2.89\): the median in A is about 2.9 times the median in B. The median detected-gene count in A is \(1450/720=2.01\) times that in B. The median mitochondrial fraction differs by \(18.0-6.2=11.8\) percentage points, not 11.8 percent.
These summaries flag B for further investigation: its called cells have lower counts and detected-gene counts and a higher mitochondrial fraction. They do not establish a processing failure. A shallower sequencing depth could lower counts and detected genes; a different cell-type composition could shift mitochondrial fractions; and other sample-specific biological or technical differences could contribute. Distribution plots would show whether the contrast is broad or driven by a tail. The appropriate conclusion is that the samples differ on these QC metrics and that the cause needs checking, not that B should automatically be excluded.
Cell-Call Rates Need Explicit Denominators
A cell-call rate is the proportion of a specified set of barcodes that were called as cells. If sample \(s\) has \(C_s\) called barcodes among \(B_s\) candidate barcodes evaluated under the same rule, its call rate is \(\hat p_s=C_s/B_s\). The denominator is part of the definition. A rate calculated among all barcodes considered by a cell-calling procedure is not interchangeable with a rate among only high-count candidate barcodes.
Under a simple model in which each of the \(B_s\) candidate barcodes independently has probability \(p_s\) of being called, \(C_s\) has a binomial distribution and the estimated standard error of \(\hat p_s\) is \(\sqrt{\hat p_s(1-\hat p_s)/B_s}\). This model provides a reference for the amount of barcode-level sampling variation under its assumptions. Barcodes may not be independent in practice, and this uncertainty does not capture differences in sample loading, sequencing, or biological composition. In particular, it is not a measure of biological replication.
Worked Example: Comparing Cell-Call Rates
Two hypothetical samples each have 10,000 candidate barcodes evaluated using the same cell-calling procedure. Sample A has 6,200 called barcodes, and sample B has 5,100.
The rates are \(\hat p_A=6200/10000=0.620\) and \(\hat p_B=5100/10000=0.510\). The difference is \(0.620-0.510=0.110\), or 11.0 percentage points.
Under the independent-binomial approximation, the estimated standard error for the difference is
The observed difference is about \(0.110/0.006968=15.8\) such standard errors from zero under this model. That calculation indicates that ordinary independent-barcode sampling variation alone is not a plausible explanation for the difference if the model applies. It does not show that either sample failed QC or that the difference is biologically unimportant. Investigate whether the samples had comparable loading, barcode evaluation, and sequencing, and whether the denominator truly represents the same kind of candidate set in both samples.
How Pooling Can Hide a Sample Shift
A pooled mean is a weighted average of sample means. If sample \(s\) contains \(n_s\) cells with sample mean \(\bar{x}_s\), then the mean over all cells is \(\bar{x}_{\mathrm{pooled}}=\sum_s n_s\bar{x}_s/\sum_s n_s\). Thus, a large sample receives more weight than a small one. The pooled value can conceal a problematic subgroup, particularly when samples differ greatly in size.
This identity follows directly by grouping the cell-level sum by sample. The total of all observations is \(\sum_s n_s\bar{x}_s\); dividing by the total number of observations, \(\sum_s n_s\), gives the pooled mean. The identity explains why a reasonable-looking pooled center does not imply that each sample has a similar center.
Worked Example: A Pooled Mean Hides a Difference
Suppose two hypothetical samples each contain 100 cells. Their mean UMI counts are 10,000 in sample A and 20,000 in sample B. The pooled mean is
The pooled mean of 15,000 is between the two sample means, but it does not describe either sample. Reporting only that pooled value would hide the 10,000-UMI difference between sample centers. If sample B instead had 900 cells and A had 100, the pooled mean would be \(\{100(10000)+900(20000)\}/1000=19,000\) UMIs per cell, close to B’s mean and potentially obscuring A’s lower count distribution. The sample-specific summaries remain necessary regardless of which sample is larger.
Distinguish Sample Composition From a Within-Group Shift
Some QC metrics vary across cell types. A sample with more cells from a type that typically has a higher mitochondrial fraction may have a higher overall fraction even when corresponding cell types have similar values across samples. Comparing only sample-wide medians can therefore mix a difference in cell composition with a difference within cell types. If reliable cell-type labels are available, stratified summaries can help separate these possibilities; when labels are not yet available, treat composition as a possible explanation rather than assuming it away.
Worked Example: A Mitochondrial-Fraction Shift From Composition
Consider two hypothetical samples with two cell types. In each sample, the mean mitochondrial fraction is 6% for type 1 and 18% for type 2. Sample A is 80% type 1 and 20% type 2; sample B is 30% type 1 and 70% type 2.
The expected sample-wide mean fractions, using these proportions and type-specific means, are \(0.80(6\%)+0.20(18\%)=4.8\%+3.6\%=8.4\%\) for A and \(0.30(6\%)+0.70(18\%)=1.8\%+12.6\%=14.4\%\) for B. The 6.0-percentage-point difference arises entirely from the stated composition difference; the within-type means are identical.
This example shows why a higher overall mitochondrial fraction is not sufficient evidence of a sample-processing failure. If the within-type distributions also shift, a technical or biological difference within types becomes more plausible, but still requires context. Cell-type proportions and conditional QC distributions should be reported separately when the scientific question and available annotations permit.
A Practical Diagnostic Sequence
Check sample labels, metric definitions, gene annotation, and the barcode set used for each cell-call rate. Record relevant differences in library preparation or sequencing.
Report called-cell counts, robust centers and spreads for QC metrics, and cell-call rates with their denominators. Do not replace sample summaries with a pooled distribution.
Use the same axes and display scales for side-by-side plots. Look for broad shifts, unusual tails, multimodality, or a small subgroup driving a summary difference.
Consider sequencing depth, sample handling, cell composition, and plausible biological differences. Where appropriate, compare within annotated cell groups rather than only across all cells.
State what differs, how large the difference is, and what remains uncertain. A diagnostic flag should lead to review, not automatic sample rejection.
Alternatives, Pitfalls, and Limits
A pooled cutoff is convenient, but it can classify cells differently simply because samples have different distributions. Sample-specific plots and summaries preserve that information, although they do not by themselves supply a decision rule. Formal comparisons can quantify evidence for differences when their assumptions and sampling units are appropriate. For biological questions, the independent samples or donors—not thousands of cells from a few donors—are generally the relevant replication units. A test that treats every cell as an independent biological replicate can give misleadingly small uncertainty.
| Approach | What it helps show | Main limitation |
|---|---|---|
| Pooled summary or cutoff | Overall distribution or a common rule | Can conceal sample-specific shifts and apply unevenly across samples |
| Per-sample summaries and plots | Centers, spreads, tails, and sample outliers | Descriptive; does not identify the cause of a shift |
| Cell-call-rate comparison | Differences in called fractions under a defined denominator | Depends on comparable barcode sets and the rate model; not a direct measure of sample quality |
| Within-cell-type comparison | Whether a sample-wide difference may reflect composition | Requires suitable annotations and can miss unmeasured subgroups |
- Mistake: “The pooled median is acceptable, so every sample is acceptable.” A pooled statistic can hide a shifted sample. Compare each sample’s distribution and size directly.
- Mistake: “A higher mitochondrial fraction proves damaged cells.” It may reflect cell composition, biology, or technical factors. Check the distribution and relevant sample context before assigning a cause.
- Mistake: “A very small cell-level p-value means the biological effect is well supported.” Many cells do not replace independent biological replicates. Match uncertainty calculations to the actual sampling design.
- Limitation: QC summaries do not reveal every failure mode, and unusual values can be biologically meaningful. These diagnostics identify patterns to investigate; they do not determine, by themselves, which cells or samples must be removed.
Check Your Understanding
Answer each question, then check the brief solutions below.
- Two samples have the same median mitochondrial fraction, but one has a much wider interquartile range. What difference does this indicate, and what should be inspected next?
- Sample A has 4,000 called barcodes among 8,000 candidates; sample B has 3,000 among 5,000 candidates. Calculate both call rates and their difference in percentage points.
- Why can a pooled mean UMI count fail to describe either of two samples?
- A sample has a higher overall mitochondrial fraction, but the within-cell-type distributions are similar to those in other samples. Give one explanation for the overall difference.
- Why is treating every cell as an independent biological replicate a problem when comparing samples from a small number of donors?
Solutions. (1) The centers are similar but the middle 50% of values is more dispersed in one sample; inspect the full distributions and tails for heterogeneity or subgroups. (2) A’s rate is \(4000/8000=0.500\), or 50.0%; B’s is \(3000/5000=0.600\), or 60.0%. B exceeds A by 10.0 percentage points. (3) The pooled mean is a sample-size-weighted average, so it may fall between sample means or be dominated by the larger sample. (4) The sample may contain a larger proportion of a cell type that tends to have higher mitochondrial fractions. (5) Cells from the same donor are not independent biological replicates; treating them as independent can understate uncertainty and overstate evidence for a sample-level difference.