## The examples here require the package glpkAPI to be
## installed. If that package is not available, you have to set
## the argument 'solver' (the default is: solver = "glpk").
## load the example data set
data(Ec_core)
## run simpleFBA(), Ec_sf will be a list
Ec_sf <- simpleFBA(Ec_core)
## run simpleFBA(), Ec_sf will be an object of
## class optsol_simpleFBA
Ec_sf <- simpleFBA(Ec_core, retOptSol = TRUE)
## do FBA, change the upper and lower bounds for the reactions
## "ATPM" and "PFK". Return also the resulting flux distribution
simpleFBA(Ec_core, react = c("ATPM", "PFK"),
lb = c(3, -3), ub = c(5, 6), fld = TRUE)
## do FBA, perform s sensitivity analysis after optimization
simpleFBA(Ec_core, poCmd = list("sensitivityAnalysis"))
## do FBA, write the problem object to file in lp-format
simpleFBA(Ec_core, poCmd = list(c("writeProb", "LP_PROB",
"'lp'", "'Ec_core.lp'"))
)
## do FBA, use "cplex" as lp solver. Get all upper bounds before
## solving the problem. After solving, perform a sensitivity
## analysis and retrieve the reduced costs
simpleFBA(Ec_core, solver = "cplex",
prCmd = list(c("getColsUppBnds", "LP_PROB", "1:77")),
poCmd = list("sensitivityAnalysis",
c("getDjCPLEX",
"LP_PROB@oobj@env",
"LP_PROB@oobj@lp",
"0", "react_num(Ec_core)-1"
)
)
)
Run the code above in your browser using DataLab