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.
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:
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.
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,
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
For the parent, it is
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
For the parent, the corresponding tail is
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
The parent's fold enrichment is
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
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
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 approach | What it contributes | Important limitation |
|---|---|---|
| Read each significant term separately | Provides a quick list of ontology labels and their reported statistics | Can make overlapping terms sound like distinct findings |
| Compare child and parent counts and fractions | Shows where selected genes concentrate and how broad the memberships are | Descriptive comparison alone does not establish significance or causation |
| Inspect term-gene overlap and ontology paths | Reveals shared evidence and whether terms are hierarchical or merely overlapping | Depends 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.
Check Your Understanding
Answer each question using the definitions and reasoning above. Solutions follow the questions.
- 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?
- Why can a child term have a smaller p-value than its parent even when the child has no more selected genes?
- Two significant related terms share most of their selected genes. What is a defensible interpretation, and what claim should be avoided?
- 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.
- 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.
- 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.
- 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.
- 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.