Tutorials › Statistical Methods for Single-Cell RNA Sequencing › Cluster-Specific Markers And Global Gene Claims

Marker Genes and the Double-Dipping Problem · Tutorial 299 of 700

Cluster-Specific Markers And Global Gene Claims

Learn to match cluster-specific marker claims and global gene claims to their contrasts, omnibus tests, and relevant multiple-testing families.

Advanced 12 min read

What You'll Learn

  • Define a one-versus-rest contrast and an across-cluster omnibus null for one gene.
  • Calculate a cluster-specific contrast and its standard error under a one-way normal model.
  • Interpret what an omnibus test does and does not establish.
  • Identify the testing family for claims across several clusters.
  • Distinguish multiplicity correction from protection against data-adaptive cluster selection.
  • Check assumptions and recognize common failure modes in single-cell applications.

Two Different Questions About a Gene

A gene can be described as a marker for one cluster, or as a gene whose expression differs somewhere across all clusters. These claims are related, but they are not interchangeable. A marker claim names a target cluster and compares it with a defined reference, often the cells in all other clusters combined. A global claim asks whether any cluster has a different mean from the others, without naming which one or the direction of the difference.

The distinction matters because each claim defines a different null hypothesis and, when several tests are conducted, a different testing family. The earlier material on marker contrasts establishes how one-versus-rest and pairwise comparisons are formed. Here the emphasis is on matching the scope of the scientific claim to the scope of the test.

Definition: For a gene \(g\) and \(K\) clusters, let \(\mu_{gk}\) denote the mean expression in cluster \(k\). A cluster-specific one-versus-rest claim for cluster \(k\) concerns a contrast between \(\mu_{gk}\) and the mean expression among all cells outside cluster \(k\). A global across-cluster claim concerns whether all \(K\) cluster means are equal or whether at least one differs.

For a fixed gene and a prespecified target cluster \(k\), write the one-versus-rest contrast as

$$ \Delta_{gk} = \mu_{gk} - \sum_{\ell\ne k} w_\ell\mu_{g\ell}, \qquad w_\ell=\frac{n_\ell}{\sum_{j\ne k}n_j}. $$

Here \(n_\ell\) is the number of cells in cluster \(\ell\), so the reference mean is the cell-count-weighted mean across the other clusters. A directional marker claim that expression is higher in cluster \(k\) corresponds to \(H_0:\Delta_{gk}\le 0\) against \(H_a:\Delta_{gk}>0\). A nondirectional contrast instead tests \(H_0:\Delta_{gk}=0\) against \(H_a:\Delta_{gk}\ne 0\). The direction must be chosen to match the scientific question, not after seeing which direction the data favor.

The global null for the same gene is

$$ H_0:\mu_{g1}=\mu_{g2}=\cdots=\mu_{gK}, \qquad H_a:\text{at least one cluster mean differs.} $$

Rejecting this null supports a claim of some across-cluster difference. It does not by itself identify a cluster, establish that a particular cluster is higher, or show that every pair of clusters differs.

Model and Conditions for the Tests

To give the tests precise meaning, consider the standard one-way normal model for one gene with fixed cluster labels:

$$ Y_{gi}=\mu_{gk}+\varepsilon_{gi} \quad\text{for cell }i\text{ in cluster }k, \qquad \varepsilon_{gi}\overset{\text{ind}}{\sim}N(0,\sigma^2). $$

This model assumes independent cell-level errors, a normal distribution within each cluster, and a common variance across clusters. Under these conditions, the usual one-way analysis of variance (ANOVA) F test has an exact reference distribution under the global null. The standard pooled-variance t test for a linear contrast is also exact under the model. These assumptions describe a calculation framework; they are not automatically satisfied by single-cell data.

In practice, cells from the same donor may be correlated, expression may be skewed or zero-heavy, and cluster sizes and variances may differ. Moreover, when the same expression data helped construct the clusters, treating the discovered labels as fixed and independent of expression may not give valid ordinary test p-values. The earlier material on double dipping explains this selection problem. Testing several clusters with a multiplicity adjustment does not, by itself, undo the dependence created by data-adaptive clustering.

Worked Example: Testing a Prespecified Cluster Against the Rest

Suppose a hypothetical gene has mean expression 8, 5, and 4 units in clusters 1, 2, and 3, respectively, with four cells per cluster. Assume the one-way normal model is appropriate, the labels are fixed independently of these expression values for this calculation, and the pooled within-cluster sum of squares is 18. Test whether cluster 1 has higher mean expression than the rest.

The one-versus-rest contrast is \(\Delta_{g1}=\mu_{g1}-(\mu_{g2}+\mu_{g3})/2\), because the two reference clusters have equal sizes. Its estimate is

$$ \widehat{\Delta}_{g1} =8-\frac{5+4}{2} =8-4.5 =3.5\text{ units}. $$

There are \(12-3=9\) residual degrees of freedom, so the pooled variance estimate is \(s_p^2=18/9=2\) square units. For contrast coefficients \(1,-1/2,-1/2\), the estimated standard error is

$$ SE(\widehat{\Delta}_{g1}) = \sqrt{2\left(\frac{1^2}{4}+\frac{(-1/2)^2}{4}+\frac{(-1/2)^2}{4}\right)} = \sqrt{2(0.375)} = \sqrt{0.75} \approx 0.8660\text{ units}. $$

Thus \(t=3.5/0.8660\approx4.041\), with \(df=9\). The one-sided p-value is approximately 0.0015. Under the stated model and a test fixed in advance, this is evidence that cluster 1 has higher mean expression than the cell-count-weighted mean of clusters 2 and 3. It is not evidence that cluster 1 exceeds each of the other clusters in a separate pairwise comparison.

The assumptions matter to this conclusion. If cells are correlated within donors, the cell count of 12 does not necessarily represent 12 independent pieces of information. If cluster 1 was selected because it had the largest observed expression for this gene, the ordinary p-value also fails to account for that selection.

Global Tests and What They Establish

Under the one-way normal model, the global null can be tested by comparing variation between cluster means with residual variation within clusters. Let \(\bar{Y}_{gk}\) be the sample mean in cluster \(k\), and let \(\bar{Y}_{g\cdot}\) be the mean across all cells. The test statistic is

$$ F= \frac{\displaystyle\sum_{k=1}^{K}n_k(\bar{Y}_{gk}-\bar{Y}_{g\cdot})^2/(K-1)} {\displaystyle\sum_{k=1}^{K}\sum_{i\in k}(Y_{gi}-\bar{Y}_{gk})^2/(N-K)}, \qquad N=\sum_{k=1}^{K}n_k. $$

The numerator is the between-cluster mean square; the denominator is the pooled within-cluster mean square. If the global null holds and the model assumptions hold, \(F\) follows an \(F\) distribution with \(K-1\) and \(N-K\) degrees of freedom. A large value indicates that cluster means are more separated than expected from the within-cluster variation under the null.

A short justification follows from decomposing the total sum of squared deviations:

$$ \sum_{k=1}^{K}\sum_{i\in k}(Y_{gi}-\bar{Y}_{g\cdot})^2 = \sum_{k=1}^{K}\sum_{i\in k}(Y_{gi}-\bar{Y}_{gk})^2 + \sum_{k=1}^{K}n_k(\bar{Y}_{gk}-\bar{Y}_{g\cdot})^2. $$

For each cell, write \(Y_{gi}-\bar{Y}_{g\cdot}=(Y_{gi}-\bar{Y}_{gk})+(\bar{Y}_{gk}-\bar{Y}_{g\cdot})\), square, and sum within cluster \(k\). The cross-product is zero because \(\sum_{i\in k}(Y_{gi}-\bar{Y}_{gk})=0\). Summing over clusters gives the displayed decomposition. The F statistic compares the second component, variation attributable to cluster means, with the first, residual variation.

Worked Example: A Global Claim Is Not a Named Marker Claim

Use the hypothetical means 8, 5, and 4 units from the previous example, with four cells per cluster and within-cluster sum of squares 18. The overall mean is

$$ \bar{Y}_{g\cdot}=\frac{4(8)+4(5)+4(4)}{12}=\frac{68}{12}=5.667\text{ units}. $$

The between-cluster sum of squares is \(4[(8-5.667)^2+(5-5.667)^2+(4-5.667)^2]\approx34.67\). Its mean square is \(34.67/2=17.33\). The within-cluster mean square is \(18/9=2\). Therefore

$$ F=\frac{17.33}{2}=8.667,\qquad df=(2,9). $$

The upper-tail p-value is approximately 0.0080. Under the model, this rejects equality of all three means at the 0.05 level. It supports the global statement that at least one cluster mean differs. It does not, on its own, show which cluster differs or prove that cluster 1 is higher than both other clusters. Those more specific claims require contrasts with appropriate inference.

The Testing Family Depends on the Claim

A testing family is the collection of hypotheses for which a stated error-rate guarantee is intended. For a single gene, a prespecified global question about equality across clusters is one omnibus test. By contrast, a claim that a gene marks any one of \(K\) clusters based on \(K\) one-versus-rest tests involves \(K\) opportunities to make a false positive claim. If the intended guarantee is family-wise error control at level \(\alpha\), the family must include all \(K\) cluster tests considered for that claim.

For example, the Bonferroni method compares each of \(m\) p-values with \(\alpha/m\). It controls the probability of one or more false rejections at no more than \(\alpha\), provided each test p-value is valid under its null; the control does not require the tests to be independent. Holm’s step-down method is usually at least as powerful while also controlling family-wise error: sort the p-values \(p_{(1)}\le\cdots\le p_{(m)}\), compare \(p_{(j)}\) in order with \(\alpha/(m-j+1)\), and stop at the first failure. Neither method repairs invalid p-values caused by model failure or data-adaptive selection.

Worked Example: Three Candidate Cluster Markers

Suppose a hypothetical analysis of one gene tested higher expression in each of three candidate clusters, producing valid one-sided p-values 0.012, 0.031, and 0.20. If the claim is that the gene marks at least one of these clusters, the family contains all three tests. At family-wise \(\alpha=0.05\), the Bonferroni threshold is

$$ \frac{0.05}{3}=0.0167. $$

Only 0.012 is below 0.0167, so only the first cluster test is rejected by this procedure. With Holm’s method, the ordered p-values are 0.012, 0.031, and 0.20. The first comparison is \(0.012\le0.05/3=0.0167\), so it passes. The second is \(0.031\not\le0.05/2=0.025\), so the procedure stops; the first test remains rejected, and the other two are not rejected. This does not show that the other clusters have equal expression to the reference. It means the procedure did not reject their null hypotheses.

If instead the scientific question was specified in advance as a single global equality test for this gene, its one omnibus p-value would be interpreted as one test for that question, not as a set of three marker claims. If significant follow-up contrasts are then used to name clusters, those additional claims need an appropriate plan for the associated family. A global rejection alone does not supply those follow-up conclusions.

Diagnostics, Alternatives, and Limits

Before interpreting either test, check whether its assumptions and target match the analysis:

  • Independence: cells from one donor or sample may be more alike than cells from different donors. Treating all cells as independent can understate uncertainty when the scientific replication is at the donor or sample level.
  • Variance and distribution: strong differences in spread, extreme skew, or many zero values can make the equal-variance normal reference inaccurate, especially with unequal cluster sizes. Examine cluster-level summaries and residual patterns; an alternative model must still justify its uncertainty calculation.
  • Contrast direction and reference: one-versus-rest combines all other clusters into a weighted reference. A positive contrast does not imply the target exceeds every other cluster, and changing the reference changes the claim.
  • Selection: if the gene or cluster was chosen after inspecting the same expression values, an ordinary fixed-label p-value may not account for that selection. A correction across the \(K\) cluster tests addresses multiplicity among those tests, not the entire adaptive discovery process.
  • Testing scope: a family across clusters for one gene is not the same as a family across many genes. When claims span a gene panel, that additional scope must be reflected in the analysis; a per-gene cluster adjustment alone does not control errors across the panel.

The omnibus test is a natural choice for a broad “does this gene vary across clusters?” question because it tests the equality restriction directly. It may be more efficient than interpreting a collection of pairwise tests as a global screen. However, it does not localize the difference. One-versus-rest tests directly address a named cluster relative to a combined reference, while pairwise tests address differences between particular pairs. These methods answer different questions; none is a universal substitute for the others.

A further limitation is that cluster labels are often discovered from the same expression matrix later used to describe markers. High cluster stability does not establish that an ordinary marker-test p-value is calibrated, and a small adjusted p-value does not establish that the discovered cluster is a biologically distinct population. The inferential statement should therefore name the contrast, the tested family, and the assumptions supporting the reported uncertainty.

Common Mistake

Wrong reasoning: “The global test is significant, so cluster 2 is a marker; alternatively, I tested all clusters and adjusted the p-values, so data-driven selection is no longer a concern.” The first conclusion names a cluster that the omnibus test does not identify. The second confuses multiplicity among a stated set of tests with selection bias from constructing or choosing clusters using the same expression data.

Correction: State the target claim first. Use an omnibus test for equality across clusters, and use a prespecified one-versus-rest or pairwise contrast for a localized claim. Define the family to include the claims being searched over, apply a correction when appropriate, and separately assess whether the p-values are valid after data-adaptive clustering.

Key takeaway: “This gene differs somewhere across clusters” is a global claim; “this gene marks cluster \(k\) relative to the rest” is a contrast claim. The test and testing family must match the claim, and multiplicity adjustment cannot by itself correct double dipping.

Check Your Understanding

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

  1. For four clusters, what null hypothesis does a global test of one gene assess?
  2. A positive one-versus-rest contrast for cluster 1 is observed. Does this establish that cluster 1 exceeds each of the other clusters separately?
  3. For a search across five cluster-specific tests at family-wise \(\alpha=0.05\), what is the Bonferroni per-test threshold?
  4. Why does adjusting five cluster-test p-values not automatically make ordinary p-values valid when the same gene expression helped define the clusters?
  5. A global test rejects equality across three clusters. What conclusion is justified, and what localization conclusion is not yet justified?

Solutions. (1) The null is \(\mu_{g1}=\mu_{g2}=\mu_{g3}=\mu_{g4}\); the alternative is that at least one mean differs. (2) No. It compares cluster 1 with a weighted combination of the others, not with each one separately. (3) \(0.05/5=0.0100\). (4) The adjustment addresses false rejections among the five tests only when their p-values are valid; it does not account for choosing clusters using the same expression data. (5) The test supports that at least one cluster mean differs. It does not identify which cluster differs or establish the direction of a particular contrast.

Clinical Biostats