This function performs enrichment analysis on various databases such as GO, KEGG, and Reactome. It's a generic function that dispatches to specific methods based on the class of the 'object' parameter.
enrich_pathway(
variable_info,
database = c("go", "kegg", "reactome"),
save_to_local = FALSE,
path = "result",
OrgDb,
organism = "hsa",
keyType = "ENTREZID",
use_internal_data = FALSE,
ont = "ALL",
pvalueCutoff = 0.05,
pAdjustMethod = "BH",
universe_go = NULL,
universe_kegg = NULL,
universe_reactome = NULL,
qvalueCutoff = 0.2,
minGSSize = 10,
maxGSSize = 500,
readable = FALSE,
pool = FALSE,
...
)
A data.frame containing relevant gene information or
an object that has a specific method for enrich_pathway
.
Character vector, specify which database(s) to use for enrichment ('go', 'kegg', 'reactome').
Logical, if TRUE the results will be saved to local disk.
Character, the directory where to save the results if save_to_local is TRUE.
Object, the OrgDb object required for GO enrichment.
Character, the organism code.
Character, the type of key to be used.
Logical, whether to use internal data for KEGG enrichment.
Character, the ontology to be used for GO enrichment ('ALL', 'BP', 'CC', 'MF').
Numeric, the p-value cutoff for enrichment.
Character, the method for adjusting p-values.
Numeric vector, the universe for GO enrichment.
Numeric vector, the universe for KEGG enrichment.
Numeric vector, the universe for Reactome enrichment.
Numeric, the q-value cutoff for enrichment.
Numeric, the minimum gene set size for enrichment.
Numeric, the maximum gene set size for enrichment.
Logical, whether to make the results more human-readable.
Logical, whether to use clusterProfiler's pooling feature.
Additional arguments passed to the underlying methods.
An object containing the enrichment results and parameters.
if (FALSE) {
data(demo_data)
variable_info <-
demo_data %>%
massdataset::activate_mass_dataset(what = "variable_info") %>%
dplyr::filter(fdr < 0.05 & score > 0) %>%
massdataset::extract_variable_info()
require(org.Hs.eg.db)
enriched_pathways <-
enrich_pathway(
variable_info = variable_info,
save_to_local = FALSE,
path = "result",
OrgDb = org.Hs.eg.db,
organism = "hsa",
database = c("kegg", "reactome"),
ont = "ALL",
pvalueCutoff = 0.05,
pAdjustMethod = "BH",
qvalueCutoff = 0.2,
minGSSize = 10,
maxGSSize = 500,
readable = FALSE,
pool = FALSE
)
}