{"id":13681172,"url":"https://github.com/alserglab/fgsea","last_synced_at":"2025-12-11T20:48:38.428Z","repository":{"id":45513174,"uuid":"58275999","full_name":"alserglab/fgsea","owner":"alserglab","description":"Fast Gene Set Enrichment Analysis","archived":false,"fork":false,"pushed_at":"2025-11-10T20:19:29.000Z","size":3453,"stargazers_count":424,"open_issues_count":11,"forks_count":72,"subscribers_count":19,"default_branch":"master","last_synced_at":"2025-12-01T02:56:19.309Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/alserglab.png","metadata":{"files":{"readme":"README.md","changelog":"NEWS","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2016-05-07T17:07:42.000Z","updated_at":"2025-11-28T14:24:40.000Z","dependencies_parsed_at":"2023-02-13T03:15:52.254Z","dependency_job_id":"9b6053c0-d069-4fa0-8fac-6cf40f4953cb","html_url":"https://github.com/alserglab/fgsea","commit_stats":{"total_commits":343,"total_committers":19,"mean_commits":18.05263157894737,"dds":0.282798833819242,"last_synced_commit":"f1f918546f3db1f653c18edeade9939f6f7c1a7f"},"previous_names":["alserglab/fgsea","ctlab/fgsea"],"tags_count":36,"template":false,"template_full_name":null,"purl":"pkg:github/alserglab/fgsea","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alserglab%2Ffgsea","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alserglab%2Ffgsea/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alserglab%2Ffgsea/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alserglab%2Ffgsea/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alserglab","download_url":"https://codeload.github.com/alserglab/fgsea/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alserglab%2Ffgsea/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":27588551,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-12-08T02:00:07.111Z","response_time":58,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-02T13:01:27.370Z","updated_at":"2025-12-11T20:48:38.348Z","avatar_url":"https://github.com/alserglab.png","language":"R","funding_links":[],"categories":["7. Protein Pathway Enrichment"],"sub_categories":["Table of Contents"],"readme":"[![R-CMD-check](https://github.com/ctlab/fgsea/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/ctlab/fgsea/actions/workflows/R-CMD-check.yaml)\n\n# fgsea \n\n`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. \nSee [the preprint](https://www.biorxiv.org/content/10.1101/060012v3) for algorithmic details.\n\nFull vignette can be found here: http://bioconductor.org/packages/devel/bioc/vignettes/fgsea/inst/doc/fgsea-tutorial.html\n\n## Installation\n\n`fgsea` is 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.html\n\n\nThe latest version of `fgsea` can be installed from GitHub using `devtools` package, which can take up to a few minutes to install all the dependencies:\n\n```{r}\nlibrary(devtools)\ninstall_github(\"alserglab/fgsea\")\n```\n\n\n## Quick run\n\nLoading libraries\n\n```{r}\nlibrary(data.table)\nlibrary(fgsea)\nlibrary(ggplot2)\n```\n\nLoading example pathways and gene-level statistics:\n```{r}\ndata(examplePathways)\ndata(exampleRanks)\n```\n\nRunning fgsea (should take about 10 seconds):\n```{r}\nfgseaRes \u003c- fgsea(pathways = examplePathways, \n                  stats    = exampleRanks,\n                  minSize  = 15,\n                  maxSize  = 500)\n```\n\nThe head of resulting table sorted by p-value:\n```\npathway                                 pval   padj   log2err  ES      NES     size\n5990979_Cell_Cycle,_Mitotic             1e-10  4e-09  NA       0.5595  2.7437  317\n5990980_Cell_Cycle                      1e-10  4e-09  NA       0.5388  2.6876  369\n5990981_DNA_Replication                 1e-10  4e-09  NA       0.6440  2.6390  82\n5990987_Synthesis_of_DNA                1e-10  4e-09  NA       0.6479  2.6290  78\n5990988_S_Phase                         1e-10  4e-09  NA       0.6013  2.5069  98\n5990990_G1_S_Transition                 1e-10  4e-09  NA       0.6233  2.5625  84\n5990991_Mitotic_G1-G1_S_phases          1e-10  4e-09  NA       0.6285  2.6256  101\n5991209_RHO_GTPase_Effectors            1e-10  4e-09  NA       0.5249  2.3712  157\n5991454_M_Phase                         1e-10  4e-09  NA       0.5576  2.5491  173\n5991502_Mitotic_Metaphase_and_Anaphase  1e-10  4e-09  NA       0.6053  2.6331  123\n```\n\nAs 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.\n\n```{r}\nfgseaRes \u003c- fgsea(pathways = examplePathways, \n                  stats    = exampleRanks,\n                  eps      = 0.0,\n                  minSize  = 15,\n                  maxSize  = 500)\n\nhead(fgseaRes[order(pval), ])\n```\n\n```\npathway                                          pval      padj      log2err  ES      NES     size\n5990979_Cell_Cycle,_Mitotic                      4.44e-26  1.70e-23  1.3267   0.5595  2.7414  317\n5990980_Cell_Cycle                               5.80e-26  1.70e-23  1.3189   0.5388  2.6747  369\n5991851_Mitotic_Prometaphase                     8.50e-19  1.66e-16  1.1239   0.7253  2.9674  82\n5992217_Resolution_of_Sister_Chromatid_Cohesion  1.50e-17  2.19e-15  1.0769   0.7348  2.9482  74\n5991454_M_Phase                                  1.10e-14  1.29e-12  0.9865   0.5576  2.5436  173\n5991599_Separation_of_Sister_Chromatids          3.01e-14  2.94e-12  0.9653   0.6165  2.6630  116\n```\n\n\nOne can make an enrichment plot for a pathway:\n```{r}\nplotEnrichment(examplePathways[[\"5991130_Programmed_Cell_Death\"]],\n               exampleRanks) + labs(title=\"Programmed Cell Death\")\n\n```\n\n![enrichment.png](https://www.dropbox.com/s/zusn9pju7f608sn/enrichment.png?raw=1)\n\nOr make a table plot for a bunch of selected pathways:\n```{r}\ntopPathwaysUp \u003c- fgseaRes[ES \u003e 0][head(order(pval), n=10), pathway]\ntopPathwaysDown \u003c- fgseaRes[ES \u003c 0][head(order(pval), n=10), pathway]\ntopPathways \u003c- c(topPathwaysUp, rev(topPathwaysDown))\nplotGseaTable(examplePathways[topPathways], exampleRanks, fgseaRes, \n              gseaParam=0.5)\n```\n\n\u003cimg src=\"https://alserglab.wustl.edu/files/fgsea/readme_enrichmentPlot.png\"\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falserglab%2Ffgsea","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falserglab%2Ffgsea","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falserglab%2Ffgsea/lists"}