Tutorials › High-Dimensional Genomic Data Analysis › Interpreting Enrichment Across Hierarchical Pathway Ontologies

Gene Set and Pathway Enrichment · Tutorial 474 of 795

Interpreting Enrichment Across Hierarchical Pathway Ontologies

Interpret significant child and parent terms in a pathway ontology by comparing their gene memberships, enrichment statistics, and shared evidence.

Intermediate 11 min read

What You'll Learn

  • Define child, parent, ancestor, and descendant terms in a hierarchical ontology.
  • Compare selected-gene counts and fold enrichment for nested terms.
  • Explain why a specific child term can be significant when its broader parent is not.
  • Interpret several significant related terms without counting them as independent evidence.
  • Diagnose annotation and universe choices that can distort hierarchical interpretations.
  • Distinguish ontology hierarchy from a claim about biological causation.

Why Hierarchical Terms Need Joint Interpretation

Pathway and ontology results are often reported as a ranked list of significant terms. In an ontology such as Gene Ontology, those terms are connected: a specific process can be a child of a broader process, and both may appear in the results. Reading each row as a separate discovery can therefore overstate how many distinct signals the analysis supports. A better interpretation asks how the terms are related, which genes they contain, and whether the specific and broad terms tell a consistent story.

This tutorial focuses on that interpretation. It does not change the enrichment test: it explains what a result means when tested gene sets are connected by an ontology hierarchy. In particular, a significant child and a nonsignificant parent are not inherently contradictory, and multiple significant related terms are not automatically multiple independent findings.

Definition: In a directed ontology graph, a child term is more specific than a connected parent term; a term reached by following parent links is an ancestor, and a term reached by following child links is a descendant. A term's gene set is the set of genes annotated to that term under a specified annotation release and propagation rule. For the usual propagated annotations along a given child-parent relation, the child's gene set is contained in the parent's gene set. This containment should be checked in the actual tested gene sets rather than assumed for every relation or data-processing pipeline.

Ontologies are generally directed acyclic graphs, not simple trees. A child can have more than one parent, and two terms can share genes without one being an ancestor of the other. The meaning of a relation also matters: not every edge should be read as an identical biological claim. The ontology and annotation version, the tested relation types, and the analysis's gene universe all affect which memberships are compared.

What a Hierarchical Enrichment Result Compares

For over-representation analysis, let \(U\) be the eligible gene universe, with \(N=|U|\). Let \(L\) be the selected list, with \(n=|L|\). For a term \(T\), let \(G_T\) be its genes within \(U\), \(K_T=|G_T|\), and \(x_T=|L\cap G_T|\). Under the usual competitive hypergeometric null, the selected list is treated as a size-\(n\) subset drawn from \(U\), and the overlap \(X_T\) has a hypergeometric distribution. The one-sided over-representation p-value is \(P(X_T\geq x_T)\).

This calculation requires a well-defined universe of genes that could have been selected, a selected list drawn from that universe, consistent gene identifiers, and fixed term memberships. The hypergeometric null further treats every size-\(n\) subset of the universe as equally likely under the null. It is a competitive comparison: the term's overlap is assessed relative to genes outside the term. Related terms have dependent test results because their memberships overlap, but that dependence does not make each term's marginal overlap count meaningless.

A useful descriptive quantity is fold enrichment, the selected-list fraction in a term divided by the universe fraction in that term:

$$ \operatorname{FE}(T)=\frac{x_T/n}{K_T/N}. $$

Fold enrichment summarizes the size of the observed proportion relative to the universe proportion. It is not a p-value: it does not by itself account for the variability of an overlap count, and it does not establish that a term is significant. Also, a small term can have a larger fold enrichment than its parent while containing fewer selected genes.

Key interpretation: When \(G_C\subseteq G_P\) for child \(C\) and parent \(P\), the counts satisfy \(x_C\leq x_P\) and \(K_C\leq K_P\). Neither inequality determines which term has the smaller p-value or larger fold enrichment. Those also depend on the sizes of the term memberships and on the distribution of overlaps expected under the null.

Why a Child Can Be Significant Without Its Parent

The key comparison is between the observed overlap and the overlap expected for each term's own size. A parent contains the child's genes plus other genes. Those extra genes increase the parent term's universe membership, and they may or may not contribute selected genes. Consequently, a cluster of selected genes concentrated in a small child can be strong evidence relative to that child's size, while the same count is modest relative to a much larger parent.

This follows directly from the fold-enrichment formula. If the child and parent have the same selected overlap \(x\), then their selected-list fractions \(x/n\) match, but the child's universe fraction \(K_C/N\) is smaller when \(K_C<K_P\). The child's fold enrichment is therefore larger. More generally, if both overlaps are positive,

$$ \frac{\operatorname{FE}(C)}{\operatorname{FE}(P)} = \frac{x_C}{x_P}\frac{K_P}{K_C}. $$

This identity is obtained by dividing \((x_C/n)/(K_C/N)\) by \((x_P/n)/(K_P/N)\); the common factors \(n\) and \(N\) cancel. It shows why the relative overlaps and term sizes jointly determine the contrast. Statistical significance additionally depends on the full tail probabilities, not just fold enrichment.

Worked Example: A Specific Child Is Significant but Its Parent Is Not

Hypothetical data. Suppose the eligible universe has \(N=30\) genes and the selected list has \(n=6\). A child term contains \(K_C=5\) universe genes, of which \(x_C=4\) are selected. Its parent contains \(K_P=12\) genes, including all five child genes, and also has \(x_P=4\) selected genes.

For the child, the fold enrichment is

$$ \operatorname{FE}(C) = \frac{4/6}{5/30} = \frac{2/3}{1/6} = 4.000. $$

For the parent, it is

$$ \operatorname{FE}(P) = \frac{4/6}{12/30} = \frac{2/3}{2/5} = \frac{5}{3} \approx 1.667. $$

The child has four selected genes out of five universe genes in the term, whereas the parent has those same four selected genes among twelve. The child is more concentrated relative to its background frequency. The exact fractions are used in the calculations; for comparison, \(0.6667/0.1667\approx3.9994\), not exactly \(4.000\), because those decimal inputs are rounded.

The hypergeometric p-values make the distinction explicit. The denominator for either term is \(\binom{30}{6}=593775\). For the child, the upper tail is

$$ P(X_C\geq4) = \frac{\binom{5}{4}\binom{25}{2}+\binom{5}{5}\binom{25}{1}} {\binom{30}{6}} = \frac{5(300)+25}{593775} = \frac{1525}{593775} \approx 0.002568. $$

For the parent, the corresponding tail is

$$ P(X_P\geq4) = \frac{\binom{12}{4}\binom{18}{2}+\binom{12}{5}\binom{18}{1}+\binom{12}{6}\binom{18}{0}} {\binom{30}{6}} = \frac{495(153)+792(18)+924}{593775} = \frac{90915}{593775} \approx 0.1531. $$

Thus, at a nominal \(0.05\) threshold, the child is significant and the parent is not. This comparison does not account for testing many ontology terms; in an analysis that corrects for multiple testing, significance must be judged using the reported adjusted results and the chosen threshold. The example shows why a child-parent difference in significance is possible, not a rule that small terms should always be preferred.

Interpreting Several Significant Related Terms

The converse situation is also common: both child and parent terms are significant. Their results can provide a coherent description at two levels of specificity, but the overlap means they are not automatically independent confirmations. To make the interpretation concrete, compare term sizes, selected counts, and the genes shared between the terms. The counts show what the results have in common; they do not prove that the shared genes caused the phenotype or expression pattern.

Worked Example: Significant Child and Parent Terms

Hypothetical results. In an analysis with \(N=1000\) eligible genes and \(n=50\) selected genes, a child term has \(K_C=20\) genes and \(x_C=8\) selected genes. Its parent has \(K_P=120\) genes, including the child, and \(x_P=15\) selected genes. Assume the analysis reports adjusted p-values of \(0.004\) for the child and \(0.030\) for the parent, using a declared threshold of \(0.05\).

The child's fold enrichment is

$$ \operatorname{FE}(C) = \frac{8/50}{20/1000} = \frac{0.16}{0.02} = 8.000. $$

The parent's fold enrichment is

$$ \operatorname{FE}(P) = \frac{15/50}{120/1000} = \frac{0.30}{0.12} = 2.500. $$

Both reported adjusted p-values are below \(0.05\), so both terms meet the stated significance criterion. Because the child is contained in the parent, its eight selected genes are among the parent's fifteen; the other seven selected genes belong to the parent but not the child. A careful summary is that the selected list is especially concentrated in the specific child category, while enrichment also extends across a broader parent membership. The two rows should not be presented as two independent pieces of evidence: they share the child's genes and are structurally related.

When terms are not in a direct parent-child relation, they can still overlap substantially. In a directed acyclic graph, a term may have multiple parents, so the same specific gene membership can contribute to results under more than one ontology branch. In that setting, distinguish a true ancestor-descendant comparison from a general gene-set overlap. The ontology path explains the semantic relationship; a gene overlap summary explains the shared data.

Worked Example: A Child With Two Parent Branches

Hypothetical results. Consider \(N=500\) eligible genes and \(n=40\) selected genes. A child term \(D\) has \(K_D=10\) genes, five of them selected. It is connected to parent terms \(A\) and \(B\). Term \(A\) has \(K_A=50\) genes and nine selected; term \(B\) has \(K_B=40\) genes and eight selected. Suppose all ten genes in \(D\) are members of both parents. Assume the analysis marks all three terms significant after its chosen correction procedure.

The descriptive fold enrichments are

$$ \operatorname{FE}(D)=\frac{5/40}{10/500}=6.250,\qquad \operatorname{FE}(A)=\frac{9/40}{50/500}=2.250,\qquad \operatorname{FE}(B)=\frac{8/40}{40/500}=2.500. $$

The five selected genes in \(D\) are shared with both parents. The remaining four selected genes counted for \(A\) and the remaining three counted for \(B\) need not be the same genes. If the selected overlaps of \(A\) and \(B\) share exactly the five genes in \(D\), their selected-gene Jaccard index is

$$ \frac{|(L\cap G_A)\cap(L\cap G_B)|}{|(L\cap G_A)\cup(L\cap G_B)|} = \frac{5}{9+8-5} = \frac{5}{12} \approx 0.4167. $$

The child gives a more specific, highly concentrated description, while both parent branches also capture selected genes. The common five genes contribute to all three term results, so the three significant rows cannot be counted as three independent biological signals. The Jaccard index here describes overlap among selected genes only; it does not measure the full similarity of the ontology terms or the statistical strength of their enrichment.

Practical Checks and Common Pitfalls

Before writing a biological interpretation, inspect the ontology relationships and the actual gene memberships used in the test. A relation displayed in an ontology browser may not match the propagation or filtering used to create the analysis gene sets. Annotation updates can alter memberships, and different universe definitions can change both expected proportions and p-values. Keep the annotation release, relation rules, universe, and selected-list rule fixed when comparing terms.

  • Check membership nesting. Confirm that the child's tested genes are actually included in the parent's tested genes. If not, report the actual overlap and investigate annotation or filtering differences rather than relying on a presumed subset relation.
  • Compare counts as well as p-values. Record \(K_T\), \(x_T\), the selected-list size, and the universe size. A p-value alone does not reveal whether a broad parent is supported by many genes or mostly by a child's membership.
  • Look for shared genes. Identify how much of each term's selected overlap is shared with related terms. This is a diagnostic for redundancy in interpretation, not a new significance test.
  • Use the declared significance procedure. A nominally small p-value and an adjusted p-value answer different reporting questions. Do not infer significance after multiple testing from a nominal value alone.

A frequent mistake is: “The child and parent are both significant, so the experiment independently confirms two pathways.” That reasoning ignores their shared genes and the hierarchical dependence between their gene sets. The correction is to describe the two levels of ontology specificity and state how much overlap they share; independent confirmation requires evidence beyond duplicated reporting of the same selected genes.

Another mistake is: “The child is significant but the parent is not, so the results are inconsistent.” The example above shows why this need not be so: the same overlap can be unusual in a small set and unsurprising in a larger one. Conversely, a child term's higher fold enrichment does not automatically make it the best biological explanation. Small memberships, annotation gaps, and the choice of universe can make a term appear unusually concentrated, so examine counts and context before assigning biological importance.

Interpretation approachWhat it contributesImportant limitation
Read each significant term separatelyProvides a quick list of ontology labels and their reported statisticsCan make overlapping terms sound like distinct findings
Compare child and parent counts and fractionsShows where selected genes concentrate and how broad the memberships areDescriptive comparison alone does not establish significance or causation
Inspect term-gene overlap and ontology pathsReveals shared evidence and whether terms are hierarchical or merely overlappingDepends on correct annotations and does not remove all biological ambiguity

These approaches answer different questions, so they are complementary rather than substitutes. A list of terms is useful for discovery, while hierarchical and overlap checks make the summary more precise. All remain limited by the selected-list definition, the gene universe, annotation quality, and the fact that enrichment is evidence of over-representation under a specified statistical comparison—not evidence that a process caused the observed expression pattern.

Key takeaway: Interpret a significant ontology term in relation to its tested gene set, its selected overlap, and its position in the hierarchy. Report child and parent terms as related levels of description when they share genes, not as independent discoveries by default.

Check Your Understanding

Answer each question using the definitions and reasoning above. Solutions follow the questions.

  1. A child contains 6 of 8 selected genes in a universe of 400; its parent contains 10 of 80 selected genes. Calculate each term's fold enrichment if the selected list has 40 genes. What does the comparison suggest?
  2. Why can a child term have a smaller p-value than its parent even when the child has no more selected genes?
  3. Two significant related terms share most of their selected genes. What is a defensible interpretation, and what claim should be avoided?
  4. A child-parent relationship appears in an ontology browser, but the child's tested gene set is not a subset of the parent's tested set. Give two checks to make before interpreting the discrepancy.

Solutions.

  1. The child has \(\operatorname{FE}=(6/40)/(8/400)=0.15/0.02=7.500\). The parent has \(\operatorname{FE}=(10/40)/(80/400)=0.25/0.20=1.250\). The selected genes are more concentrated relative to the child membership, but these fold enrichments alone do not establish either term's significance.
  2. The parent has a larger background membership, so the same or similar selected count can be less unusual relative to its term size. The p-value depends on the hypergeometric tail for each term, not only on the observed count; a child can therefore have a smaller tail probability.
  3. Describe the terms as related ontology levels or overlapping categories, and report the shared selected genes or overlap. Avoid claiming that they are independent confirmations merely because both terms meet a significance threshold.
  4. Check whether the analysis used the same annotation release and the expected propagation rules as the browser. Also check whether the universe restriction, identifier mapping, or term-size filtering removed genes differently from the two sets. Interpret the memberships actually tested until the discrepancy is resolved.
Clinical Biostats