Tutorials › Statistical Genetics › Overlapping Gene Sets and Enrichment Multiplicity

Gene Prioritization and Pathway Tests · Tutorial 691 of 989

Overlapping Gene Sets and Enrichment Multiplicity

Learn to quantify overlap-induced dependence, choose a multiplicity procedure that matches the claim, and summarize related pathway discoveries cautiously.

Advanced 10 min read

What You'll Learn

  • Quantify gene-set overlap with intersection size and Jaccard similarity
  • Derive the null correlation of pathway counts under fixed-size random selection
  • Distinguish false-discovery-rate control from family-wise error-rate control
  • Apply the Benjamini–Hochberg procedure to a family of pathway p-values
  • Recognize when arbitrary-dependence correction may be appropriate
  • Summarize overlapping ontology terms without treating redundancy as independent evidence

Why Overlapping Pathways Complicate Interpretation

A pathway analysis may test many gene sets, but those sets are rarely disjoint. A gene can belong to several pathways, and related ontology terms may share much of their membership. Consequently, evidence from one gene can contribute to several pathway statistics. The resulting p-values are not generally independent, and a list of small p-values may represent one broad biological signal repeated across overlapping terms rather than several distinct signals.

Two questions therefore need separate answers. First, how should the reported discoveries account for testing many pathways? Second, how should the discoveries be described when the pathways themselves overlap? Multiplicity procedures address the first question. Overlap summaries support the second, but a descriptive summary does not automatically replace or modify statistical error control.

Definition: For tested pathways \(1,\ldots,m\), the family is the complete set of hypotheses included in a specified multiplicity analysis. A false discovery is a rejected null hypothesis that is true. If \(R\) hypotheses are rejected and \(V\) of those rejections are false, the false discovery proportion is \(V/\max(R,1)\). The false discovery rate (FDR) is its expectation. The family-wise error rate (FWER) is the probability of making at least one false rejection: \(P(V\geq 1)\).

An FDR of at most \(q\) is a repeated-analysis error-rate guarantee under the procedure's assumptions; it is not a statement that each reported pathway has probability \(q\) of being false. FWER control at level \(\alpha\) instead limits the probability of one or more false discoveries in the family. Neither guarantee means that a particular reported pathway is certainly true or that pathway membership establishes a causal mechanism.

Measuring Overlap and Its Consequences

For pathways \(A\) and \(B\), let their gene sets have sizes \(K_A\) and \(K_B\), and let \(r=|A\cap B|\) genes be shared. A basic descriptive measure is the Jaccard similarity, the fraction of genes in the union that are shared:

$$ J(A,B)=\frac{|A\cap B|}{|A\cup B|} =\frac{r}{K_A+K_B-r}. $$

Jaccard similarity is useful for describing redundancy, but it is not itself a p-value or a measure of association between the pathway test statistics. The relation between overlap and statistical dependence also depends on how the gene-level evidence behaves. The following calculation isolates the structural effect of shared membership under a simple random-selection null.

Result: Suppose a universe contains \(N\) genes and exactly \(m\) genes are selected uniformly at random, without replacement. Let \(X_A\) and \(X_B\) count selected genes in pathways \(A\) and \(B\). Then $$ \operatorname{Corr}(X_A,X_B)= \frac{Nr-K_AK_B} {\sqrt{K_AK_B(N-K_A)(N-K_B)}}. $$ This describes dependence between pathway counts under this particular null model. It is not a universal formula for the correlation between pathway p-values.

To justify the result, write \(I_g=1\) if gene \(g\) is selected and \(0\) otherwise. Under fixed-size uniform selection, \(P(I_g=1)=m/N\). For distinct genes \(g\) and \(h\), sampling without replacement gives \(P(I_g=1,I_h=1)=m(m-1)/(N(N-1))\), so their covariance is \(-m(N-m)/(N^2(N-1))\). Each pathway count is a sum of these indicators. In the variance of \(X_A\), there are \(K_A\) individual variances and \(K_A(K_A-1)\) ordered cross-gene covariances; simplifying gives \(\operatorname{Var}(X_A)=m(N-m)K_A(N-K_A)/(N^2(N-1))\). For the covariance of the two pathway counts, \(r\) gene pairs refer to the same gene, while the other \(K_AK_B-r\) pairs refer to distinct genes. Substitution and simplification give \(\operatorname{Cov}(X_A,X_B)=m(N-m)(Nr-K_AK_B)/(N^2(N-1))\). Dividing this covariance by the square root of the two variances yields the displayed correlation.

Worked Example: Overlap and Null Count Correlation

Hypothetical data. Suppose the tested gene universe has \(N=1{,}000\) genes. Pathway A contains \(K_A=100\) genes, pathway B contains \(K_B=80\), and 40 genes are shared. Under a null that selects a fixed number of genes uniformly from this universe, quantify their overlap and the correlation of their selected-gene counts.

The union has \(100+80-40=140\) genes, so \(J(A,B)=40/140=0.2857\). Thus, about 28.6% of the genes in the union belong to both pathways.

For the null count correlation, the shared-gene term in the numerator is \(Nr-K_AK_B=(1{,}000)(40)-(100)(80)=32{,}000\). The denominator is \(\sqrt{(100)(80)(900)(920)}=\sqrt{6{,}624{,}000{,}000}\approx81{,}388\). Therefore, \(\operatorname{Corr}(X_A,X_B)=32{,}000/81{,}388\approx0.3932\).

The positive value indicates that, under this particular fixed-size random-selection model, the two pathway counts tend to move together. It does not establish a biological relationship between the pathways, nor does it determine the correlation of p-values from a different enrichment procedure. In an actual analysis, dependence can also reflect correlations among gene-level statistics and the details of the null procedure.

This distinction matters in practice. A permutation-based analysis can preserve features of the observed gene-level evidence that the simple random-selection model ignores. Empirical dependence among pathway statistics can therefore differ from the correlation of counts derived above. The overlap calculation is a transparent structural diagnostic; it is not a substitute for checking whether the test procedure's null assumptions are appropriate.

Choosing an Error-Rate Claim

A common conservative choice is the Bonferroni procedure. For \(m\) hypotheses, reject a pathway when its p-value is at most \(\alpha/m\). By the union bound, the chance of one or more false rejections is at most the sum of the individual true-null rejection probabilities, which is at most \(m(\alpha/m)=\alpha\). This guarantee does not require independence among tests. The procedure controls FWER, but can be conservative, especially when many hypotheses are tested.

When the aim is to identify a set of candidates while controlling the expected fraction of false findings, the Benjamini–Hochberg (BH) procedure is often used. Sort the \(m\) p-values as \(p_{(1)}\leq\cdots\leq p_{(m)}\). For a chosen target \(q\), find the largest rank \(k\) satisfying \(p_{(k)}\leq kq/m\), then reject the hypotheses corresponding to ranks \(1,\ldots,k\). Under independence, and under certain positive dependence conditions known as positive regression dependence on the subset of true nulls (PRDS), this procedure controls FDR at level \(q\). Overlap alone does not prove that the PRDS condition holds.

If arbitrary dependence must be covered, the Benjamini–Yekutieli (BY) procedure uses the more conservative thresholds \(kq/(mH_m)\), where \(H_m=\sum_{j=1}^{m}1/j\). It controls FDR under arbitrary dependence, assuming the individual null p-values are valid. The choice between procedures should reflect the intended error-rate claim and the dependence assumptions, not simply which method yields more discoveries.

Worked Example: Applying Benjamini–Hochberg

Hypothetical data. Suppose eight pathway tests produce the sorted p-values \(0.001,\ 0.008,\ 0.012,\ 0.030,\ 0.041,\ 0.20,\ 0.45,\ 0.80\). Use BH with \(q=0.05\), assuming its conditions for FDR control are satisfied.

Here \(m=8\), so the threshold at rank \(i\) is \(i(0.05)/8\). The thresholds at ranks 1 through 8 are \(0.00625,\ 0.0125,\ 0.01875,\ 0.0250,\ 0.03125,\ 0.0375,\ 0.04375,\ 0.0500\), respectively.

Compare each sorted p-value with its rank threshold. At rank 1, \(0.001\leq0.00625\); at rank 2, \(0.008\leq0.0125\); and at rank 3, \(0.012\leq0.01875\). At rank 4, \(0.030>0.0250\). Ranks 5 through 8 also fail their thresholds: \(0.041>0.03125\), \(0.20>0.0375\), \(0.45>0.04375\), and \(0.80>0.0500\). The largest passing rank is \(k=3\), so BH rejects the first three hypotheses.

The conclusion is that these three pathways meet the BH rejection rule for a target FDR of 0.05, subject to the stated dependence and validity assumptions. It is not correct to say that each of the three pathways has a 5% probability of being false. If these three pathways overlap substantially, their rejections also should not be described as three independent biological signals.

The family must be specified clearly. If 200 pathways were tested, applying BH only to the 20 smallest p-values while ignoring the other 180 does not generally control FDR for the original family. Filtering can be compatible with valid inference under suitable conditions, but selecting terms because their observed results looked promising and then treating them as the full family can invalidate the intended error-rate guarantee. Report the number of hypotheses in the family and the procedure used.

Summarizing Redundant Terms

Multiplicity correction and ontology-aware summaries serve related but distinct purposes. Correction addresses repeated testing; a summary addresses interpretability. After applying a valid procedure to the defined family, one can present pairwise overlap, group highly overlapping terms for display, or identify a representative term for a cluster. Such choices should be described as summaries unless a formal cluster-level test and its inferential procedure were specified.

Worked Example: Reporting a Cluster of Related Pathways

Hypothetical data. Suppose three pathways have these memberships: A contains genes \(\{g_1,g_2,g_3,g_4,g_5\}\), B contains \(\{g_1,g_2,g_3,g_4,g_6\}\), and C contains \(\{g_7,g_8,g_9,g_{10}\}\). Their multiplicity-adjusted results identify A and B as discoveries, but not C.

Pathways A and B share four genes and have a union of six genes, so \(J(A,B)=4/6=0.667\). A and C share no genes, giving \(J(A,C)=0\); B and C also have \(J(B,C)=0\). Thus A and B are highly redundant by this descriptive measure, while C is distinct in membership.

A cautious report would say that two adjusted pathway hypotheses, A and B, met the chosen discovery criterion and that they share four of six genes in their union. A compact ontology-aware table could group A and B for display, name one as the representative term, and retain both adjusted results and their memberships in supplementary reporting. It should not relabel this group as one statistically tested discovery unless a cluster-level test was actually performed. Nor should the two term names be presented as independent confirmation of the same signal.

Overlap summaries can be made more useful by including the genes contributing to each term, the number shared, the Jaccard similarity, and adjusted p-values. If the ontology supplies parent-child relationships, those can guide which term is selected for a readable label, but semantic relatedness and gene overlap are not identical. A shared gene may be important to the test, yet an overlap table alone does not show that the shared gene caused the association.

Common Pitfalls and Practical Reporting

  • Reading FDR as a pathway-specific probability. An FDR target describes an error rate across repeated applications of a procedure under its assumptions; it is not the probability that a particular rejected pathway is false.
  • Calling related pathway discoveries independent. Shared genes can contribute to several tests. Report the overlap or group terms transparently rather than counting every related name as a separate line of evidence.
  • Assuming overlap guarantees a specific dependence condition. Shared membership often induces dependence, but its direction and strength also depend on the test statistics and null construction. BH validity requires its stated conditions; BY is an option when arbitrary dependence must be accommodated.
  • Confusing a descriptive cluster with an inferential test. Grouping terms after seeing results can improve presentation, but the group has no automatically calibrated p-value. A formal group claim requires an appropriate test and multiplicity treatment.
  • Leaving the family undefined. State which pathways were tested and how many were included in the correction. A threshold or adjusted p-value is interpretable only relative to a specified family and procedure.
Key takeaway: Shared membership can make pathway results dependent and redundant. Define the tested family, choose a procedure whose error-rate guarantee matches the scientific claim, and use overlap-aware summaries to describe what the discoveries share. Keep the inferential correction distinct from the descriptive grouping.

Check Your Understanding

Answer these questions by distinguishing the dependence structure, the error-rate claim, and the biological summary.

  1. Two pathways share 30 genes. What additional information is needed to calculate their Jaccard similarity?
  2. In the fixed-size random-selection model, what does a positive correlation between pathway counts establish, and what does it not establish?
  3. How does the claim controlled by FDR differ from the claim controlled by FWER?
  4. With eight tests and \(q=0.05\), what is the BH threshold at rank 4, and what comparison determines whether that rank passes?
  5. Why is it misleading to describe two highly overlapping, significant ontology terms as independent evidence?
Clinical Biostats