R/parsing_and_conversion.R
reactiontbl_to_expanded.Rd
The long format can also be suitable for manipulating equations.
reactiontbl_to_expanded(reaction_table, regex_arrow = "<?[-=]+>")
reaction_table | A data frame describing the metabolic model. |
---|---|
regex_arrow | Regular expression for the arrow splitting sides of the reaction equation. |
A list of data frames:
rxns
, which has one row per reaction,
mets
, which has one row for each metabolite, and
stoich
, which has one row for each time a metabolite appears in a reaction.
The reaction_table
must have columns:
abbreviation
,
equation
,
uppbnd
,
lowbnd
, and
obj_coef
.
Other parsing_and_conversion:
expanded_to_ROI()
,
expanded_to_glpk()
,
expanded_to_gurobi()
,
reactiontbl_to_gurobi()
if (FALSE) { data(ecoli_core) library(dplyr) try(library(ROI.plugin.ecos)) # make a solver available to ROI roi_model <- ecoli_core %>% reactiontbl_to_expanded %>% expanded_to_ROI if(length(ROI::ROI_applicable_solvers(roi_model))>=1){ roi_result <- ROI::ROI_solve(roi_model) ecoli_core_with_flux <- ecoli_core %>% mutate(flux = roi_result[['solution']]) } }