reactiontbl_to_expanded: Parse a reaction table to an intermediate, long format

Description Usage Arguments Details Value See Also Examples

View source: R/parsing_and_conversion.R

Description

The long format can also be suitable for manipulating equations.

Usage

1
reactiontbl_to_expanded(reaction_table, regex_arrow = "<?[-=]+>")

Arguments

reaction_table

A data frame describing the metabolic model.

regex_arrow

Regular expression for the arrow splitting sides of the reaction equation.

Details

The reaction_table must have columns:

Value

A list of data frames:

See Also

Other parsing_and_conversion: expanded_to_ROI(), expanded_to_glpk(), expanded_to_gurobi(), reactiontbl_to_gurobi()

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
## Not run: 
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']])
}

## End(Not run)

fbar documentation built on Sept. 2, 2020, 5:08 p.m.