expandGeneSets: Retrieve genes in each gene set

Description Usage Arguments Value Examples

View source: R/geneSetAnalysis.R

Description

Given a list of gene set IDs, query MSigDb to retrieve all genes that compose those gene sets, and return the result in a data.table. Since each gene set ID is mapped to a wide array of genes, each gene set is being "expanded".

Usage

1
expandGeneSets(geneSetIds, geneSetType = NULL)

Arguments

geneSetIds

A character vector containing gene set IDs from MSigDb

geneSetType

(optional) The types of gene sets in geneSetNames; see MSigDb for possible subcategories (use msigdbr::msigdbr_collections()). This parameter is not required but may speed up computation because less data will be retrieved from MSigDb (smaller queries = faster queries).

Value

A data.table mapping all gene sets to their component genes. The data.table has two columns: "gs_id", which is the ID of the gene set, and "ensembl_gene", which is ENSEMBL ID of one of the genes in that gene set.

Examples

1
2
geneSets <- getGeneSets("ENSG00000000971", "GO:BP")
expandGeneSets(geneSets$gs_id, "GO:BP")

EvgeniyaGorobets/PGxVision documentation built on Dec. 17, 2021, 7:26 p.m.