Differential Pathway Enrichment Analysis

Research
Introduced by
Extended from Over-Representation Analysis (Draghici et al. 2003) and competitive gene-set testing (Smyth lab, ~2004–2012)
Year
2004–2012
Type
Comparative enrichment analysis
Family
Bioinformatics / omics

What does it do?

Differential pathway enrichment analysis identifies biological pathways whose enrichment differs significantly between two or more experimental conditions, such as two diseases, two treatments, or two cell types.

Instead of asking which pathways are enriched in one condition, it asks which pathways change in enrichment level between conditions, which can reveal condition-specific or context-dependent biology.

The intuition behind the method

Consider two cancer subtypes, each represented by a group of patients with replicate samples. Both may show many differentially expressed genes, but the question is which biological processes are dysregulated in one subtype and not the other, rather than which are active in either. Differential pathway enrichment addresses this by contrasting the enrichment of curated gene sets, such as those drawn from KEGG or Reactome, between the two subtypes. The output is a ranked list of pathways whose activity differs between contexts. This is more direct than running enrichment separately in each group and comparing the resulting lists by eye.

History

Competitive gene set tests are commonly used in molecular pathway analysis to test whether a gene annotation category is enriched among differential expression results. Permutation-based competitive tests were shown to be extremely sensitive to inter-gene correlation. Wu and Smyth (2012) introduced CAMERA, which estimates inter-gene correlation from the data and uses it to adjust the gene set test statistic, and showed that CAMERA controls the type I error rate regardless of inter-gene correlation while retaining power. Väremo, Nielsen and Nookaew (2013) developed the piano R package, which collects a range of gene set analysis methods in one system, divides gene set P-values into three classes describing directionality of gene expression, and proposes consensus scoring across multiple runs. That 2013 work addresses method integration and directionality rather than contrasts between conditions. When comparison of enrichment between conditions was first proposed is not documented in the references given on this page.

When to use it

Use differential pathway enrichment analysis when you have gene expression data from two or more distinct biological conditions and want to know which pathways are specifically more or less active in one condition relative to another, rather than which are enriched overall. It suits multi-group RNA-seq studies, disease-subtype comparisons, drug mechanism investigations, and pre/post treatment designs with paired samples. It is not a substitute for standard enrichment when there is only one condition and no valid comparator. Avoid it when there are fewer than about 3 biological replicates per group, because the within-group variance estimates that the differential test relies on become unreliable.

Limitations and considerations

  • Reliable variance estimation within each condition requires replication, typically at least 3 biological replicates per group. With few replicates, the differential calls are weakly supported.
  • Results depend on the gene-set collection. Gaps or outdated annotations in KEGG, Reactome or Gene Ontology can cause important biology to be missed.
  • Large gene sets with heterogeneous functions can dilute the signal from the subset of genes that are actually regulated, so an enrichment score may not reflect the pathway's core mechanism.
  • Multiple-testing correction across many pathways can suppress true findings when the effect differences between conditions are modest.

Source conditions do not replace independent scientific review or validation by an analysis engine.

Strengths

  • It tests the change in pathway enrichment between conditions directly, instead of requiring a manual comparison of separate enrichment results.
  • Competitive methods such as CAMERA account for inter-gene correlation within gene sets. The CAMERA paper reports that permutation-based gene set tests are highly sensitive to such correlation, and that CAMERA controls the type I error rate regardless of inter-gene correlation while retaining power.
  • It works with the gene-level statistics produced by standard differential expression tools (edgeR, DESeq2, limma), so existing RNA-seq or microarray pipelines can feed into it without a bespoke data format.
  • Results can be read in biological terms through pathway databases and standard visualisation tools.

Applications

  • Identifying pathways uniquely dysregulated in one cancer subtype compared with another, to inform therapy selection.
  • Comparing immune pathway activity between responders and non-responders in clinical immunotherapy studies.
  • Detecting treatment-specific metabolic pathway changes across drug conditions in pharmacogenomics screens.
  • Contrasting pathway enrichment profiles across developmental time points in time-course RNA-seq experiments.
  • Comparing host pathway activity associated with the microbiome between disease and healthy control groups.
  • Prioritising condition-specific mechanistic hypotheses in multi-tissue or multi-cell-type atlases.

How it works

How it works

1

Raw count or expression data from each condition are normalised (for RNA-seq, for example with TMM or DESeq2 size-factor normalisation) and filtered to remove low-count features. Samples are assigned to condition labels. Normalisation and filtering are meant to keep between-condition comparisons from being driven by library-size or technical batch differences.

2

A differential expression model is fitted for each pairwise contrast of interest. For count data this is typically a negative-binomial generalised linear model (for example in edgeR or DESeq2); for log-transformed data it is typically a linear model (limma). The output is a per-gene log-fold change and test statistic for each contrast.

3

Gene-set enrichment is quantified for each contrast using a competitive or self-contained gene-set test, applied to the gene-level statistics from the previous step. Competitive tests, such as CAMERA, ask whether a gene set is enriched among differential expression results relative to the other genes; CAMERA additionally estimates and adjusts for inter-gene correlation. Rank-based GSEA-style scoring is a distinct approach that assigns an enrichment score to each pathway gene set from a ranked gene list. Gene sets come from collections such as KEGG, Reactome, Gene Ontology, or custom sets, and each test returns an enrichment score and p-value per pathway.

4

Enrichment is then compared between contrasts, so that the question becomes whether a pathway's enrichment changes between conditions rather than whether it is significant in one of them. A formal test of this change can be implemented in more than one way, and the statistic depends on the implementation, so the approach used should be stated explicitly. Two options are commonly used. First, the condition term can be included in the gene-level model and the enrichment test run on the resulting interaction statistics; this tests the contrast directly and requires replicates in each condition. Second, the enrichment statistics of separate condition contrasts can be compared; this is simpler, but it gives a valid test of their difference only if the uncertainty of each statistic is taken into account. Pathway-level p-values from the differential test are then corrected for multiple testing using FDR. A pathway is called differentially enriched when its FDR-adjusted p-value falls below a significance threshold and its change in enrichment score exceeds a minimum effect size. Both thresholds are chosen by the analyst before interpretation and should be reported with the results.

5

Differentially enriched pathways are ranked and interpreted in biological context. They are annotated with known functions, compared with published biology for the condition under study, and displayed as enrichment score bar charts, bubble plots, or pathway maps. Sensitivity checks, such as varying the gene-set size cutoff or using an alternative database, indicate whether the findings are robust to these analysis choices.

Common pitfalls

  • Running enrichment separately in each condition and calling a pathway differentially enriched because it is significant in one and not the other. This informal comparison does not test the contrast and inflates false discoveries; the contrast should be tested formally.
  • Treating genes as independent. Over-representation tests such as Fisher's exact test applied to a differentially expressed gene list assume independence among genes, which is violated by co-expression. Competitive tests that account for inter-gene correlation, such as CAMERA, are designed to address this.
  • Using a very small gene-set size cutoff. Gene sets with fewer than about 10 to 15 genes give unstable enrichment estimates, and most tools default to a minimum of 10 to 20. The default should not be lowered without a reason.
  • Confusing the two null hypotheses. Competitive tests ask whether a pathway is enriched relative to the rest of the genes, while self-contained tests ask whether any gene in the pathway is differentially expressed. The biological question should determine which is used.
  • Not validating in an independent dataset. Differential enrichment results can be specific to one cohort or platform, so replication in a held-out dataset or an orthogonal platform is advisable before drawing mechanistic conclusions.

Frequently asked questions

How is this different from running standard GSEA separately in each condition?

Running GSEA or over-representation analysis separately in each condition and then comparing the results by significance threshold tests two separate hypotheses and does not test whether the enrichment differs between conditions. Differential pathway enrichment tests the contrast of enrichment between conditions within one analysis, and corrects the resulting pathway-level p-values for multiple testing using FDR. Judging a difference by one result being significant and the other not is a common inferential error.

What is the minimum number of replicates needed?

Competitive gene-set tests need within-group variance estimates, so at least 3 biological replicates per condition is the practical minimum. With 3 replicates per group, power is limited; 5 to 6 per group substantially improves the reliability of differential enrichment calls. Technical replicates should not be counted as biological replicates, since this inflates apparent confidence.

Which gene-set database should I use?

KEGG, Reactome and Gene Ontology Biological Process are among the most widely used collections. MSigDB aggregates these and other curated collections in a convenient format. The choice should follow the biological question: KEGG is often used for metabolic pathways, Reactome for signalling, and Gene Ontology for broad functional annotation. Reporting consistent findings across two independent databases strengthens the conclusions.

Can I apply this to single-cell RNA-seq data?

Yes, with modifications. One common approach is pseudo-bulk aggregation, in which cells from the same donor and condition are summed into one profile per sample and condition, after which differential enrichment is run as for bulk RNA-seq. Cell-level enrichment is also possible with single-cell enrichment tools such as AUCell or VISION, but it requires attention to data sparsity.

How do I handle more than two conditions?

Multi-condition designs are handled by specifying contrasts within the linear model or GLM framework, for example pairwise contrasts between each pair of conditions or a one-versus-rest contrast. Joint tests across all conditions can identify pathways that vary anywhere in the experiment. Piano, which collects several gene set analysis methods, can be applied to the resulting gene-level statistics, and limma-based workflows provide one way to specify the contrasts.

Related methods

Sources

  1. Wu, D., & Smyth, G. K. (2012). Camera: a competitive gene set test accounting for inter-gene correlation. Nucleic Acids Research, 40(17), e133.

    Open DOI reference
  2. Väremo, L., Nielsen, J., & Nookaew, I. (2013). Enriching the gene set analysis of genome-wide data by incorporating directionality of gene expression and combining statistical inferences. Nucleic Acids Research, 41(8), 4378–4391.

    Open DOI reference