Harmful behaviour through plasmid transfer: a successful evolutionary strategy of bacteria harbouring conjugative plasmids

Conjugative plasmids are extrachromosomal mobile genetic elements pervasive among bacteria. Plasmids' acquisition often lowers cells' growth rate, so their ubiquity has been a matter of debate. Chromosomes occasionally mutate, rendering plasmids cost-free. However, these compensatory mutations typically take hundreds of generations to appear after plasmid arrival. By then, it could be too late to compete with fast-growing plasmid-free cells successfully. Moreover, arriving plasmids would have to wait hundreds of generations for compensatory mutations to appear in the chromosome of their new host. We hypothesize that plasmid-donor cells may use the plasmid as a ‘weapon’ to compete with plasmid-free cells, particularly in structured environments. Cells already adapted to plasmids may increase their inclusive fitness through plasmid transfer to impose a cost to nearby plasmid-free cells and increase the replication opportunities of nearby relatives. A mathematical model suggests conditions under which the proposed hypothesis works, and computer simulations tested the long-term plasmid maintenance. Our hypothesis explains the maintenance of conjugative plasmids not coding for beneficial genes. This article is part of the theme issue ‘The secret lives of microbial mobile genetic elements’.


Introduction
Conjugative plasmids are significant agents of horizontal gene transfer among bacteria, frequently transferring across taxa and enabling the co-mobilization of other non-conjugative plasmids [1,2]. Furthermore, they are relevant from a public health perspective because they frequently carry antibiotic resistance and virulence genes and are responsible for the emergence of multidrug resistance in clinical pathogens [3,4].
If a plasmid encodes resistance to a particular antibiotic, the presence of this drug confers a fitness advantage to plasmid-bearing cells by counterselecting plasmid-free cells. However, in the absence of appropriate selective forces, plasmid-bearing cells often replicate slower than otherwise isogenic plasmid-free cells-a phenomenon commonly referred to as plasmid fitness cost or simply plasmid cost. Given that selective conditions enforcing plasmid maintenance are not widespread nor constant, the ubiquitous plasmid presence among bacterial populations has been hard to explain. Moreover, some plasmids seem to lack relevant genes to ensure plasmid maintenance in bacteria (e.g. [5]).
In principle, despite imposing a fitness cost to their hosts, conjugative plasmids could ensure maintenance in bacterial communities by transferring efficiently to plasmid-free cells. That is indeed the case for some plasmids and experimental conditions [19,20]. However, in other cases, plasmid transfer rates observed suggest that plasmid mobility is insufficient to explain plasmid presence in bacterial populations. For example, for the R1 plasmid, the transfer rate experimental values (e.g. [21][22][23]) are often below the minimum threshold value for plasmid spread [21,24,25] and the same happens with other plasmids [26].
Compensatory mutations sometimes appear in the chromosome, plasmid or both. These mutations facilitate plasmid maintenance in bacterial communities by decreasing the burden of plasmid presence (reviewed in [27,28]). Plasmidborne mutations that compensate plasmid costs include, for example, those occurring in genes involved in its own replication [29] or transfer [30,31]. Compensatory mutations occurring in the chromosome include those in genes encoding helicases [32,33], global regulators [26,34], a hypothetical DNA-binding protein or the RNA polymerase [35]. Moreover, a recent report has shown that chromosomal mutations promoting host adaptation (niche adaptation) may also decrease plasmid cost as a pleiotropic effect [36].
While compensatory mutations certainly are relevant to plasmid maintenance [26,35,37], one must understand their role in the evolutionary success of conjugative plasmids. Despite facilitating the maintenance of plasmids in cells and their descendants, compensatory mutations occurring in the chromosome are not the best strategy for plasmid maintenance because the transconjugant clone usually has to replicate tens [35] or hundreds of generations [26,38,39] for the compensatory mutation to appear. Moreover, it is unclear why would conjugative plasmids rely on chromosomal compensatory mutations after every transfer event to guarantee evolutionary success. In laboratory experiments, the evolution of compensatory mutations is typically achieved by artificially selecting the plasmid-bearing clones, e.g. using an antibiotic to select a plasmid that confers resistance to that antibiotic. Yet, in nature, the pressure for plasmid maintenance may not exist or not take long enough for the appearance of compensatory mutations, so the prospects of transconjugants cells may be narrow. Thus it is unclear what maintains plasmids in bacterial populations for several generations while compensatory mutations do not appear. Chances are even slimmer for the plasmid if, after the appearance of compensatory mutations, the growth rate of plasmid-bearing cells is not as high as that of isogenic plasmid-free cells.
We have yet to provide a mechanism explaining the maintenance of costly plasmids yet not carrying any particular genes. This study provides a solution for this conundrum, where we show that a mechanism which relies precisely on plasmids' cost when they arrive in new cells is behind plasmid maintenance in nature.
Undoubtedly, one must consider the impact of the donor on cells that receive the plasmid copy (transconjugants).
However, because most bacteria live in structured habitats, one must also consider the impact of plasmid transfer on other cells in the vicinity of donor and recipient cells.
An allele's evolutionary success depends on its inclusive fitness, comprising (i) its direct impact on its own reproduction and (ii) its indirect impact on alleles copies present in other individuals [40,41]. The indirect fitness component is responsible for evolutionary social interactions in many phenomena involving different taxa, including microorganisms [42,43]. As explained below, we may consider plasmid transfer events as social interactions. Consider a conjugative plasmid and a bacterial cell already adapted to each other (because, somewhere in the past, a chromosomal mutation ameliorated the disruption associated with plasmid presence). When the plasmid transfers from this (focal) donor cell, the fitness cost experienced by the recipient cell owing to plasmid acquisition (becoming a transconjugant cell) translates to a lower replication probability, hence a decrease in the ability to spend resources. Unspent resources, comprising all essential components for bacterial replication, such as nutrients or space, are now available to the donor cell (direct impact) and other nearby cells (indirect impact) (figure 1). As we now explain, this indirect impact becomes relevant for the donor population's success, particularly in structured habitats. First, if most nearby cells in that neighbourhood are similar to the donor cell, the transfer event increases their success, implying a relative increase in their frequency (figure 1, upper part). This advantage arises because resources will mostly be consumed by other cells harbouring similar copies of the focal plasmid and not by transconjugant cells that replicate slowly for several generations. However, if most nearby cells in that neighbourhood are similar to the recipient cell, the transfer event increases recipients' success, implying a relative increase in their frequency (figure 1, middle part). Finally, if there is no plasmid transfer, the frequency of plasmidbearing cells decreases if the plasmid is costly (figure 1, lower part).
We start this paper with a mathematical model based on Hamilton's rule [40,[44][45][46] to show that plasmid transfer is initially advantageous to donor cells if the ratio of the density of donor to recipient cells is high or if the cost to unadapted transconjugant cells is high. The mathematical model assumes that plasmids have no relevant genes beyond those involved in their replication, partition systems to ensure that each daughter cell receives at least one plasmid copy and conjugation for plasmid transfer. Then, because the initial scenario changes, namely the formation of several transconjugants and the possibility that some of them adapt to the presence of the plasmid as well as the possibility that some plasmid-bearing cells lose their plasmid ( plasmid segregation), we analysed the long-term effect of plasmid donation to the population of donor cells with computer simulations. Hence, while the mathematical model shows the conditions for the short-term advantage of donor cells, simulations show that, even in the long term, the cost inflicted on transconjugants may be advantageous to the donor population. Surprisingly, we also show that the population of transconjugants and their descendants is almost irrelevant for the plasmid success in some conditions. Therefore, at least in these conditions, plasmid-mediated interference competition, and not so much plasmid spread through bacterial communities, is the primary evolutionary royalsocietypublishing.org/journal/rstb Phil. Trans. R. Soc. B 377: 20200473 force for conjugative plasmids' success when plasmids do not code for advantageous genes.

(a) Computational model: concept and initial conditions
The central concept of this work is that, although donor bacteria may undergo a permanent fitness cost, c, for carrying a plasmid, it can impose an even higher cost, b, to other cells by allowing plasmid transfer into them. These transconjugants then pay a fitness cost for a period of n generations. After n = 70 generations (as in [35]) or 400 generations (close to [39]), a compensatory mutation appears, so the cost ameliorates to the same value as that of the original donor cells (cost c) (  royalsocietypublishing.org/journal/rstb Phil. Trans. R. Soc. B 377: 20200473 asynchronous, which means that the decision for replication is random. Therefore, the number of generations of the population (as a whole) does not coincide with the number of generations of each original cell. Moreover, although we assume that, individually, a cell with n duplications (for example, 400 duplications) receives a compensatory mutation, some cells receive a compensatory mutation sooner than others owing to the asynchronicity. We used two computer models to study bacterial growth and plasmid transfer: one simulated these processes in unstructured habitats and another in structured habitats. This second model uses a spatially explicit model developed and, most importantly, experimentally tested by Krone et al. [50], Zhong et al. [51] and Fox et al. [52]. To simulate the same processes in an unstructured habitat, we adapted the model from the one used to simulate a structured habitat (see below in the respective subsection).
We define donors (D) as plasmid-bearing cells present at the beginning of the simulation and their descendants, recipient cells (R) are those that do not carry the plasmid and their descendants, transconjugant cells (T ), which are recipient bacteria that received the plasmid and their descendants and segregant cells (S), which are donor or transconjugant bacteria that lost the plasmid and their descendants. The four cell types are of the same bacterial species. At any time point, only these four cell types are in the habitat, plus empty sites (E) with D + R + T + S + E = N + E = 10 6 , where N is the total number of cells in the system, N = D + R + T + S. In the simulations, we assume that, upon cellular division, most plasmid-bearing cell originates two plasmid-bearing cells. However, we assumed that there is some probability of plasmid loss (segregation rate). The rate of plasmid loss can vary substantially, at least ranging from 10 −9 to 10 −3 [33,53] cell −1 generation −1 . The appearance of plasmidfree segregants decreases the relative fitness advantage of plasmid-bearing cells [54]. Therefore, we used the highest value (10 −3 cell −1 generation −1 ) to be conservative. Data on fitness values of bacteria that lost a conjugative plasmid is scarce. Therefore, we adopted a neutral assumption by presuming that the fitness of donors or transconjugants (with or without compensatory adaptation) that lost the plasmid becomes 1 (no fitness cost nor benefit). Finally, these plasmid-free cells that once lost a plasmid may receive the plasmid again; in these cases, cells regain the cost they had at the moment of plasmid loss (fitness cost c if it was a donor or an adapted transconjugant or fitness cost b if it was an unadapted transconjugant). At the beginning of all simulations, there are 10 000 bacteria in the following proportions of donors, D/(R + D), depending on the simulation: 99%, 50%, 1% and 0.1% (table 1).

(b) Computational model: simulations in structured habitat
As mentioned above, we used a model of structured habitats developed by Krone et al. [50], Zhong et al. [51] and Fox et al. [52]. It is an individual-based lattice model made in a grid of 1000 × 1000 sites with periodic boundaries-that is, the upper margin is linked to the lower margin, and the left margin is linked to the right margin. Each site can have a single cell; assuming the average size of a cell is 1 µm 2 , the lattice size corresponds to an area of approximately 1 mm 2 . Each space in the grid can be empty or occupied by a single bacterium. Initially, some cells harbour a conjugative plasmid that is not present in others.
Following [51], we consider that each cell has a local neighbourhood and a nutrient neighbourhood (figure 2a). The local neighbourhood, defined by the 3 × 3 squares centred on a focal bacterium, represents (i) the places where it can duplicate; and (ii) the available neighbours for conjugation. The nutrient neighbourhood, defined by the 7 × 7 squares centred on the focal bacterium, allows estimating the available nutrients (C ) for that bacterium. The C value is also the proportion of empty spaces in the nutrient neighbourhood [50,51].
Initially, we randomly distributed the 10 000 bacteria across the grid. The growth rate (ψ) and the conjugation rate (γ) of each cell type depend on the amount of the available nutrients (C ) in its nutrient neighbourhood: Here θ is a threshold for growth rate as in [51] and ψ max = 1cost, with 'cost' being the plasmid cost (note that, in our model, the fitness cost differs between bacteria and can even evolve-see below): Here θ 1 and θ 2 are thresholds for conjugation rate; the parameter γ max represents the maximum value for the conjugation rate (table 1). Different simulations use different values for γ max , γ max ∈ {0.001, 0.01, 0.1, 1}. The γ max = 1 value is about half of the value determined for the IncP-1 pB10 plasmid using the same computer model [52] and one-third of that of the IncF II R1drd19 plasmid also using the same computer model [50]. Values of γ max used here span four orders of magnitude, hence comprising most values observed with different plasmids and bacterial species [22,23,51,55].

(c) Computational model: simulations in unstructured habitat
The computer model for unstructured habitats results from an adaptation of the model for structured habitats [50,51]. In unstructured habitats, bacterial positions, as well as neighbourhoods, are no more relevant. The growth and conjugation rates follow the same equations shown above. Cells interact freely, and all cells have access to all nutrients present in the habitat; therefore, the royalsocietypublishing.org/journal/rstb Phil. Trans. R. Soc. B 377: 20200473 parameter C is the proportion of empty grid squares out of the maximum possible (10 6 ). For conjugation to occur, a donor or a transconjugant cell and a recipient or a segregant cell must find each other. Thus, there is a conjugation event per each plasmidbearing cell with a probability proportional to (D + T )/N * (R + S)/N, where N is the total number of cells in the system.

(d) Simulation cycles: structured habitat
In each simulation cycle, a location on the grid that contains a bacterium is randomly chosen and the following processes are performed: (i) check whether the bacterium duplicates, i.e. whether there is at least an empty site in the local neighbourhood and whether a random number between 0 and 1 is lower than the growth rate. If the bacterium duplicates and if the bacterium contains the plasmid, check if the new bacterium loses the plasmid, that is, whether a random number between 0 and 1 is lower than the segregation rate; and (ii) if the bacterium contains the plasmid, check if there is a conjugation event, i.e. at least one recipient bacterium in the local neighbourhood. If more than one recipient bacterium is in this neighbourhood, choose one of them randomly and verify if a random number between 0 and 1 is less than the conjugation rate for that only bacterium (equation (2.2)).
Simulations begin by randomly distributing 10 000 bacteria across the grid in specific proportions (table 1). Grid locations are updated randomly and asynchronously. At the end of each cycle, we check whether the number of bacteria in the grid is at least 95% of the total capacity (950 000 bacteria). In this case, we randomly eliminate bacteria until only 50% of the sites contain a cell. Then, the surviving 500 000 cells regrow again until reaching 95% of all sites (figure 2b). The simulation ends when the grid reaches 95% of its capacity 1073 times (electronic supplementary material, table S1 and figure S1, show the respective pseudocode and flowchart). In the first step, each cell completes log 2 (950 000/10 000) = 6.57 generations on average, and in the following 1073 steps, each cell completes 0.926 generations on average. Therefore, each initial clone completes 1000 generations on average. If bacterial cells of some species can duplicate in just 20 min in ideal laboratory conditions (e.g. well shaken Escherichia coli cultures in 37°C), 1000 generations correspond to 13.9 days. Thus, in such a long period under natural conditions, something would happen and change the initial conditions of the ecosystem. In nature, 1000 generations represent even more time because, for example, the estimation is that E. coli takes about 15 h to duplicate [56]-in this case, 1000 generations correspond to 625 days.

(e) Simulation cycles: unstructured habitat
In each simulation cycle, a bacterium is randomly chosen, and the following processes are performed (electronic supplementary material, table S2 and figure S2, show the respective pseudocode and flowchart): (i) verify whether the bacterium duplicates, that is, whether a random number between 0 and 1 is lower than the growth rate (equation (2.1)). Note that, in the unstructured habitat, the nutrient neighbourhood that affects the nutrient availability C, which is used in equation (2.1), represents the 'global' number of empty grid cells. If the bacterium duplicates and if the bacterium contains the plasmid, verify if the new bacterium loses the plasmid, that is, whether a random number between 0 and 1 is lower than the segregation rate; and (ii) if the bacterium contains the plasmid, check if there is a conjugation event. There are two steps. First, if a random number between 0 and 1 is less than the encounter probability between a plasmid-bearing cell and a plasmidfree cell ((D + T )/N * (R + S)/N), as explained above), then a donor or a transconjugant is close to a recipient cell. Second, if a random number between 0 and 1 is less than the conjugation rate (equation (2.2)), the recipient cell becomes a transconjugant cell with an initial fitness cost b that lasts 70 or 400 generations. At the end of each cycle, we check whether the number of bacteria in the grid is at least 95% of the total capacity (950 000 bacteria). The simulation proceeds as for the structured habitat.

(f ) Fitness analysis
During the simulations of competitions between two strains, sometimes one of the competitors declines in abundance. Therefore, to measure the performance of strain a relative to that of strain b, we calculated the selection rates [57]: In this mathematical expression, Ln is the natural logarithm, and N A f and N Ai are the final and the initial number of cells of type A (the same for cells of type B: N B f and N Bi ). Here m A and m B are the Malthusian parameters of strain A and B. Therefore, the selection rate constant is equal to the difference in the two genotypes' realized Malthusian parameters during the competition for resources [57]. That is, in a full simulation of 1000 generations, if S AB is positive (negative), the density of A increases by about S AB natural-logs more (less) than the density of B. Note that we use the letter S instead of the standard r to avoid confusion with relatedness; however, S should not be confused with selection coefficients.
In figures 3 and 4; electronic supplementary material, figure  S5, we calculated the donors' relative success, (m A − m B ) with transfer , hence their performance relative to recipients, transconjugants and segregants (we use the suffix 'with transfer' to distinguish this simulation from other-see below). A positive value reveals that the competitiveness of donors is higher than that of the other three strains.
To understand how much the transfer of plasmids contributed to the success of donor cells, we performed a control simulation, this time where there was no plasmid transfer.  . Arrows indicate the cases where donors went extinct at least in one replicate (in these cases, data points assume that half a colony survived; otherwise, fitness would be -infinity). Coloured asterisks represent cases where the fitness of donors is significantly above zero (one-sample t-test, p-value < 0.05). Black asterisks represent cases where the fitness of the plasmid (donors plus transconjugants) are significantly above zero (one-sample t-test, p-value < 0.05). Bars represent standard deviation. This equation (to be used in the electronic supplementary material, figures S3 and S4) is a measure of the contribution of plasmid transfer to the relative success of donors. Values above zero imply that plasmid transfer contributes to the relative success of donors, and the higher the value, the higher the contribution.

(a) Hamilton's rule, spiteful behaviour and plasmid transfer
What are the conditions for an initial advantage of donor cells over plasmid-free cells? To answer this question, we note that the end of the Introduction section and figure 1 describe what is known as spiteful or harmful behaviours adapted to the case of plasmid transfer. In a spiteful behaviour, the actor decreases its direct fitness to decrease the fitness of the recipient of that behaviour while indirectly affecting other individuals in the same neighbourhood [44,46,[59][60][61][62]. Following Taylor [63] and Queller [46], one must consider all individuals whose fitness is affected by the behaviour.
In appendix A, we show that, if there are D donors and R recipient cells in the neighbourhood comprising all the affected individuals, spite is advantageous if: In this equation, c is the fitness cost paid by the donor cell, and b is the cost paid by the plasmid recipient. In an unstructured habitat (e.g. well-mixed liquid environment), any plasmid-bearing cells can donate a plasmid to any plasmidfree cell, and any cell can use the resources unspent by unadapted transconjugant cells-all cells are indirectly affected by conjugation events. Therefore, plasmid transfer is advantageous to donor cells only if equation (3.1) is true, where D and R correspond to cell densities of donor and recipient cells in the whole habitat. In a structured habitat, however, the interactions are primarily local, comprising just a few individuals. In this case, the actual value of the proportion of donor cells in each neighbourhood may vary across the habitat. Thus, even if equation (3.1) is not valid (in the habitat as a whole), locally, D/R may still be higher than c/b in several places in the habitat. This analysis implies that, compared to unstructured habitats, structured habitats facilitate donors' success.
Equation (3.1) shows that spite evolves if the ratio of costs (low cost for donor cells, and/or high costs for newly formed transconjugants) is lower than the proportion of donors to recipients. Equation (3.1) also shows that plasmid donation is advantageous for high densities of donor cells and low densities of recipient cells. The biological reason for the emergence of this criterium is that the interaction between donor and recipient cells is costly to the recipient cell, implying that non-interacting individuals gain a relative advantage from the 'nasty' interaction between the donor and the recipient cell. Therefore, a donor cell should only interact with a recipient cell if other affected cells are also its kin (similar donor cells) (figure 1).
Note that equation (3.1) state the conditions under which donors are advantageous over plasmid-free cells only at the beginning (when there are no transconjugants), even if plasmid-free cells suffer a fitness cost only after receiving the plasmid.

(b) Long-term plasmid maintenance: computer simulations
Because the victim's harmful act receives the plasmid and plasmid-bearing cells may lose the plasmid upon cell replication, the system is more complex than predicted by equation (3.1). Moreover, compensatory mutations appearing in transconjugant cells and their descendants change the initial scenario. Therefore, we performed simulations in unstructured and structured habitats with a carrying capacity of one million cells ( plasmid-bearing or plasmid-free cells) and lasting 1000 generations (see Methods (d)). During simulations, donor cells pay a fitness cost c (with 0 ≤ c ≤ 0.1) for harbouring a plasmid relative to plasmid-free cells. However, as soon as a plasmid-free cell receives a plasmid, it pays a fitness cost b, with 0 ≤ c < b, as it is still non-adapted to the presence of the plasmid. After an adaptation period of 70 or 400 generations, transconjugants' cost for harbouring a plasmid decreases from b to c (the fitness of transconjugants increases from 1 − b to 1 − c); hence the replication rate of transconjugants becomes equal to that of original donor cells.

(i) Simulations in unstructured habitats
As just explained, in unstructured habitats, bacteria have no defined positions, interacting globally with any other cell in the habitat. The population dynamics showing the model behaviour is available on GitHub (https://github.com/jre belo27/harmfull_plasmids). 3)) than the other strains with c = 0, for example, if the maximum conjugation rate, γ max is 0.01, and the initial proportion of donors is 50%. Other simulations, however, show that donors did not perform so well (e.g. if γ max = 0.01 and the initial proportion of donors is 99%), even though donors pay no cost for carrying the plasmid. Possibly, the explanation for the difference between these cases is that, with such a high initial proportion of donors in the habitat, there are few chances for them to increase in frequency, particularly for low conjugation rates. Moreover, one can see in the GitHub folder mentioned above that, for example for the case where the plasmid cost in transconjugants is b = 0.6, recipient and transconjugant royalsocietypublishing.org/journal/rstb Phil. Trans. R. Soc. B 377: 20200473 cells go extinct and only donors and segregant cells survive. While the proportion of donors to all other cell types decreased from 99 to ≈93% in one of the replicates (mostly owing to segregation), it is interesting to note that conjugation was responsible for the victory of the donor cells population (with plasmid and segregants).
For c > 0, the condition expressed in equation (3.1) is much more stringent. The minimum value of c/b used in this work is 1/12 (for c = 0.05 and b = 0.6), so D/R should be above 1/12. Accordingly, when the conjugation rate is 1, donors have the advantage to pass the plasmid to other cells if the initial proportion of donors is 99% or 50%, but not for the cases 1% nor 0.1%. Simulations confirmed these predictions in several cases. Equation (3.1) is a necessary condition, however not sufficient for being advantageous per se to harm another individual. For example, if the conjugation rate is too low (e.g. conjugation rate is 0.01, and c > 0), the proportion of donor cells may decline even if equation (3.1) is verified ( figure 3).
Furthermore, it is interesting to find that the conditions where the plasmid (donors plus transconjugants) was successful are the same as the conditions where donors are successful. This finding also explains another unexpected observation: the simulations' results are very similar irrespectively to the adaptation period (70 versus 400 generations).
To understand how much the transfer of plasmids contributed to the success of donor cells, we performed another simulation where there was no plasmid transfer. Data on these simulations are also in the GitHub folder, including population dynamics. Then, we used equation (  . Arrows indicate the cases where donors went extinct at least in one of the replicates (in these cases, data points assume that half a colony survived; otherwise, fitness would be -infinity). Coloured asterisks represent cases where the fitness of donors is significantly above zero (one-sample t-test, p-value < 0.05). Black asterisks represent cases where the fitness of the plasmid (donors plus transconjugants) are significantly above zero (one-sample t-test, p-value < 0.05). Bars represent standard deviation.
royalsocietypublishing.org/journal/rstb Phil. Trans. R. Soc. B 377: 20200473 the contribution of plasmid transfer to donors' relative success. Positive values imply that plasmid transfer contributes to donors' success, and the higher this value, the higher the contribution (electronic supplementary material, figure S3). This figure represents 73 points (indicated with asterisks) where plasmid transfer positively affected donors' success. Interestingly, some of the 71 cases marked with a coloured asterisk in figure 3 do not appear in the electronic supplementary material, figure S3-these are cases where donors were successful relative to recipients and transconjugants but where the impact of plasmid was non-significant. Moreover, some points have an asterisk in the electronic supplementary material, figure S3 (conjugation had a positive impact on donors) but not in figure 3 (donors were unsuccessful). In these cases, donors decrease in frequency, but plasmid transfer significantly contributed to donors' fitness. In other words, with plasmid transfer, the donors' fitness is not so low as without plasmid transfer. Finally, some data points do not appear in the electronic supplementary material, figure S3-these are the cases where donor cells went extinct in both simulations (with and without plasmid transfer).

(ii) Simulations in structured habitats
We then performed the simulations with the same parameters but in structured habitats, where cells grow and interact on a 1000 × 1000 = 10 6 grid. The population dynamics showing the model behaviour is also available on GitHub (https://github.com/jrebelo27/harmfull_plasmids). Figure 4 shows that the difference of the Malthusian parameters between the donor population and the recipient, transconjugant and segregant populations is positive (significantly above zero, Student t-test, p-value < 0.05) in 137 out of 144 conditions analysed with a conjugation rate of 0.1 or 1. All seven exceptions occur when the initial frequency of donors is 99% ( figure 4). Therefore, a possible explanation is that donor cells already start at a very high proportion of 99%, giving few opportunities to grow even more. This explanation agrees with another observation: that all seven exceptions also occur when the initial cost in transconjugants is low (b = 0.2). The population dynamics shown in the GitHub folder are very similar for the three values of b, but the population of transconjugants remains at a lower level than for the case of b = 0.2. In other words, if the initial frequency of donors is already high and the return per plasmid transfer is low, donors decrease in frequency. As for the unstructured habitat, we performed simulations without plasmid transfer. The respective results, including population dynamics, can be found in the GitHub folder. Then we used equation (2.4) to quantify the contribution of plasmid transfer on the success of donor cells. Positive values imply that plasmid transfer contributes to donors' success, and the higher this value, the higher the contribution (electronic supplementary material, figure S4). This figure represents 137 points (indicated with asterisks) where plasmid transfer positively affected donors' success. Some points marked with an asterisk in the electronic supplementary material, figure S4 were not marked with an asterisk in figure 4-these are cases where donors were unsuccessful (they decrease in frequency), but plasmid transfer significantly contributed to donors fitness. Moreover, when the conjugation rate is shallow (several cases if γ max = 0.01 and all cases for γ max = 0.001), donors are not superior to the other strains ( figure 4). However, even in these cases, plasmid transfer still contributes to the donors' fitness. Finally and importantly, in several cases, the donor population became extinct when there was no plasmid transfer but survived when plasmid transfer occurred (indicated with diamonds in the electronic supplementary material, figure S4).
We have seen that, in many conditions, donors are competitively superior even when growing slower than plasmid-free cells (c > 0) and despite the relatively high rate of plasmid loss. Part of this success results from plasmid transfer from the initial donor cells; another part may result from the transfer from transconjugants. The latter may be relevant because we assumed that, before and after adaptation, the conjugation rate from transconjugants is the same as that from the original donors. To estimate the importance of the transfer from transconjugants to the relative success of donors, we calculated the success of plasmids; that is, we calculated the number of plasmid-bearing cells (the sum of donors and transconjugants) relative to plasmid-free cells (recipient and cells that lost the plasmid). Black asterisks in figures 3 and 4 indicate the cases where plasmid success is significantly higher than zero (one-sample t-test, p-value < 0.05). With few exceptions, the cases indicated with black asterisks are the same as those indicated with coloured asterisks-that is, in most cases, if the plasmid (donors plus transconjugants) is successful, donors alone also are (figures 3 and 4). This coincidence suggests that plasmid transfer from transconjugants is almost irrelevant to the donors' success.
Simulations showed that, in structured habitats, plasmid donation is advantageous to donor cells even when the initial D : R ratio is very low (D : R = 100 : 9900 or 10 : 9990, that is, D/(D + R) = 1% or 0.1%) (figure 4). This advantage observed in a structured habitat is possible because neighbourhoods are small, and there is a spatial variance of the local values of D and R, as we now explain. For example, consider the case where the cost for donors is c = 0.1, and the cost for newly formed transconjugants is b = 0.4. In this case, the ratio c/b in equation (3.1) becomes 0.25. Also, consider that the initial number of plasmid-bearing and plasmid-free cells are D = 100 and R = 9900, a total of 10 000 cells (hence, D/(D + R) = 1%). Then, equation (3.1) becomes 0.01 > 0.25, which is false. Because equation (3.1) is false, we may conclude that donors would be unsuccessful in an unstructured habitat (this is indeed the case- figure 3). However, that may not be the case in structured habitats because, in such habitats, what counts is the local value of D/R, not of the population as a whole. Plasmid-bearing cells duplicate several times, forming a 'colony' before encountering a 'colony' of plasmid-free cells to which plasmids can transfer. When the two 'colonies' of plasmid-bearing and plasmid-free cells 'touch' each other, the local D/R ratio may be high, hence fulfilling equation (3.1) (locally) and meaning that spite is advantageous in that neighbourhood. To test this hypothesis, we ran a simulation (c = 0.1; b = 0.4; γ max = 1), and, every time a donor cell donates a plasmid, we calculated the mean value of relatednesses in its 7 × 7 neighbourhood. At the end of the first cycle (around 6.  The model assumed that bacteria duplicate at a maximum rate only if nutrients' concentration is above a certain threshold value θ [51,52]. All simulations presented until now used θ = 0.8 (table 1). However, conditions may vary and the ability of different bacterial species to use resources may also vary, so we performed further simulations, this time for θ = 0.6 and θ = 1.0 (table 1), for γ max = 1 and D/ (D + R) = 50%. In all cases, data points are significantly above zero, suggesting that, concerning the donors' success, the computer model is robust under changes in nutritional conditions (electronic supplementary material, figure S5).

Discussion
This paper shows that the fitness cost frequently imposed on newly formed transconjugants benefits the original population of plasmid-bearing cells, even if the plasmid is also costly in the donor cells. Such an advantage allows the maintenance of the original donor population even when the conjugation rate is not very high. With this mechanism, donors' success depends on plasmid ability to move into other cells, not on any particular beneficial genes such as those conferring, for example, drug resistance or other adaptation traits. The independence from beneficial genes is relevant because, otherwise, cells would recruit the beneficial gene(s) into the chromosome and eliminate the costly plasmid [64,65]. In a previous study, Lili et al. [66] used ordinary differential equations to show that conjugative plasmids may persist by oscillations between plasmid-bearing and plasmid-free cells in the absence of selection for plasmidencoded traits. However, unlike the present study, that model assumes that plasmids encode post-segregational killing mechanisms ensuring that segregation does not generate viable plasmid-free cells (also see [64]). Moreover, this study shows that, in many conditions, plasmid transfer confers a fitness advantage to donor cells, not only to the spreading plasmid.
The mathematical model in appendix A has shown that the conditions for donors to gain an advantage of donating plasmids are broader for the higher donor to recipient proportions. However, as in bacteriocin-mediated [67] or virusmediated spiteful behaviour [68], donors may have the advantage of donating plasmids in structured habitats, even if the overall ratio of initial donor to recipient cells is very low. This is because the spontaneous emergence of the spatial variance of the proportion of donor cells on a surface allows donor cells to increase in proportion locally and globally. Therefore, there is no need for a particular mechanism to increase the local proportion of donor cells. In unstructured habitats, however, conditions for conjugation-mediated spiteful behaviour are much more stringent.
The present study further suggests that the role of secondary transconjugants (formed by plasmid transfer from transconjugants to plasmid-free cells) or even their adapted descendants are not essential in structured habitats to ensure donors' success. We can take this conclusion by observing that the conditions where plasmids are successful (donors + transconjugants) almost coincide with the conditions where donors alone are successful (see figure 4, where coloured and black asterisks appear almost in the same conditions). Given this finding, it should not matter whether compensatory mutations appear sooner or later in transconjugant cells. Indeed, the conditions where donor cells are successful if the adaptation period is 70 generations almost match the conditions where donor cells are successful with a much longer adaptation period of 400 generations (compare the left and right sides in figures 3 and 4).
One may conceive that donors could use plasmid-mediated spiteful behaviour to compete with genetically non-identical co-inhabiting cells. In that case, this process reminds the hypothesized mechanism that hosts could use their pathogens as biological weapons to compete with conspecifics [69,70]. There is, however, a sharp difference. An essential ingredient of the pathogen-mediated harming behaviour is the amplification of the pathogen among the susceptible host population and its successive transfer to other susceptible hosts [70], which is highly effective when bacteria use their lysogenic viruses as biological weapons [68,[71][72][73][74]. However, our results suggest that the role of secondary transconjugants (formed by plasmid transfer from transconjugants to plasmid-free cells) or even their adapted descendants is not essential for donors' success in structured habitats. In the case of temperate bacterial viruses [68,[71][72][73][74] or bacteriocin-mediated spiteful behaviour [61,67], bacteriocin molecules or viruses may diffuse and act distantly from the bacterial cell that produced them. In the case of plasmid transfer, donor and recipient cells must be side-by-side [75]. Another significant difference between the mechanism shown here with conjugative plasmids and that of bacterial viruses or bacteriocins is that we do not assume that plasmids encode lysins, toxins or any other chemical weapons to destroy recipient cells.
As already mentioned, we are not focusing on the advantage of having any particular plasmid-encoded phenotype. Nevertheless, these results suggest that plasmids might be evolving towards the imposition of higher costs, a 'weaponizing' process. Such a 'weaponizing' process suggests an explanation for the presence of genes encoding bacteriocins in plasmids [76]. However, from the plasmids viewpoint, killing nearby cells would not be the best strategy because these cells constitute putative future hosts. Of course, viruses have no similar spatial constraint because their next host does not need to be close. Moreover, plasmids should not be too hostile with their present host because, while most viruses that infect bacteria need to kill their present host to colonize future hosts, conjugative plasmids need their present host alive. In conclusion, 'weaponizing' processes in plasmids are expected to be subtle.
Although not studied here in detail, the plasmid-mediated spiteful behaviour also suggests a mechanism for maintaining non-transferable plasmids. In a previous study, San Millan et al. [77] studied the instability of a non-transferable plasmid with a high rate of segregational loss. They have shown that rare events of selection for plasmid-encoded traits (e.g. drug resistance) and compensatory mutations are sufficient to maintain the non-conjugative plasmid in the population for a long time. The results presented in this paper suggest that their mere presence in cells turns non-conjugative plasmids into defensive tools against incoming conjugative plasmids if the two plasmids belong to the same incompatibility group. Such a selective mechanism may provide a selective force for the maintenance of non-conjugative plasmids.
There is yet another previously described mechanism promoting the maintenance of non-conjugative plasmids. With computer simulations of growing bacteria in a structured habitat as in the present work, Werisch et al. [78] studied the maintenance conditions of non-conjugative plasmids in royalsocietypublishing.org/journal/rstb Phil. Trans. R. Soc. B 377: 20200473 competition with plasmid-free cells. They have shown that the spread of costly conjugative plasmids among plasmidfree cells increases the relative fitness of cells harbouring non-conjugative plasmids, hence helping the stable maintenance of the latter [78]. The mechanism works if the conjugative and the non-conjugative plasmids belong to the same incompatibility group (blocking the entrance of the conjugative plasmid into cells harbouring the non-conjugative plasmid) and if the conjugative plasmid is more costly than the non-conjugative plasmid. However, because in their model there are no compensatory mutations, the plasmid's transfer rate (that may increase for some periods owing to transitory derepression of plasmid transfer) has to counterweigh the conjugative plasmid's cost [78]. With the model presented here, we aim to explain why, in the first place, costly conjugative plasmids persist in bacterial populations.
In this work, we focused on the case where compensatory mutations occur in chromosomes and not in the plasmid. Previously, with a mass action model (modelling well-mixed, non-structured, populations) Zwanzig et al. [79] showed that, because mutations occurring in conjugative plasmids can transfer to other cells, compensatory mutations in plasmids are prone to be more beneficial to the plasmid success than if they were occurring in the chromosome. Thus, their results suggest that compensatory mutations occurring in plasmids would also be more favourable to plasmid maintenance in structured populations. However, we expect that the plasmidmediated harmful behaviour would still be relevant because compensatory mutations often take hundreds of generations to occur. Moreover, the compensatory mutation occurring in a cell of a specific bacterial strain may not work in another strain (e.g. [38]). Finally, the present paper explains why so many adaptations occur in the chromosome (e.g. [26,35]): they serve the evolutionary interests of the chromosome.
This study has limitations that should be addressed in future studies. For example, we consider that the conjugation rate is constant in each simulation. However, that is false in some cases. Conjugative plasmids that repress their transfer may transiently derepress in newly formed transconjugants [19]. The present study shows that the negative effect of plasmids on the recipient population increases with the plasmid transfer rate. Therefore, we expect that transient derepression would increase donors' success. Also, we assumed that transconjugant cells adapt to the plasmid presence whenever they complete a certain adaptation period (70 or 400 generations). Most likely, the population of adapted transconjugants observed by several authors after a few hundred generations consists to a large extent of the replicates of those cells that have previously acquired compensatory mutations. Consider, for example, the case of adapted transconjugants appearing after the adaptation period of 70 generations-in this case, maybe these are those mutants detected at the population level after, say, 400 or 500 generations [35]. Future studies should clarify the consequences of our simplifying assumption. Moreover, we considered a computational model where bacteria live in a two-dimensional layer [50,51]. Although its authors experimentally tested this model, it does not consider that bacteria may form (three-dimensional) biofilms that may affect or be affected by conjugative plasmids' transfer [80][81][82].
In conclusion, our results show that the negative effect of plasmids on transconjugants can be advantageous to donor cells. Thus, this paper provides a new explanation for the prevalence of conjugative plasmids in bacterial communities and indicates a previously unidentified benefit of plasmids' transferability.
Data accessibility. A detailed model description following the ODD protocol, the code for reproducing the content described here, and population dynamics of each simulation, are available at https:// github.com/jrebelo27/harmfull_plasmids. plasmid) and in the neighbourhood ( p E = D/(D + R) where D and R is the number of donor and recipient cells in the neighbourhood), respectively. Then equation (A 1) becomes ð0 À p E Þ=ð1 À p E Þ: (Àb) À c . 0, or p E =ð1 À p E Þ . c=b, and equation (3.1) follows.
In this paper, c and b correspond to the plasmid fitness cost on donor cells and transconjugants, respectively. We further assume that, because donor cells received the plasmid long ago, adaptation already occurred-this assumption implies that plasmid cost in donor cells is lower than in newly formed transconjugants (c < b). Finally, note that the plasmid fitness cost in donor cells, c, may be zero-in these cases, the plasmid and the chromosome are fully adapted to each other.