Skip to main content
Advertisement
Browse Subject Areas
?

Click through the PLOS taxonomy to find articles in your field.

For more information about PLOS Subject Areas, click here.

< Back to Article

Fig 1.

The five elements of the Community Simulator.

The core object of the Community Simulator is a virtual n-well plate, holding n independent well-mixed microbial communities. This plate has three properties: its current state, a dynamical law for the population dynamics, and a set of parameters. Once a plate is initialized, two actions can be performed on it: propagation in time using the given dynamical law, and passaging of given fractions of the contents of each well to fresh wells on a replacement plate. For some models, the equilibrium state of the population dynamics can also be found directly using a new algorithm summarized in Fig 5 below.

More »

Fig 1 Expand

Fig 2.

Constructing the dynamical law.

The MicroCRM models the growth and metabolism of S microbial species in terms of energy fluxes , mediated by import, export and chemical transformation of M substitutable resources. Specification of the resource dynamics and of the dependence of import rates on the resource concentrations requires three additional modeling choices, represented by the three arrows. First, the intrinsic dynamics of the resources can either be a linear model of a fixed external input flux and dilution rate, or a logistic model of self-renewing resources, which was employed in MacArthur’s original CRM. The left-hand plot shows the supply rate as a function of resource concentration for these two options. Second, the import rates from the different resource types can be independent, or globally regulated in such a way as to preferentially consume the resource that is currently most abundant. The middle plot shows timeseries of consumer and resource abundances in the presence and absence of regulation, with all other parameters held fixed. Third, the dependence of import rates on resource concentration can take a linear (Type-I), Monod (Type-II) or Hill (Type-III) form. The right-hand plot shows the growth rate as a function of resource concentration for these three choices.

More »

Fig 2 Expand

Table 1.

Parameters and units for the Microbial Consumer Resource Model.

More »

Table 1 Expand

Fig 3.

Sampling parameters and adding metabolic structure.

(a) Sampling the consumer preference matrix c. Each row corresponds to a different microbial species, and the value of each entry in the row specifies the preference level of that species for a given resource. An example of each of the three sampling choices is shown, with white pixels representing c = 0 and darker pixes representing larger values. The examples have F = 3 consumer families with specialism level q = 0.9, each with SA = 25 species, plus a generalist family with Sgen = 25 species. (b) Sampling the metabolic matrix Dαβ. Each column represents the allocation of output fluxes resulting from metabolism of a given input resource. This example has T = 3 resource classes, and an effective sparsity s = 0.05. (c) Diagram of three-tiered metabolic structure. A fraction fs of the output flux is allocated to resources from the same resource class as the input, while a fraction fw is allocated to the “waste” class (e.g., carboxylic acids). In the example of the previous panel, allocation fractions were fs = fw = 0.49.

More »

Fig 3 Expand

Table 2.

Definitions of global parameters used for constructing random ecosystems.

Values of these parameters are supplied as a Python dictionary to the function MakeMatrices, which generates randomly sampled consumer preference and metabolic matrices.

More »

Table 2 Expand

Fig 4.

Propagating and passaging.

(a) System state after successive applications of the method to a plate with n = 100 wells, with a single externally supplied resource (blue). Each column of a panel represents a different well, and the height of each colored patch represents the abundance of a different consumer species or resource type. Each panel is normalized so that the sample with the largest total biomass or total resource concentration spans the entire panel. As time passes, the resources become more diverse due to the generation of metabolic byproducts, while the consumers become less diverse through competitive exclusion. (b) Modeling spatial structure with a stepping stone model. At each time step, each cell in a given well can migrate to neighboring wells with probability m. (c) Implementation of stepping stone model in a 96-well plate. Every day, the communities are passaged to fresh wells, with a fraction f0(1 − m) transferred to the corresponding position in the new set of wells, and f0 m divided equally between the two nearest neighbors, where f0 is an overall dilution factor. (d) Transfer matrix f implementing the stepping stone protocol. (e) Simulated range expansion using successive applications of the and methods, with the transfer matrix from the previous panel. See the Jupyter notebook included with the package for all simulation details.

More »

Fig 4 Expand

Fig 5.

An expectation-maximization algorithm for finding noninvadable stationary states.

(a) Noninvadable states by definition can only exist in the region Ω of resource space where the growth rate dNi/dt of each species i is zero or negative. Here, the blue and orange lines represent the combinations of resource abundances leading to zero growth rate for two different consumer species, so the noninvadable region is the space beneath both of the lines. Within this region, a recently discovered duality implies that the stationary state R* locally minimizes the dissimilarity d(R0, R) with respect to the fixed point R0 of the intrinsic environmental dynamics [23, 24]. (b) Metabolic byproducts move the relevant unperturbed state from R0 (gray ‘x’) to (black ‘x’), which is itself a function of the current environmental conditions. Dotted contour lines represent , and arrows are two trajectories of the population dynamics starting from the unperturbed environmental state with two different sets of initial consumer population sizes. See main text and Appendix for model details and parameters. (c) Pseudocode for self-consistently computing R* and , which is identical to standard expectation-maximization algorithms employed for problems with latent variables in machine learning.

More »

Fig 5 Expand

Fig 6.

Performance of EM algorithm versus ODE integration.

The steady state of the MicroCRM was computed by direct ODE integration and with our new EM algorithm for a range of values of the number of resource types M. The initial number of species S was set equal to M, and a single resource type was externally supplied with intrinsic fixed point ( for all i > 1). The absolute error tolerance of the integrator was set to 10−4, and the convergence tolerance for the EM algorithm was set to δ = 10−7. See ‘scripts’ folder in the ‘EM-algorithm’ branch of the GitHub repository for the rest of the parameters, which were held fixed for all simulations. (a) Total computation time for 10 realizations. (b) Final root-mean-square per-capita deviation of the growth rate from zero (‘Error’) over all surviving species in all 10 samples.

More »

Fig 6 Expand