Figures
Abstract
Predictability is a fundamental requirement in biological engineering. As we move to building coordinated multicellular systems, the potential for such systems to display chaotic behaviour becomes a concern. Therefore understanding which systems show chaos is an important design consideration. We developed a methodology to explore the potential for chaotic dynamics in small microbial communities governed by resource competition, intercellular communication and competitive bacteriocin interactions. Our model selection pipeline uses Approximate Bayesian Computation to first identify oscillatory behaviours as a route to finding chaotic behaviour. We have shown that we can expect to find chaotic states in relatively small synthetic microbial systems, understand the governing dynamics and provide insights into how to control such systems. This work is the first to query the existence of chaotic behaviour in synthetic microbial communities and has important ramifications for the fields of biotechnology, bioprocessing and synthetic biology.
Author summary
In chaotic systems, infinitesimally small differences in the initial conditions will become amplified over time, making forecasting and prediction of behaviour impossible. Although we know that chaos can be observed in the complex networks of natural ecosystems, the field of biotechnology is interested in designing and building new microbial communities and the presence of chaotic behaviour is unexplored. In this paper, we present a statistical pipeline that can tell us how, when and why chaos arises in small microbial communities. We apply this approach to study a set of communities involving quorum sensing systems and amensal interactions through antimicrobial peptides. Out of 4182 interaction networks in these three strain communities, we identify the networks that have the highest propensity to produce chaos. We then explore the levers we can pull to bring these networks in and out of chaotic regimes. Our work is the first to look at chaos in synthetic microbial communities and indicates that chaos is an important design consideration.
Citation: Karkaria BD, Manhart A, Fedorec AJH, Barnes CP (2022) Chaos in synthetic microbial communities. PLoS Comput Biol 18(10): e1010548. https://doi.org/10.1371/journal.pcbi.1010548
Editor: Christopher Rao, University of Illinois at Urbana-Champaign, UNITED STATES
Received: December 8, 2021; Accepted: September 7, 2022; Published: October 10, 2022
Copyright: © 2022 Karkaria et al. This is an open access article distributed under the terms of the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original author and source are credited.
Data Availability: Data and scripts required to reproduce the figures in this manuscript can be accessed from the following Zenondo repository: https://doi.org/10.5281/zenodo.5764686.
Funding: B.D.K was funded through the BBSRC LIDo Doctoral Training Partnership, (Grant No 1758911). A.J.H.F and C.P.B received funding from the European Research Council (ERC) under the European Union’s Horizon 2020 Research and Innovation Programme (Grant No. 770835). C.P.B. received salary funding from the Wellcome Trust (209409/Z/17/Z). The funders had no role in study design, data collection and analysis, decision to publish, or preparation of the manuscript.
Competing interests: The authors have declared that no competing interests exist.
Introduction
Chaos can be defined as deterministic behaviour that displays aperiodic orbits and sensitivity to initial conditions [1]. Infinitesimally small differences in the initial conditions of a chaotic system will become amplified over time, making forecasting and prediction of behaviour impossible [2]. Despite being deterministic, chaotic systems possess an inherent uncertainty due to the fact that we can never describe the initial conditions of a system in sufficient detail. Building systems which behave in a predictable and repeatable manner is essential across fields invested in engineering biology and its applications. Evidence from studies of neural networks suggests the increasing probability of chaotic behaviour as the number of dimensions in the network grows [3–5]. Therefore we might expect opportunities for unpredictable behaviour to become more probable as we try and implement larger synthetic communities, or edit existing networks such as the human gut microbiome. Steps to date have not been taken to investigate the existence of chaos in small synthetic microbial networks. A long-term goal of engineering biology is to create truly scalable and robust synthetic microbial communities [6, 7]. Therefore understanding and evaluating the possibility of chaotic behaviour in a system becomes an important consideration.
Observations of chaotic behaviour in biological systems have been reported. A three species system containing one predator and two prey species has been demonstrated to produce chaotic behaviour, with dilution rate a key parameter in enabling aperiodic behaviours [8]. An eight year study of a planktonic food web measured chaotic behaviours, resulting in subpopulation abundance predictability being limited to 15–30 days, despite constant external conditions [9]. These experimental examples demonstrate that a low number of species are capable of producing chaotic behaviour and are therefore unpredictable.
In order to predict the possibility for chaotic behaviour in synthetic microbial communities, we need to develop models that capture interactions between different community species. Generalised Lotka-Volterra equations (gLV) have previously been used to model pair-wise interactions and infer inter-species relationships [10]. However, gLV models provide an incomplete description of interactions we expect to find in microbial communities. They are unable to capture the existence of chaos in three species networks [11]. Furthermore, gLV models have failed to predict community formation from pairwise interactions in microbial communities [12]. gLV models lack dynamics that occur with the accumulation and depletion of extracellular species, which can be important for predicting the true dynamics of a community [13]. Modified Lotka-Volterra equations produce chaotic behaviour in predator-prey systems by including time-delayed feedback [13, 14], or in one predator two prey systems, by adding dampening effects [15]. While these abstractions are suitable in some circumstances, by modelling the intermediates involved in competitive interactions we can include experimentally measurable mechanisms and parameters. In previous work, we have modelled quorum sensing (QS) to regulate bacteriocin expression and engineer inter-population interactions. These methods allowed us to tune experimental parameters of an engineered two strain system [16], and predict the most promising topologies for producing stability in two and three strain systems [17].
The existence of chaos in dynamical models and the distribution of chaotic parameter space can be identified using various optimisation techniques. The unscented Kalman filter has previously been used to investigate chaos in electrical circuits and biological systems, obtaining parameters yielding chaos [18]. Simulated annealing has been applied to finding chaotic parameters in four species standard Lotka Volterra models [19]. Evidence also suggests that perturbation of system parameters can be used to drive systems towards or away from chaotic attractors [20]. The possibility of chaos in synthetic microbial communities, to our knowledge, has not been previously considered.
Standard competitive gLV models can produce chaotic behaviour in four species networks [11]. We use these previous findings to demonstrate and validate our methodology, before applying it to models that describe interpopulation interactions that are more specific to mechanisms found in synthetic microbial communities.
Results
Development of a novel statistical approach to identifying chaotic regions in a multidimensional parameter space
Approximate Bayesian Computation Sequential Monte Carlo (ABC SMC) is a method that can be used for model selection and parameter inference in dynamical systems [21] (Algorithm 1). This flexible algorithm can also be used to tackle the design question, namely what model topologies and parameters are able to give rise to some specified target qualitative behaviour [22]. ABC SMC requires a distance function, describing how far away a simulation is from the objective behaviour. When searching for chaotic beahviour, we use the maximal Lyapunov exponent (λ1) to create a distance function. We calculate λ1 by initialising two nearby orbits and measuring their divergence or convergence over the course of a simulation (see Methods and Algorithm 1). λ1 < 0 corresponds to linear stability, λ1 = 0 corresponds to periodic oscillations, and λ1 > 0 corresponds to chaos. While these rules hold true for infinite time, our simulations run for a finite time, meaning these boundary rules can be noisy. To identify chaos, we therefore define a threshold above 0 where we can be sure simulations have chaotic behaviour.
First, we demonstrate the use of ABC SMC in resolving a chaotic parameter distribution in a competitive gLV system. Competitive gLV equations are commonly used in ecological population modelling, and have similarly been used to model microbial communities [23]. They describe generic negative interactions between species that could represent competition for nutrients or amensal interactions. Competitive gLV systems take the form
where Ni is the size of a species population, ri is the growth rate, n is the number of species in the population and α the interaction matrix, describes the amensal interactions between pairs of species in the system. To simulate the chemostat environment, we set the diagonal as a dilution rate, D, which is the same for all species. The diagonal of α can also be thought of as defining the carrying capacity of each species.
Vano et al. previously identified a chaotic attractor in this system using a brute-force parameter search [11]. Fig 1A shows the parameters identified, Fig 1B shows the resulting chaotic timeseries of the four species. We wanted to see if our ABC SMC methods could provide a posterior distribution for chaotic behaviour, capturing the findings of Vano et al. We identified a threshold of λ > 0.015 was sufficient for classifying chaotic behaviour and ran ABC SMC for this chaotic objective. We show the posterior of several parameters in Fig 1C. The black point corresponds to the parameters found by Vano et al, while the red scatter points correspond to chaotic behaviour we identified using ABC SMC. We can see that the interspecies interaction parameters, a42 and a43, are constrained, indicating their importance for producing chaotic behaviour, given the prior parameter distributions. Conversely, the initial population of N1 is not constrained, indicating the chaotic behaviours are robust to changing initial conditions. Similarly, r3, defining the growth rate of N3 is not constrained. The full posterior parameter distribution is shown in S1 Fig.
Mechanisms of interaction in microbial communities such as crossfeeding and toxin interactions would be subjected to time delays, accumulation of intermediate species and dynamic genetic regulation, contributing to non-linearity of these systems. gLV equations simplify these mechanisms and as such, are unable to capture chaotic behaviour with three species. In the next sections we move to studying more biochemically realistic systems.
A Shows the parameters used in the chaotic attractor and an illustration of the interaction topology. B Time series of the chaotic attractor. C Posterior parameter distribution for chaotic objective, identified using ABC SMC (red) and the individual chaotic particle identified by Vano et al. (black). Center grid shows 2D parameter distributions, left and top rows 1D parameter distribtuions.
Searching for chaos across synthetic microbial community models
In previous work we developed a model framework to describe QS regulated bacteriocin interactions in a three strain model space, and predicted topologies that form stable communities [17]. Here we use this same model space to investigate the existence of chaos in three strain synthetic microbial communities.
Fig 2A shows the pipeline we developed to search for chaos in synthetic three strain systems. Three strains, N1, N2, N3, optionally express bacteriocins, B1, B2, and B3 under the control of optionally expressed QS molecules, A1, and A2. The QS molecules regulate expression of bacteriocins positively or negatively. Each strain can be optionally sensitive to a bacteriocin. The initial model space describes an enumeration of possible combinations of bacteriocin and QS systems, and forms the first uniform prior model space of 4182 models (Fig 2A(i)). Prior parameter distributions describe the range of characteristics for the different parts (Table 1). We expected the existence of chaos to be sparse in this three strain model space, and therefore computationally expensive to explore. Oscillations are a known route to chaos [1], therefore, in order to narrow down the search, we defined a novel set of three distances that are used to classify oscillatory behaviours. These were the period of the signal (defined through the Fourier transform), the number of expected peaks, and the amplitude of the signal (see Methods). We also define an extinction threshold of 10−5; if a strain population falls below this it is classified as extinct. Using these distances, we performed ABC SMC for an oscillations objective (Fig 2A(ii)). We identified 117 models capable of producing oscillations. These models become the new uniform prior model distribution for the next stage, where we perform ABC SMC for the previously described chaotic objective (Fig 2A(iii)). In this model framework we identified λ1 > 0.003 as sufficient for classifying chaos.
A(i) The initial model space is built from different combinations of engineering options. N1, N2, N3 are the three strains being engineered, and can optionally express QS molecules A1, A2 and bacteriocins B1, B2, B3. 4182 models are generated forming our initial model space. A(ii) We then perform ABC SMC for an oscillatory objective, which yielded 117 models that were capable of producing oscillations. A(iii) These form the prior model space for the chaos objective, using a threshold of λ1 > 0.003, we identify models capable of producing chaotic behaviour B The barchart shows the probability of models for the chaotic objective. The error bars represent the standard deviation. C An example time series representative of the chaos objective posterior distribution. Population densities as optical density (OD) show sustained, nonrepetitive oscillatory behaviour for the three species community.
The posterior probabilities of the models for the chaotic objective given the prior distributions used are shown in Fig 2B. Fig 2C shows a representative chaotic trajectory, demonstrating aperiodic non-repeating behaviour, satisfying the qualitative features of chaos.
Properties of chaotic models
We next explored some of the properties of chaotic topologies identified using ABC SMC. Fig 3A shows the top performing models when subsetting for complexity, based on the number of parts expressed. mk refers to the k-th model from the initial model space. m850 contains four expressed parts and possesses the highest posterior probability for chaotic behaviour. Systems containing fewer parts all had a posterior probability of zero. As complexity increases to five and six parts (m3177 and m2547), the posterior probability decreases. Our previous work demonstrated that system stability increased with the number of parts [17]. The peak in the posterior probability for chaos at four parts reflects a balance that includes enough mechanisms to enable co-existence, without the tighter network of negative interactions that are associated with linear stability [17, 24]. We highlight that these observations are limited to the small communities defined in our prior. These properties may not be reflective of larger communities, however, we hypothesise that a trade-off between stabilizing interactions that enable co-existence, and destabilising interactions to prevent linear stability, will remain important for producing chaotic population dynamics.
A Shows the models with highest posterior probability when subsetted for number of parts expressed, in order of increasing complexity (4, 5 and 6 expressed parts). The bar chart shows the mean model posterior probability across three experiments, the error bars indicate the standard deviation. B Comparison between average posterior probabilities with different properties. In order from left to right, the barcharts compare: The number of QS systems used, the modes by which QS regulates bacteriocin expression (positive, negative or both), the number of bacteriocins used, and systems containing self-limiting (SL), other-limiting (OL) or SL and OL interactions.
Fig 3B provides summaries of how different parts contribute to chaotic behaviour in the three strain models. We can see that one QS system and positive regulation of bacteriocin is strongly favoured for producing chaos. This ensures all system bacteriocins are regulated in tandem. Expression rates are all dependent upon the same QS, resulting in stronger negative or positive correlations defined by the mode of regulation. Two bacteriocin systems also dominate the model posterior. Bacteriocin interactions can be categorised as either self-limiting (SL), whereby the strain is inhibited by the bacteriocin it produces, or other-limiting (OL) where a strain is inhibited by a bacteriocin produced by a different strain. Both SL only and a combination of SL and OL interactions are associated with producing chaotic behaviour. These observations are interesting in comparison to other work on ecological systems. Cooperative interactions were previously found to give rise to unstable systems, whereas competition was more indicative of stability [24]. The same effect might occur here in systems with one QS, rather than two, as the system would be expected to have increased correlation. While chaotic behaviour may seem to be very different from linear stability, both behaviours share the necessity for coexistence. Our previous work showed that SL interactions were important for producing linear stability, while OL interactions more frequently associated with extinction events and non-linear stability [17]. This may explain why we see tendencies for topologies to share a mixture of stability associated SL interactions, and instability associated OL interactions. We also find models with three bacteriocins, and hence higher suppression of growth, have a low posterior probability for chaos, given the prior distributions used.
Parameter importance for chaos in m850
The model with the highest posterior probability for chaotic behaviour was m850; the topology is shown in Fig 4A. It consists of a single QS system, produced by N1, that positively regulates two bacteriocins. B1 is produced by N1 and N2 but it inhibits the growth of N1 only. B2 is produced by N3 and inhibits the growth of N3 only. The system in total consists of four expressed parts. m850 also ranked highly for the oscillatory objective, ranking 3rd out of the initial 4182 models. This presents an interesting problem whereby a model that has promising use as an oscillator also has a high potential to produce chaos, relative to other candidate models. Identifying the parameters and initial conditions important for differentiating between chaotic and oscillatory behaviour gives us insight into how to control this behaviour when constructing genetic circuits or selecting chemostat settings.
As a first step, we analyzed the model to quantify the possible steady states and basins of attraction. Our analysis gave analytical conditions for the existence and stability for complete extinction and for single strain survival (See Methods). For three-strain co-existence, we find the following necessary conditions:
This shows that for three-strain co-existence, the maximal growth rate of N2 has to lie between certain upper and lower bounds. In particular, it has to be smaller than the maximal growth rate of N1 or N3. We can see from the topology of m850 (Fig 4A) that the growth of N2 is not limited by any bacteriocin, therefore the only limitation on growth comes through resource competition. If N2 had a higher growth rate than N1 or N3, it would out compete these strains and cause an extinction event.
We then wanted to explore the most important parameters that separate oscillatory and chaotic behaviours in m850 only. We refer to a set of parameters and initial conditions as an input vector. Using ABC SMC, we performed parameter inference on m850 for the chaotic and oscillatory objectives, generating 3750 input vectors for each objective. We can use this dataset of labelled input vectors to understand the importance of individual parameters, initial conditions and nearby steady states.
Fig 4B shows multivariate parameter distributions for the oscillator and chaotic objectives for the experimentally accessible parameters. The dilution rate (D) is a directly controllable parameter of the chemostat. The production rate of A1 (kA1) can be tuned by using an inducible promoter to control expression of the AHL synthase species. Strain maximal growth rates (μmax1, μmax2, μmax3) can be controlled by using different base strains or through the combined use of auxotrophic strains and defined media. Finally, the initial population densities (N1, N2, N3) can easily be set when inoculating the initial culture. Divergence between two parameter distributions indicates its importance in differentiating between the two objectives. We can see that the oscillatory objective distributions for D, N1 and μmax2 are all constrained towards lower values relative to the prior. However, for all these distributions we can see that the chaotic and oscillatory regions overlap. This again implies that chaotic and oscillatory behaviour exist close to one another in parameter space, and highlights the multidimensional nature that determines the behaviour.
To further investigate the importance of parameters and initial conditions we trained a random forest classifier model using the input vectors as features [25]. We curated a label-balanced dataset of oscillating input vectors and chaotic input vectors. Using a train test ratio of 0.5, the trained classifier model was able to classify the test set with a ~90% accuracy (Methods). Fig 4C shows the average information gain across all decision tree classifiers in the forest for all free parameters. This can be used as an indicator of feature importance in correctly classifying an input vector. and
describe the concentration of A1 required to produce half-maximal repression of bacteriocins B1 and B2 respectively. While the feature importance indicates these parameters are the most important, they are more difficult to tune compared with other parameters in this system. The error bars indicate the variability in the importance of a feature across all trees in the forest. Large error bars suggest single features are not essential for classification, and that redundancy exists between the features used [26].
From the set of chaotic input vectors, we used numerical methods to identify nearby steady states that could be reached by changing the initial state of the system only. Fig 4D shows the sensitivity analysis of a chaotic input vector. The black stars indicate stable steady states identified by numerical analysis. We perturbed the initial species values of either N1, B1 or B2 individually. The plots show how changing these initial states yields different Lyapounv exponents, highlighting the chaotic region in red. The range of Lyapunov exponents shown in Fig 4D suggest that by changing the initial conditions only we are able to produce a range of different behaviours. Perturbing N2, N3 or A1 did not produce chaotic behaviour. It is interesting that the initial state of N1 as the A1 producing strain appears to be more important whereas the initial concentration of A1 itself is not.
A Topology of m850 with key parameters labelled. kA1 is the rate of QS molecule production, KBmax1 and KBmax2 are the maximal expression rates of bacteriocins B1 and B2 respectively. B Posterior parameter distributions of m850 for chaos (red) and oscillatory (blue) objectives for key parameters in system design. The borders show 1D posterior distributions for each parameter and the lower-diagonal element the 2D posterior marginals, and the upper-diagonal shows the Pearson correlations. C Feature importance calculated using random forest regression. The information gain (bits) is calculated as an average of the reduction in entropy across all trees in the forest (2000 trees). The error bars indicate the standard deviation of the entropy for each feature across all trees. D Sensitivity analysis of a chaotic input vector with chaotic region in red. Black stars refer to the identified stable steady state. The fixed parameter values are shown in Table 2
Exploring the parameters in the transition to chaos
Being able to move a system from a chaotic state to a fixed point could be important in a bioprocess control scenario so we explored this in more detail. Previous studies have frequently identified the bioreactor dilution rate as an important parameter for transitioning between different population dynamics [27–29]. The posterior parameter distribution shown in Fig 4B strongly indicated the dilution rate, D, to be important for defining chaotic behaviour. We previously identified the QS production rate, kA1 and D as important parameters for transitioning between co-existence and extinction states [16]. We hypothesised that the antagonistic effect of kA1 to D would make it a useful parameter for controlling population behaviour.
First, we took an input vector known to produce chaotic behaviour and randomly sampled new values for kA1 and D from the prior and calculated the Lyapunov exponent of the new input vector. Fig 5A shows the results where filled colour indicates the maximal Lyapunov exponent calculated at each grid reference. The grid outline indicates the classification, the red grid region of Fig 5A shows the chaotic region. Fig 5A illustrates that, changing D and kA1 affects the Lyapunov exponent. The bifurcation diagrams in Fig 5B and 5C for kA1 and D respectively, illustrate the antagonistic transitions in behaviour that occur when changing the two parameters. Fig 5A and 5B show transitions through one strain extinctions (Nx < 10−5), stable steady state, oscillations and chaotic behaviour. Fig 5A and 5B both show that increasing kA1 results in transitions from stable co-existence, through oscillations and then to chaos, followed abruptly by an extinction event. Fig 5A and 5C both show that a lower dilution rate is associated with chaos; increasing the dilution rate reduces instability to produce oscillations, which abruptly transitions to a stable extinction state.
The fixed parameter values are shown in Table 2. A Map showing how different combinations of kA1 and D change population behaviour. The grid fill colour corresponds to the maximum Lyapunov exponent measured, the grid outlines indicate the approximate classification where green is stable, yellow is oscillatory, red is chaotic and white is extinction. B Bifurcation diagram showing the community states visited for different values of kA1. C Bifurcation diagram showing the community states visited for different values of D. D Real-time ramp down tuning of kA1, moving the system from a chaotic state to a stable steady state. E Real-time ramp up tuning of D, moving the system from a chaotic state to a stable steady state.
In a bioreactor control scenario it is interesting to understand if a community could be switched between states in real time. Fig 5D and 5E show how this is possible by modifying kA1 and D respectively. The red arrows on Fig 5A indicate the position of the single start point and two end points in these real-time transitions. It is important to note that when ramping up the dilution rate in real-time, we reach stable steady state in a region that would not be obtainable with a fixed dilution rate.
Discussion
We have developed a novel methodology to explore parameter regions that give rise to chaotic dynamics. We have applied it to the exploration of chaotic dynamics in synthetic microbial communities and found a high prevalence of such dynamics in these systems. This work is the first to query the existence of chaotic behaviour in synthetic microbial communities. We show that we can expect to find chaotic states in relatively small synthetic microbial systems, which has important ramifications for the field.
By first running ABC SMC for the oscillatory objective we were able to drastically reduce the model space for the search for chaos. However, the timecourse simulation and parameter sampling makes this pipeline computationally costly. In the future we can consider using eigenvalue stability methods to reject particles without simulation, improving the efficiency of our approach and therefore improving the number of samples available for posterior estimation [30, 31].
We expect it will become increasingly important to consider the location of chaotic attractors in parameter space as the microbial communities we build or interact with become more complex. These methods can easily be applied to parametrise different models. It would be interesting to compare the existence of chaotic attractors in systems that use toxin-antitoxin systems [32], combinations of cooperative and competitive interactions [33], or mutualistic only interactions [34]. Genome scale metabolic models contain a large number of linear reactions [35]; they can be combined to describe microbial communities and used to model industrial bioprocesses [36, 37]. Given the high dimensional nature of metabolic networks, it would be interesting to investigate whether these models yield chaotic behaviour in small community networks.
Conclusion
To conclude, we have developed methods for identifying chaotic parameter regions using ABC SMC. We have demonstrated the application of this method to resolve a previously identified chaotic attractor in a gLV model, and identified models susceptible to chaos in three strain synthetic microbial communities. Although chaotic attractors are generally thought to be sparse in low dimensional systems, we have shown their existence in realistic synthetic microbial systems. They may also exist in close proximity to stable steady state regions. This work demonstrates that deterministic chaos will be an important factor in microbial community design and should be studied in much more detail.
Materials and methods
Three strain synthetic communities model space definition
Models are generated from a set of parts, that are expressed by different strains in the system. We represent an expression configuration through a set of options. We define the options for expression of A in each strain, where the options are: not expressed, expression of A1, or expression of A2 (0, 1 or 2 respectively). We define the options for expression of bacteriocin as: no expression, expression of B1, expression of B2 or expression of B3 (0, 1, 2 and 3 respectively). Lastly we define the mode of regulation, R, for each bacteriocin, which can be either induced or repressed (0 and 1). This is redundant if a bacteriocin is not expressed.
This enables us to build possible part combinations that can be expressed by a population. Let Pc be a family of sets, where each set is a unique combination of parts.
Each strain in a system can be sensitive to up to one bacteriocin. Let I represent the options for strain sensitivity. The options are: insensitive, sensitive to B1, sensitive to B2 or sensitive to B3 (0, 1, 2 and 3 respectively).
Each strain is defined by its sensitivities, and expression of parts. Let PE be all unique engineered strains:
Which can be combined to form a model, yielding unique combinations:
Finally, we use a series of rules to remove redundant models. A system is removed if:
- Two or more strains are identical, concerning bacteriocin sensitivity and combination of expressed parts.
- The QS regulating a bacteriocin is not present in the system.
- A strain is sensitive to a bacteriocin that does not exist in the system.
- A bacteriocin exists that no strain is sensitive to.
This cleanup yields the options which are used to generate ODE equations for a system.
System equations
State variables in each system are rescaled to improve speed of obtaining numerical approximations. NX describes the concentration of a strain, Bz describes the concentration of a bacteriocin and Ay describes the concentration of a quorum molecule. CN, CB and CA are scaling factors:
Each model is represented as sets where defines the number of strains,
defines the set of bacteriocins and
defines the set of QS systems. The following differential equations are used to represent each model.
Growth is modelled by Monod’s equation for growth limiting nutrient, S. defines the maximal growth rate of the strain and KX defines the concentration of substrate required for half-maximal growth.
Killing by bacteriocin is defined by , where ωmax defines the maximal killing rate which is set to 0 if the strain is insensitive. Kω defines the concentration at which half-maximal killing occurs.
Induction or repression of bacteriocin expression by QS, is defined by kB(z, y), where z defines the bacteriocin being expressed and y defines the quorum molecule regulating its expression. KBmax z is the maximal expression rate of the bacteriocin and is the concentration of quorum molecule at which bacteriocin is half-maximal. nz defines the cooperativity of the AHL binding.
Software packages and simulation settings
The ABC SMC model selection algorithm was written in python using Numpy [38], Pandas and Scipy [39]. ODE simulations were conducted in C++ with a Rosenbrock 4 stepper from the Boost library [40]. All simulations use an absolute error tolerance of 1e−9, and relative error tolerance of 1e−4. Simulations were conducted for 5000hrs, and were stopped early if the population of any strain fell below 1e−5 (extinction event). Simulations with an extinction event have distances set to maximum in order to prevent excessive time spent simulating collapsed populations.
Approximate Bayesian computation with sequential monte-carlo (ABC SMC)
Particles are first sampled from the prior distribution and simulated. A set of distances, d, are calculated from the simulation. If all distances are less than the intermediate threshold, ϵt, the particle is accepted (d < ϵt). Accepted particles are weighted using importance sampling. The next population is sampled from the previous, and a new threshold is generated that is closer to the final threshold, ϵF. This process is repeated until we reach a distance threshold of ϵF. ABC SMC is highly parallel, allowing us to take advantage of high performance computing resources [21].
Updating ϵt.
At the end of each population of ABC SMC, the distance threshold ϵt is updated to approach the final population, ϵF. The quantile parameter, α, is defined. The distances of the population are sorted in ascending order and the distance at quantile α is used as the threshold for the next population. If ϵt < ϵF, we set ϵt = ϵF, marking the next population as the final population.
Algorithm 1: Algorithm for model selection with ABC SMC
1: Initialisation
Set population indicator, t = 0
Set ϵt
Set final epsilon, ϵF
Set population size, N
Set population particle count, i
Set distance threshold quantile, α
2: Sample particle, consisting of a model (m) and parameters (θ):
If t = 0, sample θ**(m*) from prior distribution, π(m, θ)
If t > 0, sample θ*(m*) from previous distribution with weights w(m*)t−1
3: Perturb particle
If t > 0, perturb particle using perturbation kernel Kt, yielding perturbed particle θ**(m*)
4: Simulate particle
x* ∼ f(x|θ*, m*)
5: Calculate distance from objective
d = ρ(x*, x0)
6: Accept or reject particle
If d > ϵt, reject particle and go to 2
If d < ϵt, accept particle, add θ**, m* to population
7: Set accepted particle weight
Particle weight, w, is set to 1 for the initial population. For subsequent populations, the weight of a particle is equal to the probability of observing the particle given the prior, divided by the probability of observing the particle given the previous population.
i = i + 1
If i < N go ot 2
8: Population full
Normalise population particle weights
If ϵt == ϵF, return and wt, the approximation of the posterior distribution
Prepare next population
Set i = 0
Set t = t + 1
Update the distance threshold as a function of the distances in the population, d and the threshold quantile, α, ϵt = fe(α, d)
go to 2
Oscillatory population dynamic objective
We define the oscillatory population dynamic using three summary statistics for each strain. First, we use Fourier transform of the population signal to find the maximum frequency, f, and convert this to the period, T.
We set a minimum period of t/2 where t is the simulation time, giving us .
. Any simulations in which T < t/2,
is set to 0, this distance ensures that all we have frequencies of oscillations that are on a scale relevant to the time period being measured. It was found that using the signal frequency alone resulted in acceptance of many simulations with very small oscillations, or simulations that rapidly dampen. We therefore generated two additional distances that account for oscillation amplitudes to select for sustained oscillations only. We can define the number of expected peaks in the simulation, p.
Peaks in the trajectory are identified by changes from a positive gradient to a negative gradient, and troughs via changes from negative gradient to positive gradient. The peak-to-peak amplitudes are calculated by differences between consecutive peaks and troughs. AK is the number of amplitudes above the threshold, K = 0.05. is the difference between the number of expected oscillations in the simulation, and the count of above threshold oscillations. Because incomplete oscillations at the time the simulation ends can impact the distance measurement, we set a lenient final distance threshold for
compares the final amplitude AF in the simulation to the threshold. We set
if
.
Maximal Lyapunov exponent calculation
Lyapunov exponents can be used to measure chaotic behaviour; they describe the average exponential rate of divergence between two near trajectories of a dynamical system. The maximal Lyapunov exponent, λ1, can be used as determinant of chaotic behaviour. Using a method described by Sprott et al. [41], we evolve two nearby orbits and measure their average rate of separation. This directly investigates whether small changes to an initial state will produce a disproportionate separation. By periodically readjusting the distance of divergence after each time step we measure separation across a period of time, preventing a single event dominating subsequent states (Fig 6). The method is described in full by Algorithm 2. For all simulations we generate nearby orbits by perturbing one of the strain initial strain densities by △0 = 10−10. All simulations use a transient time equivalent to the first 10% of the time series.
Two orbits with an initial state separation of △0 are followed. After each time step measure the separation, △1, is measured. The perturbed orbit (red) is readjusted to prevent excess separation. The average rate of separation between the two orbits corresponds with the λ1.
Chaos population dynamic objective
is the only distance for the chaotic objective. If
, the particle is rejected. The final distance threshold, ϵC, is equivalent to all λ1 > 0.003.
For each sampled particle a prescreening process was performed to minimise time spent conducting the more computationally time consuming dual-orbit method. Simulations in which a strain fell below 10−5 were rejected. The number of oscillations with an amplitude greater than 0.05 was counted for each strain signal. If any strain showed less than 2 oscillations the particle was rejected. ABC SMC was conducted with population sizes of 10, repeated 255 times yielding a combined final population of 2550 particles.
Random forest classifier model
Using the sci-kit learn (sklearn) python package [42], a random forest classifier was trained using 2000 estimators. The data used consisted of 3750 oscillatory input vectors, and 3750 chaotic input vectors. Training and test datasets were generated with a ratio of 0.5 by random sampling. Fig 7 shows the performance of the classifier model on the test data.
Algorithm 2: Description of dual-orbit method, demonstrated with two-dimensional system
1 Set S = 0.0
2 Set parameters and initial state θi = (xi, yi) for orbit, f(θi)
3 Simulate f(θi) for transient time, tt, yielding state, θa0
4 Set initial state of nearby orbit, f(θb0), where, θb0 = θa0 + △0
5 Set t = 0
6 Advance and
by one step, dt, yielding states
and
respectively
7 Set t = t + dt
8 Calculate separation between the state variables of the two orbits,
9 S = S + log2(|△1/△0|)
10 Readjust to align directionally with
,
and
11 Set and
12 Repeat lines 6 to 11 for n iterations
13 Calculate maximal Lyapunov exponent as an average of the separation values, λ1 = S/n
Analysis of m850
m850 is described by the following equations
By setting the left hand side of (1) to 0 we find a number of steady states P = (N1, N2, N3, S, B1, B2, A1).
The trivial steady state.
P0 = (0, 0, 0, S0, 0, 0, 0). The Jacobian of the linearisation has eigenvalues
Consequently the trivial steady state always exists and is linearly stable for
This shows that if the dilution rate is high enough, no strain can survive.
One strain only steady states.
There are three steady states where only one strain survives, P1, P2, P3. While P2, and P3 can be calculated explicitly, P1 is given implicitly (see below).
We see that P2 exists provided
The linearisation at P2 has eigenvalues
This shows that P2 exists and is linearly stable if
The situation for P3 is very similar:
We see that P3 exists provided
The linearisation at P3 has eigenvalues
This shows that P3 exists and is linearly stable if
The steady state P1 = (N1, 0, 0, S, B1, 0, A1) is more complicated and can not be expressed explicitly. Instead it is given as follows: Assume there exists a solution S to the following equation
(2)
where
If such a solution S exists then B1 = B1(S), A1 = A1(S) and .
Lemma 1 There exists a unique steady state P1 if and only if
Proof: We need the solution to (2) to fulfil S < S0 in order for A1 to be positive. We interpret the right and left-hand-sides of (2) as a function of S, denoting them by R(S) and L(S) respectively. It is easy to see that A1(S) is a decreasing function of S, B1(S) increases as a function of A1 and R(S) is an increasing function of B1. Consequently the R(S) is a decreasing function of S. We also see that R(0) = ωmax > 0 and R(S0) = 0. Further L(0) = −D and and L(S) increases as a function of S. This proves the statement.
To summarise, the single-strain survival steady state requires the corresponding maximal growth rate to be large compared to other parameters.
The three-strain co-existence steady state.
P123 = (N1, N2, N3, S, B1, B2, A1).
From the equation for N2 we obtain that
Stability. Solved numerically using MATLAB. For each of the 3750 chaotic input vectors we used numerical root finding to calculate P123, and determined its stability by numerically determining the eigenvalues of the Jacobian. We found P123 existed for all 3750 input vectors and was stable for 7.8% of them.
Constant parameters have the same min and max value.
Supporting information
S1 Fig. Posterior distribution of chaotic objective for gLV model.
Posterior distribution of of all parameters.
https://doi.org/10.1371/journal.pcbi.1010548.s001
(TIF)
References
- 1.
Strogatz SH. Nonlinear Dynamics and Chaos. In: Nonlinear Dynamics and Chaos; 2018.
- 2. Lorenz EN. Deterministic Nonperiodic Flow. Journal of the Atmospheric Sciences. 1963;20(2).
- 3. Ispolatov I, Madhok V, Allende S, Doebeli M. Chaos in High-Dimensional Dissipative Dynamical Systems. Scientific Reports. 2015;5. pmid:26224119
- 4. Albers DJ, Sprott JC, Crutchfield JP. Persistent Chaos in High Dimensions. Physical Review E—Statistical, Nonlinear, and Soft Matter Physics. 2006;74(5). pmid:17280024
- 5. Dechert WD, Sprott JC, Albers DJ. On the Probability of Chaos in Large Dynamical Systems: A Monte Carlo Study. Journal of Economic Dynamics and Control. 1999;23(8).
- 6. Jawed K, Yazdani SS, Koffas MA. Advances in the Development and Application of Microbial Consortia for Metabolic Engineering. Metabolic engineering communications. 2019;9:e00095. pmid:31720211
- 7. Tsoi R, Dai Z, You L. Emerging Strategies for Engineering Microbial Communities. Biotechnology advances. 2019;37(6):107372. pmid:30880142
- 8. Becks L, Hilker FM, Malchow H, Jürgens K, Arndt H. Experimental Demonstration of Chaos in a Microbial Food Web. Nature. 2005;435(7046):1226–1229. pmid:15988524
- 9. Benincà E, Huisman J, Heerkloss R, Jöhnk KD, Branco P, Van Nes EH, et al. Chaos in a Long-Term Experiment with a Plankton Community. Nature. 2008;451(7180):822–825. pmid:18273017
- 10. Hsu RH, Clark RL, Tan JW, Ahn JC, Gupta S, Romero PA, et al. Microbial Interaction Network Inference in Microfluidic Droplets. Cell Systems. 2019;9(3):229–242.e4. pmid:31494089
- 11. Vano JA, Wildenberg JC, Anderson MB, Noel JK, Sprott JC. Chaos in Low-Dimensional Lotka-Volterra Models of Competition. Nonlinearity. 2006;19(10):2391–2404.
- 12. Momeni B, Xie L, Shou W. Lotka-Volterra Pairwise Modeling Fails to Capture Diverse Pairwise Microbial Interactions. eLife. 2017;6. pmid:28350295
- 13. Fan G, Wolkowicz GSK. Chaotic Dynamics in a Simple Predator-Prey Model with Discrete Delay. Discrete and Continuous Dynamical Systems—Series B. 2021;26(1).
- 14. Zhao H, Sun Y, Wang Z. Control of Hopf Bifurcation and Chaos in a Delayed Lotka-Volterra Predator-Prey System with Time-Delayed Feedbacks. Abstract and Applied Analysis. 2014;2014.
- 15. Gilpin ME. Spiral Chaos in a Predator-Prey Model. The American Naturalist. 1979;113(2):306–308.
- 16. Fedorec AJH, Karkaria BD, Sulu M, Barnes CP. Single Strain Control of Microbial Consortia. Nature Communications. 2021;12(1):1–12. pmid:33785746
- 17. Karkaria BD, Fedorec AJH, Barnes CP. Automated Design of Synthetic Microbial Communities. Nature Communications. 2021;12(1):1–12. pmid:33510148
- 18. Silk D, Kirk PDW, Barnes CP, Toni T, Rose A, Moon S, et al. Designing Attractive Models via Automated Identification of Chaotic and Oscillatory Dynamical Regimes. Nature Communications. 2011;2(1). pmid:21971504
- 19. Roques L, Chekroun MD. Probing Chaos and Biodiversity in a Simple Competition Model. Ecological Complexity. 2011;8(1).
- 20. Liu YY, Barabási AL. Control Principles of Complex Systems. Reviews of Modern Physics. 2016;88(3).
- 21. Toni T, Welch D, Strelkowa N, Ipsen A, Stumpf MP. Approximate Bayesian Computation Scheme for Parameter Inference and Model Selection in Dynamical Systems. Journal of the Royal Society Interface. 2009;6(31):187–202. pmid:19205079
- 22. Barnes CP, Silk D, Sheng X, Stumpf MPH. Bayesian Design of Synthetic Biological Systems. Proceedings of the National Academy of Sciences. 2011;108(37):15190–15195. pmid:21876136
- 23. Thébault E, Fontaine C. Stability of Ecological Communities and the Architecture of Mutualistic and Trophic Networks. Science (New York, NY). 2010;329(5993):853–856. pmid:20705861
- 24. Coyte KZ, Schluter J, Foster KR. The Ecology of the Microbiome: Networks, Competition, and Stability. Science (New York, NY). 2015;350 (6261). pmid:26542567
- 25. Breiman L. Random Forests. Machine Learning. 2001;45(1):5–32.
- 26. Genuer R, Poggi JM, Tuleau-Malot C. Variable Selection Using Random Forests. Pattern Recognition Letters. 2010;31(14):2225–2236.
- 27. Balagaddé FK, Song H, Ozaki J, Collins CH, Barnet M, Arnold FH, et al. A Synthetic Escherichia Coli Predator-Prey Ecosystem. Molecular systems biology. 2008;4(187):187. pmid:18414488
- 28. Yurtsev EA, Conwill A, Gore J. Oscillatory Dynamics in a Bacterial Cross-Protection Mutualism. Proceedings of the National Academy of Sciences of the United States of America. 2016;113(22):6236–41. pmid:27194723
- 29. Weiße AY, Oyarzún DA, Danos V, Swain PS. Mechanistic Links between Cellular Trade-Offs, Gene Expression, and Growth. Proceedings of the National Academy of Sciences. 2015;112(9):E1038–E1047. pmid:25695966
- 30. Kirk P, Rolando DMY, MacLean AL, Stumpf MPH. Conditional Random Matrix Ensembles and the Stability of Dynamical Systems. New Journal of Physics. 2015;17(8):083025.
- 31. Allesina S, Tang S. Stability Criteria for Complex Ecosystems. Nature. 2012;483(7388):205–208.
- 32. Liao MJ, Din MO, Tsimring L, Hasty J. Rock-Paper-Scissors: Engineered Population Dynamics Increase Genetic Stability. Science (New York, NY). 2019;365(6457):1045–1049.
- 33. Kong W, Meldgin DR, Collins JJ, Lu T. Designing Microbial Consortia with Defined Social Interactions. Nature Chemical Biology. 2018;14(8):821–829. pmid:29942078
- 34. Ziesack M, Gibson T, Oliver JKW, Shumaker AM, Hsu BB, Riglar DT, et al. Engineered Interspecies Amino Acid Cross-Feeding Increases Population Evenness in a Synthetic Bacterial Consortium. mSystems. 2019;4(4):e00352–19. pmid:31409662
- 35. Hädicke O, Klamt S. EColiCore2: A Reference Network Model of the Central Metabolism of Escherichia Coli and Relationships to Its Genome-Scale Parent Model. Scientific Reports. 2017;7(1):1–15.
- 36. Ye C, Zou W, Xu N, Liu L. Metabolic Model Reconstruction and Analysis of an Artificial Microbial Ecosystem for Vitamin C Production. Journal of Biotechnology. 2014;182–183(1).
- 37. Ang KS, Lakshmanan M, Lee NR, Lee DY. Metabolic Modeling of Microbial Community Interactions for Health, Environmental and Biotechnological Applications. Current Genomics. 2018;19(8). pmid:30532650
- 38. Harris CR, Millman KJ, van der Walt SJ, Gommers R, Virtanen P, Cournapeau D, et al. Array Programming with NumPy. Nature. 2020;585 (7825).
- 39. Virtanen P, Gommers R, Oliphant TE, Haberland M, Reddy T, Cournapeau D, et al. SciPy 1.0: Fundamental Algorithms for Scientific Computing in Python. Nature Methods. 2020;17(3).
- 40.
Siek JG, Lee LQ, Lumsdaine A. The Boost Graph Library. In: Proceedings of The. vol. 243; 2002.
- 41.
Sprott JC. Chaos and Time-Series Analysis; 2003.
- 42. Pedregosa F, Varoquaux G, Gramfort A, Michel V, Thirion B, Grisel O, et al. Scikit-Learn: Machine Learning in Python. Journal of Machine Learning Research. 2011;12.
- 43. Kylilis N, Tuza ZA, Stan GB, Polizzi KM. Tools for Engineering Coordinated System Behaviour in Synthetic Microbial Consortia. Nature Communications. 2018;9(1). pmid:29992956
- 44. Senn H, Lendenmann U, Snozzi M, Hamer G, Egli T. The Growth of Escherichia Coli in Glucose-Limited Chemostat Cultures: A Re-Examination of the Kinetics. BBA—General Subjects. 1994. pmid:7803473
- 45. Destoumieux-Garzón D, Duquesne S, Peduzzi J, Goulard C, Desmadril M, Letellier L, et al. The Iron-Siderophore Transporter FhuA Is the Receptor for the Antimicrobial Peptide Microcin J25: Role of the Microcin Val11-Pro16 β-Hairpin Region in the Recognition Mechanism. Biochemical Journal. 2005. pmid:15862112
- 46. Kaur K, Tarassova O, Dangeti RV, Azmi S, Wishart D, McMullen L, et al. Characterization of a Highly Potent Antimicrobial Peptide Microcin N from Uropathogenic Escherichia Coli. FEMS Microbiology Letters. 2016;363(11):1–6. pmid:27190283
- 47. Andersen KB, Von Meyenburg K. Are Growth Rates of Escherichia Coli in Batch Cultures Limited by Respiration? Journal of Bacteriology. 1980. pmid:6998942
- 48. Marenda M, Zanardo M, Trovato A, Seno F, Squartini A. Modeling Quorum Sensing Trade-Offs between Bacterial Cell Density and System Extension from Open Boundaries. Scientific Reports. 2016. pmid:27966657
- 49. Weiße AY, Oyarzún DA, Danos V, Swain PS. Mechanistic Links between Cellular Trade-Offs, Gene Expression, and Growth. Proceedings of the National Academy of Sciences of the United States of America. 2015;112(9):E1038–1047. pmid:25695966
- 50. Marisch K, Bayer K, Scharl T, Mairhofer J, Krempl PM, Hummel K, et al. A Comparative Analysis of Industrial Escherichia Coli K-12 and b Strains in High-Glucose Batch Cultivations on Process-, Transcriptome- and Proteome Level. PLoS ONE. 2013. pmid:23950949
- 51. Treloar NJ, Fedorec AJH, Ingalls B, Barnes CP. Deep Reinforcement Learning for the Control of Microbial Co-Cultures in Bioreactors. PLOS Computational Biology. 2020;16(4):e1007783. pmid:32275710
- 52. Destoumieux-Garzón D, Thomas X, Santamaria M, Goulard C, Barthélémy M, Boscher B, et al. Microcin E492 Antibacterial Activity: Evidence for a TonB-dependent Inner Membrane Permeabilization on Escherichia Coli. Molecular Microbiology. 2003. pmid:12890026