Two Different Questions About a Gene Set
A gene-set analysis begins with a set of genes and evidence about their association with a phenotype. But “is this set enriched?” can refer to two different questions. A competitive question asks whether genes in the set show stronger association than genes outside it. A self-contained question asks whether the set contains any associated genes at all. The first is relative to a comparator; the second is not.
These are different scientific targets, not merely alternative calculations for the same target. A set can contain genuine association while showing no stronger evidence than the rest of the genome. Conversely, its evidence can look stronger than the comparator even when that observation alone does not establish that any gene in the set truly has an effect.
The universe is part of the question. It might be all genes that passed prespecified quality criteria and could receive a gene-level score, for example. Genes not in that universe are neither members of the comparison set nor part of the stated analysis. Changing \(U\) can change a competitive result even when \(S\) and its scores stay fixed.
Competitive Enrichment as a Relative Estimand
To make the target precise, consider a mean-score formulation. Let \(Y_i\) denote the gene-level score for gene \(i\), with larger values interpreted as stronger evidence of association. The finite-universe mean score in the set is the sum of its scores divided by its number of genes. Define the corresponding mean for genes outside the set in the same way. The competitive estimand is their difference.
For a one-sided question of greater mean evidence in the set, the hypotheses are \(H_0:\theta_C\leq 0\) and \(H_a:\theta_C>0\). A two-sided comparison instead uses \(H_0:\theta_C=0\) against \(H_a:\theta_C\neq 0\). These hypotheses concern mean scores. Other competitive analyses can target a difference in distributions or another explicitly defined summary; “competitive” by itself does not specify a unique estimand.
The mean-score formulation also clarifies what the conclusion does and does not say. Evidence that \(\theta_C>0\) means that the set’s mean score is greater than the mean score in the chosen complement. It does not, by itself, mean that every gene in the set is associated, or even that a particular gene is associated. Nor does a positive observed difference alone establish statistical evidence: an inferential procedure must account for the uncertainty and dependence relevant to the scores.
Worked Example: Calculating a Competitive Mean Difference
Suppose a hypothetical gene universe contains six genes. Three belong to a set \(S\), and the other three form \(U\setminus S\). Their hypothetical association scores are:
Set genes: 8, 6, and 4. Genes outside the set: 5, 3, and 2. Assume these scores are on the same scale, and larger scores represent stronger evidence.
The set mean is \((8+6+4)/3=18/3=6\). The complement mean is \((5+3+2)/3=10/3\approx3.333\). Thus the observed mean difference is
In this hypothetical data set, the set’s mean score is 2.667 score units higher than the mean for the three eligible genes outside it. This is a descriptive competitive contrast. Without a specified inferential model or calibration, it is not a p-value and does not determine whether \(H_0:\theta_C\leq0\) should be rejected.
Self-Contained Enrichment as a Within-Set Question
A self-contained question needs no outside-gene comparator. Let \(\beta_i\) denote the gene-level effect parameter for gene \(i\), defined under a specified association model for the phenotype. For example, \(\beta_i\) might be a log-odds association coefficient; the exact parameter and its units depend on the model. The self-contained global null says that every gene in \(S\) has a null effect. Its alternative says at least one gene in \(S\) has a nonzero effect.
This is a global hypothesis about the set: the alternative does not require all genes to be associated, nor does it specify which gene is associated. If the scientific question is directional, the parameterization and alternative must reflect that direction. The two-sided form above asks whether any gene has an effect in either direction.
The distinction between a parameter and its observed score matters here. A score calculated from data is evidence about an underlying effect; it is not the effect itself. Seeing a large score for a gene does not make the gene’s unknown \(\beta_i\) known, and observing small scores does not make the global null true. A test of the self-contained null requires a procedure that calibrates evidence under the joint null, including whatever dependence among the gene-level results is relevant. The hypothesis definition alone is not a testing procedure.
Worked Example: Stating the Self-Contained Global Null
Consider a hypothetical set of three genes, A, B, and C. Suppose the association parameter is a log-odds coefficient, so each \(\beta_i\) is measured in log-odds units. The self-contained hypotheses are \(H_0^{SC}:\beta_A=\beta_B=\beta_C=0\) and \(H_a^{SC}:\) at least one of these coefficients is nonzero.
For a hypothetical parameter configuration \((\beta_A,\beta_B,\beta_C)=(0,0,0)\), the global null is true: all three coefficients equal zero. For \((0,0.08,0)\), the global null is false, because \(\beta_B=0.08\) log-odds units is nonzero. The alternative is true even though genes A and C have zero coefficients.
These configurations illustrate the meaning of the hypotheses; a real study does not observe the true coefficient vector directly. It observes data and must use an inferential procedure to assess evidence against the global null. The definition itself neither identifies gene B nor supplies a p-value.
Why the Two Nulls Are Not Interchangeable
The competitive null is comparative: it concerns a contrast between \(S\) and \(U\setminus S\). The self-contained null is absolute in the sense that it specifies no association for any gene in \(S\), without reference to genes outside it. As a result, the two hypotheses can give different answers to the same scientific story.
A simple algebraic identity shows why the comparator matters. Write \(m=|S|\), \(r=|U\setminus S|\), and let \(\bar{Y}_U\) be the mean score across the whole universe. Because the whole-universe mean is the size-weighted average of the two group means,
Rearranging gives
Thus even when the set and its scores are unchanged, changing which genes qualify for \(U\) can change \(\bar{Y}_{U\setminus S}\), and therefore the competitive contrast. This identity describes the mean-score contrast; it does not turn that contrast into a self-contained hypothesis about the \(\beta_i\)'s.
Worked Example: A Set Can Have Signal Without Competitive Enrichment
Suppose a hypothetical set contains genes A and B, with true log-odds coefficients \(\beta_A=0.10\) and \(\beta_B=0.08\). Both coefficients are nonzero, so the self-contained global null for this set is false. Now suppose the two genes outside the set have coefficients 0.30 and 0.25. If a hypothetical score is simply the absolute coefficient on this same scale, the set scores are 0.10 and 0.08, while the outside scores are 0.30 and 0.25.
The set mean score is \((0.10+0.08)/2=0.18/2=0.09\). The complement mean is \((0.30+0.25)/2=0.55/2=0.275\). Therefore the mean-score competitive contrast is
In this hypothetical configuration, there is within-set signal, but the set’s mean score is lower than the complement’s. The self-contained alternative is true, while the one-sided competitive alternative of greater mean score in the set is not supported by this contrast. In real data, estimated scores and uncertainty would need to be considered; the example isolates the difference in the targets.
Interpreting Results and Avoiding a Common Mistake
Before interpreting an enrichment result, state three things: the gene universe, the gene set, and the target being tested. For a competitive mean-score analysis, name the comparison as genes in \(S\) versus eligible genes in \(U\setminus S\). For a self-contained analysis, state that the global null is zero effect for every gene in \(S\), with the alternative that at least one effect is nonzero. Also name the association model and phenotype that give the gene-level parameters their meaning.
A common mistake is to treat “the set is enriched” as if it always meant “the set contains an associated gene.” The mistaken reasoning is: “The set has stronger scores than genes outside it, therefore the set contains a true association.” The correction is that stronger scores answer a relative question and may reflect the comparison group’s scores. Conversely, failing to exceed the outside genes does not establish that every gene in the set has zero effect. Only the self-contained null makes that all-zero claim.
Check Your Understanding
Use the definitions above to answer each question.
- For a competitive analysis, what genes belong to the comparison set when the universe is \(U\) and the tested set is \(S\)?
- In the mean-score formulation, what does a positive value of \(\theta_C\) mean, and what does it not establish by itself?
- Write the self-contained null for a set containing genes A, B, and C using gene-level effects \(\beta_A,\beta_B,\beta_C\).
- Can the self-contained alternative be true when the competitive contrast is negative? Explain the distinction.
- Why can two analyses of the same gene set yield different competitive contrasts if they use different gene universes?