mzwiki Mass spectrometry
knowledge commons by UniMZ
Guides & terminologyAll Guides
Guide 42 · Computation

Pathway enrichment: connect measured changes to biological hypotheses

Define compound identities, the tested background, and the enrichment question before interpreting a pathway result as biological evidence.

A pathway label is a new layer of inference

A list of changed signals does not explain why they changed. Pathway analysis compares measured entities with annotated biological sets to ask a more structured question. This Guide introduces over-representation analysis (ORA): are members of a particular pathway unusually frequent in a selected list, relative to a defined background? The answer depends on the entities, selection rule, database, and null model.

Keep the inference chain visible: measured feature, supported compound annotation, statistical selection, database mapping, and pathway test. Uncertainty does not disappear when a software interface replaces individual rows with a familiar pathway name. Read small-molecule annotation and differential-abundance analysis first.

Decide what is being counted

A compound can produce several isotope, adduct, or fragment features. Counting all of them as independent pathway members can multiply one piece of evidence. Conversely, an unresolved feature may represent several candidate compounds. Preserve feature-to-compound mappings and uncertainty; a formula does not uniquely identify the structure needed for a pathway assignment. Identification evidence should remain explicit, as the MSI reporting framework requires. [1]

Use stable identifiers and a declared database version and organism. Check synonyms, many-to-one mappings, and compounds without a usable mapping. Do not choose an uncertain candidate merely because it strengthens an attractive pathway. Report unmapped and ambiguous entries, and examine how justified alternative mappings change the result.

Choose the eligible background before testing

The background universe is the set of entities eligible to enter the selected list under the analysis. For this Guide's simple ORA, start from distinct, eligible compounds that were measured, passed the declared filtering and mapping rules, and could be selected by the same statistical procedure. Define these rules before inspecting enrichment results; document exclusions rather than silently using the entire database.

Restrict each pathway to that same universe. A compound the assay could not measure should not casually become an unselected control. Research on metabolomics ORA demonstrates that background, database choice, identification errors, and assay bias can change the findings. An assay-specific background is important, but does not by itself remove unequal detectability or selection probability among its members. [2]

Worked example: count the possible overlaps

Constructed teaching sets: the eligible universe contains N = 20 distinct compounds; K = 5 belong to pathway P. A prespecified analysis selects n = 4 compounds, of which k = 3 belong to P. There are 3 selected pathway members, 1 selected nonmember, 2 unselected pathway members, and 14 unselected nonmembers.

The simple hypergeometric null treats every possible four-compound subset of this universe as equally likely. It is a model for the test, not a claim that the experiment physically sampled compounds at random. The expected overlap is nK/N = 4 × 5/20 = 1. The selected fraction 3/4 is three times the background fraction 5/20; this enrichment ratio is not a concentration fold change.

For an upper-tail test, add the possibilities with at least three pathway members. Let C(a,b) count ways to choose b objects from a. Then P(X ≥ 3) = [C(5,3)C(15,1) + C(5,4)C(15,0)] / C(20,4) = (150 + 5)/4845 ≈ 0.03199. Sampling without replacement gives the hypergeometric distribution. [3] This raw p-value is not the probability that pathway P is false, and it is not yet a multiple-testing-adjusted result.

Changing the denominator changes the evidence

Suppose we improperly add 80 database compounds that could not enter this assay's selected list, all outside P. Keeping K = 5, n = 4, and k = 3 but setting N = 100 changes the same calculation to (950 + 5)/3,921,225 ≈ 0.0002435. No new experimental evidence was collected. The apparently stronger result came from an inappropriate comparison population. This deliberately simplified example isolates one failure; real mapping changes may alter several counts at once.

The selection cutoff also matters. A binary selected list discards effect sizes and information just below the threshold. Quantitative enrichment methods ask different questions using quantitative inputs; MSEA illustrates this distinction. [4] Do not compare their p-values as if the null hypotheses were identical, or switch methods only to obtain a desired pathway.

Report what the test can establish

Define the family of pathways tested and use an appropriate multiple-testing procedure with its assumptions. Pathways often overlap, so their tests are dependent; the method and its dependence conditions matter. Report raw and adjusted values and the tested family, not only surviving names. Official R documentation distinguishes procedures with different error-control aims and assumptions. [5]

Inspect the actual supporting compounds, their directions, uncertainties, and annotation confidence. ORA alone does not establish pathway activation, inhibition, causal mechanism, or metabolic flux. A pathway can contain both increased and decreased compounds. A molecular-network connection is also not automatically a biochemical reaction. Use isotope tracing and other targeted measurements when they address the remaining biological uncertainty.

Check your understanding

Why did the p-value shrink when unmeasurable compounds were added?

The assumed background pathway frequency fell. The comparison population changed, while the measured evidence did not.

Can three adduct features be counted as three compounds in this example?

No. The reporting unit is a distinct compound. Preserve and review the ion-to-compound mapping rather than multiplying evidence.

Does enrichment mean that pathway flux increased?

No. The test concerns set overlap. Flux is a rate and needs additional measurements and a suitable model.

Keep a reproducible evidence trail

Save the feature-to-compound table, ambiguity policy, eligible universe, selected list and selection rule, database version, pathway memberships, all four counts, statistical method, tested family, and per-pathway outputs. Keep enough information to reproduce a negative or unstable result as well as a highlighted one.

References & further reading

  1. Sumner et al. (2007). Proposed minimum reporting standards for chemical analysis. Metabolomics 3, 211–221.

    MSI Chemical Analysis Working Group reporting recommendations. Supports evidence-specific identification of previously characterized metabolites and calibration/validation reporting. Publisher metadata/abstract, indexed PMC text, and an institutional author manuscript (Fiehn Lab, UC Davis), p. 12, were checked. The institutional manuscript is not the final typeset version. Historical numerical validation thresholds are not adopted.

  2. Wieder et al. (2021). Pathway analysis in metabolomics: Recommendations for the use of over-representation analysis. PLOS Computational Biology 17(9), e1009105.

    Primary analysis using five metabolomics datasets to evaluate background, selection, pathway database, identification, and assay-bias effects. Supports sensitivity and reporting cautions, not a universal correction for all pathway methods.

  3. R stats package. Hypergeometric: The Hypergeometric Distribution.

    Official sampling-without-replacement probability and upper-tail definitions. Constructed examples independently enumerate combinations; article symbols N, K, n, and k are defined locally rather than copied from software argument names.

  4. Xia & Wishart (2010). MSEA: a web-based tool to identify biologically meaningful patterns in quantitative metabolomic data. Nucleic Acids Research 38, W71–W77.

    Primary method publication describing distinct over-representation and quantitative enrichment approaches. DOI: 10.1093/nar/gkq329. Used to distinguish analysis questions, not to prescribe current service defaults.

  5. R stats package. p.adjust: Adjust P-values for Multiple Comparisons.

    Official documentation inspected 2026-10-07. Confirms BH/fdr, BY and family-wise error methods and family-size semantics. Both numerical BH examples are independently calculated, with backward cumulative minima and capping at one, not copied software output.

Help make this article clearer.Edit this article →Suggest a correction →