Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@jotech
Last active August 1, 2023 04:04
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jotech/8dd1e27b21ab70ecf2b2a56e5b70a2e0 to your computer and use it in GitHub Desktop.
Save jotech/8dd1e27b21ab70ecf2b2a56e5b70a2e0 to your computer and use it in GitHub Desktop.
Working with flux distribution
#
# 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