Tutorials › Multi-Omics Data Integration › Interpreting Factors With Pathway Enrichment

Latent Factor Models and Their Interpretation · Tutorial 238 of 597

Interpreting Factors With Pathway Enrichment

You will learn to test whether a factor’s high-magnitude loadings are over-represented in a pathway, and how the selected features and background determine what the result means.

Advanced 10 min read

What You'll Learn

  • Define a selected set and eligible background for a factor-loading enrichment test.
  • Derive and calculate a hypergeometric over-representation p-value.
  • Explain how feature filtering and annotation coverage change the result.
  • Distinguish enrichment of absolute loading magnitudes from direction or pathway activity.
  • Account for testing multiple pathways and recognize when a ranked approach is preferable.

From Loading Patterns to Biological Descriptions

A latent factor can summarize coordinated variation across subjects, while its loadings indicate which measured features contribute strongly to that factor. A pathway enrichment analysis asks a narrower question: among a defined set of high-magnitude loadings, are members of a specified biological pathway more numerous than would be expected under a stated reference model? This can help describe a factor, but it does not establish that the pathway is active, causal, or the unique biological explanation for the factor.

The first decision is how to turn loadings into a feature set. A common choice is to select the \(n\) features with the largest absolute loadings for a factor. Absolute values focus on magnitude: a large positive and a large negative loading can both enter the set. The selection rule should be stated before interpreting the pathway results, since a different threshold or rank cutoff can produce a different selected set.

Definition: For a factor and an omics view, the selected set is the set of features chosen by a stated loading-based rule, such as the top \(n\) absolute loadings. The eligible background is the set of all features that could have been selected under that analysis, after measurement, quality control, and any feature filtering. A pathway’s over-representation is an excess of its members in the selected set relative to the eligible background under a specified null model.

The background is not automatically every gene in a genome or every feature listed in a pathway database. It should reflect the actual selection process. If only a restricted set of genes was measured and eligible to receive a loading, genes outside that set could not have been selected and should not be counted as non-selected candidates.

The Over-Representation Test

For one pathway and one feature universe, let \(N\) be the number of eligible features, \(K\) the number of those features annotated to the pathway, \(n\) the number of selected features, and \(x\) the number of selected features annotated to the pathway. Under the null model, the selected set is a uniformly chosen subset of size \(n\) from the \(N\) eligible features. The number of pathway members in such a set has a hypergeometric distribution.

$$ X \sim \operatorname{Hypergeometric}(N,K,n), \qquad P(X=j)=\frac{\binom{K}{j}\binom{N-K}{n-j}}{\binom{N}{n}}. $$

For an over-representation question, the p-value is the probability under this null model of observing at least \(x\) pathway members:

$$ p_{\text{ORA}}=P(X\geq x) =\sum_{j=x}^{\min(K,n)} \frac{\binom{K}{j}\binom{N-K}{n-j}}{\binom{N}{n}}. $$

This is a one-sided test. It compares the observed overlap with what the background composition predicts; it does not test whether the pathway’s genes have positive loadings, whether the factor is statistically significant, or whether the pathway causes the observed variation. A useful descriptive quantity alongside the p-value is the fold enrichment, the observed selected-set proportion of pathway members divided by their background proportion:

$$ \text{fold enrichment} =\frac{x/n}{K/N}. $$

The hypergeometric calculation assumes that the selected set is a subset of the eligible background, that pathway membership is defined consistently, and that under the null every subset of size \(n\) is equally likely. This exchangeability assumption is a reference model, not a claim that biological features are identical. It can be implausible if the selection process systematically favors certain gene classes, or if the background fails to represent the features that could enter the list. The test also treats each feature as the sampling unit; duplicated identifiers or multiple probes for one gene need a deliberate mapping policy.

Worked Example: Testing One Pathway Against the Eligible Genes

Suppose a hypothetical gene-expression view has eligible genes A through T, so \(N=20\). A pathway contains A through F, giving \(K=6\) pathway genes in this universe. The five largest absolute loadings belong to A, B, C, D, and G. Thus \(n=5\), and the overlap is A, B, C, D, so \(x=4\). The selected genes are all in the stated background.

Under the null, a size-five subset is drawn uniformly from the 20 genes. Four or more pathway genes can occur as either four or five. Therefore:

$$ P(X\geq 4) =\frac{\binom{6}{4}\binom{14}{1}+\binom{6}{5}\binom{14}{0}} {\binom{20}{5}} =\frac{15(14)+6(1)}{15504} =\frac{216}{15504} \approx 0.01393. $$

The expected overlap under the null is \(nK/N=5(6/20)=1.5\) genes. The observed four-gene overlap is therefore larger than expected. The fold enrichment is \((4/5)/(6/20)=2.667\): the selected set has 2.667 times the pathway proportion found in the eligible background. The p-value means that, under the stated random-subset null, a subset of five would have an overlap of at least four about 1.393% of the time. It is not the probability that the null is true.

Why the Background and Selection Rule Matter

The background determines both the expected overlap and the distribution used for the p-value. In the example, the 20 genes were the features that could have been selected. Suppose instead the pathway database lists 10 members among 100 genome-wide genes, while the assay and preprocessing made only genes A through T eligible. The observed selected set still comes from those 20 genes, and only six pathway members are represented among them. Treating \(N=100\), \(K=10\), and \(n=5\) as if the five selected genes had been sampled from all 100 would not model the actual selection mechanism.

Worked Example: An Inappropriate Genome-Wide Background

Use the same hypothetical selected genes A, B, C, D, and G. The eligible universe remains the 20 measured genes A through T, of which six belong to the pathway. The valid calculation is the one above, \(p=0.01393\). To see the consequence of an inappropriate background, suppose someone instead uses all 100 genome-wide genes and counts 10 pathway members, while leaving the same selected list size and overlap.

That calculation would produce:

$$ \frac{\binom{10}{4}\binom{90}{1}+\binom{10}{5}\binom{90}{0}} {\binom{100}{5}} =\frac{210(90)+252}{75287520} =\frac{19152}{75287520} \approx 0.0002544. $$

This smaller number is not evidence of stronger enrichment: it answers a different, in this setting unjustified sampling question. The five genes were selected from 20 eligible genes, not uniformly from 100. The appropriate test uses the 20-gene universe and the six pathway genes represented within it. A broader universe is appropriate only if those broader features were genuinely eligible for selection under the same analysis.

Filtering can affect results in two ways. First, it changes which genes can enter the selected set and therefore changes \(N\), \(K\), and possibly the observed overlap. Second, pathway annotation coverage may be incomplete or uneven. A pathway with many well-annotated, measured genes has different opportunities to appear in a selected list than a pathway with few eligible members. For multi-omics data, the feature unit and background may differ by view: gene-level expression features, proteins, metabolites, and genomic regions should not be pooled into one universe without a defensible mapping and selection model.

Interpreting Magnitude, Direction, and Thresholds

An absolute-loading list deliberately discards sign. Enrichment means that pathway members occur disproportionately among the selected features; it does not show whether their loadings are positive or negative, nor whether all pathway members move together. To describe direction, inspect the signed loadings and the factor-score orientation separately. The factor sign itself can be reversed without changing the underlying factor representation, so a claim such as “positive means pathway activation” requires additional biological and modeling justification.

A hard cutoff also discards information about features just outside the threshold and treats all selected features alike. It can make results sensitive to the chosen list size. A ranked enrichment approach instead uses the ordering of all eligible features and can be useful when no threshold is compelling. It answers a different question and has its own assumptions and implementation choices; it is not a repair for an incorrectly defined background. For threshold-based over-representation, report the selection rule, view, universe, pathway database or annotation definition, overlap, effect-size summary, and p-value.

Usually many pathways are examined. Since each pathway test has its own chance of a small p-value under its null, unadjusted results can produce false discoveries across the collection. A common correction controls the false discovery rate using the Benjamini–Hochberg procedure. Sort the \(m\) p-values as \(p_{(1)}\leq\cdots\leq p_{(m)}\); at target level \(q\), find the largest rank \(i\) such that \(p_{(i)}\leq iq/m\), and reject hypotheses at ranks 1 through \(i\). The procedure relies on conditions such as independence or suitable positive dependence for its standard false-discovery-rate guarantee; pathway tests often overlap, so the dependence and correction choice should be reported.

Worked Example: Adjusting a Small Set of Pathway Tests

Suppose four pathways are tested in the same hypothetical analysis, with ordered p-values 0.01393, 0.0400, 0.200, and 0.600. At false discovery rate target \(q=0.05\), the Benjamini–Hochberg thresholds are \(iq/m\), with \(m=4\). They are 0.0125, 0.0250, 0.0375, and 0.0500 for ranks 1 through 4.

Compare each ordered p-value with its rank-specific threshold: 0.01393 exceeds 0.0125; 0.0400 exceeds 0.0250; 0.200 exceeds 0.0375; and 0.600 exceeds 0.0500. No rank satisfies the criterion, so none of these four tests is rejected at the 0.05 false discovery rate target. In particular, the first pathway’s nominal p-value of 0.01393 is not sufficient for this multiple-testing decision. This conclusion concerns the specified collection of four tests; it does not show that the pathway has no biological relevance.

Diagnostics, Limitations, and Common Mistakes

Before interpreting an enrichment result, verify that every selected feature belongs to the stated background, that the pathway overlap is counted using the same identifier mapping, and that \(N\), \(K\), \(n\), and \(x\) match the analysis. Check whether a pathway contains a meaningful number of eligible features and whether results depend strongly on the loading cutoff. If the selected set is extremely small, the test has limited resolution; if the background is narrow or annotation sparse, apparent enrichment can be driven by a few genes. Large loading magnitude is not itself a calibrated measure of certainty, and the enrichment p-value does not account automatically for uncertainty in estimated loadings or factor selection.

  • Using every genome gene by default. This is wrong when only a subset could enter the loading-based list. Use the features eligible under the actual measurement and filtering process.
  • Mixing feature types or duplicate identifiers. A gene, transcript, and probe are not automatically interchangeable sampling units. State how identifiers were mapped and avoid counting one biological unit multiple times without justification.
  • Reading enrichment as activation or causation. The test concerns membership concentration in a selected set. It does not establish pathway activity, a direction of effect, or causal mechanism.
  • Reporting only a nominal p-value. If many pathways were screened, report the multiple-testing procedure and adjusted results, as well as overlap and a descriptive effect size.

Pathway enrichment is most useful as a disciplined summary of a factor’s loading pattern, not as a substitute for examining the loadings, annotations, and model context. Its interpretation is only as credible as the selection rule and background that define the comparison.

Check Your Understanding

Answer each question, then compare with the concise solutions.

  1. A view has 50 eligible features, 10 in a pathway, and a selected list of 5 with 3 pathway members. What are \(N\), \(K\), \(n\), and \(x\), and what probability tail defines the over-representation p-value?
  2. Why is a feature outside the assay’s eligible universe generally not a suitable non-selected feature in the background?
  3. If a pathway is enriched among the largest absolute loadings, what can and cannot be concluded about loading signs?
  4. Why should p-values be adjusted when many pathways are tested?

Solutions. (1) \(N=50\), \(K=10\), \(n=5\), and \(x=3\); the p-value is \(P(X\geq3)\) for \(X\sim\operatorname{Hypergeometric}(50,10,5)\). (2) It could not have been selected, so including it changes the reference sampling frame and can distort the expected overlap. (3) The result says pathway members are concentrated among large-magnitude loadings; because absolute values were used, it does not establish positive or negative direction, coordinated sign, or pathway activation. (4) Testing many pathways creates multiple opportunities for small p-values under null hypotheses; adjustment addresses the chosen error-rate target across the tested collection.

Clinical Biostats