Skip to main content

Thank you for visiting You are using a browser version with limited support for CSS. To obtain the best experience, we recommend you use a more up to date browser (or turn off compatibility mode in Internet Explorer). In the meantime, to ensure continued support, we are displaying the site without styles and JavaScript.

Automated design of synthetic microbial communities


Microbial species rarely exist in isolation. In naturally occurring microbial systems there is strong evidence for a positive relationship between species diversity and productivity of communities. The pervasiveness of these communities in nature highlights possible advantages for genetically engineered strains to exist in cocultures as well. Building synthetic microbial communities allows us to create distributed systems that mitigate issues often found in engineering a monoculture, especially as functional complexity increases. Here, we demonstrate a methodology for designing robust synthetic communities that include competition for nutrients, and use quorum sensing to control amensal bacteriocin interactions in a chemostat environment. We computationally explore all two- and three- strain systems, using Bayesian methods to perform model selection, and identify the most robust candidates for producing stable steady state communities. Our findings highlight important interaction motifs that provide stability, and identify requirements for selecting genetic parts and further tuning the community composition.


Traditionally, in biotechnology and synthetic biology, a microbe is engineered and grown as a monoculture to perform a particular function. Novel functionality is imparted by introducing heterologous genetic processes that would not normally be found in the organism. Non-orthogonal interactions between the introduced heterologous processes can cause the engineered function to behave in an unintended manner1,2,3, while the increased metabolic burden imposed can significantly slow growth rates and encourage selection of mutants4. Limited cellular resource availability and unforseen interactions can cause the host organism and the introduced circuits to behave differently when expressed alongside one another5,6,7. Using microbial communities would enable us to allocate functional components between subpopulations of cells, creating physical barriers that insulate processes from one another and distribute the burden of heterologous expression between members of the community7. This allows us to scale complexity in a manner that could not be achieved under the limitations of a monoculture. In natural environments, we observe mixed-species microbial communities that exhibit competitive advantages over monocultures in productivity, resource efficiency, metabolic complexity and resistance to invasion8,9. Being able to predictably and reproducibly construct microbial communities for synthetic biology or biotechnology applications would allow us to harness these advantages.

The maintenance and control of microbial communities comes with its own challenges. Competitive exclusion occurs when multiple populations compete for a single limiting resource (in the absence of other interactions); a single population with the highest fitness will drive the others to extinction10. Evidence from microbial ecology has shown us that stability can arise through feedback between subpopulations. Cooperative and competitive interactions are both important for integrating feedback that can stabilise communities by manipulating growth or fitness of the subpopulations11,12,13,14,15,16. Synthetic microbial communities have been built using quorum sensing (QS) systems to regulate processes that manipulate the growth rate or fitness of a population. Fitness can be manipulated by the expression of lysis proteins, metabolic enzymes, toxins and anti-microbial peptides (AMPs)14,17,18,19,20,21,22,23. Here, we focus on the use of bacteriocins to manipulate subpopulation fitness. Bacteriocins are gene-encoded AMPs that can be used to directly suppress the growth rate of a sensitive population24. They are exported into the extracellular environment, and generally use “Trojan horse” strategies to enter and kill sensitive strains. Expression of immunity genes provides protection against the bacteriocin, and can be expressed separately or in conjunction with the bacteriocin25. A single expressed bacteriocin can impact the growth of multiple other strains in the system, as opposed to intracellular toxins which require all strains to be engineered. Bacteriocins also offer variable spectrums of sensitivity, enabling broad or narrow targeting of microbial species24. Previously, we have demonstrated the use of bacteriocin MccV to improve plasmid maintenance in a population26 and for building stable cocultures that overcome competitive exclusion66. Other bacteriocins, such as nisin, have also been used to produce stable communities23.

Predicting how a system will behave before implementation is essential for the efficient use of lab resources and fully understanding the interactions that occur27. System design by intuition alone becomes increasingly challenging when dealing with multi-level interactions. We can use model selection to compare a set of candidate models and identify the most promising designs28. We have previously performed model selection and parameterisation using Approximate Bayesian computation with sequential Monte Carlo sampling (ABC SMC)29 to design robust genetic oscillators30 and multistable genetic switches31. Similar approaches have been used to compare the ability of genetic parts to produce logic gate behaviours32 and to design regulatory networks from databases of characterised parts33,34. Automated circuit design has the potential to greatly improve the engineering process in synthetic biology.

Here, we build upon computational circuit design in synthetic biology, presenting automated synthetic community design. Our workflow automatically generates candidate systems from a set of parts which can be used to engineer a community. We use ABC SMC to perform model selection, identifying candidate systems that have the highest probability of producing stable communities in a chemostat bioreactor. Using these methods we reveal the optimal designs for two-strain and three-strain systems. This workflow also allows us to derive fundamental design principles for building stable communities and reveals critical parameters to control the community composition.


Automated synthetic microbial Community Designer (AutoCD) workflow

Figure 1 illustrates AutoCD, the workflow developed and applied in this study. First, we set the available parts which can be used to build a stabilising system in a chemostat environment. This consists of the number of strains (N), bacteriocins (B), and QS systems (A). Any QS system can regulate the expression of any bacteriocin in the system by induction or repression. Strains in all models are dependent upon a single nutrient resource (S), which is consumed by strains and replenished through dilution of the chemostat with fresh media. Importantly, all models therefore include nutrient-based competition between subpopulations. Uniform distributions are used to encode our prior knowledge of biochemical rate parameters informed by literature, describing each part and their interactions with one another (Table 1). The priors used are broad to allow the full range of possible part characteristics; in scenarios where the parts have already been selected and characterised, the prior parameters can be constrained. The available parts and prior parameter distributions serve as inputs to the model space generator, which conducts a series of combinatorial steps to produce all possible genetic circuits. The model space generator then builds unique combinations of strains expressing different genetic circuits, where each combination is a candidate model. Filtering steps remove unviable, redundant and mirror systems, yielding a set of unique candidates to be assessed. The model space generator produces an ordinary differential equation (ODE) model for each system in the context of the chemostat environment, and these models form our prior model space (for details, see the “Methods“ section).

Fig. 1: Overview of AutoCD pipeline.

Model selection workflow begins with definition of available parts and prior parameter distributions used to generate system models from all the possible interactions. We use ABC SMC to perform model selection for the desired population behaviour. The outputs of ABC SMC provide us with community designs, insight into underlying motifs, parameter requirements and information on composition tunability.

Table 1 Prior distributions for both two and three strain systems. Constant parameters have the same min and max value. \({K}_{{A}_{y}{B}_{z}}\), Kω, \({K}_{{A}_{y}}\) and \({KB}_{\mathrm{max}}z\) are sampled from log uniform distributions. The remaining parameters are sampled from uniform distributions.

The final input is a mathematical description of the objective population behaviour, a stable steady state. We use three distance functions (d1, d2, d3) to describe how far away a simulation is from the objective stable steady state (Eq. (1)). d1 is the final gradient of a strain population (Nx), capturing the most fundamental characteristic of stable steady state, where the population level of a strain is unchanging. d2 is the standard deviation of a population, quantifying unstable behaviours such as oscillations, favouring simulations that reach stable steady state quickly. d3 is the reciprocal of the strain population at the end of the simulation, allowing us to define a minimum population density. Given the three distances, ϵF defines thresholds below which a simulation meets the requirements of our stable steady state objective. The distances of all strain populations in a simulation must be below these thresholds to satisfy the objective behaviour. \({\epsilon }_{{F}_{1}}\) was chosen to match the error tolerance of the ODE solver and \({\epsilon }_{{F}_{2}}\) threshold was chosen through qualitative assessment of simulation data to define a practical threshold for what stable steady state simulations should look like. \({\epsilon }_{{F}_{3}}\) is set to ensure all populations have a minimum final OD of 0.001, chosen for what could be realistically measured using flow cytometry. The posterior distribution is made up of simulations where the distances for each strain population are less than the ϵF thresholds (Eq. (2)).

ABC SMC performs model selection on the model space for the objective defined by these distance functions and ϵF. A particle is a sampled model and associated parameters. ABC SMC initially samples particles from the prior distributions with an unbounded distance threshold. Particles are propagated through intermediate distributions, gradually reducing the distance thresholds until they equal ϵF (see the “Methods” section). ABC SMC provides an estimation of model and parameter space posterior probabilities for the given prior distributions and the objective behaviour. We can use the outputs of ABC SMC to help us design synthetic communities and chemostat settings in the lab.

Distance functions:

$${d}_{1}({N}_{x}) =| {{\Delta }}{N}_{x}(t-1)| \\ {d}_{2}({N}_{x}) =\sigma ({N}_{x})\\ {d}_{3}({N}_{x}) =\frac{1}{{N}_{x}(t-1)}$$

Distance thresholds:

$${\epsilon }_{F} = \{1{{\mathrm{{e}}}}^{-9},0.001,1000\}\\ \quad{\,\,}{d}_{1}\, <\, {\epsilon }_{{F}_{1}}\\ \quad{\,\,}{d}_{2}\, <\, {\epsilon }_{{F}_{2}}\\ \quad{\,\,}{d}_{3}\, <\, {\epsilon }_{{F}_{3}}$$

Designing two-strain cocultures that achieve steady state

Here we apply AutoCD to the design of a stable steady state coculture containing two strains. In Fig. 2 we define a model space consisting of two strains (N1, N2), two bacteriocins (B1, B2) and two QS systems (A1, A2). We set model space limits to enable feasible experimental implementation, allowing expression of up to one QS per strain and expression of up to one bacteriocin per strain. Each strain can be sensitive to up to one bacteriocin. Given these conditions, the model space generator yields 69 unique two-strain models (m0,m1...m68). These 69 models serve as a uniform prior model space upon which we perform model selection using ABC SMC (see Supplementary Fig. 4 for visualisation of each candidate model). From the available genetic parts, there are 17 possible interaction options that could exist between state variables in each candidate model. We perform hierarchical clustering on the interactions present in each model, grouping models based on the similarity of their interactions. This clustering is visualised as a dendrogram in Fig. 2a. ABC SMC approximates the posterior probability of each model for the stable steady state objective, indicating how effective the candidate system is in producing a stable steady state. m62 has the highest posterior probability, and is therefore the system which most robustly produces stable steady state (Fig. 2a). m62 consists of two strains exhibiting a cross-protection mutualism relationship35. Each strain expresses an orthogonal QS molecule that represses the expression of a self-limiting (SL) bacteriocin in the opposing strain (Fig. 2b). In the absence of the opposing strain, the SL bacteriocin is expressed freely. This creates an interdependence between the two strains where the extinction of one strain would result in the extinction of the other. This closed feedback loop is a feature of the topology of m62, overcoming the competitive exclusion principle.

Fig. 2: Output of AutoCD for the two-strain stable steady state objective.

a Dendrogram generated by hierarchical clustering of the adjacency matrices for each model in the two-strain model space. All possible interactions are shown in the network illustration. Each column of the heatmap represents a possible interaction between state variables, where green indicates the interaction exists for the model and black indicates absence of the interaction. The bar chart shows the mean posterior probability of each model. The scatter points indicate the posterior probability of each replicate and the error bars indicate the standard deviation. n = 3, where each replicate consists of 180,000 accepted particles. b Shows the mean posterior probability of three models with the highest posterior probability when subsetted for number of parts expressed in order of increasing complexity (2, 3 and 4 parts). The scatter points indicate the posterior probability of each replicate and the error bars indicate the standard deviation. n = 3, where each replicate consists of 180,000 accepted particles. Bayes factors (BF) are shown for pairwise comparison of the three models. Model schematics show the interactions between strains (blue and green), bacteriocin (red) and QS molecules (purple). c Posterior parameter distributions of several tunable parameters in m66 and m62. The top and left plots show 1D density distributions of each parameter, central distributions are 2D density distributions for each pair of parameters. Pearson correlation coefficients are shown on the top side of the diagonal for each parameter pair.

When designing new systems, minimising the number of genetic parts will reduce the number of experimental variables, improving the ease of construction and optimisation of a system. We subset the model space by the number of expressed parts in the system (maximum two QS and two bacteriocin), yielding subsets containing candidate models with two, three and four expressed parts (low complexity to high complexity). We identify the candidates with the highest posterior probability in each subset (Fig. 2b). The posterior probability increases despite the larger parameter spaces, which is important because ABC SMC will naturally favour models which yield stable steady state with the smallest possible number of parameters (Occam’s razor)36. We see that all three models have SL motifs, where a strain is sensitive to the bacteriocin it produces. All three models are devoid of other-limiting (OL) motifs, where a strain is sensitive to a bacteriocin produced by another strain.

The Bayes factor (BF) is a ratio between the marginal likelihoods of two models, giving a quantification of support for one model compared with another. BF > 3.0 indicates evidence of a notable difference between the two models, while BF < 3.0 suggests insubstantial evidence37 (Table 2). The BF of m66 compared with m48 suggests substantial improvement in the posterior probability can be made by increasing complexity. However, the BF of m48 compared with m62 suggests insubstantial evidence behind this improvement in posterior probability (Fig. 2b). These diminishing returns when increasing system complexity hold important ramifications for system design. The introduction of an additional QS part to move from m48 to m62 may not be worthwhile for the minor improvement in steady state robustness.

Table 2 Bayes factor categorisation to describe evidence in favour of m1, compared with m2.

Model selection has identified the best performing designs for producing stable communities. However, the parts used in the design may require specific characteristics or chemostat settings. ABC SMC also produces posterior parameter distributions for each model, giving us information about the parameter values necessary to yield stable steady state. Figure 2c shows the posterior distributions of several tunable parameters in m66 and m62. The dilution rate of the chemostat (D) is a directly tunable parameter and the maximal expression rate of the bacteriocin (\(K{B}_{\max }\)) can be tuned through choice of promoter and ribosome-binding site38. The growth rates (\({\mu }_{\max }\)) can be tuned through choice of base strains or auxotrophic dependencies39,40.

For m66, the correlation coefficients between strain maximal growth rates (μmax1 and μmax2) shows the parameters are loosely correlated. Additionally, we see that N1 requires a higher maximal growth rate (μmax1) than that of N2 (μmax2). The faster maximal growth rate of N1 is necessary to counteract self-limitation that is negatively regulated by the population of N2. Conversely, m62 shows a wider distribution of strain growth rates at stable steady states and a low correlation coefficient. This indicates that this topology does not heavily depend on specific growth rates or related growth rates between the two strains in order to produce a stable steady state. \(K{B}_{\max }\) for all bacteriocins is tightly constrained to high maximal bacteriocin expression rates. The distributions of D in both systems show a lower dilution rate is important for stable steady state. The steady state compositions for m66 frequently contain N1 in high proportion compared with N2, whereas m62 will commonly yield compositions with more even representation of N1 and N2 at steady state (Supplementary Fig. 2).

Self-limiting motifs stabilise two strain systems

The dendrogram of Fig. 2a highlights a cluster of high performing models that are closely related. This suggests underlying interactions of the model space exist that are important for producing communities with stable steady state.

Non-negative matrix factorisation (NMF) is an unsupervised machine learning method we can use to reduce the dimensionality of the interaction space41. We can use NMF to help us understand the underlying motifs and how they affect community stability. We represent each model by the interactions present in the system (Fig. 2a). NMF takes these interactions and learns a number of clusters (K), models can be rebuilt by a weighted sum of these clusters. In our case, these clusters can be represented as interaction motifs. We set K = 4, in order to give us a digestible summary of the model space. Figure 3a shows the learned motifs that can be used to represent the entire model space. Figure 3b shows the component weights for each model, defining the membership each model has for each motif. The models are shown in descending order of posterior probability, we can see that K1 is heavily weighted in the top performing models. The motif K1 refers to SL only interactions where the strain is sensitive to the bacteriocin it produces (Fig. 3a, b). The top models are consistently assigned low weights for K4 (Fig. 3a, b), a motif which refers to OL only interactions, where the strain is sensitive to a bacteriocin produced by the other strain (Fig. 3a).

Fig. 3: Contribution of network motifs to stability.

a, b Non-negative matrix factorisation (NMF) analysis to learn motifs in model space using four components (K = 4). a Four components learned by NMF, the line opacity indicates the coefficient of the interaction. b Visualisation of the component weights for each model. Each column is a model, with light colours corresponding to high weight and dark colours low weight. ce Manually curated minimal motifs capture interaction importance. c Minimal motifs split into self-limiting (SL) and other-limiting (OL) by the direction of bacteriocin killing. d Illustration of the algorithm used to generate each datapoint in e. Moving from a model to the nearest neighbours that can be built by adding a motif will produce a change in model posterior probability. e Boxplots and scatter plot showing the change in posterior probability when adding each motif to a model. The boxplots show the median, first and third quartile. The lower and upper whiskers mark the 5th and 95th percentiles, respectively. n = 224 for each motif.

We use the indications produced by NMF to curate our own discrete motifs, improving the ease of interpretation. K1 and K4 show us the direction of bacteriocin sensitivity is an important feature and we proceed to investigate this further. All models can be built by combining eight fundamental motifs which can be categorised as either SL or OL, based on the direction of bacteriocin sensitivity (Fig. 3c). Within each category, motifs are differentiated by the mode of bacteriocin regulation (Fig. 3c). For example, m66 = SL2, m48 = SL4 + SL2 and m62 = SL2 + SL2. In order to assess the importance of each motif for producing stable communities we perform a motif impact analysis. For each model we identify the nearest neighbours in the model space that can be built by adding each motif and calculate the change in posterior probability for each neighbour (Fig. 3d). By repeating this across the entire model space, we are able to quantify whether a motif is stabilising or destabilising (Fig. 3e). The lower quartiles of SL motifs all show lower negative change magnitudes compared with the lower quartiles of OL motifs. The upper quartiles of SL motifs show a higher positive change magnitude than that of OL motifs. Together these show the addition of SL motifs more often result in an improved posterior probability, whereas addition of OL motifs more often result in decreased posterior probability. The upper quartile of SL2 shows the motif has the most stabilising effect, closely followed by SL4. We see these findings are reflected by top models identified in Fig. 2b, where all models are constructed with SL2 and SL4 motifs.

The total output of bacteriocin by a population is a function of the population’s density. All SL motifs therefore possess a fundamental negative feedback relationship between growth rate and density, augmented by the mode of QS regulation. Conversely, the population density and growth rate of a strain in OL motifs are decoupled. This lack of feedback is a clear explanation as to why we see SL motifs as positive contributors to stability while OL motifs have a destabilising effect. By comparing the posterior probabilities of m62 and Supplementary Fig. 4, we show that while self-limitation interactions are important for viability, interdependence between the strains is necessary to produce the most robust design (Supplementary Fig. 3).

Designing three strain communities that achieve steady state

While several studies have demonstrated the ability to establish synthetic two-strain systems19,22,42,43,44,45,46,47,48,49,50,51, efforts with three strains are sparser23,52,53. Having demonstrated the automated design of two-strain systems, we next tackle the far larger challenge of designing stable three-strain communities. The addition of a single strain significantly increases the parameter space, engineering options and possible interactions. We define our available parts consisting of three strains (N1, N2, N3), three bacteriocins (B1, B2, B3) and two orthogonal QS systems (A1, A2). We maintain the same strain engineering restrictions, allowing up to one QS expression and up to one bacteriocin expression per strain. Each strain can be sensitive to up to one bacteriocin. Given the available parts and engineering limits, the model space generator yields 4182 unique models (see Supplementary Fig. 5 for visualisation of each candidate model). Due to the much greater number of models, we group models based upon the interactions in each model by hierarchical clustering for up to five levels. The average posterior probabilities of each cluster are shown (Fig. 4a). 3289 models have a posterior probability of zero, highlighting how much more difficult this design scenario is. ABC SMC identifies m4119 as the system with the highest posterior probability for producing stable steady state. m4119 consists of two QS molecules; A1 is produced by N2, A2 is produced by N3 (Fig. 4b). The QS molecules repress the expression of SL bacteriocins produced by each population. Using the minimal motifs defined in Fig. 3c, m4119 can be summarised as m4119 = 3 × SL2. We group the model space on the counts of heterologous expression in the system, yielding subsets containing candidate models with three, four, five and six expressed parts (Fig. 4b). Models with two heterologously expressed parts all had a posterior probability of 0.0 and are not shown. Again, we see a diminishing increase in posterior probability that comes with increasing complexity. m3938 is the more complicated neighbour of m4119, where N1 is also contributing with production of A1, resulting in a fall in the posterior probability. The increase in posterior probability that occurs when moving from m4125 to m4119 has BF < 3.0, indicating the difference between the posterior probability of the two models is not substantial. These system comparisons highlight the trade-off between increasing complexity and improving system performance. In a similar fashion to the two-strain model space, the top performing models are dominated by SL only interactions (Supplementary Fig. 1).

Fig. 4: Output of AutoCD for three-strain stable steady state objective.

a Dendrogram is generated by hierarchical clustering of the adjacency matrices for each model in the three-strain model space. We set the limit of number of levels to 5, in order to show high level groups. Each column of the heatmap represents a possible interaction between state variables, where green indicates the interaction exists for the model and black indicates absence of the interaction. The posterior probability plot shows the average posterior probability within each group of models. b Shows the models with highest posterior probability when subsetted for number of parts expressed, in order of increasing complexity (3, 4, 5 and 6 expressed parts). The bar chart shows the mean model posterior probability across three experiments, represented by the scatter points, the error bars indicate the standard deviation. n = 3, where each replicate consists of 825,000 accepted particles. Bayes factors (BF) are shown for pairwise comparison of the three models and error bars show the standard deviation between three repeat experiments. Model schematics show the interactions between strains (blue, green and red), bacteriocin (red) and QS molecules (purple). Models with two parts showed posterior probability 0.0 and are not shown.

Multiple engineered bacteriocins are more important than multiple orthogonal QS systems

Our results have identified top performing models in the two-strain and three-strain model spaces. We have also highlighted the diminishing returns that occur with increasing model complexity in top performing models. Next we aim to summarise the importance of different parts and their contribution to the stable steady state objective behaviour, further enabling us to triage genetic parts for construction in the lab.

Figure 5 shows a summary of the parts used to construct three-strain systems and the average posterior probabilities they yield. This gives us important information to form heuristic rules in the design of three-strain systems. Figure 5a shows a very similar posterior probability when comparing two QS systems rather than one. Figure 5b demonstrates the substantial advantage of repressive QS regulation of bacteriocin production over inducible systems. Figure 5c shows very strong evidence in favour of using three bacteriocins to produce stable steady state in three-strain systems. These three statistics suggest that on average there is little advantage to be gained in the use of two QS systems, and priority should be given to the use of a single repressive QS to regulate three bacteriocin systems, such as we see in m4125.

Fig. 5: Average posterior probabilities associated with the number of genetic parts.

a Comparing systems with one and two orthogonal QS parts. b Comparing modes of bacteriocin regulation in the system by subsetting for systems with induction (+ve), repression (−ve) or both (+ve, −ve). c Comparing systems with one, two and three bacteriocin.

Defining stable steady state population ratios in three-strain systems

Natural microbial communities are observed to contain species in abundances differing over orders of magnitude54,55. Together the individual species can contribute to an aggregate community function56,57. Synthetic communities can take advantage of aggregate community output by their application to improving yields and efficiency of bioproduction pathways via the distribution of genetic processes between subpopulations43,50. Biosynthesis studies using cocultures have shown the importance of optimising inoculation ratios to maximise community outputs58,59. Therefore being able to define the steady state composition of a synthetic community is a valuable feature. Here we demonstrate that a form of post-processing can be applied to the output of ABC SMC by applying a secondary threshold, identifying key parameters that enable fine tuning of stable steady state population densities.

The \({\epsilon }_{{F}_{3}}\) threshold value ensures all simulations in the final population have an OD > 0.001. Figure 6a shows the community composition distribution of m4119. The majority of accepted particles show a final community composition that is dominated by a single strain. Using the final population distances from ABC SMC we can apply a secondary threshold and identify how the system can be tuned to produce a more evenly distributed community composition. We set a secondary threshold, stipulating that all strains must be of OD > 0.1 (pink) (Fig. 6b). Therefore strains that do not meet the secondary threshold have 0.001 < OD < 0.1 (blue) (Fig. 6b). From these two subsets we generate separate parameter distributions and calculate the divergence using Kolmogorov–Smirnov (KS). Parameter distributions that show the greatest divergence are important for changing the system behaviour from one that is dominated by a single strain, to one that has a more even distribution of strain densities. The distributions of four parameters that exhibit greatest divergence are shown in Fig. 6c. A higher dilution rate (D) and lower maximal bacteriocin expression rates (\({K}_{{B}_{\max }1}\), \({K}_{{B}_{\max }2}\), \({K}_{{B}_{\max }3}\)) are associated with producing a more evenly distributed community composition. Importantly, all three parameters are realistically tunable. The dilution rate can be controlled directly through the chemostat device, while bacteriocin expression rates can be changed through the choice of promoters and ribosome-binding sites.

Fig. 6: Distribution of population densities in model 4119.

Axes of ternary diagrams (a and b) show percentage composition of the community. a Heat map showing the community composition at stable steady state in model 4119. Axes refer to percentage representation for each strain in the community. b Scatter plot of the stable steady state systems, highlighting the secondary threshold where all strains have OD > 0.1 (red), and the primary objective only where any strain has 0.001 < OD < 0.1. c Density plots comparing the parameter distributions of four parameters that show the greatest divergence to produce the secondary threshold: Dilution rate (D) and maximal bacteriocin expression rates (KBmax1, KBmax2, KBmax3). The Kolmogorov–Smirnov values for the two objectives are 0.25, 0.12, 0.13 and 0.12, respectively.


Synthetic communities built to date have employed the use of QS, metabolic dependencies, intracellular lysis proteins, toxins and extracellular AMPs to engineer interactions that enable community formation23,51,52. When designing a synthetic community, the fundamental interactions in the system itself is often directed by mimicking ecological interactions found in nature, or by rational judgement. As the possible types of engineered interaction increases, so does the need for comprehensive assessment of the vast model spaces. The modelling and statistical framework demonstrated here addresses this design problem. With our examples we have highlighted important design features and heuristic rules for building synthetic steady state communities. As we move to increasingly complex multi-strain systems, bottom-up approaches have shown that understanding pair-wise interactions can be used to build up to larger stable communities60.

We have identified optimal system designs using bacteriocins and QS for stable steady state in two-strain and three-strain communities. m62, the top model of the two-strain model space uses a cross-protection mutualism, whereby the density of each subpopulation inhibits the self-limitation of the other. Similarly, in the three-strain model space m4119 has pairwise cross-protection mutualism between two subpopulations and a dependent subpopulation (Fig. 4b). Cross-protection mutualism has previously been incorporated in synthetic microbial communities via the mutual degradation of externally supplied antibiotics46. Metabolic interdependencies can also be employed to engineer mutualism47,48. All top performing models used SL interactions to produce stable steady state dynamics. Self-limitation is observed in many natural biological communities, normally in a response to stress61,62. These processes, while detrimental to the individual, provide a net benefit to the community through release of a public good—they are altruistic processes63. Altruistic cell death is conserved throughout different species implying a competitive advantage in natural environments64. SL interactions have previously been used to overcome competitive exclusion by employing lysis proteins regulated by QS in a two-strain culture51. The inducible expression of SL bacteriocins under tightly controlled promoters has also been demonstrated65. Additionally, in our recent work we have demonstrated the use of bacteriocins to stabilise communities66. Random sampling or encapsulation of microbial networks has been demonstrated experimentally in both ecological and synthetic contexts67,68. These high throughput approaches could be used to validate our findings, combining differentially engineered strains with one another to give a view of strain combinations that form stable communities.

The robustness of SL interactions can be explained by the feedback loops involved. Total bacteriocin output by a subpopulation is heavily dependent upon its population density; low population density will naturally have a low output of bacteriocin69, making QS a secondary level of regulation. This is supported by both two-strain and three-strain scenarios where we observe the diminishing returns that come with increasing complexity. Figure 5 shows that increasing the number of bacteriocins in a system yields greater increases in stability than increasing the number of QS systems. A closed feedback loop exists between the bacteriocin expression rate and the population density, an important reason why we see all SL motifs generally show positive contribution to stability. Conversely, in OL motifs the population expressing the bacteriocin will not be negatively affected and therefore a closed feedback loop does not exist.

Ecological studies using generalised Lotka–Volterra approaches frequently show that negative, intraspecific interactions are of central importance to the stability of ecological networks70,71,72. In our models, SL interactions, dilution rate and limited nutrients are all analogous to negative, intraspecific, density-dependent interactions described at a more detailed level; particularly regarding time delays and accumulation of bacteriocin or QS molecules that may occur. Our results align with previous findings and provide insight into the relative importance of different types of interactions in a synthetic biology context. Additionally, studies have previously shown that higher connectance in mutualistic ecological networks promotes persistence and resilience73. All our top performing models contain forms of mutualism; in these models we also see a trend of increasing robustness with complexity which is analagous to connectance (Figs. 2b and 4b).

Studies have traditionally used eigenvalue analysis to investigate the stability properties of random interaction ecological networks71,73,74. Similar approaches could be applied to the synthetic community model spaces shown here. The Bayesian approach and time series analysis used here allows us to select for defined temporal characteristics of transient behaviour that represent a definition of a stable system that is achievable experimentally. In principle, eigenvalues could also be included within a distance measure of asymptotic local stability. However, we found they did not improve the classification of behaviour in these models. Finally, we showed that the posterior parameter distribution from ABC SMC can be used to make decisions on part characteristics and experimental conditions (Figs. 2c and 6c). Our results show the dilution rate (D) is an important experimental parameter for producing stable steady state, and tuning the community composition. The rate of removal of molecules from the environment can produce very different population dynamics. This is supported by previous work where the dilution rate has been demonstrated to be important for determining the population dynamics6,22,46. We also show our methodology can identify systems that are robust to differences in growth rate, highlighted by the comparison of m66 and m62 in Fig. 2c. Together these draw attention to important part characteristics that should be considered when constructing a stable community. It should be emphasised that while the design rules we have identified hold true for a stable steady state objective, it may not be the case for other objective population dynamics, such as oscillations. New objectives can be investigated by changing the distance functions which describe the population dynamics.

The framework we have developed offers a natural entry point to the design-build-test cycle, providing a data informed roadmap for building a robust synthetic community with a desired behaviour. We have revealed stable steady state systems in a two-strain and three-strain model space, and generated impactful rules and heuristics for their construction. The flexibility of this framework enables us to quickly redefine population level behaviours depending on the required application.


Model space generator

Models are generated from a set of parts, which 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, and expression of A2 (0, 1 and 2). We define the options for expression of bacteriocin, which for the two-strain model space includes no expression, expression of B1 or expression of B2 (0, 1, and 2). For the three-strain model space, this includes includes 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 the bacteriocin, which can be either induced or repressed (0 and 1). This is redundant if a bacteriocin is not expressed.

Two strain:

$$A =\{0,1,2\}\\ B =\{0,1,2\}\\ R =\{0,1\}$$

Three strain:

$$A =\{0,1,2\}\\ B =\{0,1,2,3\}\\ R =\{0,1\}$$

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:

$${P}_{{\mathrm{{C}}}}=A\times B\times R$$

Each strain in a system can be sensitive to up to one bacteriocin. Let I represent the options for strain sensitivity. In the two-strain model space, the options are insensitive, sensitive to B1 or sensitive to B2 (0, 1 and 2, respectively). In the three-strain model space, the options are insensitive, sensitive to B1, sensitive to B2 or sensitive to B3 (0, 1, 2 and 3, respectively).

Two strain:


Three strain:


Each strain is defined by its sensitivities and expression of parts. Let PE be all unique engineered strains:

$${P}_{{\mathrm{{E}}}}=I\times {P}_{{\mathrm{{C}}}}$$

which can be combined to form a model yielding unique combinations in two strains and three strains:

Two strain:

$${P}_{{\mathrm{{M}}}}={P}_{{\mathrm{{E}}}}\times {P}_{{\mathrm{{E}}}}$$

Three strain:

$${P}_{{\mathrm{{M}}}}={P}_{{\mathrm{{E}}}}\times {P}_{{\mathrm{{E}}}}\times {P}_{{\mathrm{{E}}}}$$

Finally, we use a series of rules to remove redundant models. A system is removed if:

  1. 1.

    Two or more strains are identical, concerning bacteriocin sensitivity and combination of expressed parts.

  2. 2.

    The QS regulating a bacteriocin is not expressed by a strain.

  3. 3.

    A strain is sensitive to a bacteriocin that is not expressed by a strain.

  4. 4.

    A bacteriocin is expressed that no strain is sensitive to.

This cleanup yields the options which are used to generate ODE equations for system.

System equations

State variables in each system are rescaled to improve speed of obtaining numerical approximations:


Each model is represented as sets defining the system:


The system is represented as differential equations:

$$ \frac{{\mathrm{{d}}}{N}_{x}}{{\mathrm{{d}}}t}={N}_{x}{\mu }_{x}(S)-{N}_{x}\mathop{\sum }\limits_{z=1}^{{\mathbb{B}}}\omega ({B}_{z}^{\prime})-{N}_{x}D$$
$$\frac{{\mathrm{{d}}}S}{{\mathrm{{d}}}t}=D({S}_{0}-S)-\mathop{\sum }\limits_{x=1}^{{\mathbb{N}}}\frac{{\mu }_{x}{N}_{x}^{\prime}}{{\gamma }_{x}}$$
$$\frac{{\mathrm{{d}}}{B}_{z}}{{\mathrm{{d}}}t}=\mathop{\sum }\limits_{x=1}^{{\mathbb{N}}}\frac{({k}_{{B}_{x,z}}{N}_{x}^{\prime})}{{C}_{B}}-D{B}_{z}\quad \,\,\,$$
$$\frac{{\mathrm{{d}}}{A}_{y}}{{\mathrm{{d}}}t}=\mathop{\sum }\limits_{x=1}^{{\mathbb{N}}}\frac{{k}_{{A}_{x,y}}{N}_{x}^{\prime}}{{C}_{A}}-D{A}_{y}\quad \, \quad$$

Growth is modelled by Monod’s equation for nutrient limited growth:

$${\mu }_{x}(S)=\frac{{\mu }_{{x}_{\max }}S}{{K}_{X}+S}$$

Killing by bacteriocin is modelled via a Hill function, where \({\omega }_{\max }=0\) if strain is insensitive:

$$\omega ({B}_{z}^{\prime})={\omega }_{\max }\frac{{B}_{z}^{^{\prime} {n}_{\omega }}}{{K}_{\omega }^{{n}_{\omega }}+{B}_{z}^{^{\prime} {n}_{\omega }}}$$

Induction or repression of bacteriocin expression by QS, Ay:

$${k}_{{\mathrm{{B}}}}(z,y)=K{B}_{\max }z\frac{{A}_{y}^{^{\prime} {n}_{z}}}{{K}_{{{\mathrm{{B}}}}_{z}}^{{n}_{z}}+{A}_{y}^{^{\prime} {n}_{z}}}$$
$${k}_{{\mathrm{{B}}}}(z,y)=K{B}_{\max }z\frac{{K}_{{B}_{z}}^{{n}_{z}}}{{K}_{{B}_{z}}^{{n}_{z}}+{A}_{y}^{^{\prime} {n}_{z}}}$$

Simulations were conducted for 1000 h, the final 100 h were used to calculate the summary statistics and were stopped early if the population of any strain fell below 1e−10 (extinction event). Simulations with an extinction event have distances set to maximum in order to prevent excessive time spent simulating collapsed populations.

Bayesian inference

Let θ Θ be a sampled parameter vector with a prior π(θ). Given an objective of x0, where x0 exists in the solution space, \({x}_{0}\in {\mathcal{D}}\). We define the likelihood function for the objective behaviour as f(x0θ). Bayes’ theorem gives us the posterior distribution of θ that exists for the objective x0:

$$\pi (\theta | {x}_{0})=\frac{f({x}_{0}| \theta )\pi (\theta )}{\pi ({x}_{0})}$$

We can rewrite π(x0) where a and b represent the lower and upper bounds of the parameter value:

$$\pi ({x}_{0})=\mathop{\int}\nolimits_{a}^{b}f({x}_{0},\theta ){\mathrm{{d}}}\theta =\mathop{\int}\nolimits_{a}^{b}f({x}_{0}| \theta )\pi (\theta ){\mathrm{{d}}}\theta$$

The posterior distribution informs us of the parameter distribution that gives rise to the objective:

$$\pi (\theta | {x}_{0})=\frac{f({x}_{0}| \theta )\pi (\theta )}{\mathop{\int}\nolimits_{a}^{b}f({x}_{0}| \theta )\pi (\theta ){\mathrm{{d}}}\theta }$$

Let m be a model from a vector of competing models, M, such that mM = {m0,m2,...,mn}. Each model has its own parameter space, allowing us to define a joint space, (m, θ) M × Θ.

We can write Bayes’ theorem in the context of a model space:

$$\pi (m| {x}_{0})=\frac{f({x}_{0}| m)\pi (m)}{{\int}_{M} \,\, f({x}_{0}| m^{\prime} )\pi (m^{\prime} ){\mathrm{{d}}}m^{\prime} }$$

Since the M is discrete, we can rewrite this as:

$$\pi (m| {x}_{0})=\frac{f({x}_{0}| m)\pi (m)}{{\sum }_{M}\, \, f({x}_{0}| m^{\prime} )\pi (m^{\prime} )}$$

The marginal likelihood of the model, f(x0m), is the expectation of the likelihood function taken over the model parameter prior distribution. It measures a model’s fit:

$$f({x}_{0}| m)={\int}_{{{{\Theta }}}_{M}}\pi (\theta | m)f({x}_{0}| \theta ,m){\mathrm{{d}}}\theta$$

Approximate Bayesian computation

Writing the likelihood function, f (x0θ), in terms of summary statistics can be difficult. We bypass this and approximate the posterior by generating data from a model. We can sample a parameter vector from the prior, θ* ~ π(θ), which is simulated to yield a data vector, x*. This can be written as a conditional, x* ~ f (xθ*), which also gives the joint density, π(θ,x). In order to obtain the posterior distribution that satisfies our objective behaviour, x0, we apply a conditional to define whether a generated data vector, x*, belongs to the objective x0.

If x = x0

$$\pi (\theta | x,{x}_{0})=\frac{\pi (\theta )f(x| \theta )}{\pi (\theta )f(x| \theta ){\mathrm{{d}}}x{\mathrm{{d}}}\theta }$$


$$\pi (\theta | x,{x}_{0})=0$$

Let ρ(x, x0) be a distance function that compares a simulation to the objective. Using distance threshold, ϵ, we can define values below which the distance is acceptably small. We can redefine π(θx, x0) in the context of thresholds to obtain an approximation of the posterior.

If ρ(x, x0) < ϵ

$${\pi }_{\epsilon }(\theta | x,{x}_{0})=\frac{\pi (\theta )f(x| \theta )}{\pi (\theta )f(x| \theta ){\mathrm{{d}}}x{\mathrm{{d}}}\theta }$$


$${\pi }_{\epsilon }(\theta | x,{x}_{0})=0$$

The smaller ϵ is and the larger the number of simulations conducted, the more accurate the representation of the true posterior will be. We can write this marginal posterior distribution as:

$$\pi ({\theta }^{* }| \rho ({x}^{* },{x}_{0}))\le \epsilon \approx \pi (\theta | {x}_{0})$$

Model selection with ABC SMC

In this paper, we use a variant of ABC, ABC Sequential Monte Carlo (ABC SMC)36. Particles are sampled from the prior distributions. Each particle represents a sampled model and sampled parameters for that model. ABC SMC evolves particles sampled from the prior distribution through a series of intermediate distributions and perturbations. Importance weighting is used to define their sample probability for the next distribution. The distance threshold, ϵ, is decreased between distributions, moving the acceptance criteria closer to the objective. These features aim to improve the acceptance rate of particles while maintaining a good approximation of the posterior distribution (see Supplementary Algorithm 1 for more details).

Bayes factor

The BF can be used to help us interpret how much better (or worse) one model is than the other. Given two models, m1 and m2, the BF is calculated as

$${\mathrm{{BF}}}=\frac{P({m}_{1}| x)/P({m}_{2}| x)}{P({m}_{1})/P({m}_{2})}$$

P(mi) is the prior, and P(mix) is the posterior probability. Given uniform priors, P(mi) = 1/M, where M is the number of models. Therefore we can simplify to:

$${\mathrm{{BF}}}=\frac{P({m}_{1}| x)}{P({m}_{2}| x)}$$

The BF is a measure of the support for m1 relative to m2. It accounts for the number of parameters, or complexity of the two models. The BF allows us to directly compare the weight of evidence for and against the two models and has the advantage that it can be used to compare non-nested models. Two BFs can be compared directly, since they both represent evidence in favour of the hypothesis36,37. We therefore use BFs to directly compare the ability of two models to represent the objective population behaviour. Table 2 allows us to interpret BF.

Software packages and simulation settings

ABC SMC model selection algorithm was written in python using Numpy75, Pandas and Scipy76. ODE simulations were conducted in C++ with a Rosenbrock 4 stepper from the Boost library77. All simulations use an absolute error tolerance of 1e−9, and relative error tolerance of 1e−4. NMF was conducted using Scikit-learn78. Dendrograms were made from SciPy, using the unweighted pair group method with arithmetic mean (UPGMA) clustering algorithm76. Ternary diagrams were made using python package python-ternary79. Parameter distribution plots were made in R using ggplot280.

Reporting summary

Further information on research design is available in the Nature Research Reporting Summary linked to this article.

Data availability

The data generated and used to create figures can be found at Any other relevant data can be obtained from the authors upon reasonable request.

Code availability

AutoCD code repository can be found at The repository includes configuration files for the two- and three- strain experiments conducted in this study. All code to recreate figures can be found at


  1. 1.

    Pantoja-Hernández, L. & Martínez-García, J. C. Retroactivity in the context of modularly structured biomolecular systems. Front. Bioeng. Biotechnol. 3, 85 (2015).

    PubMed  PubMed Central  Article  Google Scholar 

  2. 2.

    Jayanthi, S. & Del Vecchio, D. Retroactivity attenuation in bio-molecular systems based on timescale separation. IEEE Trans. Autom. Control 56, 748–761 (2011).

    MathSciNet  Article  Google Scholar 

  3. 3.

    Gyorgy, A. et al. Isocost lines describe the cellular economy of genetic circuits. Biophys. J. 109, 639–646 (2015).

    ADS  CAS  PubMed  PubMed Central  Article  Google Scholar 

  4. 4.

    Summers, D. The kinetics of plasmid loss. Trends Biotechnol 9, 273–278 (1991).

    CAS  PubMed  Article  PubMed Central  Google Scholar 

  5. 5.

    Mishra, D., Rivera, P. M., Lin, A., Del Vecchio, D. & Weiss, R. A load driver device for engineering modularity in biological networks. Nat. Biotechnol. 32, 1268–1275 (2014).

    CAS  PubMed  PubMed Central  Article  Google Scholar 

  6. 6.

    Weiße, A. Y., Oyarzún, D. A., Danos, V. & Swain, P. S. Mechanistic links between cellular trade-offs, gene expression, and growth. Proc. Natl. Acad. Sci. USA 112, E1038–E1047 (2015).

    ADS  PubMed  Article  CAS  PubMed Central  Google Scholar 

  7. 7.

    Brenner, K., You, L. & Arnold, F. H. Engineering microbial consortia: a new frontier in synthetic biology. Trends Biotechnol 26, 483–489 (2008).

    CAS  PubMed  Article  PubMed Central  Google Scholar 

  8. 8.

    Kennedy, T. A. et al. Biodiversity as a barrier to ecological invasion. Nature 417, 636–638 (2002).

    ADS  CAS  PubMed  Article  PubMed Central  Google Scholar 

  9. 9.

    Beyter, D. et al. Diversity, productivity, and stability of an industrial microbial ecosystem. Appl. Environ. Microbiol. 82, 2494–2505 (2016).

    CAS  PubMed  PubMed Central  Article  Google Scholar 

  10. 10.

    Butler, G. J. & Wolkowicz, G. S. K. A mathematical model of the chemostat with a general class of functions describing nutrient uptake. SIAM J. Appl. Math. 45, 138–151 (1985).

    MathSciNet  Article  Google Scholar 

  11. 11.

    Foster, K. R. & Bell, T. Competition, not cooperation, dominates interactions among culturable microbial species. Curr. Biol. 22, 1845–1850 (2012).

    CAS  PubMed  Article  PubMed Central  Google Scholar 

  12. 12.

    Hibbing, M. E., Fuqua, C., Parsek, M. R. & Peterson, S. B. Bacterial competition: surviving and thriving in the microbial jungle. Nat. Rev. Microb. 8, 15–25 (2010).

    CAS  Article  Google Scholar 

  13. 13.

    Freilich, S. et al. Competitive and cooperative metabolic interactions in bacterial communities. Nat. Commun. 2, 589 (2011).

    ADS  PubMed  Article  CAS  PubMed Central  Google Scholar 

  14. 14.

    Zelezniak, A. et al. Metabolic dependencies drive species co-occurrence in diverse microbial communities. Proc. Natl. Acad. Sci. USA 112, 6449–6454 (2015).

    ADS  CAS  PubMed  Article  PubMed Central  Google Scholar 

  15. 15.

    May, A. et al. Kombucha: a novel model system for cooperation and conflict in a complex multi-species microbial ecosystem. PeerJ 7, e7565 (2019).

    PubMed  PubMed Central  Article  Google Scholar 

  16. 16.

    Czaran, T. L., Hoekstra, R. F. & Pagie, L. Chemical warfare between microbes promotes biodiversity. Proc. Natl. Acad. Sci. USA 99, 786–790 (2002).

    ADS  CAS  PubMed  Article  PubMed Central  Google Scholar 

  17. 17.

    Dinh, C. V., Chen, X. & Prather, K. L. J. Development of a quorum-sensing based circuit for control of coculture population composition in a naringenin production system. ACS Synth. Biol. 9, 590–597 (2020).

    CAS  PubMed  Article  PubMed Central  Google Scholar 

  18. 18.

    Stephens, K., Pozo, M., Tsao, C.-Y., Hauk, P. & Bentley, W. E. Bacterial coculture with cell signaling translator and growth controller modules for autonomously regulated culture composition. Nat. Commun. 10, 4129 (2019).

    ADS  PubMed  PubMed Central  Article  CAS  Google Scholar 

  19. 19.

    Liu, F., Mao, J., Lu, T. & Hua, Q. Synthetic, context-dependent microbial consortium of predator and prey. ACS Synth. Biol. 8, 1713–1722 (2019).

    CAS  PubMed  Article  PubMed Central  Google Scholar 

  20. 20.

    Gupta, A., Reizman, I. M. B., Reisch, C. R. & Prather, K. L. J. Dynamic regulation of metabolic flux in engineered bacteria using a pathwayindependent quorum-sensing circuit. Nat. Biotechnol. 35, 273–279 (2017).

    CAS  PubMed  PubMed Central  Article  Google Scholar 

  21. 21.

    Scott, S. R. & Hasty, J. Quorum sensing communication modules for microbial consortia. ACS Synth. Biol. 5, 969–977 (2016).

    CAS  PubMed  PubMed Central  Article  Google Scholar 

  22. 22.

    Balagaddé, F. K. et al. A synthetic Escherichia coli predator–prey ecosystem. Mol. Syst. Biol. 4, 187 (2008).

    PubMed  PubMed Central  Article  Google Scholar 

  23. 23.

    Kong, W., Meldgin, D. R., Collins, J. J. & Lu, T. Designing microbial consortia with defined social interactions. Nat. Chem. Biol. 14, 821–829 (2018).

    CAS  PubMed  Article  Google Scholar 

  24. 24.

    Rebuffat S. M. (ed. Kastin, A. J.) In Handbook of Biologically Active Peptides 129–137 (Elsevier, 2013).

  25. 25.

    Geldart, K., Forkus, B., McChesney, E., McCue, M. & Kaznessis, Y. pMPES: a modular peptide expression system for the delivery of antimicrobial peptides to the site of gastrointestinal infections using probiotics. Pharmaceuticals 9, 60 (2016).

    PubMed Central  Article  CAS  PubMed  Google Scholar 

  26. 26.

    Fedorec, A. J. H. et al. Two new plasmid post-segregational killing mechanisms for the implementation of synthetic gene networks in Escherichia coli. iScience 14, 323–334 (2019).

    ADS  CAS  PubMed  PubMed Central  Article  Google Scholar 

  27. 27.

    MacDonald, J. T., Barnes, C., Kitney, R. I., Freemont, P. S. & Stan, G.-B. V. Computational design approaches and tools for synthetic biology. Integr. Biol. 3, 97 (2011).

    Article  Google Scholar 

  28. 28.

    Kirk, P., Thorne, T. & Stumpf, M. P. H. Model selection in systems and synthetic biology. Curr. Opin. Biotechnol. 24, 767–774 (2013).

    CAS  PubMed  Article  Google Scholar 

  29. 29.

    Barnes, C. P., Silk, D., Sheng, X. & Stumpf, M. P. H. Bayesian design of synthetic biological systems. Proc. Natl. Acad. Sci. USA 108, 15190–15195 (2011).

    ADS  CAS  PubMed  Article  Google Scholar 

  30. 30.

    Woods, M. L., Leon, M., Perez-Carrasco, R. & Barnes, C. P. A Statistical approach reveals designs for the most robust stochastic gene oscillators. ACS Synth. Biol. 5, 459–470 (2016).

    CAS  PubMed  PubMed Central  Article  Google Scholar 

  31. 31.

    Leon, M., Woods, M. L., Fedorec, A. J. H. & Barnes, C. P. A computational method for the investigation of multistable systems and its application to genetic switches. BMC Syst. Biol. 10, 130 (2016).

    PubMed  PubMed Central  Article  Google Scholar 

  32. 32.

    Yeoh, J. W. et al. An automated biomodel selection system (BMSS) for gene circuit designs. ACS Synth. Biol. 8, 1484–1497 (2019).

    CAS  PubMed  Article  PubMed Central  Google Scholar 

  33. 33.

    Beal, J. et al. An end-to-end workflow for engineering of biological networks from high-level specifications. ACS Synth. Biol. 1, 317–331 (2012).

    CAS  PubMed  Article  PubMed Central  Google Scholar 

  34. 34.

    Rodrigo, G. & Jaramillo, A. AutoBioCAD: full biodesign automation of genetic circuits. ACS Synth. Biol. 2, 230–236 (2013).

    CAS  PubMed  Article  PubMed Central  Google Scholar 

  35. 35.

    Friedman, J. & Gore, J. Ecological systems biology: the dynamics of interacting populations. Current Opinion in Systems Biology 1, 114–121 (2017).

    Article  Google Scholar 

  36. 36.

    Toni, T., Welch, D., Strelkowa, N., Ipsen, A. & Stumpf, M. P. H. Approximate Bayesian computation scheme for parameter inference and model selection in dynamical systems. J. R. Soc. Interface 6, 187–202 (2009).

    PubMed  Article  PubMed Central  Google Scholar 

  37. 37.

    Kass, R. E. & Raftery, A. E. Bayes factors. J. Am. Stat. Assoc. 90, 773–795 (1995).

    MathSciNet  Article  Google Scholar 

  38. 38.

    Salis, H. M., Mirsky, E. A. & Christopher, C. Automated design of synthetic ribosome binding sites to control protein expression. Nat. Biotechnol. 27, 946–950 (2009).

    CAS  PubMed  PubMed Central  Article  Google Scholar 

  39. 39.

    Marisch, K. et al. A Comparative analysis of industrial Escherichia coli K-12 and B strains in high-glucose batch cultivations on process-, transcriptomeand proteome level. PLoS ONE 8, e70516 (2013).

    ADS  CAS  PubMed  PubMed Central  Article  Google Scholar 

  40. 40.

    Treloar, N. J., Fedorec, A. J. H., Ingalls, B. & Barnes, C. P. Deep reinforcement learning for the control of microbial co-cultures in bioreactors. PLOS Comput. Biol. 16, e1007783 (2020).

    ADS  CAS  PubMed  PubMed Central  Article  Google Scholar 

  41. 41.

    Lee, D. D. & Seung, H. S. Learning the parts of objects by non-negative matrix factorization. Nature 401, 788–791 (1999).

    ADS  CAS  PubMed  Article  PubMed Central  Google Scholar 

  42. 42.

    Kerner, A., Park, J., Williams, A. & Lin, X. N. A programmable Escherichia coli consortium via tunable symbiosis. PLoS ONE 7, e34032 (2012).

    ADS  CAS  PubMed  PubMed Central  Article  Google Scholar 

  43. 43.

    Zhou, K., Qiao, K., Edgar, S. & Stephanopoulos, G. Distributing a metabolic pathway among a microbial consortium enhances production of natural products. Nat. Biotechnol. 33, 377–383 (2015).

    CAS  PubMed  PubMed Central  Article  Google Scholar 

  44. 44.

    Shou, W., Ram, S. & Vilar, J. M. G. Synthetic cooperation in engineered yeast populations. Proc. Natl. Acad. Sci. USA 104, 1877–1882 (2007).

    ADS  CAS  PubMed  Article  PubMed Central  Google Scholar 

  45. 45.

    Pande, S. et al. Fitness and stability of obligate cross-feeding interactions that emerge upon gene loss in bacteria. ISME J 8, 953–962 (2014).

    CAS  PubMed  Article  PubMed Central  Google Scholar 

  46. 46.

    Yurtsev, E. A., Conwill, A. & Gore, J. Oscillatory dynamics in a bacterial crossprotection mutualism. Proc. Natl. Acad. Sci. USA 113, 6236–6241 (2016).

    CAS  PubMed  Article  PubMed Central  Google Scholar 

  47. 47.

    Hosoda, K. et al. Cooperative adaptation to establishment of a synthetic bacterial mutualism. PLoS ONE 6, e17105 (2011).

    ADS  CAS  PubMed  PubMed Central  Article  Google Scholar 

  48. 48.

    Zhang, X. & Reed, J. L. Adaptive evolution of synthetic cooperating communities improves growth performance. PLoS ONE 9, e108297 (2014).

    ADS  PubMed  PubMed Central  Article  CAS  Google Scholar 

  49. 49.

    Chen, Y., Kim, J. K., Hirning, A. J., Josi, K. & Bennett, M. R. Emergent genetic oscillations in a synthetic microbial consortium. Science 349, 986–989 (2015).

    ADS  CAS  PubMed  PubMed Central  Article  Google Scholar 

  50. 50.

    Bernstein, H. C., Paulson, S. D. & Carlson, R. P. Synthetic Escherichia coli consortia engineered for syntrophy demonstrate enhanced biomass productivity. J. Biotechnol. 157, 159–166 (2012).

    CAS  PubMed  Article  Google Scholar 

  51. 51.

    Scott, S. R. et al. A stabilized microbial ecosystem of self-limiting bacteria using synthetic quorum-regulated lysis. Nat. Microbiol. 2, 17083 (2017).

    CAS  PubMed  PubMed Central  Article  Google Scholar 

  52. 52.

    Ziesack, M. et al. Engineered Interspecies amino acid cross-feeding increases population evenness in a synthetic bacterial consortium. mSystems 4, e00352–19 (2019).

    PubMed  PubMed Central  Article  Google Scholar 

  53. 53.

    Liao, M. J., Din, M. O., Tsimring, L. & Hasty, J. Rock-paper-scissors: engineered population dynamics increase genetic stability. Science 365, 1045–1049 (2019).

    ADS  CAS  PubMed  PubMed Central  Article  Google Scholar 

  54. 54.

    Ahn, J. et al. Human gut microbiome and risk for colorectal cancer. J. Natl Cancer Inst 105, 1907–1911 (2013).

    CAS  PubMed  PubMed Central  Article  Google Scholar 

  55. 55.

    Stokell, J. R. et al. Analysis of changes in diversity and abundance of the microbial community in a cystic fibrosis patient over a multiyear period. J. Clin. Microbiol. 53, 237–247 (2015).

    CAS  PubMed  Article  PubMed Central  Google Scholar 

  56. 56.

    Louca, S. et al. Function and functional redundancy in microbial systems. Nat. Ecol. Evol. 2, 936–943 (2018).

    PubMed  Article  PubMed Central  Google Scholar 

  57. 57.

    Tyson, G. W. et al. Community structure and metabolism through reconstruction of microbial genomes from the environment. Nature 428, 37–43 (2004).

    ADS  CAS  PubMed  Article  PubMed Central  Google Scholar 

  58. 58.

    Wang, X., Policarpio, L., Prajapati, D., Li, Z. & Zhang, H. Developing E. coli– E. coli co-cultures to overcome barriers of heterologous tryptamine biosynthesis. Metab. Eng. Commun. 10, e00110 (2020).

    PubMed  Article  PubMed Central  Google Scholar 

  59. 59.

    Yuan, S. F., Yi, X., Johnston, T. G. & Alper, H. S. De novo resveratrol production through modular engineering of an Escherichia coli–Saccharomyces cerevisiae co-culture. Microb. Cell Factor 19, 143 (2020).

    CAS  Article  Google Scholar 

  60. 60.

    Friedman, J., Higgins, L. M. & Gore, J. Community structure follows simple assembly rules in microbial microcosms. Nat. Ecol. Evol 1, 109 (2017).

    PubMed  Article  Google Scholar 

  61. 61.

    Carmona-Fontaine, C. & Xavier, J. B. Altruistic cell death and collective drug resistance. Molecular Systems Biology 8, 627 (2012).

    PubMed  PubMed Central  Article  Google Scholar 

  62. 62.

    Tanouchi, Y., Pai, A., Buchler, N. E. & You, L. Programming stress-induced altruistic death in engineered bacteria. Mol. Syst. Biol. 8, 626 (2012).

    PubMed  PubMed Central  Article  CAS  Google Scholar 

  63. 63.

    Ackermann, M. et al. Self-destructive cooperation mediated by phenotypic noise. Nature 454, 987–990 (2008).

    ADS  CAS  PubMed  Article  Google Scholar 

  64. 64.

    Williams, G. T. Programmed cell death: a fundamental protective response to pathogens. Trends Microbiol 2, 463–464 (1994).

    CAS  PubMed  Article  Google Scholar 

  65. 65.

    Calles, B., Goñi-Moreno, Á. & Lorenzo, V. Digitalizing heterologous gene expression in Gram-negative bacteria with a portable ON/OFF module. Mol. Syst. Biol. 15, e8777 (2019).

    CAS  PubMed  PubMed Central  Article  Google Scholar 

  66. 66.

    Fedorec, A., Karkaria, B., Sulu, M. & Barnes, C. Single strain control of microbial consortia. bioRxiv, (2019).

  67. 67.

    Bell, T., Newman, J. A., Silverman, B. W., Turner, S. L. & Lilley, A. K. The contribution of species richness and composition to bacterial services. Nature 436, 1157–1160 (2005).

    ADS  CAS  PubMed  Article  Google Scholar 

  68. 68.

    Hsu, R. H. et al. Venturelli. Microbial interaction network inference in microfluidic droplets. Cell Syst 9, 229–242.e4 (2019).

    CAS  PubMed  PubMed Central  Article  Google Scholar 

  69. 69.

    Doekes, H. M., De Boer, R. J. & Hermsen, R. Toxin production spontaneously becomes regulated by local cell density in evolving bacterial populations. PLoS Comput. Biol. 15, e1007333 (2019).

    CAS  PubMed  PubMed Central  Article  Google Scholar 

  70. 70.

    McNaughton, S. J. Stability and diversity of ecological communities. Nature 274, 251–253 (1978).

    ADS  Article  Google Scholar 

  71. 71.

    Sterner, R. W., Bajpai, A. & Adams, T. The enigma of food chain length: absence of theoretical evidence for dynamic constraints. Ecology 78, 2258–2262 (1997).

    Article  Google Scholar 

  72. 72.

    Barabás, G., Michalska-Smith, M. J. & Allesina, S. Self-regulation and the stability of large ecological networks. Nat. Ecol. Evol. 1, 1870–1875 (2017).

    PubMed  Article  PubMed Central  Google Scholar 

  73. 73.

    Thébault, E. & Fontaine, C. Stability of ecological communities and the architecture of mutualistic and trophic networks. Science 329, 853–856 (2010).

    ADS  PubMed  Article  CAS  PubMed Central  Google Scholar 

  74. 74.

    Tang, S., Pawar, S. & Allesina, S. Correlation between interaction strengths drives stability in large ecological networks. Ecol. Lett. 17, 1094–1100 (2014).

    PubMed  Article  PubMed Central  Google Scholar 

  75. 75.

    Harris, C. R. et al. Array programming with NumPy. Nature 585, 357–362 (2020).

    ADS  CAS  PubMed  PubMed Central  Article  Google Scholar 

  76. 76.

    Virtanen, P. et al. SciPy 1.0: fundamental algorithms for scientific computing in Python. Nat. Methods 17, 261–272 (2020).

    CAS  PubMed  PubMed Central  Article  Google Scholar 

  77. 77.

    Siek, J. G., Lee, L.-Q., Lumsdaine, A. The Boost Graph Library, 243 (Addison-Wesley, 2002).

  78. 78.

    Pedregosa, F. et al. Scikit-learn: machine learning in Python. J. Mach. Learn. Res. 12, 2825–2830 (2011).

    MathSciNet  Google Scholar 

  79. 79.

    Harper, M., et al. python-ternary: ternary plots in python. Zenodo (2019).

  80. 80.

    Wickham, H. ggplot2-Positioning Elegant Graphics for Data Analysis (Springer-Verlag New York, 2016).

  81. 81.

    Kylilis, N., Tuza, Z. A., Stan, G. B. & Polizzi, K. M. Tools for engineering coordinated system behaviour in synthetic microbial consortia. Nat. Commun. 9, 2677 (2018).

    ADS  PubMed  PubMed Central  Article  CAS  Google Scholar 

  82. 82.

    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—Gen. Subj. 1201, 424–436 (1994).

    Article  Google Scholar 

  83. 83.

    Destoumieux-Garzón, D. 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. Biochem. J. 389, 869–876 (2005).

    PubMed  PubMed Central  Article  Google Scholar 

  84. 84.

    Kaur, K. et al. Characterization of a highly potent antimicrobial peptide microcin N from uropathogenic Escherichia coli. FEMS Microbiology Letters 363, fnw095 (2016).

    PubMed  Article  CAS  PubMed Central  Google Scholar 

  85. 85.

    Andersen, K. B. & Meyenburg, K. V. Are growth rates of Escherichia coli in batch cultures limited by respiration? J. Bacteriol. 144, 114–123 (1980).

    CAS  PubMed  PubMed Central  Article  Google Scholar 

  86. 86.

    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. Sci. Rep. 6, 39142 (2016).

    ADS  CAS  PubMed  PubMed Central  Article  Google Scholar 

  87. 87.

    Destoumieux-Garzón, D. et al. Microcin E492 antibacterial activity: evidence for a TonB-dependent inner membrane permeabilization on Escherichia coli. Mol. Microbiol. 49, 1031–1041 (2003).

    PubMed  Article  CAS  PubMed Central  Google Scholar 

  88. 88.

    Karkaria, B. D., Fedorec, A. J. H. & Barnes, C. P. Automated design of synthetic microbial communities. Zenodo (2020).

Download references


B.D.K. received funding from the Biotechnology and Biological Sciences Research Council (BBSRC Grant No. BB/M009513/1). C.P.B. and A.J.H.F. 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 funding from the Wellcome Trust (209409/Z/17/Z).

Author information




B.D.K., A.J.H.F. and C.P.B. all contributed to the idea conception and methodologies. B.D.K. and A.J.H.F. developed the mathematical models. B.D.K. developed the software and performed analysis of the data. B.D.K. wrote the first draft of the manuscript. B.D.K., A.J.H.F. and C.P.B. all contributed to manuscript revision, read and approved the submitted version.

Corresponding author

Correspondence to Chris P. Barnes.

Ethics declarations

Competing interests

The authors declare no competing interests.

Additional information

Peer review information Nature Communications thanks Matthew Bennett, Aurore Picot and the other, anonymous, reviewer(s) for their contribution to the peer review of this work.

Publisher’s note Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Supplementary information

Rights and permissions

Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license, and indicate if changes were made. The images or other third party material in this article are included in the article’s Creative Commons license, unless indicated otherwise in a credit line to the material. If material is not included in the article’s Creative Commons license and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this license, visit

Reprints and Permissions

About this article

Verify currency and authenticity via CrossMark

Cite this article

Karkaria, B.D., Fedorec, A.J.H. & Barnes, C.P. Automated design of synthetic microbial communities. Nat Commun 12, 672 (2021).

Download citation

Further reading


By submitting a comment you agree to abide by our Terms and Community Guidelines. If you find something abusive or that does not comply with our terms or guidelines please flag it as inappropriate.


Quick links

Nature Briefing

Sign up for the Nature Briefing newsletter — what matters in science, free to your inbox daily.

Get the most important science stories of the day, free in your inbox. Sign up for Nature Briefing