Skip to contents

Wrapper around msigdbr. Reformats pathway data for use with fgsea2.

Usage

msigdbr2(
  species = "Homo sapiens",
  genes = c("gene_symbol", "entrez_gene", "ensembl_gene"),
  gs_subcat,
  capitalize = FALSE
)

Arguments

species

character; scientific or common name of species. Default is "Homo sapiens". msigdbr::msigdbr_species displays all possible choices.

genes

character; type of gene ID to fetch. Options are "gene_symbol", "entrez_gene", and "ensembl_gene".

gs_subcat

character vector of one or more MSigDB subcategories. See msigdbr_collections for details.

capitalize

logical; whether to capitalize the first letter of each description if the first word does not contain a mix of capital and lowercase letters. Improves appearance of plots, such as those produced by enrichmat.

Value

A data.table with columns "gs_exact_source" (term ID), "gs_subcat" (subcategory), "gs_description" (term description), and a list-column of gene IDs specified by genes.

References

Liberzon, A., Birger, C., Thorvaldsdóttir, H., Ghandi, M., Mesirov, J. P., & Tamayo, P. (2015). The Molecular Signatures Database (MSigDB) hallmark gene set collection. Cell systems, 1(6), 417--425. https://doi.org/10.1016/j.cels.2015.12.004

Dolgalev, I. (2022). msigdbr: MSigDB Gene Sets for Multiple Organisms in a Tidy Data Format. R package version 7.5.1, https:://igordot.github.io/msigdbr

Examples

# Reactome pathways and GO Molecular Functions:
x <- msigdbr2(species = "rat",
              genes = "gene_symbol",
              gs_subcat = c("CP:REACTOME", "GO:MF"))
#> Searching MSigDB 7.5.1 Release Notes for OBO file date:
#> Error in obo_file(version = version): argument "obo_file" is missing, with no default