Modeling the ecology of parasitic plasmids
Single plasmid, single-population modelsTo understand the dynamics of parasitic plasmids in complex ecologies, we first need to understand their behavior in simple scenarios. In this section, we analyze the dynamics of plasmids spreading by different HGT mechanisms in single populations. We begin by modeling competition between plasmid-free cells and cells containing a conjugative plasmid. A nutrient, with concentration (C), is supplied to the system at rate (S). Cells grow at a rate proportional to (C) with proportionality constant (alpha) for plasmid-free cells or ((1 ,-, {Delta})alpha) for plasmid-containing cells. Since we are interested in parasitic plasmids, we assume that ({Delta} in (0,1)). Cells of both types die at a rate (delta). When a plasmid-containing cell divides there is a loss probability, (p_ell), for one of the daughter cells to contain no plasmids. As long as a daughter cell contains at least one plasmid, the original plasmid copy number (the number of copies of the plasmid maintained per cell) is regenerated (as depicted in Fig. 1A). Plasmids can spread horizontally by conjugation, as illustrated in Fig. 1B, wherein a plasmid-free cell and a plasmid-containing cell interact to produce two plasmid-containing cells. We model the rate of conjugation by a mass-action term with rate (gamma _{mathrm{c}}). The equations governing the dynamics of conjugation are therefore:$$ frac{{drho }}{{dt}} ,=, alpha Crho ,-, gamma _{mathrm{c}}rho rho _{mathrm{p}} ,+, p_ell (1 ,-, {Delta})alpha Crho _{mathrm{p}} ,-, delta rho ,\ frac{{drho _{mathrm{p}}}}{{dt}} ,=, (1 ,-, {Delta})alpha Crho _{mathrm{p}} ,+, gamma _{mathrm{c}}rho rho _{mathrm{p}} ,-, p_ell (1 ,-, {Delta})alpha Crho _{mathrm{p}} ,-, delta rho _{mathrm{p}},\ frac{{dC}}{{dt}} ,=, S ,-, alpha Crho ,-, (1 ,-, {Delta})alpha Crho _{mathrm{p}}.$$
(1)
Fig. 1: Different modeled mechanisms of plasmid transfer lead to distinct ecological phase diagrams, but all such mechanisms leave individual populations susceptible to runaway plasmid invasion.A At each division, plasmids are randomly segregated between daughter cells. Original plasmid copy number is regenerated if at least one plasmid remains in a daughter cell. B Schematic of plasmid transfer mechanisms. Left: spread of plasmids by plasmid-containing cells conjugating with plasmid-free cells. Right: spread of plasmids by extracellular plasmids infecting plasmid-free cells via transformation. C Phase diagram for conjugative plasmids as a function of plasmid cost, ({Delta}), and (gamma _{mathrm{c}}); (delta ,=, 0.1), (S ,=, 1), (p_ell ,=, 0), and (alpha ,=, 1) (see Eq. 4). D Phase diagram for transformative plasmids as a function of ({Delta}) and (gamma _{mathrm{t}}). Parameters as in C with (delta _{mathrm{p}} ,=, 0.3) and (n_{{mathrm{eff}}} ,=, 0.6) (see Eq. 9). See “Methods” for details. E In model multiplasmid cells, plasmid types segregate independently. If at least one plasmid of a given type remains in a daughter cell, the full copy number of that plasmid type is regenerated. F Fitness cost as a function of number of unique plasmid types in a cell for multiplicative case ({Delta}_{{mathrm{tot}}} ,=, 1 ,-, (1 ,-, {Delta})^m) with ({Delta} ,=, 0.05). G Steady-state distribution of number of plasmid types per cell at different conjugation rates, measured relative to (gamma _{mathrm{c}}^ ast) (the critical conjugation rate necessary for invasion of a single plasmid into a plasmid-free population, see Eq. 4). Results for eight unique plasmid types with (delta ,=, 1), ({Delta} ,=, 0.1), (alpha ,=, 1), (S ,=, 1), and (p_ell ,=, 0.05).Full size imageIn this model, what are the conditions for a parasitic conjugative plasmid to be able to invade a plasmid-free population? Invasibility implies that the equilibrium containing only plasmid-free cells is locally unstable, which occurs when$$qquadqquadqquadgamma _{mathrm{c}}rho ^ ast , > , delta {Delta} ,+, delta p_ell (1 ,-, {Delta}),$$
(2)
where (rho ^ ast ,=, S/delta) is the steady-state abundance of the plasmid-free cells at the plasmid-free equilibrium. This invasibility condition has an intuitive physical interpretation: to invade, the rate of conjugation must overcome losses due to reduced host growth rate as well as plasmid loss during division. This condition is similar to those found in previous studies [15].Given the condition for plasmid invasion in Eq. 4, what is the optimal behavior for a parasitic conjugative plasmid? The left-hand-side of the expression is linear in the plasmid-free population, meaning that it is more difficult for a plasmid to invade smaller populations. To favor invasion, the plasmid can minimize the right-hand-side of the equation. For a plasmid that relies on random segregation upon cell division, both the plasmid cost ({Delta}) and the loss probability (p_ell) are functions of plasmid copy number, (n_{mathrm{p}}), a property controlled by the plasmid itself. If the primary cost of a plasmid is its replication and its gene products, plasmid cost will scale with copy number such that ({Delta} ,=, {Delta}_{mathrm{p}}n_{mathrm{p}}), where ({Delta}_{mathrm{p}}) is the cost of an individual plasmid copy. The loss probability will be (p_ell ,=, 2^{1 ,-, n_{mathrm{p}}}), i.e., the probability that a daughter cell receives zero plasmids from random segregation. The right-hand-side of the invasion condition Eq. 4 is therefore (delta ({Delta}_{mathrm{p}}n_{mathrm{p}} ,+, 2^{1 ,-, n_{mathrm{p}}}(1 ,-, {Delta}_{mathrm{p}}n_{mathrm{p}}))), which has a minimum at finite (n_{mathrm{p}}). The minimum in the invasion boundary at finite (n_{mathrm{p}}) indicates that in our framework optimal conjugative plasmids have a moderate copy number.What kinds of ecological dynamics does our model for a conjugative parasitic plasmid exhibit? To answer this question, we characterize the stability of the system’s equilibria (see SI Appendix 1 for details). For conjugative plasmids with the optimal copy number, the dominant form of loss will be from reduced host fitness (see SI Fig. S1), and thus we characterize the case of negligible loss rate (p_ell ,=, 0) (we consider the case of finite loss rates in SI Fig. S2 and find similar results). In Fig. 1C we show the phase diagram of possible ecological outcomes as a function of plasmid cost ({Delta}) and conjugation rate (gamma _{mathrm{c}}). For high values of plasmid cost and low values of conjugation rate, the plasmid is unable to invade and the plasmid-free equilibrium is the only stable state. As plasmid cost decreases or conjugation rate increases, plasmids are able to invade and there is a state of stable coexistence between plasmid-free and plasmid-containing cells. The range of conjugation rates permitting coexistence is larger for costlier plasmids. Once the plasmid cost is sufficiently low or the conjugation rate is sufficiently high, the unique stable state consists only of plasmid-containing cells (note that for finite values of loss rate (p_ell), this plasmid-only state will contain a small fraction of plasmid-free cells due to plasmid loss).Conjugation is the best studied mechanism of plasmid transmission, but plasmids can instead be transmitted by transformation, whereby plasmid-free cells are infected by free-floating plasmids, as illustrated in Fig. 1B. We therefore consider a model for plasmid-spread via transformation in which cell death results in release of free-floating plasmids which can then infect cells by mass action at rate (gamma _{mathrm{t}}). For every cell death, (n_{{mathrm{eff}}}) free-floating plasmids are released and these plasmids decay at a rate (delta _{mathrm{p}}). The dynamics of transformative plasmids are therefore:$$ frac{{drho }}{{dt}} ,=, alpha Crho – gamma _{mathrm{t}}rho P ,+, p_ell (1 ,-, {Delta})alpha Crho _{mathrm{p}} ,-, delta rho ,\ frac{{drho _{mathrm{p}}}}{{dt}} ,=, (1 ,-, {Delta})alpha Crho _{mathrm{p}} ,+, gamma _{mathrm{t}}rho P ,-, p_ell (1 ,-, {Delta})alpha Crho _{mathrm{p}} ,-, delta rho _{mathrm{p}},\ frac{{dC}}{{dt}} ,=, S ,-, alpha Crho ,-, (1 ,-, {Delta})alpha Crho _{mathrm{p}},\ frac{{dP}}{{dt}} ,=, n_{{mathrm{eff}}}delta rho _{mathrm{p}} ,-, gamma _{mathrm{t}}rho P ,-, delta _{mathrm{p}}P.$$
(3)
What is the condition for transformative plasmid invasion? The plasmid-free equilibrium is unstable if$$qquadqquadquadgamma _{mathrm{t}}rho ^ ast , > , delta _{mathrm{p}}left( {frac{{{Delta} ,+, p_ell (1 ,-, {Delta})}}{{n_{{mathrm{eff}}} ,-, {Delta} ,-, p_ell (1 ,-, {Delta})}}} right).$$
(4)
The left-hand-side of Eq. 9 is similar to the conjugative plasmid invasion condition, with the conjugation rate (gamma _{mathrm{c}}) replaced by the transformation rate (gamma _{mathrm{t}}). The numerator of the right-hand-side is also similar, with the cell death rate (delta) replaced with the plasmid decay rate (delta _{mathrm{p}}). The primary difference is in the denominator, which is the difference between the number of plasmids released on cell death, (n_{{mathrm{eff}}}), and the total replication deficit of plasmid-containing cells. If this denominator is negative, the inequality reverses and the plasmid-free equilibrium is always stable.The invasion condition in Eq. 9 determines the optimal (n_{mathrm{p}}) of transformative plasmids: if each plasmid within a cell has a fixed probability of remaining viable after cell death, (p_{mathrm{v}}), then (n_{{mathrm{eff}}}) will scale linearly with (n_{mathrm{p}}) such that (n_{{mathrm{eff}}} ,=, p_{mathrm{v}}n_{mathrm{p}}). If the denominator of Eq. 9 is positive, the optimal copy number will be (n_{mathrm{p}} ,=, 1/{Delta}_{mathrm{p}}), the point at which the host’s growth rate is driven to zero and the plasmid relies entirely on horizontal transfer to survive. These results are substantially different than in the case of conjugation: instead of restricting itself to a limited portion of the host’s metabolic budget, a transformative parasite maximizes its spread by using as much of the host’s resources as possible. This is reminiscent of the behavior of phages—suggesting a possible evolutionary link between parasitic plasmids and phages.As in the conjugation case, we now explore the ecological outcomes possible with transformative plasmids. We again consider the case of negligible loss rate (p_ell ,=, 0) and characterize the stability of the equilibria (see SI Appendix 1 for details). For (n_{{mathrm{eff}}} , > , 1), the system has similar ecological outcomes to the conjugative case, with the system transitioning through no-plasmid, coexistence, and plasmid-only equilibria as ({Delta}) decreases and (gamma _{mathrm{t}}) increases. Interestingly, when (n_{{mathrm{eff}}} , , 0.} end{array}$$
(5)
Fig. 2: Competition between populations may prevent runaway plasmid invasion.A Illustration of multiple populations, each occupying an isolated “deme”. During each epoch, populations compete for demes, with plasmid invasion occurring randomly (see Eq. 11 for details). In the example shown, in the first epoch, the population with two plasmids is replaced by the population with zero plasmids. In the second epoch, the population with magenta plasmids is invaded by the green plasmid. B Multiplasmid fitness costs for different types of epistasis. With no epistasis, fitness burden is multiplicative as in Fig. 1F. With positive epistasis, fitness burden increases sub-multiplicatively (pictured: ({Delta}_{{mathrm{tot}}} ,=, {Delta}) for (m , > , 0)). For negative epistasis, fitness burden increases super-multiplicatively (pictured: ({Delta}_{{mathrm{tot}}} ,=, 1 ,-, (1 ,-, {Delta})^{m^{3/2}})). C Steady-state distributions of number of plasmid types per cell in the Wright–Fisher model (see SI Appendix 3). Parameters ({Delta} ,=, 0.01) and plasmid invasion probability for each time period (q ,=, 0.005).Full size imageA population’s fitness is dependent on the number of unique plasmid types it contains. Thus far, we have considered a simple multiplicative model. However, it has been demonstrated that plasmid–plasmid interactions can modulate plasmid properties. For example, one study found that the presence of a plasmid can reduce the fitness cost of an invading plasmid [12]. To account for this epistasis between plasmids, we also consider fitness costs that increase sub-multiplicatively (positive epistasis) or super-multiplicatively (negative epistasis). We show examples of positive epistasis, negative epistasis, and no epistasis in Fig. 2B.What is the distribution of unique plasmid types across populations in our model with HGT barriers? We derive the stationary distribution of this model for the three different epistasis functions in Fig. 2B and plot them in Fig. 2C (see SI Appendix 3 for details). For the case of no epistasis, the stationary distribution is Poisson-like. Positive epistasis favors carriage of multiple plasmids and results in an exponential-like distribution with a long tail. Negative epistasis has the opposite effect: it penalizes carriage of multiple plasmids and results in a sub-Poissonian distribution with a reduced tail. Importantly, in all cases the runaway invasion of plasmids is stopped. While there is nothing stopping individual populations from being overrun by invading plasmids, these populations are more likely to be out-competed by populations with fewer plasmids. Thus, the single-population “tragedy of the commons” is counteracted at a higher level of selection.Analysis of natural genomesHow does our predicted distribution of unique plasmid types per cell compare to that in natural genomes? To make this comparison, we downloaded all complete bacterial genomes from NCBI (a total of 17,725 genomes) and analyzed their plasmid content. In Fig. 3A, we show the overall distribution of unique plasmid types per genome and corresponding model fits for both positive and no epistasis cases (see “Methods” for fitting details). The natural distribution is exponential-like and is well-fit by a model with positive epistasis. The model fit with no epistasis has too short a tail to be able to fit the data, and this problem becomes even more severe for negative epistasis. Thus, interestingly, we find that the distribution of unique plasmid types in real-world genomes is consistent with parasitic plasmids that ameliorate each other’s fitness costs. The degree of positive epistasis suggested by the data is quite strong—the distribution is nearly a pure exponential. In our model, this corresponds to the case in which the cost of all plasmids beyond the first is zero, such that for (m , > , 1) the parameters controlling both population replication and plasmid invasion are independent of plasmid number. This means that the ratio between consecutive elements of the distribution is constant, yielding an exponential tail. In order to determine whether our conclusions are influenced by oversampling of clinically relevant species, we excluded 91 genera known to be clinically relevant or human-associated and repeated our analysis. The remaining dataset contains nearly 5000 genomes and still shows clear exponential behavior (see SI Fig. S4). We also analyzed whether the presence of engineered strains within the NCBI database influences our results. We found that there are only a small number of these engineered strains and that removing them had negligible impact on our results (see SI Fig. S5).Fig. 3: Comparison of distributions of number of unique plasmid types per cell in natural genomes to Wright–Fisher model.A Distribution of number of plasmid types per cell in 17,725 complete NCBI genomes. Positive epistasis distribution fit with the fitness function ({Delta}_{{mathrm{tot}}} ,=, {Delta}) for (m , > , 0) (best-fit parameters: ({Delta} ,=, 9.8 ,times, 10^{ – 3}), (q ,=, 5.4 ,times, 10^{ – 3})), no epistasis distribution fit with ({Delta}_{{mathrm{tot}}} ,=, 1 ,-, (1 ,-, {Delta})^m) (best-fit parameters: ({Delta} ,=, 3.9 ,times, 10^{ – 3}), (q ,=, 1.4 ,times, 10^{ – 2})). B Distribution of number of plasmid types per cell in 1153 complete Escherichia genomes, with a positive epistasis fit using the fitness function ({Delta}_{{mathrm{tot}}} ,=, 1 ,-, (1 ,-, {Delta})^{m^a}) (best-fit parameters: ({Delta} ,=, 8.3 ,times, 10^{ – 3}), (q ,=, 8 ,times, 10^{ – 3}), (a ,=, 0.33)). C Distribution of number of plasmid types per cell in 576 complete Klebsiella genomes, with a positive epistasis fit using the fitness function as in (B) (best-fit parameters: ({Delta} ,=, 7 ,times, 10^{ – 3}), (q ,=, 9.7 ,times, 10^{ – 3}), (a ,=, 0.43)). Note that in certain limits of our models, only the ratio of (q) and ({Delta}) can be properly estimated, effectively reducing them to single parameter (see SI Appendix 3). D Distribution of number of plasmid types per cell in genomes containing and not containing cas genes. Genomes are considered cas containing if at least one chromosome or plasmid within the genome contains a cas gene. See “Methods” for details.Full size imageCan our model capture variation within smaller, related groups of genomes? In Fig. 3B we show the distribution of unique plasmid types per cell within the genus Escherichia. As can be seen, the data is very well fit by a model of parasitic plasmids with positive epistasis. However, our model was not able to capture some of the within-genus distributions we encountered. A notable exception is the distribution of unique plasmid types per cell in the genus Klebsiella, shown in Fig. 3C. In this genus, there is a substantial discontinuity between the zero-plasmid class and the rest of the distribution. While our simple Wright–Fisher model with some positive epistasis can capture the tail of the distribution, it then fails to capture the first few classes. Despite such exceptions, we find that the positive epistasis model is generally able to capture the overall trends in plasmid distributions over the bulk of natural genomes (see SI Fig. S6).It should be noted that our current model of constant plasmid invasion probability and strong positive epistasis is not the only Wright–Fisher model that can produce an exponential distribution matching the data. We analyzed a more general form of the Wright–Fisher model in which the invasion probability and total fitness cost are arbitrary functions of unique plasmid number (see SI Appendix). We find that the general condition to yield an exponential is that the plasmid invasion probability and total fitness cost must be comparable regardless of the number of plasmids in the cell. These results indicate that even if there is no epistasis in fitness cost, an exponential can still result if there is positive epistasis in the invasion probability (i.e., if existing plasmids make it more likely for a new plasmid to successfully invade).HGT barriers are not the only mechanism that can plausibly limit runaway plasmid invasion. Cells also have specialized systems to defend against foreign DNA, notably the CRISPR-Cas system [32]. To explore whether CRISPR-Cas is responsible for limiting plasmid invasion in natural genomes, we searched for cas genes within the NCBI complete bacterial genomes using HMMER (see “Methods” for details). We expect that if CRISPR-Cas plays a major role in limiting the spread of plasmids, the distribution of unique plasmid types per cell would be shifted towards lower plasmid numbers in genomes containing cas genes versus those lacking cas genes. In Fig. 3D, we show the distribution of unique plasmid types per genome in genomes containing at least one cas gene and those not containing any cas genes. The distributions are very similar, with no large differences between them. These results suggest that CRISPR-Cas is not a major mechanism limiting the spread of plasmids in bacteria. There are additional defense systems that may also influence plasmid carriage. However, a prior bioinformatics study found results similar to ours for restriction-modification (RM) systems, another defense system that protects against foreign DNA; the study examined the distribution of RM systems in bacterial genomes and found almost no relationship between the number of RM systems a genome encodes and the presence of plasmids (in one subset of data the authors actually found a positive relation) [33]. More