View source: R/14_enrich_pathways.R
enrich_metabolic_pathway | R Documentation |
Performs enrichment analysis for metabolic pathways using HMDB or KEGG identifiers. The function applies statistical tests to assess the overrepresentation of queried compounds or proteins in metabolic pathways.
enrich_metabolic_pathway(
query_id,
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 protein identifiers. |
id_type |
Character. Type of identifier, either '"HMDB"' or '"KEGG"'. Default: '"HMDB"'. |
pathway_database |
The pathway database object containing metabolic pathway information. |
only_primary_pathway |
Logical. Whether to retain only primary pathways. Default: 'FALSE'. |
p_cutoff |
Numeric. P-value cutoff for statistical significance. Default: '0.05'. |
p_adjust_method |
Character. Method to adjust p-values. Options include '"holm"', '"hochberg"', '"hommel"', '"bonferroni"', '"BH"', '"BY"', '"fdr"', '"none"'. Default: '"holm"'. |
method |
Character. Statistical method for enrichment analysis. Options: '"hypergeometric"' or '"fisher"'. Default: '"hypergeometric"'. |
threads |
Integer. Number of computational threads. Default: '3'. |
A list containing pathway enrichment results, including pathway ID, pathway name, pathway description, and enrichment statistics.
## Not run:
data("sample_pathway_database")
query_compounds <- c("HMDB0000122", "HMDB0000532")
metabolic_enrichment <- enrich_metabolic_pathway(
query_id = query_compounds,
id_type = "HMDB",
pathway_database = sample_pathway_database,
p_cutoff = 0.05,
method = "fisher"
)
print(metabolic_enrichment)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.