# NOT RUN {
## 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)
mod <- Ec_core
# Change bounds for glucsoe, oxygen and acetate uptake
mod <- changeBounds(mod, react = "EX_glc(e)", lb = -12)
mod <- changeBounds(mod, react = "EX_o2(e)", lb = -10)
mod <- changeBounds(mod, react = "EX_ac(e)", lb = -10)
# initial values
init.source <- c("EX_ac(e)","EX_o2(e)","EX_glc(e)")
init.conc <- c(10,50,28)
init.bmass <- 0.01
# dFBA
Ec_df <- dynamicFBA(mod,exclUptakeRxns = c(),
substrateRxns = init.source,
initConcentrations = init.conc,
initBiomass = init.bmass,
timeStep=.1,nSteps=200,verbose=3)
# Plotting
plot(Ec_df,
plotRxns=c('EX_glc(e)','EX_ac(e)',"EX_for(e)","EX_o2(e)"),
legend_cex=0.85,legend_xpos=0,legend_ypos=45)
# }
Run the code above in your browser using DataLab