Last active
August 1, 2023 04:04
-
-
Save jotech/8dd1e27b21ab70ecf2b2a56e5b70a2e0 to your computer and use it in GitHub Desktop.
Working with flux distribution
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# In BacArena the activity of each reaction of an organism (flux distribution) is stored in arena@mflux. | |
# After finishing a simulation, the time series of the reaction activities can be accessed via eval@simlist. | |
# | |
library(BacArena) | |
data("Ec_core") | |
bac <- Bac(Ec_core) | |
arena <- Arena(n=20, m=20) | |
arena <- addOrg(arena,bac,amount=20) | |
arena <- addSubs(arena, smax=0.5, mediac="EX_glc(e)", unit="mM") | |
arena <- addSubs(arena, smax=1, mediac=c("EX_pi(e)", "EX_h2o(e)", | |
"EX_o2(e)", "EX_nh4(e)"), unit="mM") | |
eval <- simEnv(arena,time=4) | |
eval@mfluxlist[[4]]$ecoli_core_model # gives the reaction activities in time step 4 | |
plotTotFlux(eval) | |
plotReaActivity(eval, reactions = c("PYK", "ATPS4r"))[[1]] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment