1/23
Looks like no tags are added yet.
Over-representation analysis (ORA)
ORA tests whether a pathway contains more DE genes than expected by chance using the hypergeometric/Fisher exact test. It requires a DE cutoff and treats all DE genes equally. Best used when DE hits are strong and clear.
Describe ORA (over-representation analysis) step by step
Start with two sets of genes
Foreground list: e.g. significantly upregulated genes.
Background list: all genes that could have been found (e.g. all measured genes).
Pick a gene set / pathway / GO term
This is a predefined list of genes (e.g. “apoptosis pathway”).
Count the overlap
k = number of genes in your foreground list that are in this pathway.
K = total number of genes in this pathway (within the background set).
M = total number of genes in the background set.
n = size of your foreground list.
Build a 2×2 contingency table
Run the statistical test
use hypergeometric test /Fisher’s Exact Test to ask:
“Is k bigger than expected if the foreground was just random genes from the background?”
Get a p-value for that pathway
Small p-value → pathway is over-represented in your DE genes.
Repeat for all pathways / GO terms
Correct for multiple testing
Apply FDR (e.g. Benjamini–Hochberg).
Hypergeometric test (how it works)
The test calculates the probability of observing k or more DE genes in a pathway of size Ni given K DE genes in a background of size M. A low p-value means the overlap is unlikely under random sampling.
Hypergeometric test assumptions
Assumes genes behave independently, are equally likely to be DE under the null, and that the background list M is correct. Violating these assumptions produces false enrichment.
Importance of background list
The background must be the set of genes actually measured. Using “all genes in the genome” artificially inflates M and makes pathways appear falsely significant.
Mapping problems
Probe or transcript IDs can map to multiple genes; if not corrected, DE counts inflate and produce false pathway hits. Proper pipeline: probes → unique genes → remove duplicates → run enrichment.
Limitations of ORA
Uses a binary DE cutoff and ignores fold-change magnitude. Very sensitive to the chosen threshold; cannot detect coordinated small changes across many genes.
When to use ORA
Use ORA when differential expression is strong with large fold-changes and robust p-values. Avoid when effects are subtle.
Enrichment analysis (concept)
Uses ALL genes ranked by a continuous metric (fold change, t-statistic). Detects whether pathway genes cluster at the top or bottom of the ranked list without requiring a cutoff.
Why enrichment outperforms ORA
Uses quantitative information, avoids thresholds, detects subtle coordinated effects, and is more stable for transcriptomics.
GSEA (how it works)
Rank all genes by a metric. Walk through the list: increase score for pathway hits, decrease for misses. The maximum deviation from zero is the enrichment score. Significance comes from permutations.
GSEA hit/miss balancing
Hit and miss scores are scaled so the running sum starts and ends at zero, preventing bias from pathway size.
GSEA permutation test (p-value)
Phenotype labels are shuffled and enrichment scores recalculated. The p-value is the fraction of permuted scores ≥ the observed score.
GSEA: when to use
Use GSEA when many genes show subtle but coordinated changes. Good for continuous phenotypes and large datasets.
Weighted GSEA
Weights hits by fold-change magnitude. Prevents false positives when pathway genes cluster in no-change regions.
Wilcoxon enrichment test (how it works)
Compares ranks of pathway genes vs all genes. If ranks are systematically higher or lower, the pathway is significant. Non-parametric and robust.
When to use Wilcoxon enrichment
Use when data are non-normal or contain outliers, or when a ranking-based, distribution-free test is preferred.
Kolmogorov–Smirnov enrichment test
Compares cumulative distributions of pathway genes vs all genes. Large distributional differences imply pathway enrichment.
When to use KS enrichment
Use when you want to detect global distribution shifts, not just top or bottom clustering.
Gene Ontology (GO) structure
GO has three branches: Biological Process, Molecular Function, Cellular Component. GO is a DAG, so terms can have multiple parents.
GO term inheritance
A gene annotated to a specific GO term also belongs to all parent GO terms. Broad terms accumulate many genes via inheritance.
GO in enrichment analysis
GO terms can be analyzed like pathways using ORA, GSEA, Wilcoxon, or KS. GO enables hierarchical biological interpretation.
Other gene sets
Disease gene sets include disorder-related genes; protein complexes include subunits; NESTs contain network-neighbor genes.
Why use pathway and GO analysis
Transforms long DE lists into meaningful biological themes by identifying affected processes, functions, and cellular locations.