View source: R/14_enrich_pathways.R
enrich_pathways | R Documentation |
This function performs pathway enrichment analysis using metabolic pathway databases. It supports compound and metabolite enrichment based on HMDB or KEGG identifiers.
enrich_pathways(
query_id,
query_type = c("compound", "protein"),
id_type = c("HMDB", "KEGG"),
pathway_database,
only_primary_pathway = FALSE,
p_cutoff = 0.05,
p_adjust_method = c("holm", "hochberg", "hommel", "bonferroni", "BH", "BY", "fdr",
"none"),
method = c("hypergeometric", "fisher"),
threads = 3
)
query_id |
A vector of compound or metabolite identifiers. |
query_type |
Character. Type of query, either '"compound"' or '"protein"'. Default: '"compound"'. |
id_type |
Character. Type of identifier, either '"HMDB"' or '"KEGG"'. Default: '"HMDB"'. |
pathway_database |
The pathway database object containing pathway information. |
only_primary_pathway |
Logical. Whether to filter only primary pathways. Default: 'FALSE'. |
p_cutoff |
Numeric. The significance threshold for pathway enrichment. Default: '0.05'. |
p_adjust_method |
Character. P-value adjustment method. Options include '"holm"', '"hochberg"', '"hommel"', '"bonferroni"', '"BH"', '"BY"', '"fdr"', '"none"'. Default: '"holm"'. |
method |
Character. Statistical method used for enrichment analysis. Options: '"hypergeometric"' or '"fisher"'. Default: '"hypergeometric"'. |
threads |
Integer. Number of threads to use for computation. Default: '3'. |
A data frame containing the pathway enrichment results, including pathway ID, pathway name, description, p-values, adjusted p-values, and mapping statistics.
## Not run:
data("sample_pathway_database") # Load example pathway database
query_metabolites <- c("HMDB0000122", "HMDB0000532", "HMDB0000889")
enrichment_results <- enrich_pathways(
query_id = query_metabolites,
query_type = "compound",
id_type = "HMDB",
pathway_database = sample_pathway_database,
p_cutoff = 0.05,
method = "fisher"
)
print(enrichment_results)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.