powered by
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]$)" )
A metabolite table, with one column, met
met
Regular expression to identify compartments in model
a metabolite table with the columns chemical and compartment
chemical
compartment
# NOT RUN { data(ecoli_core) mod <- reactiontbl_to_expanded(ecoli_core) decompose_metabolites(mod$mets) recompose_metabolites(decompose_metabolites(mod$mets)) # }
Run the code above in your browser using DataLab