runEnrichR: Run EnrichR on SCE object

View source: R/enrichRSCE.R

runEnrichRR Documentation

Run EnrichR on SCE object

Description

Run EnrichR on SCE object

Usage

runEnrichR(
  inSCE,
  features,
  analysisName,
  db = NULL,
  by = "rownames",
  featureName = NULL
)

Arguments

inSCE

A SingleCellExperiment object.

features

Character vector, selected genes for enrichment analysis.

analysisName

A string that identifies each specific analysis.

db

Character vector. Selected database name(s) from the enrichR database list. If NULL then EnrichR will be run on all the available databases on the enrichR database. See details. Default NULL

by

Character. From where should we find the features? "rownames" for from rownames(inSCE), otherwise, from a column of feature metadata (rowData(inSCE)[[by]]). See details. Default "rownames".

featureName

Character. Indicates the actual feature identifiers to be passed to EnrichR. Can be "rownames", a column in feature metadata (rowData(inSCE)[[featureName]]), or a character vector with its length equals to nrow(inSCE). See details. Default "rownames".

Details

EnrichR works by querying the specified features to its online databases, thus it requires the Internet connection.

Available db options could be shown by running enrichR::listEnrichrDbs()$libraryName

This function checks for the existence of features in the SCE object. When features do not have a match in rownames(inSCE), users may try to specify by to pass the check.

EnrichR expects gene symbols/names as the input (i.e. Ensembl ID might not work). When specified features are not qualified for this, users may try to specify featureName to change the identifier type to pass to EnrichR.

Value

Updates inSCE metadata with a data.frame of enrichment terms overlapping in the respective databases along with p-values, z-scores etc.

See Also

getEnrichRResult

Examples

data("mouseBrainSubsetSCE")
if (Biobase::testBioCConnection()) {
  mouseBrainSubsetSCE <- runEnrichR(mouseBrainSubsetSCE, features = "Cmtm5", 
                                    db = "GO_Cellular_Component_2017",
                                    analysisName = "analysis1")
}


compbiomed/singleCellTK documentation built on Oct. 27, 2024, 3:26 a.m.