knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  out.width = "100%"
)
library(metPath)

Load HMDB pathway database

data("hmdb_pathway", package = "metPath")
hmdb_pathway
get_pathway_class(hmdb_pathway)

Pathway enrichment

We use the demo compound list from metPath.

data("query_id_hmdb", package = "metPath")
query_id_hmdb
result = 
enrich_hmdb(query_id = query_id_hmdb, 
            query_type = "compound", 
            id_type = "HMDB",
            pathway_database = hmdb_pathway,
            only_primary_pathway = TRUE,
            p_cutoff = 0.05, 
            p_adjust_method = "BH", 
            threads = 3)

Check the result:

result

Plot to show Pathway enrichment

enrich_bar_plot(
  object = result,
  x_axis = "p_value_adjust",
  cutoff = 0.05,
  top = 10
)
enrich_scatter_plot(object = result)
enrich_network(object = result)


jaspershen/metPath documentation built on March 14, 2021, 12:07 a.m.