Description Usage Arguments Details Value Author(s) See Also Examples
View source: R/importGeneSets.R
Converts a list of gene sets stored in a GMT file into a GeneSetCollection and stores it in the metadata of the SingleCellExperiment object. These gene sets can be used in downstream quality control and analysis functions in singleCellTK.
1 2 3 4 5 6 7 | importGeneSetsFromGMT(
inSCE,
file,
collectionName = "GeneSetCollection",
by = "rownames",
sep = "\t"
)
|
inSCE |
Input SingleCellExperiment object. |
file |
Character. Path to GMT file. See getGmt for more information on reading GMT files. |
collectionName |
Character. Name of collection to add gene sets to.
If this collection already exists in |
by |
Character, character vector, or NULL. Describes the
location within |
sep |
Character. Delimiter of the GMT file. Default |
The gene identifiers in gene sets in the GMT file will be
mapped to the rownames of inSCE
using the by
parameter and
stored in a GeneSetCollection object from package
GSEABase. This object is stored in
metadata(inSCE)$sctk$genesets
, which can be accessed in downstream
analysis functions such as runCellQC.
A SingleCellExperiment object
with gene set from collectionName
output stored to the
metadata slot.
Joshua D. Campbell
importGeneSetsFromList for importing from lists, importGeneSetsFromCollection for importing from GeneSetCollection objects, and importGeneSetsFromMSigDB for importing MSigDB gene sets.
1 2 3 4 5 6 7 8 9 10 | data(scExample)
# GMT file containing gene symbols for a subset of human mitochondrial genes
gmt <- system.file("extdata/mito_subset.gmt", package = "singleCellTK")
# "feature_name" is the second column in the GMT file, so the ids will
# be mapped using this column in the 'rowData' of 'sce'. This
# could also be accomplished by setting by = "feature_name" in the
# function call.
sce <- importGeneSetsFromGMT(inSCE = sce, file = gmt, by = NULL)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.