Tutorials › High-Dimensional Genomic Data Analysis › Overlapping Pathways and Dependent Enrichment Results

Gene Set and Pathway Enrichment · Tutorial 473 of 795

Overlapping Pathways and Dependent Enrichment Results

You will learn to measure pathway overlap, understand how it affects enrichment dependence, and assess whether multiple significant results reflect shared genes or distinct evidence.

Intermediate 11 min read

What You'll Learn

  • Define pathway intersection, Jaccard similarity, and pathway-hit overlap.
  • Derive the covariance of two over-representation hit counts under a fixed-list null.
  • Interpret the sign and size of count dependence without assuming all overlap creates positive correlation.
  • Audit whether enriched pathways are supported by the same selected genes or by distinct genes.
  • Recognize why separate pathway p-values are not automatically independent biological confirmations.
  • Identify limits of overlap summaries and diagnostics for misleading interpretations.

Why Pathway Results Can Repeat the Same Evidence

A pathway analysis can return several significant gene sets even when the underlying expression evidence is concentrated in a relatively small group of genes. This often happens because pathway definitions overlap: a gene may belong to several sets, so selecting that gene can affect several enrichment results at once. The resulting pathway tests are generally dependent, and counting significant pathways as though each were a separate confirmation can exaggerate how much distinct evidence the analysis contains.

Dependence does not mean that two pathways are biologically identical. Nor does overlap alone establish that their results are redundant. The useful questions are more specific: how much do the gene sets overlap, how many of the selected genes do they share, and how much of each pathway’s enrichment is supported by genes not shared with the other pathway?

Definition: For gene sets \(A\) and \(B\), their gene-set overlap is \(r=|A\cap B|\). The Jaccard similarity is \(J(A,B)=|A\cap B|/|A\cup B|\), where \(|A\cup B|=|A|+|B|-|A\cap B|\). For a selected gene list \(L\), their shared selected hits are \(|A\cap B\cap L|\). Gene-set overlap describes the annotations; shared selected hits describe how much of the observed list-level evidence is common to both tests.

These quantities answer different questions. Two pathways can share many genes but have few selected genes in common in a particular analysis. Conversely, a small intersection can contain most of the selected hits in both pathways. Neither the Jaccard similarity nor the number of shared hits is, by itself, a test of biological similarity or a measure of causal connection.

How Overlap Produces Dependence Under a Simple ORA Null

For over-representation analysis (ORA), let \(N\) be the number of genes in the analysis universe, \(K\) the number selected, \(A\) and \(B\) two fixed gene sets of sizes \(a\) and \(b\), and \(r=|A\cap B|\). Write \(X_A=|A\cap L|\) and \(X_B=|B\cap L|\) for their hit counts. Under the simple competitive null used here, the universe and annotations are fixed, and every subset of \(K\) genes is equally likely to be selected. Thus the list is sampled uniformly without replacement. Each count separately has a hypergeometric distribution, with expected values \(E(X_A)=Ka/N\) and \(E(X_B)=Kb/N\).

This null is a mathematical reference for understanding dependence, not a claim that real differential-expression lists arise from uniform random sampling. If selection probabilities differ across genes, or the analysis uses a different null, the dependence may differ. The covariance formula below is exact for the stated fixed-size, uniform-selection model.

Result: Under uniform selection of exactly \(K\) genes from \(N\), $$ \operatorname{Cov}(X_A,X_B)=\frac{K(N-K)}{N-1}\left(\frac{r}{N}-\frac{ab}{N^2}\right). $$ For a single set of size \(a\), this gives the hypergeometric variance \(\operatorname{Var}(X_A)=\frac{K(N-K)}{N-1}\frac{a}{N}(1-\frac{a}{N})\).

The formula shows why overlap matters, but also why the sign is not determined by merely observing at least one shared gene. Covariance is positive when \(r>ab/N\), zero when \(r=ab/N\), and negative when \(r<ab/N\). The quantity \(ab/N\) is the expected intersection size if two sets of sizes \(a\) and \(b\) were independently placed in a universe of size \(N\). In actual pathway databases, sets are fixed rather than randomly placed; this benchmark helps interpret the formula, not decide whether annotations are biologically appropriate.

A Short Derivation

For each gene \(g\), let \(I_g=1\) if it is selected and \(I_g=0\) otherwise. Under the fixed-\(K\) null, \(P(I_g=1)=K/N\). For two distinct genes \(g\) and \(h\), the probability both are selected is \(K(K-1)/[N(N-1)]\), so

$$ \operatorname{Cov}(I_g,I_h)=\frac{K(K-1)}{N(N-1)}-\left(\frac{K}{N}\right)^2 =-\frac{K(N-K)}{N^2(N-1)}. $$

Let \(q=K/N\). Then \(\operatorname{Var}(I_g)=q(1-q)\), while the covariance for distinct genes is \(-q(1-q)/(N-1)\). Now \(X_A\) is the sum of the \(I_g\) values for genes in \(A\), and \(X_B\) is the corresponding sum for \(B\). When expanding their covariance, \(r\) gene pairs are identical (one shared gene counted in both sums), while \(ab-r\) pairs consist of distinct genes. Therefore,

$$ \begin{aligned} \operatorname{Cov}(X_A,X_B) &=r q(1-q)-(ab-r)\frac{q(1-q)}{N-1}\\ &=\frac{K(N-K)}{N-1}\left(\frac{r}{N}-\frac{ab}{N^2}\right). \end{aligned} $$

This also explains the two competing effects. Shared genes contribute common inclusion indicators, tending to make the counts move together. But fixing the total list size \(K\) creates negative dependence between the inclusion indicators of distinct genes: selecting one gene leaves slightly less room for others. The net covariance combines both effects. Enrichment p-values are functions of the counts, so dependence between counts usually means pathway results are dependent too; however, the covariance is not itself a correlation between p-values.

Worked Example: Count Covariance With a Small Overlap

Suppose a hypothetical analysis has a universe of \(N=1{,}000\) genes, selects \(K=50\), and compares pathways with \(a=40\) and \(b=35\) genes. They share \(r=2\) genes. Calculate the covariance and correlation of their ORA hit counts under the uniform fixed-list null.

The expected hit counts are \(50(40/1{,}000)=2.00\) for \(A\) and \(50(35/1{,}000)=1.75\) for \(B\). The covariance is

$$ \begin{aligned} \operatorname{Cov}(X_A,X_B) &=\frac{50(1{,}000-50)}{999} \left(\frac{2}{1{,}000}-\frac{(40)(35)}{1{,}000^2}\right)\\ &=\frac{47{,}500}{999}(0.002-0.0014)\\ &=\frac{47{,}500}{999}(0.0006)\\ &\approx 0.02853. \end{aligned} $$

The sign is positive because the observed intersection of 2 genes is greater than \(ab/N=(40)(35)/1{,}000=1.4\). The marginal variances are

$$ \begin{aligned} \operatorname{Var}(X_A)&=\frac{50(950)}{999}(0.04)(0.96)\approx 1.826,\\ \operatorname{Var}(X_B)&=\frac{50(950)}{999}(0.035)(0.965)\approx 1.606. \end{aligned} $$

Thus the correlation of the counts is \(0.02853/\sqrt{(1.826)(1.606)}\approx 0.01666\). This is weakly positive. The example illustrates an important distinction: shared membership creates a common source of variation, but a small overlap relative to pathway sizes can still yield only weak count correlation. It would be incorrect to describe the pathway results as strongly dependent merely because the sets have two genes in common.

Audit the Genes Behind the Results

To assess whether two enrichment results repeat evidence, inspect both the pathway intersection and the selected genes in that intersection. A useful audit reports set sizes, intersection size, a normalized overlap measure such as Jaccard similarity, each pathway’s selected-hit count, and the number of selected hits shared by the pathways. If a result is based on a ranked analysis, the same broad logic applies: check whether genes common to the sets also contribute to both results. The exact dependence of ranked statistics depends on the ranking and null procedure, so the ORA covariance formula should not be transferred to them.

1
Establish the common universe.
Use the same eligible genes when comparing set sizes, selected hits, and overlaps. Different universes can make overlap summaries misleading.
2
Measure annotation overlap.
Record \(|A|\), \(|B|\), \(|A\cap B|\), and a normalized measure such as Jaccard similarity. A raw intersection of 10 genes means something different for two sets of 20 genes than for two sets of 2,000.
3
Measure evidence overlap.
Count selected genes in each set and in their intersection. Determine whether the same selected genes account for much of both observed hit counts.
4
Report the relationship cautiously.
Describe the results as overlapping evidence when shared genes support both. Distinct selected genes can indicate distinct gene-level evidence, but do not alone prove distinct mechanisms or independent biological signals.

Worked Example: Two Significant Results, Much Shared Evidence

Consider hypothetical pathways \(A\) and \(B\) in a universe of 1,000 genes. Their sizes are 40 and 35, and they share 12 genes. A selected list of 50 genes contains 10 genes from \(A\), 9 from \(B\), and 6 genes in both pathways.

The Jaccard similarity is \(12/(40+35-12)=12/63\approx 0.1905\). The pathways share 12 of 35 genes in \(B\), and 6 of their selected hits are common. The total number of distinct selected genes supporting either pathway is \(10+9-6=13\), not 19. Thus, six selected genes contribute to both pathway hit counts, while four hits are unique to \(A\) and three are unique to \(B\).

For context, the expected hit counts under the uniform-list null are \(50(40/1{,}000)=2\) and \(50(35/1{,}000)=1.75\). The observed counts exceed those expectations. Their sample ORA odds ratios are also large. For \(A\), the selected and unselected counts inside the pathway are 10 and 30; outside it they are 40 and 920. Hence

$$ \widehat{\mathrm{OR}}_A=\frac{10(920)}{30(40)}\approx 7.667. $$

For \(B\), the corresponding table entries are 9 and 26 inside, and 41 and 924 outside, giving

$$ \widehat{\mathrm{OR}}_B=\frac{9(924)}{26(41)}\approx 7.801. $$

Both sets show substantial over-representation by these summaries, but the results are not two independent confirmations: six selected genes contribute to both, and the annotations overlap. A careful report would present both findings while making the shared support explicit. Whether the three and four nonshared hits are enough to support distinct biological interpretations requires more than these overlap calculations.

Worked Example: Disjoint Sets Can Still Be Dependent

Now let two hypothetical pathways in the same \(N=1{,}000\)-gene universe be disjoint, with sizes 40 and 35. Under a uniform list of \(K=50\) genes, \(r=0\). Their count covariance is

$$ \begin{aligned} \operatorname{Cov}(X_A,X_B) &=\frac{50(950)}{999}\left(0-\frac{(40)(35)}{1{,}000^2}\right)\\ &=\frac{47{,}500}{999}(-0.0014)\\ &\approx -0.06657. \end{aligned} $$

Using the variances from the preceding calculation, the count correlation is approximately \(-0.06657/\sqrt{(1.826)(1.606)}=-0.03888\), a weak negative correlation. There are no shared genes; the negative dependence comes from fixing the total list size. For example, a hypothetical selected list could contain 8 genes from \(A\) and 7 from \(B\), with no shared hits. Those are distinct selected genes, but the fixed-list null still does not make the two counts independent. Also, observing distinct hits is not by itself proof of separate biological mechanisms.

Diagnostics, Alternatives, and Limitations

Several checks help prevent overinterpretation. First, verify that the pathways were tested against the same gene universe and that set membership is being compared consistently. Second, distinguish overlap in annotations from overlap in selected evidence: a large set intersection need not contain selected genes, and a modest intersection may contain most of the hits. Third, inspect whether the apparent relationship is driven by a few shared genes or is broadly supported across each set. Fourth, remember that dependence can arise from the fixed-size selection constraint even when sets do not overlap. The sign and strength of dependence are properties of the full testing setup, not just a visual impression of two pathway names.

A common mistake is to reason, “Both pathways are significant, so they independently confirm the same biological process.” That conclusion does not follow. If the pathways share selected genes, their enrichment results reuse part of the same evidence. The correction is to report the shared support and avoid treating the count of significant pathways as a count of independent replications. The opposite mistake is to discard one result whenever pathways overlap. Overlap may be partial, and each pathway may also contain distinct selected genes; report that distinction rather than making an automatic choice.

One alternative is to list every significant pathway separately. This preserves detail but can make redundant findings appear more numerous than the underlying evidence warrants. Another is to summarize overlapping pathways together or choose a representative set for communication. This is concise, but can hide pathway-specific genes and depends on a transparent grouping rule. A third option is to focus on the genes supporting each result and describe common versus noncommon evidence. This retains biological detail but does not itself create a formal test of distinct mechanisms. These summaries answer different reporting needs; none turns overlapping results into independent tests.

Overlap summaries also have limits. Jaccard similarity is sensitive to set sizes and can be small even when one small set is almost contained in a much larger one. A raw intersection ignores whether genes are selected or how strongly they contribute. ORA count covariance applies only under its stated uniform fixed-size null; a different selection mechanism or ranked statistic may have a different dependence structure. Finally, shared annotation and shared evidence support a statement about statistical dependence or reuse of genes, not a causal explanation of the biology.

Key takeaway: When pathway results overlap, report both the annotation overlap and the overlap among the genes supporting the results. Shared genes often make enrichment findings dependent, but dependence can be weak, negative under a fixed-list constraint, or different under another null. Multiple significant pathways should not automatically be counted as multiple independent biological signals.

Check Your Understanding

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

  1. Under the uniform fixed-list null, \(N=500\), \(K=25\), and pathway sizes are \(a=20\), \(b=10\). What intersection size makes the hit-count covariance zero?
  2. Two pathways have sizes 30 and 20, with 10 shared genes. Their selected hit counts are 8 and 6, with 5 shared selected hits. How many distinct selected genes support either result, and what is the Jaccard similarity?
  3. Explain why two disjoint pathways can have dependent ORA hit counts when the selected list has a fixed size.
  4. Two pathways are both significant and share most of their selected hits. What conclusion is justified, and what conclusion is not justified?

Solutions. (1) Zero covariance requires \(r=ab/N=(20)(10)/500=0.4\). Since an actual intersection is an integer, no possible intersection gives exactly zero covariance here; \(r=0\) gives negative covariance and \(r=1\) gives positive covariance. (2) The distinct selected genes number \(8+6-5=9\). The Jaccard similarity is \(10/(30+20-10)=10/40=0.25\). (3) With a fixed number of selected genes, inclusion indicators for distinct genes have negative covariance: once one gene is selected, slightly fewer list positions remain for others. Thus disjoint-set counts need not be independent. (4) It is justified to say the results share much of their selected-gene evidence and should not be treated as independent confirmations. It is not justified to conclude that the pathways are biologically identical, or that they represent distinct causal mechanisms, from enrichment and overlap alone.

Clinical Biostats