geneSetSimplifyR

Gene-set enrichment analysis often returns hundreds or thousands of significant gene sets, far too many to read one by one. geneSetSimplifyR groups them into a small number of clusters of overlapping gene sets and gives each cluster an informative two-word label.

It works on the output of any enrichment tool, with helpers for fgsea and pairedGSEA results.

Installation

if (!requireNamespace("BiocManager", quietly = TRUE)) {
  install.packages("BiocManager")
}
BiocManager::install("geneSetSimplifyR")

The development version can be installed from GitHub. This also works on R 4.4 and 4.5, which the Bioconductor release does not support:

BiocManager::install("remotes") # needed to install from GitHub
BiocManager::install("IsoformAnalysisGroup/geneSetSimplifyR")

BiocManager installs the dependencies from both CRAN and Bioconductor.

Platform notes

Quick start

library(geneSetSimplifyR)
data("exampleGeneSets")
data("exampleEnrichment")

# A named list of gene sets and, optionally, a table of enrichment results
# with the columns 'pathway', 'enrichment_score' (or 'NES'), and optionally
# 'pval' and 'source'.
gsList <- geneSetSimplifyR(
  geneSetsList = exampleGeneSets,
  geneSetsDF = exampleEnrichment
)

gsList
plotUMAP(gsList)
plotEnrichments(gsList)

# One row per gene set with its cluster label, for supplementary tables
extractTable(gsList, summarize = FALSE)

Documentation

The vignette walks through the whole workflow, from fgsea results to renaming clusters. After installing from Bioconductor, open it with vignette("geneSetSimplifyR", package = "geneSetSimplifyR").

GitHub installs skip the vignette by default. To get it from GitHub, install with build_vignettes = TRUE. This needs a few extra packages and pandoc, which comes with RStudio:

BiocManager::install(c("knitr", "rmarkdown", "BiocStyle"))
BiocManager::install(
  "IsoformAnalysisGroup/geneSetSimplifyR",
  build_vignettes = TRUE,
  force = TRUE # reinstall if the package is already installed
)
vignette("geneSetSimplifyR", package = "geneSetSimplifyR")

Report bugs and questions at https://github.com/IsoformAnalysisGroup/geneSetSimplifyR/issues.