R/metabolite_utilities.R
decompose_metabolites.Rd
Decompose a metabolite table into the metabolite stub itself and the compartment it is in
decompose_metabolites( met_table, compartment_regex = "(\\[[a-zA-Z0-9]+]$)|(_[a-zA-Z]$)" )
met_table | A metabolite table, with one column, |
---|---|
compartment_regex | Regular expression to identify compartments in model |
a metabolite table with the columns chemical
and compartment
#> # 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#> # 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