Skip to contents

Gets pathways from the MSigDB database in the format required by clusterProfiler enrichment functions, such as enricher and GSEA. May be used as input to runEnrich. By default, retrieves the C2 canonical pathways.

Usage

getMsigdbT2G(
  species = "Homo sapiens",
  category = "C2",
  subcategory = NULL,
  subcategory_to_remove = "CGP",
  gene_id = "ensembl_gene"
)

Arguments

species

The species for which to obtain MSigDB pathways. See msigdbr for more details.

category

The MSigDB category to retrieve pathways for. See msigdbr for more details.

subcategory

The MSigDB subcategory to retrieve pathways for. See msigdbr for more details.

subcategory_to_remove

If not NULL, this is a character string indicating a subcategory to be removed from the results of msigdbr.

gene_id

The name to be given to the gene_id column of the resulting data.frame.

Value

Returns a data.frame, where the gs_name column indicates the name of a pathway, and the gene_id column indicates genes that belong to said pathway.

Author

Jack Gisby

Examples

pathways <- getMsigdbT2G(
    species = "Homo sapiens",
    category = "C2",
    subcategory_to_remove = "CGP",
    gene_id = "ensembl_gene"
)

# A data.frame indicating gene-pathway mappings for use in pathway analysis
head(pathways)
#>                     gs_name    ensembl_gene
#> 29000 BIOCARTA_41BB_PATHWAY ENSG00000115966
#> 29001 BIOCARTA_41BB_PATHWAY ENSG00000213341
#> 29002 BIOCARTA_41BB_PATHWAY ENSG00000111537
#> 29003 BIOCARTA_41BB_PATHWAY ENSG00000104365
#> 29004 BIOCARTA_41BB_PATHWAY ENSG00000109471
#> 29005 BIOCARTA_41BB_PATHWAY ENSG00000113520