Tutorials › Statistical Methods for Single-Cell RNA Sequencing › Why Spatial Spots Contain Mixtures

Spatial Transcriptomics · Tutorial 627 of 700

Why Spatial Spots Contain Mixtures

Learn how cell profiles combine within a spatial spot and why observed mixture weights need not equal the cell fractions in that spot.

Advanced 10 min read

What You'll Learn

  • Distinguish a spot’s cell fractions from its contribution to captured RNA.
  • Write an expectation model for gene counts from multiple cell types.
  • Explain how spot area and cell density affect the number of contributing cells.
  • Calculate how cell-type-specific capture efficiency changes the effective mixture.
  • Identify assumptions and practical signs that a spot’s expression reflects a mixture.

Why a Spatial Measurement Can Represent Several Cells

A spatial transcriptomic measurement is attached to a location in tissue, but the location is not necessarily one cell. In assays that measure expression over a capture area, transcripts from every cell contributing RNA to that area can enter the same spot-level count. The resulting gene profile can therefore combine several cell types, even if the biological tissue contains sharply distinct cells.

The number of cells contributing to a spot depends on its physical size and on how densely cells occupy the tissue. But counting cells alone does not determine the observed mixture. Cell types can differ in total RNA abundance, in expression of a particular gene, and in how efficiently their transcripts are captured. Consequently, a type that is a minority of the cells can contribute a substantial share of the measured RNA.

Definition: A spot-level expression mixture is the combined gene-expression signal recorded from the cells, and possibly other RNA sources, contributing molecules to one spatial measurement location. A cell fraction is the proportion of cells in the spot belonging to a cell type. An RNA contribution fraction is the proportion of the spot’s captured RNA attributable to that type. These fractions need not be equal.

This distinction is useful when interpreting spatial patterns. A high count for a gene at one location could reflect high expression within a cell type, a larger number of cells of that type, more total RNA per cell, or more efficient capture. A spot count alone does not separate these explanations.

A Simple Model for the Combined Signal

Let \(s\) index a spot, \(g\) a gene, and \(k\) a cell type. Let \(n_{sk}\) be the number of cells of type \(k\) contributing to spot \(s\). Let \(\mu_{kg}\) be the average number of molecules of gene \(g\) per cell of type \(k\), before capture. Finally, let \(e_{sk}\) be the fraction of those molecules expected to be captured and recorded for cells of type \(k\) in spot \(s\). For this simple model, \(e_{sk}\) is between 0 and 1. Write \(Y_{sg}\) for the observed count of gene \(g\) in spot \(s\).

Model: If molecules from contributing cells add together, the expected observed count is
$$ E[Y_{sg}] = \sum_k n_{sk} e_{sk}\mu_{kg}. $$
The equation describes an expected count, not a guarantee that the observed count equals that value. It assumes that the profiles \(\mu_{kg}\) are relevant to the cells in this spot, that expected capture can be represented by \(e_{sk}\), and that molecules from different cells contribute additively. It does not include background RNA or other sources unless those are added as separate terms.

This expression is a bookkeeping model for how the signal forms, not a procedure for estimating cell-type proportions. The cell count \(n_{sk}\) scales the contribution from type \(k\), while \(e_{sk}\mu_{kg}\) is its expected captured amount of gene \(g\) per cell. The earlier material on spot counts and spatial coordinate systems establishes how spot measurements are indexed and recorded; the model here focuses on why the counts can combine contributions from several cells.

From Cell Fractions to RNA Contribution Fractions

To compare cell fractions with RNA contributions, it helps to consider each cell type’s total RNA profile. Define \(T_k=\sum_g\mu_{kg}\), the total expected molecules across the genes being considered for a type-\(k\) cell, and \(p_{kg}=\mu_{kg}/T_k\), its fraction of those molecules belonging to gene \(g\). If \(T_k>0\), then \(p_{kg}\) is a normalized per-cell profile, with \(\sum_g p_{kg}=1\).

For one spot, the expected captured total RNA contribution from type \(k\) is proportional to \(n_{sk}e_{sk}T_k\). Dividing this amount by the sum of contributions across types gives an effective RNA contribution fraction:

$$ \theta_{sk} = \frac{n_{sk}e_{sk}T_k}{\sum_j n_{sj}e_{sj}T_j}. $$

The expected gene-\(g\) count can then be written as the sum of the expected captured total and the weighted gene profile:

$$ E[Y_{sg}] = \left(\sum_k n_{sk}e_{sk}T_k\right) \left(\sum_k \theta_{sk}p_{kg}\right). $$

The first factor sets the expected captured scale; the second is a weighted gene composition. This factorization shows why cell fractions alone are generally not the right weights for the observed RNA mixture. The \(\theta_{sk}\) weights equal cell fractions only under special conditions—for example, when cell types have the same total RNA per cell and the same capture efficiency in the spot.

Worked Examples

Worked Example: Adding Counts From Two Cell Types

Consider a hypothetical spot with 3 cells of type A and 2 cells of type B. For one gene, suppose type A cells have an average of 4 molecules per cell and type B cells have an average of 10. Suppose capture efficiency is 0.50 for type A and 0.80 for type B. Calculate the expected observed count.

For type A, the expected captured contribution is \(3\times0.50\times4=6\) molecules. For type B, it is \(2\times0.80\times10=16\) molecules. Adding these contributions gives

$$ E[Y_{sg}] = 3(0.50)(4)+2(0.80)(10)=6+16=22. $$

The spot contains only five cells, but the type-B cells contribute more to the expected count despite being fewer. They have both a higher per-cell expression level for this gene and a higher capture efficiency. The value 22 is an expectation under the stated assumptions; an observed count can be above or below it.

Worked Example: Cell Fractions Are Not RNA Fractions

Suppose a hypothetical spot contains 6 cells of type A and 4 of type B. Type A cells contribute 1,000 molecules across the genes considered, on average, while type B cells contribute 2,000. Their capture efficiencies are 0.80 and 0.50, respectively. For a particular gene, assume the gene makes up 0.010 of type A’s total profile and 0.040 of type B’s.

The cell fractions are \(6/10=0.60\) for type A and \(4/10=0.40\) for type B. But the expected captured totals are \(6(0.80)(1{,}000)=4{,}800\) for A and \(4(0.50)(2{,}000)=4{,}000\) for B. Thus the RNA contribution fractions are

$$ \theta_{sA}=\frac{4{,}800}{8{,}800}=0.5455,\qquad \theta_{sB}=\frac{4{,}000}{8{,}800}=0.4545. $$

The expected gene fraction in the combined profile, using these contributions, is

$$ 0.5455(0.010)+0.4545(0.040)=0.02364. $$

So the gene represents about 2.364% of this expected captured profile, not the 2.200% obtained by weighting the two gene fractions only by cell fractions: \(0.60(0.010)+0.40(0.040)=0.02200\). The difference arises because total RNA abundance and capture efficiency change each type’s share of the recorded RNA.

Worked Example: Spot Size and Cell Density Change the Signal Scale

Compare two hypothetical spots. A spot with area 100 square units has a cell density of 0.08 cells per square unit and contains 6 cells of type A and 2 of type B. A spot with area 200 square units has density 0.12 cells per square unit and contains 6 cells of type A and 18 of type B. For one gene, assume the average expression is 2 molecules per A cell and 8 per B cell, with a common capture efficiency of 0.50.

The cell totals agree with area times density: the first spot has \(100(0.08)=8\) cells, and the second has \(200(0.12)=24\). For the first spot, the expected count is

$$ 0.50\{6(2)+2(8)\}=0.50(28)=14. $$

For the second spot, it is

$$ 0.50\{6(2)+18(8)\}=0.50(156)=78. $$

The larger spot has more cells and a greater share of type B, which has higher expression of this gene. Its expected count is therefore much higher. To isolate composition from scale, divide by the cell count: the first spot has \(14/8=1.75\) expected captured molecules per cell, while the second has \(78/24=3.25\). This difference reflects the shift toward type B, not simply the larger number of cells.

Justifying the Weighted Mixture Representation

The mixture equation follows from additivity and linearity of expectation. Imagine enumerating every contributing cell and every molecule of gene \(g\) in that cell. For each molecule, define an indicator that is 1 if it is captured and recorded, and 0 otherwise. If its capture probability is \(e_{sk}\), its expected indicator is \(e_{sk}\). For a type-\(k\) cell with an average of \(\mu_{kg}\) such molecules, the expected captured contribution is \(e_{sk}\mu_{kg}\). Across \(n_{sk}\) cells, expected contributions add:

$$ E\left[\sum_{\text{contributing molecules}} I\right] = \sum_{\text{contributing molecules}} E[I] = \sum_k n_{sk}e_{sk}\mu_{kg}. $$

This argument does not require every capture event to be independent; linearity of expectation is enough for the mean. Independence would matter for deriving a specific variance or count distribution, which this expectation model does not specify. Nor does this argument imply that a normalized observed count has expectation exactly equal to the ratio of expected counts. A ratio of random quantities generally has a different expectation from the ratio of their expectations. The weighted profile is therefore best understood here as the composition implied by expected contributions, especially as a useful approximation when totals are sufficiently large.

What Spot Size, Density, and Capture Efficiency Do

A larger capture area can include more cells, but area alone does not determine cell number. If density is approximately uniform, the expected number of cells is related to area multiplied by density. In real tissue, density varies, cells can extend across nominal boundaries, and portions of the capture area may contain extracellular space or non-cellular structures. Thus size and density affect the amount and identity of material available to capture; they do not specify a fixed number of cells in every spot.

If a spot contains more cells but the cell-type proportions and profiles remain unchanged, the expected gene counts generally rise with cell number. If composition also changes, the normalized gene profile can change as well. A change in spot size can therefore affect both total signal and mixture composition, depending on which cells fall within the area.

A common capture efficiency shared by every cell type in a spot multiplies all type contributions by the same factor. It changes the expected count scale, but cancels from the effective RNA contribution fractions \(\theta_{sk}\). In contrast, type-specific capture efficiencies change those fractions. Capture efficiency can vary with tissue properties, transcript abundance, cell structure, and technical handling. It is therefore unsafe to assume that the observed RNA shares are the same as the underlying cell shares.

These are expectations across a measurement process, not exact descriptions of every observed count. Stochastic capture and sampling can make observed counts vary, particularly for low-abundance genes. Background RNA can add counts not attributable to the cells assigned to a spot. Such departures matter when interpreting data, but modeling their distributions and estimating cell-type contributions require methods beyond this signal-formation explanation.

Assumptions, Diagnostics, and Limits

The simple model is useful when the following conditions are reasonable: cell-type profiles represent the cells in the spot; the number of contributing cells is meaningful; captured molecules from different cells add to the count; and capture efficiency can be summarized for each type in the spot. It also treats the listed cell types as the relevant sources of RNA. These assumptions are approximations, not guarantees supplied by the measurement.

Several patterns can warn that a simple interpretation is inadequate:

  • Counts rise with total spot signal. This may reflect more contributing cells, higher capture, or a larger RNA contribution rather than higher expression per cell.
  • Nearby spots have different apparent mixtures. The tissue may have different cell composition or density, but local capture conditions and boundary effects can also contribute.
  • Unexpected signal appears in low-cellularity regions. Background or extracellular RNA may be contributing, so not every count should automatically be assigned to a cell in the spot.
  • A marker is weaker than its cell abundance suggests. A type may contribute little of that gene, have low total RNA, or be captured inefficiently. A weak count alone does not establish that the cell type is absent.

The main alternative measurement is a cell-resolved assay, in which expression is recorded for individual cells rather than aggregated across a capture area. That can make cell-level profiles more directly interpretable, but it does not make the assays interchangeable: spatial spot measurements preserve location, while cell-resolved measurements may have different capture properties and can lose spatial context. Within spot-based measurements, a raw count retains the combined scale, whereas a normalized profile emphasizes relative composition and can discard information about total captured RNA. Neither representation by itself identifies the biological cause of a difference.

Common pitfall: “Type A makes up 60% of the cells, so it must contribute 60% of the spot’s RNA.” This is only warranted if the cell types contribute equal total RNA per cell and have equal capture efficiency. In general, RNA contribution is proportional to cell number multiplied by per-cell RNA abundance and capture efficiency; the two fractions can differ substantially.

The mixture model explains why spot expression can be a composite signal and clarifies which factors shape that signal. It does not determine the cell counts or type-specific profiles from the spot counts alone, and it does not establish that a gene’s spatial pattern is caused by changes in cell composition. Those are inferential questions requiring additional assumptions and analysis.

Check Your Understanding

Work through each question, then compare your reasoning with the solutions below.

  1. A spot has 4 type-A cells and 2 type-B cells. For a gene, their average per-cell molecule counts are 3 and 9, and both types have capture efficiency 0.50. What is the expected observed count?
  2. In one sentence, explain why a cell fraction need not equal an RNA contribution fraction.
  3. If all cell types in a spot have the same capture efficiency, what happens to the effective RNA contribution fractions when that common efficiency is multiplied by one-half?
  4. A spot’s area doubles while density and cell-type proportions remain constant. Under the simple model, what happens to the expected count, assuming profiles and capture efficiency are unchanged?

Solutions: (1) \(4(0.50)(3)+2(0.50)(9)=6+9=15\) expected molecules. (2) Types can differ in total RNA per cell and capture efficiency, so their shares of captured RNA need not match their shares of cells. (3) The fractions do not change: the shared efficiency multiplies every contribution and cancels in the numerator-to-denominator ratio. (4) If density and proportions remain constant, doubling area doubles the expected number of contributing cells and therefore doubles the expected count under the stated assumptions.

Clinical Biostats