knitr::opts_chunk$set( collapse = TRUE, comment = "#>", out.width = "100%" )
library(metpath) library(tidyverse)
data("kegg_hsa_pathway", package = "metpath") kegg_hsa_pathway
get_pathway_class(kegg_hsa_pathway)
We use the demo compound list from metpath
.
data("query_id_kegg", package = "metpath") query_id_kegg
Remove the disease pathways:
#get the class of pathways pathway_class = metpath::pathway_class(kegg_hsa_pathway) head(pathway_class) remain_idx = pathway_class %>% unlist() %>% stringr::str_detect("Disease") %>% `!`() %>% which() remain_idx pathway_database = kegg_hsa_pathway[remain_idx] pathway_database
result = enrich_kegg(query_id = query_id_kegg, query_type = "compound", id_type = "KEGG", pathway_database = pathway_database, p_cutoff = 0.05, p_adjust_method = "BH", threads = 3)
Check the result:
result
enrich_bar_plot(object = result)
enrich_scatter_plot(object = result)
enrich_network(object = result)
sessionInfo()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.