Merge metabolite stub and compartment to form an id

recompose_metabolites(
  expanded_metabolites,
  before_signifier = "_",
  after_signifier = ""
)

Arguments

expanded_metabolites

a metabolite table as created by decompose_metabolites

before_signifier

a string that is inserted before the compartment identifier

after_signifier

a string that is inserted after the compartment identifier

Value

A merged metabolite table with one column, met

Examples

data(ecoli_core) mod <- reactiontbl_to_expanded(ecoli_core) decompose_metabolites(mod$mets)
#> # A tibble: 72 x 2 #> chemical compartment #> <chr> <chr> #> 1 13dpg c #> 2 2pg c #> 3 3pg c #> 4 6pgc c #> 5 6pgl c #> 6 ac c #> 7 ac e #> 8 acald c #> 9 acald e #> 10 accoa c #> # … with 62 more rows
recompose_metabolites(decompose_metabolites(mod$mets))
#> # A tibble: 72 x 1 #> met #> <chr> #> 1 13dpg_c #> 2 2pg_c #> 3 3pg_c #> 4 6pgc_c #> 5 6pgl_c #> 6 ac_c #> 7 ac_e #> 8 acald_c #> 9 acald_e #> 10 accoa_c #> # … with 62 more rows