R/enrichment.R
getEnrichedPathways.Rd
This function uses the enrichR API to look for enriched pathways in marker gene sets of samples and clusters.
getEnrichedPathways(
object,
column_cluster = "group",
databases = c("GO_Biological_Process_2018", "GO_Cellular_Component_2018",
"GO_Molecular_Function_2018", "KEGG_2016", "WikiPathways_2016", "Reactome_2016",
"Panther_2016", "Human_Gene_Atlas", "Mouse_Gene_Atlas"),
adj_p_cutoff = 0.05,
max_terms = 100,
URL_API = "http://amp.pharm.mssm.edu/Enrichr/enrich"
)
Seurat object. about sample; defaults to 'sample'.
Column in object@meta.data that contains information about cluster; defaults to 'cluster'.
Which databases to query. Use enrichR::listEnrichrDbs() to check what databases are available.
Cut-off for adjusted p-value of enriched pathways; defaults to 0.05,
Save only first n entries of each database; defaults to 100.
URL to send requests to (Enrichr API). Allows to overwrite default URL with an alternative taken from the Enrichr website in case the original is out-of-service; defaults to 'http://amp.pharm.mssm.edu/Enrichr/enrich'.
Seurat object with Enrichr results for samples and clusters stored in object@misc$enriched_pathways$enrichr
Get enriched pathways based on marker genes from EnrichR.
pbmc <- readRDS(system.file("extdata/v1.2/seurat_pbmc.rds",
package = "cerebroApp"
))
#> Warning: cannot open compressed file '', probable reason 'No such file or directory'
#> Error in gzfile(file, "rb"): cannot open the connection
pbmc <- getEnrichedPathways(
object = pbmc,
column_sample = "sample",
column_cluster = "seurat_clusters",
databases = c("GO_Biological_Process_2018", "GO_Cellular_Component_2018"),
adj_p_cutoff = 0.01,
max_terms = 100,
URL_API = "http://amp.pharm.mssm.edu/Enrichr/enrich"
)
#> Error in getEnrichedPathways(object = pbmc, column_sample = "sample", column_cluster = "seurat_clusters", databases = c("GO_Biological_Process_2018", "GO_Cellular_Component_2018"), adj_p_cutoff = 0.01, max_terms = 100, URL_API = "http://amp.pharm.mssm.edu/Enrichr/enrich"): unused argument (column_sample = "sample")