The msigdbr R package provides Molecular Signatures Database (MSigDB) gene sets typically used with the Gene Set Enrichment Analysis (GSEA) software:
The package can be installed from CRAN.
install.packages("msigdbr")
Recent releases are not available on CRAN and can be installed from GitHub (specific version can be specified):
::install_github("igordot/msigdbr", ref = "v2022.1.1") remotes
The package data can be accessed using the msigdbr()
function, which returns a data frame of gene sets and their member
genes. For example, you can retrieve mouse genes from the C2 (curated)
CGP (chemical and genetic perturbations) gene sets.
library(msigdbr)
<- msigdbr(species = "mouse", category = "C2", subcategory = "CGP") genesets
Check the documentation website for more information.