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
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 |
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
library("BacArena") | |
library("R.matlab") | |
mod <- readMATmod("Actinobacillus_pleuropneumoniae_L20.mat") | |
arena <- Arena(n=10,m=10) | |
arena <- addOrg(arena, Bac(mod), 10) | |
arena <- addDefaultMed(arena, Bac(mod)) | |
sim <- simEnv(arena, time=5) |
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
library(BacArena) | |
data("Ec_core") | |
bac <- Bac(Ec_core) | |
arena <- Arena(n=20, m=20) | |
arena <- addOrg(arena,bac,amount=30) | |
arena <- addSubs(arena, smax=0.05, mediac="EX_glc(e)", unit="mM") | |
arena <- addSubs(arena, smax=1, mediac=c("EX_pi(e)", "EX_h2o(e)", "EX_nh4(e)"), unit="mM") | |
# Aenaerobic simulation for 6h |
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
library(BacArena) | |
data("Ec_core") | |
arena <- Arena(n=10,m=10) | |
# by setting maxweight to infinity, duplication is disabled | |
# speed=0 indicates no movement | |
# limit_growth=FALSE removes the limit of biomass increase | |
bac <- Bac(Ec_core, speed=0, limit_growth=FALSE, maxweight=Inf) |
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
# | |
# The sihumi example data set consists of a simulation of 8 gut microbes growing on a western diet for 8 hours. | |
# Here, we use it to study microbial interactions | |
# | |
library(BacArena) | |
data("sihumi_test") |
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) |
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
# | |
# Doing a simple simulation using the E. coli model (iJO1366) | |
# | |
library(BacArena) | |
data(bcoli_orth) | |
bac <- Bac(ecoli) | |
arena <- Arena() |