henhaobio
Sign in

Abstract

Gene set enrichment analysis (GSEA) is an ubiquitously used tool for evaluating pathway enrichment in transcriptional data. Typical experimental design consists in comparing two conditions with several replicates using a differential gene expression test followed by preranked GSEA performed against a collection of hundreds and thousands of pathways. However, the reference implementation of this method cannot accurately estimate small P-values, which significantly limits its sensitivity due to multiple hypotheses correction procedure. Here we present FGSEA (Fast Gene Set Enrichment Analysis) method that is able to estimate arbitrarily low GSEA P-values with a high accuracy in a matter of minutes or even seconds. To confirm the accuracy of the method, we also developed an exact algorithm for GSEA P-values calculation for integer gene-level statistics. Using the exact algorithm as a reference we show that FGSEA is able to routinely estimate P-values up to 10-100 with a small and predictable estimation error. We systematically evaluate FGSEA on a collection of 605 datasets and show that FGSEA recovers much more statistically significant pathways compared to other implementations. FGSEA is open source and available as an R package in Bioconductor (http://bioconductor.org/packages/fgsea/) and on GitHub (https://github.com/ctlab/fgsea/).

In-depth summary

Claude Opus 5.5 · xhigh effort · 17 Oct 2026 · from the full text of version 3 (1 Feb 2021)

FGSEA estimates preranked GSEA P-values down to 10^-100 with predictable error in seconds to minutes, recovering more FDR-significant pathways across 605 GEO datasets than the Broad implementation.

Preranked gene set enrichment analysis (GSEA) gets P-values by sampling random gene sets, so with hundreds or thousands of pathways and Benjamini-Hochberg (BH) correction the reference implementation often cannot sample deeply enough for anything to reach significance. FGSEA reuses samples across pathways and adds a multilevel Monte Carlo estimator, making very small P-values, and hence standard FDR control, practical on a laptop.

Key results

  1. ShownThe multilevel estimator computes extremely small GSEA P-values accurately, and its own error estimates match the true errors measured against an exact algorithm.

    On rounded statistics from the example data, FGSEA-multilevel (Z = 101) agreed closely with an exact dynamic-programming method; estimated and actual errors matched for P-values from 10^-4 to 10^-100, gene-set sizes 15 to 250 and Z from 101 to 1001. Example-data P-values reached 10^-26, consistent with FGSEA-simple run with 10^8 permutations. · 1 Main; 2.5.6 Comparison with the exact method

  2. ShownAcross 605 GEO datasets, BH-adjusted FGSEA P-values flag far more pathways at FDR 0.01 than the Broad implementation's Q-values, which are more conservative in a pathway-size-dependent way.

    With the C5_BP collection, Broad GSEA Q-values passed 39467 pathways in total: 60% of the 65690 from BH-adjusted FGSEA-simple at depth 10^4 and 48% of the 81628 from FGSEA-multilevel. Broad's pooled null was more sensitive than BH at the same 10^4 depth on some datasets, and even depth 10^5 was not enough for some datasets under BH. · 1 Main

  3. ShownSharing one pool of random gene sets across all pathways, plus a square-root block decomposition for enrichment scores, yields the same nominal P-values as the reference implementation about two orders of magnitude faster.

    On a Th1 activation ranking against 700 Reactome pathways at n = 10000, FGSEA-simple and the reference gave indistinguishable P-values up to sampling noise, taking about 4 seconds vs about 420 seconds; this makes 10^5 samples routine and P-values near 10^-5 reachable. · 1 Main; 2.3 FGSEA-simple: an algorithm for fast…

  4. ShownMany real datasets need sampling depths that are inconvenient or even impossible to run with the reference implementation before any pathway passes BH-adjusted FDR, because significance appears abruptly at a critical depth.

    Over half of the 605 two-condition GEO datasets had a critical sampling depth of at least 10^4, and 10-20% (by collection) at least 10^5; with the whole MSigDB collection single datasets reached 5·10^6, while reference time and memory grow linearly with samples and collection size. · 1 Main

  5. SuggestedA filtering step condenses overlapping significant hits without needing a pathway hierarchy, by keeping a pathway only if it adds information beyond pathways already reported.

    A pathway is kept if it stays enriched below a set threshold either outside or only within the genes of another significant pathway, tested with FGSEA-simple in a sieve-like pass; it is illustrated on the example dataset only, with no quantitative evaluation in this text. · 1 Main; 2.6 Filtering redundant pathways

Methods, data and reproducibility

FGSEA-simple draws one set of random gene sets of the largest size and scores their prefixes for all smaller pathways, updating enrichment scores with a square-root block decomposition; FGSEA-multilevel estimates very small P-values by adaptive multilevel split Monte Carlo with Metropolis resampling, checked against an exact dynamic-programming algorithm for integer gene-level statistics.

  • Curated two-condition microarray datasets (GDS) from Gene Expression Omnibus, ranked by limma moderated t-statistic over the top 10000 genes by average expression · n = 605 datasets
  • Example ranking: Th0 vs Th1 comparison (limma t-statistic, top 12000 genes) tested against Reactome pathways of 15 to 500 genes · n = 700 Reactome pathways · GSE14308
  • Pathway collections C2_REACTOME, C5_BP, C2, C5 and full MSigDB via msigdbr, plus the LINCS perturbation collection from Enrichr
Methods & tools
FGSEA (R package, Bioconductor), FGSEA-simple, FGSEA-multilevel, exact dynamic-programming GSEA P-value algorithm, Broad GSEA (reference implementation), limma, msigdbr, MSigDB, reactome.db, Enrichr (LINCS collection), Benjamini-Hochberg correction, Metropolis algorithm
Assay conditions & compute
Multilevel FGSEA on the 605 datasets took under a minute each (median 8 seconds) on a 4-core Intel Core i5 laptop; on the example data, multilevel took 10 seconds on one thread vs 40 minutes on 32 threads for 10^8 FGSEA-simple permutations.
Reproducibility gaps
The paper says FGSEA is on Bioconductor and GitHub and that rankings, gmt files, ranking scripts and the exact-algorithm code are available, but every link is missing from this text; no package versions are given; raw error values sit in a supplementary table not included here.
Limitations (5)
  • FGSEA-simple alone cannot practically estimate P-values much below 10^-5, and FGSEA-multilevel runs per pathway with run time that grows as the P-value shrinks. · stated by the authors
  • The exact algorithm only handles integer gene-level statistics and needed a couple of hours on the example data, so validation used rounded statistics. · stated by the authors
  • Practical estimation of many low P-values produces many overlapping significant hits, which is why a redundancy filter with a pre-defined threshold is needed. · stated by the authors
  • Sensitivity is judged by counts of significant pathways without ground truth, so more hits than Broad GSEA show greater sensitivity but not that the extra calls are correct. · noted in this summary
  • Head-to-head speed comparisons (with the reference implementation and between FGSEA modes) used a single example dataset, and the 605-dataset comparison includes only the Broad reference among external implementations. · noted in this summary

Read this if you run preranked GSEA on large pathway collections and need accurate small P-values for FDR control, or want to know why the reference implementation misses significant pathways.

Citations
3,741

Reproducibility ledger

Nobody has reported trying to reproduce this paper yet. Did you replicate an experiment or run the code? Your report saves the next lab a week.

Sign in to file a reproducibility report.