Why Evaluate Removal as Well as Detection?
A doublet-detection procedure produces candidate barcodes; removing those barcodes is a separate decision with its own consequences. Filtering may reduce mixed profiles, but it can also remove genuine cells that resemble doublets, including cells from small or unusual populations. The relevant question is therefore not simply whether the number of candidate doublets fell. It is whether the retained data have more coherent profiles without an unacceptable loss of biological structure.
This evaluation compares the same initial set of called cell barcodes before and after candidate removal. It focuses on three complementary views: cluster structure, cell-type proportions, and marker patterns. These views answer different questions. Cluster summaries show where removals occurred; proportions quantify changes in the composition of the retained set; and marker patterns help assess whether mixed profiles became less common. None alone proves that every removed barcode was a doublet or every retained barcode a singlet.
Make the Comparison Interpretable
For a direct assessment of which cells were removed from which existing groups, keep the initial cluster assignments fixed and tabulate the retained and removed cells within each cluster. This isolates the effect of filtering on those assignments. If clustering is rerun after removal, report that as a separate downstream analysis: cell normalization, feature selection, dimensionality reduction, and clustering can all change when the input cells change. A cluster that splits or merges after rerunning is not necessarily evidence that the filtering directly created or resolved that structure.
Where samples or donors are available, calculate summaries within each sample before reporting an overall pattern. Pooling cells can hide sample imbalance: a cell type may appear to decline because a sample with many such cells contributed more candidates, not because the same loss occurred in every sample. Report both the number of cells and the proportion, and identify the denominator. A proportion among all initial barcodes is not directly interchangeable with a proportion among retained barcodes.
For a type or cluster \(k\), let \(n_k\) be its initial count and \(d_k\) the number flagged within it. Its initial and retained proportions are \(p_k=n_k/N\) and \(p_k'=(n_k-d_k)/(N-D)\). These summaries describe composition; they do not estimate the true biological proportion in a tissue unless the sampling and cell-calling process support that interpretation.
The last expression follows by substituting \(n_k=Np_k\) and \(d_k=D(d_k/D)\), then combining the fractions. It shows why a proportion can rise even when no cells of that type are added: the proportion rises if candidate cells are less concentrated in that type than in the initial set. Conversely, a type loses relative share when the candidate set contains a larger fraction of that type than the initial set. Always inspect the counts as well as this compositional change.
Worked Example: Reading Cluster-Level Removal
Suppose a hypothetical dataset has \(N=600\) called barcodes assigned to four clusters. Sixty are flagged and removed. The cluster counts and flagged counts are: A, 240 and 12; B, 200 and 8; C, 100 and 25; and D, 60 and 15. The cluster assignments are held fixed for this direct comparison.
The retained counts are found by subtracting the flagged count in each cluster: A has \(240-12=228\), B has \(200-8=192\), C has \(100-25=75\), and D has \(60-15=45\). These sum to \(228+192+75+45=540\), consistent with \(600-60=540\) retained barcodes.
The candidate fractions within the clusters are \(12/240=5\%\), \(8/200=4\%\), \(25/100=25\%\), and \(15/60=25\%\). Thus removals are concentrated in C and D. Their shares of the initial set were \(100/600=16.67\%\) and \(60/600=10.00\%\); their shares of the retained set are \(75/540=13.89\%\) and \(45/540=8.33\%\). A and B rise in relative share, from \(40.00\%\) to \(228/540=42.22\%\) and from \(33.33\%\) to \(192/540=35.56\%\), respectively.
This pattern identifies where filtering had the largest effect, but does not by itself establish that C or D consists of doublets. It warrants checking cluster-specific marker patterns and whether C or D represents a genuine population. Cluster D still contains 45 retained cells, so the table does not show that it disappeared; it does show that one-quarter of its initial members were removed.
Proportions, Rare Populations, and Denominators
A rare type deserves special attention because removing a modest number of cells overall can remove a large fraction of that type. Report, at minimum, the initial count, the number flagged, the retained count, and the corresponding proportions. It is often useful to report the type-specific removal fraction \(d_k/n_k\) alongside the type's share of the whole dataset. These answer different questions: the first asks what fraction of that type was removed; the second asks how much of the dataset the type represents.
A rise in another type's proportion after filtering is not evidence that its cell count increased. The denominator became smaller. Nor does a decrease in a rare type's proportion necessarily prove that the filtering was inappropriate: it may reflect a real enrichment of candidate doublets in that type. The pattern is a diagnostic signal to investigate, not a decision rule in isolation.
Worked Example: Quantifying a Possible Rare-Population Loss
In a hypothetical dataset of \(N=500\) barcodes, a rare cell type has \(n_k=20\) cells. Ten of those 20 are flagged; overall, \(D=50\) barcodes are removed. Assume the cell-type labels are held fixed for this count comparison.
Before removal, the type makes up \(20/500=0.0400\), or \(4.00\%\), of the dataset. After removal, it has \(20-10=10\) cells among \(500-50=450\) retained barcodes, so its retained share is \(10/450=0.02222\), or \(2.22\%\). Its count fell by \(10\) cells, and its type-specific removal fraction is \(10/20=50.0\%\).
For comparison, the other types contain \(500-20=480\) initial cells, of which \(50-10=40\) are flagged. Their removal fraction is \(40/480=8.33\%\). The candidate set contains \(10/50=20.0\%\) rare-type cells, compared with \(20/500=4.00\%\) in the initial set. The rare type is therefore disproportionately represented among candidates in this hypothetical comparison.
The calculation raises a clear concern: half of the rare type was removed. It does not settle whether those ten barcodes were doublets. Inspect their marker profiles, their distribution across samples, and the evidence supporting their candidate calls before deciding whether the loss is acceptable.
Marker Patterns and Residual Mixed Profiles
Marker evaluation asks whether candidate profiles show the pattern expected from contributions by more than one cell type, and whether such patterns remain among retained barcodes. Choose informative markers for the populations under consideration and use a consistent expression scale, processing procedure, and positivity definition in the before-and-after comparison. For example, one can count cells in a cluster that are positive for markers from two distinct lineages, provided the positivity thresholds are defined in advance and applied identically.
Do not interpret a single marker or a single co-expression event as definitive. A marker may be detected in more than one population, expression measurements can be sparse, and biological states can share or change marker expression. A convincing pattern uses multiple markers and the broader profile. Remaining mixed-marker profiles after filtering may indicate residual candidate doublets, but can also have other explanations and should be investigated rather than automatically removed.
Worked Example: Checking Whether Mixed Marker Profiles Remain
Consider a hypothetical cluster of 30 barcodes with fixed cluster membership. Define marker A and marker B as positive using the same pre-specified normalized-expression thresholds for all 30 cells. Fourteen cells are positive for both markers. Ten barcodes are flagged; eight of these ten are double-positive. After removal, 20 barcodes remain, including six double-positive cells.
Before removal, the double-positive fraction is \(14/30=0.4667\), or \(46.67\%\). Among candidates, it is \(8/10=80.0\%\). Among retained barcodes, it is \(6/20=30.0\%\). The candidate fraction is \(80.0/30.0=2.67\) times the retained fraction. This descriptive contrast suggests that double-positive profiles were enriched among candidates.
However, six retained cells still meet the same dual-marker definition. The data therefore do not support the claim that mixed profiles have been eliminated. Inspect the expression of additional lineage markers and the individual retained profiles. Because shared or changing marker expression is also possible, the dual-positive count alone cannot label those six cells as doublets.
A Practical Evaluation Sequence
Use a consistent sequence so that observed changes can be traced to a particular choice. The aim is not to produce a single pass-or-fail statistic, but to make losses and remaining concerns visible.
State the initial number of called barcodes, the number flagged, and the retained number. Keep sample identifiers and initial cluster labels available.
Report initial, flagged, and retained counts. Look for clusters or samples with unusually high removal fractions, not only a dataset-wide total.
For each relevant cell type, show its initial and retained counts and shares, plus the fraction of that type flagged. Give special attention to small populations.
Apply the same marker definitions to candidates and retained barcodes. Use multiple markers and review profiles that contradict the expected pattern.
First interpret summaries on fixed labels and a common comparison scale. If the analysis is rerun after filtering, describe its cluster changes separately and investigate them as downstream consequences.
Diagnostics, Alternatives, and Limits
Several checks help reveal when the evaluation itself may be misleading. Confirm that the initial and retained sets use the same barcode universe except for the stated removals, and that counts reconcile: retained plus removed equals initial. Check each sample separately for disproportionate losses. Verify that cell-type labels were assigned consistently, and that marker thresholds and normalization choices were not changed between comparisons. If the number of cells in a rare type is very small, its proportion can change sharply when only a few cells are removed; show the count rather than presenting the percentage alone.
There are two useful, complementary comparisons. A fixed-label comparison keeps initial clusters or cell-type labels and measures where candidates were removed; it is best for attributing count changes directly to filtering. A recomputed comparison repeats downstream analysis on retained cells and asks how the resulting structure changes; it is relevant to the final analysis but combines the effect of removal with changes in normalization, feature selection, and clustering. Neither replaces the other. When the question is specifically whether removal reduced mixed profiles, direct comparison of consistent marker summaries is more informative than cluster labels alone.
These diagnostics have limits. Candidate status is not a known biological truth, and removal may create selection bias if the probability of being flagged differs across cell types or samples. Relative proportions are compositional: one type's share depends on how many cells of every other type remain. Expression summaries can also shift when normalization is recalculated. For an interpretable marker comparison, keep processing and definitions consistent where possible; if they must change, state that the comparison includes those changes. The evaluation supports a reasoned filtering decision, but cannot by itself establish the true identities of individual barcodes.
Common Pitfall
Check Your Understanding
Answer each question using the definitions and comparison principles above. Solutions follow the questions.
- A dataset has 800 initial barcodes, 80 flagged barcodes, and 720 retained barcodes. What should the retained-count check equal?
- A type has 30 of 600 initial cells, with 12 flagged. Calculate its initial share, retained share, and type-specific removal fraction.
- Why can a cell type's proportion increase after filtering even though its cell count decreases?
- A marker-defined mixed profile falls from 40% before filtering to 15% among retained cells. Does that establish that all remaining mixed profiles are doublets? Give one reason.
- Why report a fixed-label comparison separately from clustering rerun after removal?
Solutions: (1) The check is \(800-80=720\), matching the stated retained count; equivalently, \(720+80=800\). (2) The initial share is \(30/600=5.00\%\). The retained count is \(30-12=18\) among \(600-12=588\) retained cells, so its retained share is \(18/588=3.061\%\). Its type-specific removal fraction is \(12/30=40.0\%\). (3) Its count can decline while the total retained denominator declines proportionally more; a share is a ratio, not a count. (4) No. The remaining profiles may reflect shared or changing marker expression, among other explanations; the pattern is a diagnostic requiring broader evidence. (5) Fixed labels isolate where filtering removed cells from the initial groups. Rerunning clustering also changes downstream processing and may split or merge groups, so it answers a different question.