fgsea is an R-package for fast preranked gene set enrichment analysis (GSEA). This package allows to quickly and accurately calculate arbitrarily low GSEA P-values for a collection of gene sets. P-value estimation is based on an adaptive multi-level split Monte-Carlo scheme.
See the preprint for algorithmic details.
pathway pval padj log2err ES NES size
5990979_Cell_Cycle,_Mitotic 1e-10 4e-09 NA 0.5595 2.7437 317
5990980_Cell_Cycle 1e-10 4e-09 NA 0.5388 2.6876 369
5990981_DNA_Replication 1e-10 4e-09 NA 0.6440 2.6390 82
5990987_Synthesis_of_DNA 1e-10 4e-09 NA 0.6479 2.6290 78
5990988_S_Phase 1e-10 4e-09 NA 0.6013 2.5069 98
5990990_G1_S_Transition 1e-10 4e-09 NA 0.6233 2.5625 84
5990991_Mitotic_G1-G1_S_phases 1e-10 4e-09 NA 0.6285 2.6256 101
5991209_RHO_GTPase_Effectors 1e-10 4e-09 NA 0.5249 2.3712 157
5991454_M_Phase 1e-10 4e-09 NA 0.5576 2.5491 173
5991502_Mitotic_Metaphase_and_Anaphase 1e-10 4e-09 NA 0.6053 2.6331 123
As you can see fgsea has a default lower bound eps=1e-10 for estimating P-values. If you need to estimate P-value more accurately, you can set the eps argument to zero in the fgsea function.
fgsea
fgseais an R-package for fast preranked gene set enrichment analysis (GSEA). This package allows to quickly and accurately calculate arbitrarily low GSEA P-values for a collection of gene sets. P-value estimation is based on an adaptive multi-level split Monte-Carlo scheme. See the preprint for algorithmic details.Full vignette can be found here: http://bioconductor.org/packages/devel/bioc/vignettes/fgsea/inst/doc/fgsea-tutorial.html
Installation
fgseais a part of R/Bioconductor and is availble on Linux, macOS and Windows platforms. For the installation instructions and more details please refer to https://bioconductor.org/packages/release/bioc/html/fgsea.htmlThe latest version of
fgseacan be installed from GitHub usingdevtoolspackage, which can take up to a few minutes to install all the dependencies:Quick run
Loading libraries
Loading example pathways and gene-level statistics:
Running fgsea (should take about 10 seconds):
The head of resulting table sorted by p-value:
As you can see
fgseahas a default lower boundeps=1e-10for estimating P-values. If you need to estimate P-value more accurately, you can set theepsargument to zero in thefgseafunction.One can make an enrichment plot for a pathway:
Or make a table plot for a bunch of selected pathways: