Tutorials › Statistical Methods for Single-Cell RNA Sequencing › Scaling Modalities Before Joint Analysis

CITE-seq, ATAC and Multiome Data · Tutorial 604 of 700

Scaling Modalities Before Joint Analysis

Learn how to prepare and balance RNA, protein and accessibility representations for joint cell-distance calculations without letting one modality dominate by accident.

Advanced 12 min read

What You'll Learn

  • Explain why raw counts and unequal feature scales can distort joint cell distances.
  • Choose a suitable representation for RNA, protein and accessibility measurements.
  • Calculate modality contributions to a weighted squared Euclidean distance.
  • Balance modality blocks using their dimensions or observed variation, with explicit assumptions.
  • Diagnose when scaling amplifies noise or leaves technical depth effects in the analysis.

Why Scaling Matters Before Joint Analysis

A joint analysis can compare cells using measurements from RNA, antibody-derived protein tags, and chromatin accessibility. Those measurements are not naturally on the same scale. RNA and protein counts have different count distributions and depth effects; accessibility is sparse and is often represented using TF–IDF and latent semantic indexing (LSI). Even after each assay has been transformed, its representation may have more features, larger variance, or a different numerical range than the others.

If a joint cell distance is calculated by concatenating features, a modality can dominate simply because its values are larger or it contributes more coordinates. The resulting neighbors may then reflect assay scale rather than a deliberate balance of biological information. Scaling is therefore a modeling choice: it determines how strongly each modality contributes to similarity, not just how numbers are formatted.

Definition: Let \(x_i^{(m)}\) be the representation of cell \(i\) in modality \(m\), where \(m\) may denote RNA, protein, or accessibility. A weighted squared Euclidean distance between cells \(i\) and \(j\) is $$ d^2(i,j)=\sum_{m=1}^{M}\lambda_m\left\|x_i^{(m)}-x_j^{(m)}\right\|^2, $$ where each \(\lambda_m\geq 0\) is the weight assigned to modality \(m\). A modality's contribution is its weighted squared distance, \(\lambda_m\left\|x_i^{(m)}-x_j^{(m)}\right\|^2\). The weights should reflect the intended analysis, not accidental differences in measurement units or representation scale.

This tutorial concerns the preparation and scaling of modality representations before a joint distance is used. It does not imply that every analysis should use Euclidean distance, or that all modalities should receive equal influence. Cell pairing matters: the coordinates being compared must refer to the same cells, and each modality must be represented consistently across those cells.

Prepare Each Modality on Its Own Terms

Scaling should follow, not replace, modality-appropriate preprocessing. Applying one operation to raw counts from all assays is generally not a meaningful way to make them comparable.

  • RNA. A common workflow normalizes counts for library size, applies a log transformation, selects informative genes, and then centers features. Depending on the analysis, selected genes may also be scaled by their standard deviations before a low-dimensional representation such as principal component scores is formed. The resulting coordinates, rather than raw counts, are often used for cell distances.
  • Protein. Antibody-derived tag counts may be transformed using centered log-ratio (CLR) normalization, as introduced in the earlier material on centered log-ratio normalization for protein tags. The transformed values can be centered across cells for each protein. Scaling each protein to unit variance is a separate choice, and can give a noisy or weakly measured tag as much influence as a reliable one.
  • Accessibility. Peak counts are sparse, and a feature can be frequent in many cells or rare across the data. TF–IDF and LSI provide a representation that accounts for those properties. Joint distances are often computed on selected LSI coordinates after checking for depth-associated structure, rather than directly on the full peak-count matrix.

These are representation choices, not interchangeable normalizations. Scaling the coordinates of a representation changes the geometry of cell-to-cell differences. In particular, standardizing individual features before dimension reduction is different from scaling the resulting coordinates afterward.

What Drives a Joint Distance?

For concatenated features, Euclidean distance adds squared differences across every coordinate. Thus, even if the average difference on each coordinate is modest, a block with many coordinates can make a large total contribution. Conversely, a smaller block with high-variance coordinates can dominate despite having fewer features.

A useful diagnostic summary is the average squared distance contributed by each modality across a set of cell pairs. If \(\mathcal{P}\) is a chosen set of pairs, define

$$ \overline{D}_m^2=\frac{1}{|\mathcal{P}|}\sum_{(i,j)\in\mathcal{P}}\left\|x_i^{(m)}-x_j^{(m)}\right\|^2. $$

This is descriptive: a larger value means that modality contributes more squared distance for those pairs before weighting. It does not establish that the modality contains more useful biological signal.

Worked Example: Detecting a Scale Imbalance

Suppose two hypothetical cells have three RNA coordinates with difference vector \((2,1,1)\) and two protein coordinates with difference vector \((0.5,0.5)\). For now, assume these are appropriate, already transformed representations and use equal modality weights of 1.

The RNA squared distance is $$ 2^2+1^2+1^2=6. $$ The protein squared distance is $$ 0.5^2+0.5^2=0.25+0.25=0.5. $$ Therefore the concatenated squared distance is \(6+0.5=6.5\). RNA contributes \(6/6.5\approx0.923\), or about 92.3% of this pair's squared distance; protein contributes about 7.69%.

This calculation shows that RNA dominates this particular distance. It does not show why: possible causes include larger RNA coordinate differences, the number of coordinates, or meaningful RNA variation. A single pair cannot distinguish those explanations. If the intended analysis gives protein information a substantial role, this imbalance motivates checking representation scale and considering an explicit block weight.

Choosing a Scaling Strategy

There is no universally correct scaling rule. The appropriate choice depends on whether the goal is to prevent numerical scale from controlling the distance, to give each modality a comparable overall contribution, or to express a scientifically chosen relative importance.

StrategyWhat it doesMain caution
Feature-wise standardizationCenters each feature and divides it by its across-cell standard deviation before calculating distances or dimension reduction.Can magnify low-variance features dominated by noise, especially with sparse measurements.
Scale the representation within each modalityApplies a common factor to all coordinates in a modality, changing its total distance contribution without changing its internal coordinate ratios.The factor is a substantive choice and can alter neighborhoods.
Normalize by typical block distanceDivides each modality's squared distance by a summary of its typical squared distance across cell pairs.May overemphasize a modality whose observed variation is mostly technical or uninformative.
Use unscaled transformed coordinatesRetains the scale produced by modality-specific preprocessing.Unequal scales and representation dimensions may still cause one block to dominate.

Feature-wise standardization is most interpretable when features have meaningful variation and are measured with adequate reliability. If \(s_k\) is the sample standard deviation of feature \(k\) across cells, the standardized feature is \((x_{ik}-\bar{x}_k)/s_k\), provided \(s_k>0\). This gives each retained feature unit sample variance, but it does not guarantee that each modality contributes equally: a block with more features can still contribute more.

For a modality-level adjustment, multiply all its coordinates by \(a_m\). Its squared distance is then multiplied by \(a_m^2\). For example, choosing \(\lambda_m=a_m^2\) in the weighted-distance definition makes the intended block weighting explicit. A common dimension-based choice, after feature standardization, is to divide each modality's coordinates by \(\sqrt{p_m}\), where \(p_m\) is its number of retained coordinates. This reduces the expected total contribution from a block with many coordinates, under the assumptions described below. It is not a guarantee of equal biological influence.

A Justification for Distance-Based Balancing

The following calculation motivates normalizing by typical block variation. Assume, for one modality, that cell representations are independent draws from a population with mean vector \(\mu\) and covariance matrix \(\Sigma\), with finite second moments. The two cells are assumed to come from the same distribution; this is a simplifying reference model, not a claim that real cells are identically distributed.

For independent cell vectors \(X_i\) and \(X_j\), write their difference as \((X_i-\mu)-(X_j-\mu)\). The cross-product has expectation zero by independence and zero means. Expanding the squared norm therefore gives

$$ \begin{aligned} E\left[\|X_i-X_j\|^2\right] &=E\left[\|X_i-\mu\|^2\right]+E\left[\|X_j-\mu\|^2\right]\\ &=2\,\operatorname{tr}(\Sigma). \end{aligned} $$

The final equality follows because the expected squared distance from the mean is the sum of the coordinate variances, which is the trace of the covariance matrix. If the \(p_m\) coordinates have each been standardized to variance 1, then \(\operatorname{tr}(\Sigma)=p_m\), so the expected squared pairwise distance is \(2p_m\). Dividing squared distances by \(2p_m\) would make their expectation 1 under this reference model. In observed data, a practical estimate can instead use an average over sampled cell pairs.

This justification has limits. Cells are not generally independent draws from one homogeneous population: cell types, states, donors, and technical effects can all create structure. If one modality's variation is largely technical, equalizing its typical distance can give that technical variation undue influence. Balance is a starting point for inspection, not a substitute for biological judgment.

Worked Example: Correcting for Unequal Feature Counts

Consider a hypothetical representation with 100 standardized RNA coordinates and 25 standardized protein coordinates. Assume, for illustration, that coordinate differences between a randomly selected pair have mean zero, variance 2, and are independent within each block. These assumptions imply an expected squared difference of 2 per coordinate.

The expected unscaled RNA squared distance is \(100\times2=200\); the expected protein squared distance is \(25\times2=50\). Thus, even with the same per-coordinate difference variance, RNA contributes four times as much on average because it has four times as many coordinates.

Now divide each block's coordinates by the square root of its feature count. This is equivalent to weighting each block's squared distance by \(1/p_m\). The expected weighted RNA contribution is \(200/100=2\), and the expected weighted protein contribution is \(50/25=2\). Under the stated assumptions, the expected contributions match.

The result does not imply that the modalities are equally informative. It only removes the expected contribution difference due to the number of standardized coordinates in this simplified model. If the features are correlated, noisy, or not standardized, this calculation need not describe their observed distances.

Worked Scaling Choices Across Three Assays

A practical workflow keeps modality-specific preprocessing distinct, then evaluates the resulting representations together. The following hypothetical example illustrates the decision rather than prescribing one universal recipe.

Worked Example: Comparing RNA, Protein, and Accessibility Blocks

Suppose a paired dataset has 500 cells. After modality-specific processing and feature selection, an analyst retains 30 RNA coordinates, 8 protein coordinates, and 20 accessibility LSI coordinates. For a sampled set of cell pairs, the average unweighted squared distances are 60 for RNA, 16 for protein, and 100 for accessibility.

The total average squared distance is \(60+16+100=176\). The respective contributions are \(60/176\approx0.341\), \(16/176\approx0.0909\), and \(100/176\approx0.568\). Accessibility contributes about 56.8% and protein about 9.09% of the total for these pairs.

One possible distance-based balancing rule is to assign each block the reciprocal of its observed average squared distance: \(\lambda_m=1/\overline{D}_m^2\). The weighted average contribution for each block is then \(\lambda_m\overline{D}_m^2=1\), so each contributes one unit on average. Equivalently, the modality coordinates are multiplied by \(1/\sqrt{\overline{D}_m^2}\). Here the multipliers are \(1/\sqrt{60}\approx0.1291\) for RNA, \(1/\sqrt{16}=0.25\) for protein, and \(1/\sqrt{100}=0.1\) for accessibility.

This choice should only follow checks that the distance summaries are representative and that each block's variation is suitable to retain. For instance, if accessibility distance is mostly driven by library depth, equalizing its average contribution would balance a technical effect, not necessarily useful accessibility information. The analyst should inspect depth associations and repeat the comparison under plausible weights before treating the joint result as robust.

Diagnostics, Alternatives, and Limitations

Before using a joint distance, inspect each modality's contribution across many cell pairs rather than relying on one illustrative pair. Summaries such as medians, quantiles, and distributions of block distances can reveal whether one modality dominates most pairs or only a subset. Also check whether modality distances are associated with total RNA counts, protein-tag depth, accessibility depth, donor, batch, or other known technical variables. A strong association is a warning that scaling alone may not have removed the relevant technical structure.

Compare unscaled transformed representations with reasonable alternatives, such as feature-wise standardization, dimension adjustment, or block weights chosen from typical pairwise distances. Ask whether broad cell neighborhoods and key conclusions persist. Large changes are not automatically evidence that one choice is wrong, but they show that results depend on the scaling decision and should be reported as such.

  • Do not blindly standardize every feature. A nearly constant or noisy feature can receive a large multiplier when divided by a small standard deviation. Filter or otherwise assess such features before standardizing.
  • Do not assume unit variance means equal modality influence. A block with more standardized coordinates generally still has larger expected squared distance.
  • Do not use dimension balancing to erase depth diagnostics. First identify whether depth-linked variation is technical, biological, or mixed; a block weight cannot make that distinction.
  • Do not interpret equal distance contribution as equal evidence. Distance magnitude describes geometry under a chosen representation, not reliability, causal importance, or biological relevance.

Alternatives include keeping modalities separate for an initial analysis, using a scientifically chosen fixed weighting, or using downstream integration approaches that adapt how modalities contribute. Each answers a different question. Fixed weights are transparent and reproducible but may be sensitive to scaling. Data-adaptive methods may accommodate cell-specific differences, but they add modeling assumptions and should not be treated as a substitute for checking the input representations. Scaling is also limited by the measurements available: it cannot recover an unmeasured modality, fix incorrect cell pairing, or by itself separate biological variation from technical variation.

Common mistake: “Each feature has been standardized, so the modalities now contribute equally.” This is incorrect because a block with more standardized coordinates can still contribute more squared distance. Further, small-variance features can be amplified, including features dominated by noise. Check block-level distances and their technical associations, then choose any modality weights explicitly and assess sensitivity to that choice.

Check Your Understanding

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

  1. Two standardized modality blocks have 40 and 10 coordinates. Under the independent, equal-variance reference assumptions, which block has the larger expected squared distance, and by what factor?
  2. A protein feature has a very small sample standard deviation. What can happen if it is standardized by dividing by that value?
  3. For three modalities, the average squared distances across sampled pairs are 30, 30, and 90. What fractions of the unweighted total does each contribute?
  4. Why does matching average block distances not prove that the blocks contain equally useful biological information?

Solutions. (1) The 40-coordinate block has the larger expected squared distance: the reference expectation is \(2p_m\), giving 80 versus 20, a factor of 4. (2) Division by a very small standard deviation can greatly amplify that feature's measurement noise or outliers, giving it disproportionate influence. (3) The total is \(30+30+90=150\); the contributions are \(30/150=0.20\), \(0.20\), and \(90/150=0.60\), or 20%, 20%, and 60%. (4) Distance magnitude reflects variation in the chosen representation; it does not distinguish informative biological variation from noise, depth effects, or other technical structure.

Clinical Biostats