Skip to content

Instantly share code, notes, and snippets.

@jotech
Last active July 13, 2022 09:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jotech/4fea125a7294a16401962ba7f835853f to your computer and use it in GitHub Desktop.
Save jotech/4fea125a7294a16401962ba7f835853f to your computer and use it in GitHub Desktop.
syntrophy of a Clostridium and a Methanogen
library(BacArena)
SYBIL_SETTINGS("SOLVER", "cplexAPI")
set.seed(115)
# C. beijerinckii:
# - publication https://doi.org/10.1007/s00253-008-1654-4
# - model http://bigg.ucsd.edu/models/iAF692
# M. barkeri:
# - publication: https://doi.org/10.1186/1752-0509-5-130
# - model: https://static-content.springer.com/esm/art%3A10.1186%2F1752-0509-5-130/MediaObjects/12918_2011_738_MOESM3_ESM.XML
mb <- readRDS("m.barkeri_iAF692.RDS")
cb <- readRDS("c.beijerinckii_iCM926.RDS")
ex <- findExchReact(cb)
cb@react_id[ex@react_pos] <- gsub("ex_","EX_",cb@react_id[ex@react_pos])
arena <- BacArena::Arena()
# set maximal uptake
bac1 <- Bac(model=mb)
bac1@lbnd["EX_h2(e)"] <- -41
bac1@lbnd["EX_meoh(e)"] <- -16
bac1@lbnd["EX_ac(e)"] <- -8
bac1@lbnd["EX_pyr(e)"] <- -5
bac2 <- Bac(model=cb)
bac2@lbnd["EX_ac(e)"] <- -3.41
arena <- BacArena::addOrg(arena, bac1, amount=50)
arena <- BacArena::addOrg(arena, bac2, amount=50)
# minimal medium
min_barkeri <- c("EX_4abz(e)", "EX_cobalt2(e)", "EX_nac(e)", "EX_h2o(e)", "EX_h(e)", "EX_nh4(e)", "EX_ni2(e)", "EX_pi(e)", "EX_so3(e)", "EX_cys_L(e)")
min_beijerinckii <- c("EX_h2o(e)", "EX_nh4(e)", "EX_h(e)", "EX_pi(e)", "EX_4abz(e)", "EX_so4(e)")
arena <- BacArena::addSubs(arena, mediac=min_beijerinckii, smax=1, unit="mM")
arena <- BacArena::addSubs(arena, mediac=min_barkeri, smax=1, unit="mM")
arena <- BacArena::addSubs(arena, mediac="EX_glc_D(e)", smax=0.1, unit="mM")
arena <- BacArena::addSubs(arena, mediac="EX_h2(e)", smax=0.05, unit="mM")
arena <- BacArena::addSubs(arena, mediac="EX_co2(e)", smax=0.05, unit="mM")
sim=BacArena::simEnv(arena, time=24, sec_obj="mtf")
plotGrowthCurve(sim)[[1]]
subs = c("EX_ac(e)", "EX_glc_D(e)", "EX_ch4(e)", "EX_h2(e)", "EX_co2(e)")
plotSubCurve(sim, mediac=subs)[[1]]
plotSubUsage(sim, subs=subs)[[2]]
findFeeding(sim)
Display the source blob
Display the rendered blob
Raw
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Display the source blob
Display the rendered blob
Raw
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Display the source blob
Display the rendered blob
Raw
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Display the source blob
Display the rendered blob
Raw
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jotech
Copy link
Author

jotech commented Jul 13, 2022

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment