Gene Set Enrichment Analysis (GSEA)

Research
Introduced by
Aravind Subramanian, Pablo Tamayo, Vamsi K. Mootha, Jill P. Mesirov, Todd R. Golub, Eric S. Lander et al. (Broad Institute)
Year
2005 (seminal PNAS paper; predecessor concept in Mootha et al. 2003)
Type
Functional genomics / enrichment analysis
Family
Bioinformatics / omics

What does it do?

Gene Set Enrichment Analysis (GSEA) tests whether a predefined set of genes, such as a biological pathway, process or function, shows coordinated differences between two biological conditions.

It works on all measured genes ranked by a differential-expression metric rather than on a list cut at a significance threshold. As a result, it can detect moderate, consistent shifts across a pathway even when no single gene passes a significance cutoff.

The intuition behind the method

Imagine a ranked table of every measured gene, from most upregulated to most downregulated between two conditions. GSEA asks whether the members of a given gene set sit at random positions in this table or cluster near the top or bottom. It walks down the list, stepping up at set members and down at non-members. A large peak near the top suggests the set is coordinately activated; a large trough suggests coordinated repression. This can capture biology that single-gene tests miss, because many pathways show moderate shifts across many genes rather than a large change in one gene.

History

Mootha et al. (2003) reported that PGC-1alpha-responsive genes involved in oxidative phosphorylation are coordinately downregulated in human diabetes. Subramanian et al. (2005) in PNAS described Gene Set Enrichment Analysis as a knowledge-based approach for interpreting genome-wide expression profiles, focusing on gene sets that share biological function, chromosomal location, or regulation. The method was released as a freely available software package with an initial database of 1,325 biologically defined gene sets. The Molecular Signatures Database (MSigDB) is a widely used source of gene sets for the method.

When to use it

Choose GSEA when you have a continuous, genome-wide ranked profile (for example from RNA-seq, microarray or proteomics) comparing two clearly defined biological conditions, and you want to detect coordinated changes across pathways rather than in individual genes. It suits situations where individual genes show modest fold-changes that threshold-based tests would miss, and it is useful for mechanistic interpretation and hypothesis generation. Avoid it when the groups are very small, because permutation statistics become unreliable and phenotype permutation is not available. Also avoid it when the two conditions are not cleanly separable phenotypes, or when you need absolute expression levels rather than directional enrichment. If the question is only which pathways are overrepresented among a list of significant genes, an over-representation analysis (ORA, Fisher's exact test) is faster and may be more appropriate.

Limitations and considerations

  • Phenotype permutation needs a reasonable number of samples per group (the guidance on this page is seven or more); below that, only gene permutation is available and its null distribution is less reliable.
  • Results depend on the ranking metric. Signal-to-noise, log fold-change and t-statistics can order genes differently and produce different enrichment patterns.
  • Gene-set collections differ in curation and size. Sets are usually filtered to a size range after intersecting them with the measured genes, and the filter should be reported, because very large sets can enrich by composition rather than biology.
  • The standard formulation compares two defined phenotypes. A single sample cannot be tested on its own against the ranking, and a continuous trait must be recast as a two-group contrast or handled by a different variant.

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

Strengths

  • Uses every measured gene without an arbitrary significance cutoff, so pathways with moderate, consistent shifts can still reach significance.
  • The leading-edge subset identifies which genes drive the enrichment, giving specific candidates for follow-up beyond the pathway-level score.
  • Accepts any gene-set collection, so one ranked list can be tested against MSigDB, KEGG, Reactome, GO or custom sets, although results still depend on the quality of those sets.
  • Phenotype permutation keeps the gene-gene correlation structure of the data intact, which gene permutation does not, and this is why it is preferred when group sizes allow it.

Applications

  • Identifying dysregulated metabolic, immune, or signalling pathways in RNA-seq comparisons of disease versus healthy tissue.
  • Interpreting proteomics or phosphoproteomics data by ranking proteins by abundance change and testing organelle or complex-level enrichment.
  • Pre-ranked analysis of gene-level association scores, for example from GWAS summary statistics after SNP-to-gene mapping by a method chosen by the analyst, to ask which biological processes are associated with a trait.
  • Characterising cell-type-specific pathway activation in bulk RNA-seq before or after single-cell deconvolution.
  • Screening drug-treatment transcriptomics data to identify mechanisms of action by matching gene-set signatures to known pharmacological databases.
  • Tracking pathway changes over time by running GSEA on pairwise contrasts between time points in a longitudinal expression dataset.

How it works

How it works

1

All genes measured in the experiment are ordered by a metric that compares the two conditions, such as the signal-to-noise ratio, which scales the mean difference by the standard deviations. For RNA-seq data, analysts often rank by a log2 fold-change combined with a statistical score, and the choice of metric changes the result. The ranked list is the only input at this stage, and no significance cutoff is applied.

2

For each gene set, GSEA walks down the ranked list with a running-sum statistic, a weighted Kolmogorov–Smirnov-like procedure. Encountering a set member increases the running sum in proportion to that gene's rank-metric weight. Encountering a non-member decreases the running sum by a small, equal step.

3

The Enrichment Score (ES) is the maximum deviation of the running sum from zero. A positive ES indicates enrichment at the top of the ranked list, where upregulated genes concentrate, and a negative ES indicates enrichment at the bottom. The genes that contribute to the running sum up to the peak form the leading edge, the subset that drives the enrichment signal.

4

Significance is assessed by permuting either the gene labels (gene permutation, used when there are too few samples per group for phenotype permutation) or the sample phenotype labels (phenotype permutation, preferred when there are seven or more samples per group). The observed ES is compared with a null distribution built from 1,000 or more permutations to give an empirical p-value.

5

Because many gene sets are tested at once, results are corrected for multiple testing. Each ES is normalised by the mean ES of its permutation distribution, giving the Normalized Enrichment Score (NES). A false discovery rate (FDR q-value) is then estimated by comparing the observed NES distribution with the null across all tested sets. A common enrichment call combines an absolute NES above a chosen cutoff, often around 1.5 as a starting point, with FDR q < 0.25. The NES cutoff should be reported and justified for the analysis rather than treated as fixed.

Common pitfalls

  • Using gene permutation when phenotype permutation is possible. Gene permutation does not preserve gene-gene correlations, which can inflate significance, so phenotype permutation should be preferred when there are seven or more samples per group.
  • Applying a conventional p-value cutoff of 0.05 to FDR q-values without justification. The usual threshold for exploratory GSEA is q < 0.25. A stricter cutoff such as q < 0.05 is more conservative and returns fewer gene sets, so the chosen threshold should be stated and justified.
  • Reading the enrichment score as an effect size. The ES and NES reflect rank position rather than the magnitude of expression change, so two sets with similar NES can differ widely in fold-change.
  • Stopping at the NES. The leading-edge genes are usually the most actionable output and should be examined before drawing biological conclusions.
  • Filtering the gene list before ranking. Removing non-significant genes reintroduces the threshold bias that the method is meant to avoid.

Frequently asked questions

What is the difference between GSEA and over-representation analysis (ORA)?

ORA (e.g., Fisher's exact test or hypergeometric test) requires a binary gene list — genes above a fold-change or p-value cutoff versus the rest — and asks whether pathway members are overrepresented among the 'hits'. GSEA uses a continuously ranked list of all genes and detects coordinated shifts even when no single gene is individually significant. ORA is faster and easier to interpret but is sensitive to the significance threshold; GSEA is more powerful for subtle, distributed pathway signals but requires clean phenotype contrast.

How many permutations should I use?

The standard recommendation is 1,000 permutations for exploratory analysis; 10,000 permutations are advisable when precise FDR estimates are needed for publication or when borderline gene sets are near the q < 0.25 threshold. More permutations reduce variance in the null distribution at the cost of computation time. The number of permutations also limits the resolution of the empirical p-value: the smallest attainable value is roughly 1/(number of permutations), so 1,000 permutations cannot give p-values much below 0.001.

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

Standard GSEA was designed for bulk profiles with replicated samples per condition. For single-cell data, a common route is to aggregate counts per cell type (pseudo-bulk) and then run GSEA on the aggregated profiles. Single-cell scoring tools also exist; they make different assumptions, which should be checked in their own documentation rather than assumed to match GSEA.

Which gene-set database should I use?

The Molecular Signatures Database (MSigDB) is the most widely used and provides curated hallmark gene sets (H collection, 50 sets representing well-defined biological states), canonical pathways (C2), and gene ontology terms (C5), among others. For metabolic questions KEGG and Reactome offer mechanistic detail. Using the hallmark collection first is recommended for exploratory work because the sets are non-redundant and highly curated, reducing multiple-testing burden.

My top pathways are all immune-related — is that meaningful or a bias?

It depends on context. Immune-related gene sets are among the largest and best-curated in MSigDB, and immune processes respond rapidly to many perturbations, so genuine enrichment is common. However, large gene sets overlap with many other processes, so their enrichment is harder to attribute to one biology. Check whether the leading-edge genes are specifically relevant to your biology, and confirm enrichment with a complementary method (e.g., pathway network analysis or independent validation cohort) before drawing conclusions.

Related methods

Sources

  1. Subramanian, A., Tamayo, P., Mootha, V. K., Mukherjee, S., Ebert, B. L., Gillette, M. A., Paulovich, A., Pomeroy, S. L., Golub, T. R., Lander, E. S., & Mesirov, J. P. (2005). Gene set enrichment analysis: A knowledge-based approach for interpreting genome-wide expression profiles. Proceedings of the National Academy of Sciences, 102(43), 15545–15550.

    Open DOI reference
  2. Mootha, V. K., Lindgren, C. M., Eriksson, K. F., Subramanian, A., Sihag, S., Lehar, J., Puigserver, P., Carlsson, E., Ridderstrale, M., Laurila, E., Houstis, N., Daly, M. J., Patterson, N., Mesirov, J. P., Golub, T. R., Tamayo, P., Spiegelman, B., Lander, E. S., Hirschhorn, J. N., Altshuler, D., & Groop, L. C. (2003). PGC-1alpha-responsive genes involved in oxidative phosphorylation are coordinately downregulated in human diabetes. Nature Genetics, 34(3), 267–273.

    Open DOI reference