Tutorials › Statistical Methods for Single-Cell RNA Sequencing › Artificial Doublets for Score-Based Detection

Quality Control, Doublets and Ambient RNA · Tutorial 31 of 700

Artificial Doublets for Score-Based Detection

You will learn to construct synthetic doublet counts from observed cells and to interpret their role as reference examples without treating them as confirmed doublets.

Intermediate 12 min read

What You'll Learn

  • Represent each cell as a gene-by-gene count vector and construct an artificial doublet by adding two such vectors.
  • Distinguish count summation from averaging, normalization, and other transformations.
  • Choose cell pairs in a way that reflects the sample and the doublet types of interest.
  • Explain how artificial profiles can serve as reference examples when examining transcriptome-based scores.
  • Diagnose limitations caused by cell selection, library size, and preprocessing choices.
  • Recognize why simulated doublets are informative reference cases, not ground-truth labels for observed barcodes.

Why Construct Artificial Doublets?

A doublet barcode can contain RNA from two cells captured together. Its observed transcript counts may therefore combine signals from two cellular profiles. The earlier material on the generative model for doublets and on heterotypic and homotypic doublets motivates a practical question: if the original captured cells are available, can we construct examples of what a combined profile might look like? Artificial doublets provide one answer.

The central operation is simple: select two observed cells and add their gene counts. The resulting profile is a simulated reference case for methods that assign transcriptome-based doublet scores. It is not a newly observed barcode, and it is not a verified doublet. Its usefulness depends on which cells were selected, how their counts were combined, and how the reference profiles are used.

Definition: Let \(x_i=(x_{i1},\ldots,x_{iG})\) be the vector of nonnegative, unnormalized RNA counts for cell \(i\) across \(G\) genes. For a selected pair of cells \(i\) and \(j\), an artificial doublet count profile is \(d_{ij}=x_i+x_j\), with gene-wise addition. Thus \(d_{ijg}=x_{ig}+x_{jg}\) for gene \(g\). It is a constructed reference profile, not an observed cell or a confirmed biological doublet.

Constructing the Count Profile

Use count vectors on the same gene set and in the same gene order. In the basic construction, each input is a cell's observed count vector before normalization or logarithmic transformation. Counts are added gene by gene; they are not averaged. If one cell has 4 counts for a gene and the other has 7, the artificial profile has 11 counts for that gene.

The total count of an artificial profile follows directly from the definition. If \(L_i=\sum_{g=1}^{G}x_{ig}\) is the total count for cell \(i\), then:

$$ \sum_{g=1}^{G}d_{ijg} =\sum_{g=1}^{G}(x_{ig}+x_{jg}) =L_i+L_j. $$

This is one reason not to interpret an artificial profile's larger total count as independent evidence that a particular barcode is a doublet: the increase is built into the construction. Artificial profiles can differ substantially in total counts because their two source cells may have different library sizes. Normalizing or otherwise transforming the profiles may be necessary for a score calculation, but that is a separate step from defining the synthetic counts.

Worked Example: Adding Two Observed Count Profiles

Suppose three genes are measured in two hypothetical observed cells. Cell A has counts \((4,1,0)\), and cell B has counts \((0,3,5)\). Construct their artificial doublet profile and calculate its total count.

Add each gene's counts: \(d_{AB}=(4+0,\;1+3,\;0+5)=(4,4,5)\). The two source totals are \(L_A=4+1+0=5\) and \(L_B=0+3+5=8\), so the artificial profile total is \(4+4+5=13=5+8\).

The profile has counts from both sources: gene 1 contributes 4 counts from A, while gene 3 contributes 5 from B. This example illustrates the arithmetic, not a claim that these genes or counts correspond to a real experiment.

Pair Selection Defines the Reference Set

A single artificial profile is rarely an adequate reference. A scoring procedure typically needs multiple simulated profiles, so the analyst selects many pairs from eligible observed cells. Pair selection is part of the method: different choices create different simulated reference sets, and thus can change what kinds of combinations the scores are asked to distinguish.

For a sample processed as one unit, a common principle is to choose both source cells from that same sample. Combining cells across samples can create profiles that could not have arisen from two cells sharing one capture process, and can confound sample-specific expression differences with the signal of interest. If samples are processed separately, the construction and any subsequent score comparison should preserve that distinction.

Pairs can be selected from the same broad cell population or across populations. Same-population pairs provide examples of combinations that may be transcriptomically similar to singlets; cross-population pairs provide examples with signals from distinct populations. These correspond loosely to homotypic and heterotypic combinations, but the construction does not ensure that the selected cells represent every possible doublet in the sample. For example, cell labels may be uncertain, rare populations may be poorly represented, and two cells from the same annotated group can still differ substantially.

Pairing a cell with itself is usually excluded: \(x_i+x_i=2x_i\) is a doubled count vector, not a simulated combination of two distinct observed cells. Sampling without replacement within a pair avoids this case. Across a large set of simulated pairs, however, a source cell can appear in more than one pair unless the design explicitly prohibits reuse. Reuse is not automatically wrong, but it means the artificial profiles are dependent through shared source cells.

Worked Example: Choosing a Pairing Scheme

Consider a hypothetical sample with six cells: three assigned to population A and three to population B. An analyst wants examples of both same-population and cross-population combinations. How many distinct unordered pairs are available in each category if each cell can appear only once within a pair?

There are \(\binom{3}{2}=3\) A-with-A pairs and \(\binom{3}{2}=3\) B-with-B pairs, for 6 same-population pairs altogether. There are \(3\times3=9\) cross-population pairs, since each of the 3 A cells can be paired with each of the 3 B cells. The total is \(6+9=15=\binom{6}{2}\), which checks the count of all distinct unordered pairs.

If the purpose is to represent both combination types, drawing pairs uniformly from all 15 would produce a different mix from drawing equal numbers of same-population and cross-population pairs. Neither scheme is universally correct: the selected mix should match the intended reference task, and the choice should be reported. These pair counts describe possible pairs, not the expected biological frequency of doublets in the sample.

From Simulated Counts to Score References

A score-based detector assigns a numerical score to profiles using their transcriptome patterns. Artificial profiles supply constructed examples of combined expression against which observed profiles can be assessed. The specific score calculation is a separate matter; the key idea here is that the simulated profiles help define a reference for interpreting a profile as more or less doublet-like under the chosen scoring procedure.

The count construction and the score calculation should be kept conceptually distinct. First, form \(d_{ij}\) from counts. Then apply compatible preprocessing to the observed and artificial profiles before calculating scores. For example, if a method uses normalized expression, the artificial profiles need to be represented under the same preprocessing scheme as the observed cells. Normalizing each source cell first and then adding the normalized values is not generally equivalent to adding counts first and then normalizing the combined vector: the first operation gives the two cells separate scaling, while the second scales their combined counts.

A useful justification for count addition comes from a simple sampling model. Suppose that, conditional on its total count \(L_i\), cell \(i\)'s gene counts follow a multinomial distribution with gene-probability vector \(p_i\). If two cells have the same gene-probability vector \(p\), and their counts are treated as independent, their summed counts have the distribution of a multinomial count vector with total \(L_i+L_j\) and probabilities \(p\). This follows because the sum of independent counts in each gene combines the two sets of draws from the same probabilities. When the source cells have different profiles, the sum instead combines distinct expression patterns; it is a constructed mixture of counts, not a draw from one cell's expression distribution.

This reasoning supports the arithmetic used to create a combined-count reference, but it does not establish that the reference set perfectly reproduces captured doublets. It assumes the observed source profiles are suitable stand-ins for the cells that could form doublets, and it abstracts from capture, sequencing, and other technical variation. Treat it as a model-based reference, not a complete physical simulation.

Worked Example: Why Count-First and Normalize-First Differ

For two hypothetical cells, suppose the counts for two genes are \(x_i=(90,10)\) and \(x_j=(10,90)\). Each cell has total count 100. Compare the normalized combined profile with the sum of separately normalized profiles, using relative counts (each vector divided by its own total).

Adding counts first gives \(d_{ij}=(100,100)\), with total 200. Its relative-count profile is \((100/200,\;100/200)=(0.5,0.5)\). Separately normalizing each source gives \((0.9,0.1)\) and \((0.1,0.9)\); their sum is \((1.0,1.0)\). If that sum is subsequently rescaled to sum to 1, it too becomes \((0.5,0.5)\) in this equal-library example.

The agreement after rescaling here depends on the equal totals. If instead the second cell had counts \((10,190)\), its total would be 200. Adding counts first gives \((100,200)\), which normalizes to \((1/3,2/3)\). Separately normalizing gives \((0.9,0.1)+(0.05,0.95)=(0.95,1.05)\), which rescales to approximately \((0.475,0.525)\). The two procedures weight source cells differently. A method should therefore specify which construction and preprocessing it uses rather than treating these operations as interchangeable.

Assumptions, Diagnostics, and Limitations

Artificial references are most interpretable when the source cells and observed barcodes are comparable: they should come from the relevant sample and use the same genes and count definitions. The construction also assumes that observed source profiles adequately represent cells that might have been captured together. That assumption can fail when some cell types are absent, filtered out, or represented by very few cells.

Several checks help reveal problems before interpreting scores:

  • Check source-cell eligibility. Confirm that cells used as inputs passed the intended cell-validity and sample checks. Contaminated or incorrectly called barcodes can contribute misleading profiles.
  • Inspect simulated totals. Compare \(L_i+L_j\) across artificial pairs and against observed totals. Large differences may make score separation reflect library size rather than combined expression patterns.
  • Check pair composition. Tabulate which populations and samples contribute source cells. A reference dominated by common populations may poorly represent rare or unobserved combinations.
  • Check preprocessing consistency. Apply compatible gene filtering and transformations to observed and synthetic profiles. Inconsistent transformations can create score differences unrelated to the intended signal.
  • Assess sensitivity to pair selection. If conclusions change substantially across reasonable pairing schemes or random draws, the reference is unstable and should not be treated as decisive.

A further limitation is that artificial profiles share source cells and are therefore not necessarily independent observations. Generating thousands of pairs from a small number of cells does not create thousands of independent biological examples. Also, a real doublet may be affected by capture and sequencing in ways that simple count addition does not reproduce. Finally, some genuine doublets—especially combinations of similar cells—may resemble ordinary singlets. A score reference cannot remove this fundamental ambiguity.

ApproachWhat it providesKey limitation
Artificial doublet profilesConstructed count combinations from observed cells for use as score referencesRepresent only the source cells and pair choices included
Observed barcodes aloneActual captured profiles without synthetic constructionUsually do not provide confirmed doublet labels by themselves
External validation evidenceIndependent evidence about whether selected barcodes are doubletsMay be unavailable, incomplete, or costly to obtain

These approaches answer different questions. Artificial profiles make a reference set possible when confirmed labels are unavailable, but they are not a substitute for independent validation. Nor should simulated profiles be interpreted as a direct estimate of how many doublets occurred; their number is chosen by the analyst.

Common Mistake

A common error is to say, “The artificial profile has twice the counts, so any observed barcode with a high total must be a doublet.” The first clause may be true for two source cells with similar library sizes, but the conclusion does not follow. Artificial totals are sums by construction, while observed totals also vary among singlets. A high total alone does not establish that the transcriptome is a combination of two cells. Use the synthetic profiles as reference cases within a score-based analysis, inspect library-size effects, and avoid treating simulated examples as verified labels.

Key takeaway: Artificial doublets are made by adding the unnormalized gene-count vectors of selected, distinct observed cells. Pair choice and preprocessing determine what the resulting reference set represents. It can inform transcriptome-based scoring, but it is neither ground truth nor a direct count of biological doublets.

Check Your Understanding

Answer each question, then compare your reasoning with the solutions.

  1. Cell U has counts \((2,5,1)\), and cell V has counts \((3,0,4)\). What is their artificial profile and its total count?
  2. Why is pairing a cell with itself usually excluded when constructing artificial doublets?
  3. Two source cells have totals 80 and 120. What is the total count of their artificial profile, and why does that total not prove an observed barcode is a doublet?
  4. Why might drawing all pairs uniformly give a different reference composition from deliberately sampling equal numbers of same-population and cross-population pairs?
  5. State one reason artificial profiles are useful and one reason they are not ground-truth doublets.

Solutions. (1) Add gene-wise: \((2+3,5+0,1+4)=(5,5,5)\); the total is \(15\). (2) Self-pairing produces \(2x_i\), a doubled copy of one observed profile rather than a combination of two distinct cells. (3) The artificial total is \(80+120=200\), by additivity of the counts. An observed barcode can have a high total for other reasons, so total count alone does not establish its origin. (4) The numbers of possible within-population and cross-population pairs depend on population sizes; uniform sampling over all pairs therefore need not allocate equal numbers to the two categories. (5) Artificial profiles provide constructed combined-expression references for score-based analysis; they are not confirmed captured events and may not reproduce all features of real doublets.

Clinical Biostats