Overview
Pathway enrichment analysis determines whether predefined sets of genes, representing biological pathways, functional categories, or cellular processes, are statistically overrepresented in a list of experimentally derived genes. This approach transforms a long list of differentially expressed genes into interpretable biological themes, helping researchers move from “which genes changed?” to “which processes are affected?” The core principle is that if a pathway is relevant to the condition under study, more of its member genes will appear in the user’s gene list than expected by chance.
Methods
the primary methods include Fisher’s exact test (or hypergeometric test), which evaluates overlap between the gene list and a pathway gene set against a defined background. The Gene Set Enrichment Analysis (GSEA) approach avoids arbitrary significance thresholds by ranking all genes by a metric of differential expression and testing whether pathway members cluster at the top or bottom of the ranked list. Multiple-testing correction, typically Benjamini-Hochberg false discovery rate, is essential because hundreds of pathways are evaluated simultaneously. Curated pathway databases such as KEGG, Reactome, and Gene Ontology provide the reference gene sets.
Applications
Pathway enrichment is a routine step in transcriptomics, proteomics, and metabolomics studies. It links differential expression results from DNA microarrays and gene expression experiments to functional biology. Cancer researchers use it to identify dysregulated pathways such as glycolysis or the citric acid cycle, and it reveals how gene regulation and epigenetics rewire cellular programs in disease. Enrichment analysis also guides biomarker discovery by highlighting pathways common to metabolic pathways that are perturbed in patient samples.
Practical Protocol
For overrepresentation analysis (ORA) using clusterProfiler in R, start with a list of differentially expressed genes (e.g., padj < 0.05, |log2FC| > 1). Load the package and perform GO enrichment: library(clusterProfiler); ego <- enrichGO(gene = de_genes, OrgDb = org.Hs.eg.db, keyType = "SYMBOL", ont = "BP", pAdjustMethod = "BH", pvalueCutoff = 0.05, qvalueCutoff = 0.2). The ont parameter can be “BP” (Biological Process), “MF” (Molecular Function), or “CC” (Cellular Component). For KEGG pathway enrichment, convert gene symbols to Entrez IDs: ekegg <- enrichKEGG(gene = entrez_ids, organism = "hsa", pvalueCutoff = 0.05). Visualize results with dotplot(ego, showCategory = 20), which displays the gene ratio, adjusted p-value, and gene count per category. The barplot function provides an alternative view. For gene set enrichment analysis (GSEA), prepare a ranked gene list sorted by log2 fold change: genelist <- sort(results$log2FoldChange, decreasing = TRUE); names(genelist) <- rownames(results). Run GSEA using gseGO(geneList = genelist, OrgDb = org.Hs.eg.db, keyType = "SYMBOL", ont = "BP", minGSSize = 10, maxGSSize = 500, pvalueCutoff = 0.05). GSEA does not require a significance threshold, making it sensitive to coordinated but modest changes across pathway members. The gseaplot2 function visualizes the running enrichment score for a specific pathway. For web-based analysis, use Enrichr: paste a gene list at https://maayanlab.cloud/Enrichr, select libraries (KEGG, GO, WikiPathways), and download the combined score table. The combined score is the product of the log-transformed p-value and the z-score, ranking pathways by both significance and direction of change. Always export results as CSV with columns for pathway ID, description, gene ratio, p-value, adjusted p-value, and the list of overlapping genes.