Tutorials › Statistical Methods for Single-Cell RNA Sequencing › Balance Coordinates for Biological Cell Groups

Differential Abundance and Compositional Effects · Tutorial 527 of 700

Balance Coordinates for Biological Cell Groups

You will learn to build a normalized log-ratio contrast between two groups of cell types, interpret its value and coefficients, and assess whether the biological grouping makes the balance useful.

Advanced 12 min read

What You'll Learn

  • Construct the balance for two disjoint groups that partition a cell composition.
  • Derive the balance coefficients and check their zero-sum and unit-length properties.
  • Interpret a balance as a scaled log ratio of group geometric means.
  • Calculate a balance from hypothetical cell-type proportions and compare balances across samples.
  • Identify biological questions that suit a balance and recognize when the grouping obscures the question.
  • Diagnose problems caused by zeros, changing cell-type definitions, or a mismatch between the balance and the scientific estimand.

Why Compare Groups With a Balance?

A cell composition can contain many cell types, while a biological question may concern the relative representation of two broader groups. For example, a researcher may ask whether a collection of cytotoxic cell types is represented differently relative to a collection of antigen-presenting types. Comparing one type at a time may not answer that group-level question. An isometric log-ratio balance provides a single coordinate for comparing the two groups through their geometric means.

The balance is a relative quantity: it describes one group in relation to the other within a composition. It does not, by itself, measure absolute cell numbers, nor does it establish that a change in one group caused a change in another. The choice of which types belong in each group is therefore part of defining the scientific question, not just a calculation made after seeing the data.

Definition: Let a composition have \(D\) strictly positive components that sum to 1. Partition the components into two nonempty, disjoint groups \(R\) and \(S\), with \(r\) and \(s\) components, respectively, so \(r+s=D\). The isometric log-ratio balance comparing \(R\) with \(S\) is $$ b_{R,S} = \sqrt{\frac{rs}{r+s}} \left[ \frac{1}{r}\sum_{i\in R}\log(x_i) - \frac{1}{s}\sum_{j\in S}\log(x_j) \right]. $$ Here \(\log\) is the natural logarithm, and \(x_i\) denotes the proportion of component \(i\). Equivalently, the balance is the scaled log ratio of the geometric mean of the components in \(R\) to the geometric mean of the components in \(S\).

The partition must include every component in the composition exactly once. The balance is positive when the geometric mean in \(R\) exceeds that in \(S\), negative when it is smaller, and zero when the two geometric means are equal. The multiplicative factor depends on the group sizes. It makes this contrast a unit-length log-contrast, rather than an arbitrary difference between group averages.

Coefficients and Their Interpretation

Writing the balance as a weighted sum of log proportions makes each component’s coefficient explicit:

$$ b_{R,S} = \sum_{i\in R}\sqrt{\frac{s}{r(r+s)}}\log(x_i) - \sum_{j\in S}\sqrt{\frac{r}{s(r+s)}}\log(x_j). $$

Every component in \(R\) receives the same positive coefficient, and every component in \(S\) receives the same negative coefficient. The coefficients sum to zero, so multiplying every component by the same positive constant leaves the balance unchanged. This is essential for a compositional measure: only relative proportions, not the arbitrary scale of the parts before closure to sum to 1, determine the result.

The squared coefficients sum to 1. In fact, the \(r\) positive coefficients contribute \(s/(r+s)\) to the sum of squares, and the \(s\) negative coefficients contribute \(r/(r+s)\). The total is therefore 1. This unit-length property is the reason for the word “isometric.” A single balance is one coordinate; it need not preserve all information in the composition.

Worked Example: Calculating a Balance for Two Biological Groups

Suppose a hypothetical donor has five cell-type proportions summing to 1. Let \(R\) contain two related T-cell types with proportions 0.20 and 0.10. Let \(S\) contain three other cell types with proportions 0.30, 0.25, and 0.15. These groups partition all five types, and every proportion is positive, so the balance is defined.

Here \(r=2\), \(s=3\), and the scaling factor is \(\sqrt{6/5}\). The balance is

$$ \begin{aligned} b_{R,S} &= \sqrt{\frac{6}{5}} \left[ \frac{\log(0.20)+\log(0.10)}{2} - \frac{\log(0.30)+\log(0.25)+\log(0.15)}{3} \right]\\ &= \sqrt{\frac{6}{5}} \left[ \log\!\left(\sqrt{0.20\cdot0.10}\right) - \log\!\left(\sqrt[3]{0.30\cdot0.25\cdot0.15}\right) \right]\\ &\approx -0.5041. \end{aligned} $$

The geometric means are approximately 0.1414 for \(R\) and 0.2241 for \(S\). The negative sign says that the geometric mean proportion in \(R\) is lower than the geometric mean proportion in \(S\) for this donor. The value is a scaled log ratio; it is not a difference of 0.5041 in proportions or a percentage-point difference.

Why the Coefficients Matter

The coefficients describe how the balance responds to changes on the log scale. If one component in \(R\) is multiplied by a factor \(c\), while all other components are unchanged before renormalization, its contribution changes by its coefficient times \(\log(c)\). Renormalizing the resulting values to sum to 1 does not change the balance, because the coefficients sum to zero.

Worked Example: Interpreting a Component’s Coefficient

Use the five-type partition in the previous example. For either component in \(R\), the coefficient is

$$ \sqrt{\frac{3}{2(5)}}=\sqrt{\frac{3}{10}}\approx 0.5477. $$

Suppose, hypothetically, that one of those two components doubles while the other four raw proportions remain fixed. The balance changes by

$$ 0.5477\log(2) \approx 0.5477(0.6931) \approx 0.3797. $$

Thus the balance increases by about 0.3797 balance units. This is a change in the log-contrast coordinate, not a 37.97-percentage-point increase. The doubling also changes the closed proportions, but their common renormalization factor cancels from the balance.

For a comparison of two samples, the difference between their balances is also a difference in log-contrast coordinates. It summarizes how the relative geometric-mean representation of the two groups differs between those samples. If the samples come from different conditions, a condition-associated balance difference is still a relative compositional result; it does not alone identify which group changed in absolute abundance.

Worked Example: Comparing Balances Across Two Hypothetical Samples

Consider four cell types partitioned into \(R\), two related T-cell types, and \(S\), two other types. Because \(r=s=2\), the scaling factor is 1. A hypothetical sample A has proportions \(0.30, 0.10\) in \(R\) and \(0.40, 0.20\) in \(S\). A hypothetical sample B has \(0.20, 0.20\) in \(R\) and \(0.30, 0.30\) in \(S\). Each composition is positive and sums to 1.

For sample A, the geometric means are \(\sqrt{0.30\cdot0.10}=\sqrt{0.03}\) and \(\sqrt{0.40\cdot0.20}=\sqrt{0.08}\). Therefore,

$$ b_A = \log\!\left(\frac{\sqrt{0.03}}{\sqrt{0.08}}\right) \approx -0.4904. $$

For sample B, the geometric means are \(\sqrt{0.20\cdot0.20}=0.20\) and \(\sqrt{0.30\cdot0.30}=0.30\), giving

$$ b_B = \log\!\left(\frac{0.20}{0.30}\right) = \log\!\left(\frac{2}{3}\right) \approx -0.4055. $$

The balance difference, sample B minus sample A, is

$$ b_B-b_A = -0.4055-(-0.4904) \approx 0.0849. $$

The balance is higher in sample B by approximately 0.0849 balance units. Both balances are negative, so in both samples the geometric mean in \(R\) remains below that in \(S\); the positive difference indicates that this relative contrast is less negative in sample B. These two hypothetical samples illustrate a calculation, not a population-level inference.

Choosing a Biologically Useful Partition

A balance is useful when its two groups correspond to a contrast that can be stated before examining the outcome. For example, a question about a coordinated shift between two biologically motivated lineages may be suited to comparing those lineages as groups. The balance then gives a compact answer to that particular relative question.

The grouping should be based on the scientific aim and on defensible cell-type definitions. A convenient but arbitrary split can produce a valid mathematical balance that is biologically unhelpful. Likewise, combining types with distinct expected responses can conceal opposing changes: a group geometric mean may remain stable even when some members rise and others fall. A balance does not imply that all components within a group change together.

The balance also differs from several tempting alternatives. A pairwise log ratio compares two individual components and may miss a group-level pattern. A raw difference between the summed proportions in \(R\) and \(S\) is not the same estimand: the balance compares geometric means on the log scale, not group totals. A one-component-versus-rest comparison is a special kind of grouping, but it asks a narrower question than a balance between two sets of multiple cell types. The appropriate choice follows from the biological question and the intended interpretation.

Assumptions, Diagnostics, and Limitations

The balance formula requires strictly positive proportions and a fixed partition. Its interpretation also depends on the same cell types being assigned to the same groups across samples, and on the composition having a consistent denominator. In differential-abundance work, donor-level compositions are commonly the relevant observational units; treating individual cells from the same donor as independent replicates would not make the balance a valid substitute for donor-level replication.

Before interpreting balances across samples, check the following:

  • Partition: confirm that every component is assigned once, with no overlap or omission.
  • Biological meaning: verify that the two groups match the intended contrast rather than a data-driven split chosen because it gives a striking result.
  • Definition consistency: check that cell-type labels and the denominator used to define the composition are consistent across samples.
  • Data adequacy: inspect whether component proportions are zero or based on very few observed cells. A zero makes the logarithm undefined, and sparse counts can make estimated proportions unstable.
  • Within-group pattern: inspect component-level summaries to see whether a group balance hides substantial opposing changes among its members.

A zero cannot be inserted into this formula because \(\log(0)\) is undefined. Zero handling requires an explicit modeling or data-processing choice; silently replacing zeros with arbitrary small values can materially change the balance. Even with positive values, a balance calculated from estimated proportions inherits their sampling uncertainty. A computed coordinate is descriptive unless an appropriate inferential analysis accounts for the sampling design and independent biological units.

A useful justification for the balance’s scale invariance is short but central. Let its coefficients be \(c_i\). Their sum is

$$ \sum_i c_i = r\sqrt{\frac{s}{r(r+s)}} - s\sqrt{\frac{r}{s(r+s)}} = \sqrt{\frac{rs}{r+s}}-\sqrt{\frac{rs}{r+s}} =0. $$

If every unclosed component is multiplied by a common positive constant \(a\), each log value gains \(\log(a)\). The balance changes by \(\log(a)\sum_i c_i=0\), so it is unchanged. Meanwhile,

$$ \sum_i c_i^2 = r\frac{s}{r(r+s)} + s\frac{r}{s(r+s)} = \frac{s}{r+s}+\frac{r}{r+s} =1. $$

Thus the contrast is both scale-invariant and normalized to unit length. These properties support its use as an isometric log-ratio coordinate, but they do not guarantee that any particular biological partition is meaningful.

Common Mistake

Common mistake: “The balance is negative, so the \(R\) cell types are less abundant in absolute number than the \(S\) cell types.”

Correction: A negative balance means only that the geometric mean of the proportions in \(R\) is below that in \(S\) in this composition. It does not compare absolute cell numbers, and it does not imply that every component in \(R\) is individually below every component in \(S\).
Key takeaway: A balance is a normalized log ratio between the geometric means of two groups that partition a composition. Its coefficients give the mathematical contrast; its biological usefulness depends on choosing groups that answer a clearly defined relative-abundance question.

Check Your Understanding

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

  1. For a composition split into \(r=2\) and \(s=3\) components, what is the balance scaling factor?
  2. What does a balance of zero say about the two groups? What does it not say about their total proportions?
  3. If one component in \(R\) is multiplied by 2 before the composition is renormalized, and its balance coefficient is 0.5477, by approximately how much does the balance change?
  4. Why can a valid balance still be a poor choice for a biological analysis?
  5. Why is a zero component proportion a problem for the balance formula?

Solutions. (1) The factor is \(\sqrt{rs/(r+s)}=\sqrt{6/5}\approx1.095\). (2) The groups have equal geometric-mean proportions. Their summed proportions need not be equal, because equality of geometric means does not imply equality of sums. (3) The change is \(0.5477\log(2)\approx0.3797\) balance units; renormalization does not alter it. (4) The grouping may not represent the intended biological contrast, or it may combine cell types with opposing patterns. (5) The logarithm of zero is undefined, so the balance cannot be computed without an explicit zero-handling choice.

Clinical Biostats