BacArena: Individual-based metabolic modeling of heterogeneous microbes in complex communities

Recent advances focusing on the metabolic interactions within and between cellular populations have emphasized the importance of microbial communities for human health. Constraint-based modeling, with flux balance analysis in particular, has been established as a key approach for studying microbial metabolism, whereas individual-based modeling has been commonly used to study complex dynamics between interacting organisms. In this study, we combine both techniques into the R package BacArena (https://cran.r-project.org/package=BacArena) to generate novel biological insights into Pseudomonas aeruginosa biofilm formation as well as a seven species model community of the human gut. For our P. aeruginosa model, we found that cross-feeding of fermentation products cause a spatial differentiation of emerging metabolic phenotypes in the biofilm over time. In the human gut model community, we found that spatial gradients of mucus glycans are important for niche formations which shape the overall community structure. Additionally, we could provide novel hypothesis concerning the metabolic interactions between the microbes. These results demonstrate the importance of spatial and temporal multi-scale modeling approaches such as BacArena.


Introduction to BacArena
Microbial communities are essential for global ecosystems and human health. Computational modeling of microbial consortia is thus a major goal in systems biology and microbial ecology. BacArena is a project to simulate bacterial behavior in communities. A lot of progress is done in the last years to create genome wide metabolic reconstructions of certain organisms, which open a wide field of mathematical analysis. One of this new methods is flux balanced analysis (FBA) to estimate optimal metabolic fluxes under certain constraints. Some of these models are available in an exchangeable format (SBML) and can be found in http://systemsbiology.ucsd.edu/InSilicoOrganisms/OtherOrganisms. The idea of this project is to use this existing reconstructions and put them in a spatial and temporal environment to study their possible interactions. This is achieved by the combination of agent based modeling with FBA. Each bacterium is considered as an agent with individual states, own properties and rules to act. Agents are located on a grid where they can move and interact via metabolic exchanges computed by FBA. The starting point for our project is curiosity of what could be done with this huge models. We just throw those models into an arena to see what kind of actions will evolve.

Getting started
Simple simulations with the Escherichia coli core metabolic model First we have to load the installed package in the workspace with library("BacArena") Next we set-up the Escherichia coli core metabolic model data("Ec_core") The model is already integrated in the sybil R package by default. Alternatively you can also load your own model of interest with commands of the sybil and libSBML. After we loaded the model, we convert it into an object of class Bac by calling its constructor bac <-Bac(Ec_core) ## Loading required package: glpkAPI ## using GLPK version 4.60 Now we have to set up an environment in which the organisms can interact arena <-Arena(n=20, m=20) Here, by default we chose 20 times 20 as the grid size of the environment. If not specified, the physical area of the environment is set automatically, in this case it is 0.005cm times 0.005cm. Details could be checked by arena Next we want to put our created organism in its environment by arena <-addOrg(arena,bac,amount=20) With this command we added 20 individuals of our bacterium. Now we can add the substances to the environment arena <-addDefaultMed(arena, bac) arena <-addSubs(arena, smax=0.5, mediac="EX_glc(e)", unit="mM") We added the default medium which was preset in the model together with 0.5 mM glucose. We can check which substances were added at which amount by calling the arena object again Finally, we can start in silico experiment simulating 10 hours of E. coli growth with eval <-simEnv(arena,time=12) During simulation, some basic statistics about growth will be printed. The object eval stores all 10 simulation steps. After we retrieve the eval object we can start analyzing the data. To get a simple overview about what happened we can look at substances having high variation EX_h(e) EX_glc(e) EX_nh4(e) EX_pi(e) ## 2.974e+10 1.726e+10 1.558e+10 1.281e+10 3.833e+09 9.464e+08 4.307e+08 ## EX_ac(e) ## 2.205e+06 To pick one substance and check its time series This will produce multiple plots one by one for each simulation step with the spatial structure of the population (black dots represent individuals).

Simulation of multiple organisms
Now we want to multiple organisms or organism types in the environment. For this we create two different types of the Escherichia coli core metabolic model: A wild type E. coli and an auxotrophic mutant which is unable to use aerobic respiration.
bac1 <-Bac(Ec_core,type="ecoli_wt") Now we create the auxotrophic mutant by using basic commands of the sybil package.
ecore_aux <-changeBounds(Ec_core, "EX_o2(e)",lb=0) bac2 <-Bac(ecore_aux,type="ecoli_aux", setExInf=FALSE) Again we set up an environment and insert organisms and substances arena <-Arena(n=30, m=30) arena <-addOrg(arena,bac1,amount=20) arena <-addOrg(arena,bac2,amount=20) arena <-addDefaultMed(arena, bac1) arena <-addSubs(arena, smax=0.5, mediac="EX_glc(e)", unit="mM") eval <-simEnv(arena,time=10) Here we put the both organism types we created next to each other (given by their x position) in the environment and then started the simulation for 10 time steps. Next we perform again all evaluation steps  Based on these results we can see, that the auxotrophic organism type grows slower in general and uses just fermentation of glucose, whereas the the wild type can respire glucose with the aid of oxygen. We can also create customized microbial communities or multicellular systems by importing external SBML models using the readSBMLmod function in the sybilSBML package.

Community analysis
BacArena was developed with focus on microbial communities. Simulation results are stored in object of class eval. Therefore, simulation could be separated from analysis and simulation files easily exchanged. To test the available methods for community analysis, BacArena provides a sample simulation file containing a 10 hour simulation of 8 gut microbes (SIHUMI community) fed with a standard diet (Altromin 1310). The test data is called sihumi_test data("sihumi_test") eval <-sihumi_test To get a summary of the growth, we start analysis by looking on the abundances of each species over time p <-plotAbundance(eval) p + ggplot2::scale_color_manual(values=colpal3) ## Scale for colour is already present. Adding another scale for ## colour , which will replace the existing scale. The methods plotAbundances() returns a ggplot object which can be modified, e.g., to use different colors.
Quit useful is to investigate the metabolic activity of all organisms. We obtain a figure with uptake (negative values) and production (positive values) patterns of substances which changed most during simulation by EX_co2 (e) EX_for (e) EX_fru (e) EX_h (e) EX_h2o (e) EX_lac_D (e) EX_h2 (e) EX_malttr (e) EX_pyr (e) We see for example that acetaldehyde is produced by B. producta, C. ramosum, and L. plantarum and is used by all other species except B. thetaiotaomicron. Furthermore, the concentration of lactate is increased by Lactobacillus plantarum and again lactate supports growth of other species such as B. thetaiotaomicon. Moreover, we can identify B. producta and E. coli as formate producers which is a short chain fatty acid (SCFA).

[[2]]
EX_cellb(e) EX_sucr ( Due to the underlying method, it is possible to compute substances whose increased availability would contribute most to growth. We can use this to detect possible substrate or cofactor shortage

E. coli
In case of E. coli, we find that a lack of cobalt is limiting its growth.