The impact of natural transformation on adaptation in spatially structured bacterial populations

Background Recent studies have demonstrated that natural transformation and the formation of highly structured populations in bacteria are interconnected. In spite of growing evidence about this connection, little is known about the dynamics of natural transformation in spatially structured bacterial populations. Results In this work, we model the interdependency between the dynamics of the bacterial gene pool and those of environmental DNA in space to dissect the effect of transformation on adaptation. Our model reveals that even with only a single locus under consideration, transformation with a free DNA fragment pool results in complex adaptation dynamics that do not emerge in previous models focusing only on the gene shuffling effect of transformation at multiple loci. We demonstrate how spatial restriction on population growth and DNA diffusion in the environment affect the impact of transformation on adaptation. We found that in structured bacterial populations intermediate DNA diffusion rates predominantly cause transformation to impede adaptation by spreading deleterious alleles in the population. Conclusion Overall, our model highlights distinctive evolutionary consequences of bacterial transformation in spatially restricted compared to planktonic bacterial populations.


Background
Bacterial populations often live in highly structured and dense populations, known as biofilms, in nature [1]. Biofilms are stable assemblages of bacterial cells that stick to a surface and are embedded in a self-secreted matrix [1][2][3]. The proximity between cells is advantageous to the bacteria as it allows them to respond to environmental stresses more effectively, coordinate their behavior better and gain access to nutrients and public goods. The proximity can, however, be disadvantageous as it intensifies the competition for nutrients and other resources between the bacteria [2,4].
In natural habitats, formation of structured bacterial communities can occur concurrently with colonization of new environments and bacterial adaptation. In the course of colonization, bacteria may be under natural selection to adapt to their new environments. One way in which the necessary genetic variation for natural selection to act upon can be generated is natural transformation, the active uptake of naked DNA fragments from the environment and their subsequent integration into the genome. Natural transformation has been reported in many species of bacteria, including some important pathogens like Streptococcus pneumoniae and Helicobacter pylori [5].
There is growing evidence that biofilm formation and natural transformation are interconnected processes reviewed in [6]. The physical proximity of bacteria in space seems to facilitate horizontal gene transfer between them, as shown in S. pneumoniae [7] and H. pylori [8]. Further, protein factors that induce natural transformation were found to also trigger biofilm formation, leading to an increased rate of transformation in the biofilm compared to the planktonic state in naturally transforming bacteria [9][10][11]. Finally, extracellular DNA is known to be abundant in biofilms and also to be involved in biofilm formation [12,13].
Transformation has the potential to facilitate adaptation, owing to the creation of co-adapted combinations of genes [14][15][16][17][18] but also the acquisition of beneficial genes. However, some hypotheses for the evolution of natural transformation emphasize physiological advantages to transformation and regard any genetic effect as the by-product of these physiological benefits [19,20]. Natural transformation can also become costly depending on the composition of DNA fragments in the environment [15,21]: while acquiring new genes can enhance the fitness of the adapting bacteria, transformation with defective DNA that originate from bacteria that are selected against by natural selection can impede adaptation. The interplay between costs and benefits of transformation and bacterial adaptation has been investigated in some previous studies [15,21,22]. These studies, however, assumed that bacteria live in a planktonic state, and therefore, neglected the effect of spatial structure of bacterial populations. Since spatial restriction on population growth limits the availability of free DNA to bacteria, we expect the impact of transformation on population dynamics to be different in spatially restricted compared to the planktonic populations.
To study the connection between transformation with external DNA and structured population growth in bacteria, we developed a mathematical model for adaptation of a bacterial population during growth across space. The bacterial population was assumed to undergo transformation with DNA fragments released by dead bacteria. This eco-evolutionary model incorporates several ecological and population genetic factors, such as bacterial migration and DNA diffusion, that govern the rate of both population expansion and adaptation in space. We demonstrate how the impact of transformation on adaptation varies in different parts of a growing population, depending on DNA diffusion, bacterial migration and the source of free DNA in the environment.

Results
The dynamics of bacterial growth and DNA diffusion We first investigated the dynamics of a bacterial population expanding in space in the absence of adaptation. Figure 1 shows how a single bacterium gives rise to a bacterial colony across space over time. The population expands symmetrically because bacteria invade adjacent grid cells at the same rate ( Figure 1A,B and C). Population growth stops when all grid cells are filled ( Figure 1C). Depending on the migration and growth rates, bacteria may migrate to adjacent cells before the carrying capacity of a focal grid cell is reached. In this case, a less compact population structure is formed over time (not shown). Not surprisingly, high levels of bacterial migration lead to dynamics resembling those in a well-mixed planktonic population.
Upon death, bacteria release DNA fragments into the environment. In the absence of DNA diffusion, the free DNA remains at the release location and accumulates with time. Since the free DNA has more time to amass in the initial grid cell, the DNA concentration is higher there ( Figure 1D,E and F). In our simulations, there is always some levels of DNA diffusion and/or DNA degradation so that free DNA does not indefinitely accumulate in the environment.

Adaptation with constant selection
We next considered a growing bacterial population that adapts to a new environment under a constant selection regime where allele 1 has a constant selective advantage s over allele 0. The population starts from a bacterium of genotype 0, which gives rise to an expanding population. As the population grows, mutation creates bacteria of genotype 1, which in the absence of transformation go quickly to fixation (Figure 2A). Transformation delays the fixation of the beneficial allele in the population and impedes adaptation ( Figure 2B). This occurs because the DNA pool during adaptation is overrepresented by the free DNA of type 0 released from the less fit bacteria of genotype 0. This so-called 'bad genes effect' of transformation, also described in prior studies [15,21], is more pronounced in central layers of the population. This leads to the formation of a frequency gradient of bacteria of genotype 1 across different layers of the growing population ( Figure 2B). In this gradient, the frequency of bacteria of genotype 1 is lower in the central layers of the population in the short term, because of the higher concentration of the free DNA of type 0.
In order to better understand the impact of migration on the evolutionary dynamics of our model, it may be helpful to first consider the two extreme ends of the spectrum of migration rates. In the complete absence of bacterial migration, there is only growth and adaptation in the initial grid cell, and this single subpopulation behaves as a planktonic population. Conversely, when migration rates are extremely high, the entire population becomes well mixed and allele frequencies will be the same in all grid cells. Both of these extreme cases can thus be understood from previous studies examining the impact of natural transformation in planktonic populations where the "bad genes" effect was previously described [15,21].
To understand how population structure affects the "bad genes" effect, we measured the overall frequency of bacteria of genotype 1 across the whole population at one specific time point, for different intermediate migration rates as well as different DNA diffusion rates and transformation rates ( Figure 3). As anticipated, the bad genes effect becomes more pronounced with increasing transformation rate. With decreasing bacterial migration rate, the "bad genes" effect is mitigated and adaptation proceeds faster. This is because the lower the migration rate, the longer it takes until new grid cells are colonized. This delayed colonization of new grid cells means that migrants spreading in new grid cells will be better adapted to start with and also encounter fewer deleterious alleles in the free DNA pool. With low migration rates adaptation is therefore impeded by the "bad genes" effect in grid cells close to the initial one but proceeds at an increasingly faster pace at the frontier of the spatially expanding population. Only at extremely low migration rates (results not shown in Figure 3) is adaptation again impeded because the bacteria fail to colonize any grid cell other than the initial one over the time period under consideration.
DNA diffusion potentially has two opposing effects on the effect of transformation on adaptation. On the one hand, DNA diffusion spreads the free DNA of type 0 in the population, and thus, impedes adaptation. On the other hand, DNA diffusion depletes free DNA of type 0 and thus mitigates the bad genes effect. These opposing effects can result in a non-monotonic impact of DNA diffusion on the transformation impact, particularly with low bacterial migration rates ( Figure 3B). High levels of migration make the non-monotonic effect of DNA diffusion disappear since in this case, the bacterial population behaves like a planktonic population in which the bad genes effect is pronounced. At very high DNA diffusion rates, the free DNA becomes unavailable to the bacteria, and thus the bad genes effect disappears.
In the Appendix, we present the results of the simulations in the presence of different levels of DNA degradation. Our results demonstrate that DNA degradation monotonically reduces the bad genes effect but a relatively high DNA decay rate (greater than 1/100 of the bacteria growth rate) is required to completely remove the effect of transformation (Additional file 1: Figure S1). Thus, the dynamics of transformation mentioned above are conceivable to be observed in natural circumstances.

Adaptation with density-dependent selection
In spatially structured bacterial populations, selection is often expected to be heterogeneous across bacteria occupying different locations, depending on the density of the surrounding subpopulations. For example, restriction on the diffusion of an antibiotic makes the interior bacteria less susceptible to the antibiotic, thus decreasing the strength of selection for resistance genes. In an extreme case where no antibiotics reach the interior, there might even be selection against resistance genes due to costs of resistance, i.e., not only the strength but also the direction of selection might depend on the density of the surrounding subpopulations. Similar effects may arise if diffusion of nutrients is restricted by the bacteria.
To emulate such effects, we next consider the dynamics of adapting populations under selection regimes that are dependent on population density in the vicinity of a focal grid cell. We consider the effect of transformation on the distribution of genotype 1 in space in three scenarios. The first scenario is the density-independent regime where genotype 0 is always disfavored by selection. As anticipated in this case, transformation reduces the frequency of genotype 1 especially in the center of the transforming population during adaptation, due to the bad genes effect ( Figure 4A).
The second scenario describes a density dependent regime where genotype 0 is selected against in an empty space but becomes selectively neutral in a full space. In this case, genotype 1 becomes more frequent at the less dense frontier parts of the population in the absence of transformation. DNA diffusion mixes free DNA fragments of type 0 and type 1 that are over-represented in the interior and frontier parts of the population, respectively. Transformation then reduces the number of  bacteria of genotype 1 in the frontier of the population but increases them in the internal part ( Figure 4B).
The third scenario features a density dependent regime where genotype 0 is favored in a free space but selected against as population density increases. This results in an overrepresentation of bacteria of genotype 1 in the interior of the population ( Figure 4C). Since genotype 0 becomes more disfavored as population density increases, the free DNA of type 0 becomes frequent in the environment. Transformation with free DNA of type 0 lowers the frequency of genotype 1 in the population ( Figure 4C). Overall, the results of this section indicate that in addition to a constant selection regime, transformation also affects adaptation when the population is subject to heterogeneous selective forces.

Competition between two species
Thus far, we have assumed that one bacterial species colonizes an empty environment, and therefore, free DNA originates from a single colony. However, in natural situations bacteria may face already adapted competitor species, so that transforming bacteria are exposed to the exogenous DNA fragments originating from the adapted species. To examine how transformation affects adaptation in this case, we study the competition between a non-transforming adapted population and an adapting population, which potentially undergoes transformation. The two populations grow across space under a constant selection regime. The non-transforming population carries allele 1 and is thus assumed to be well adapted to the environment; no mutations occur in this population. The adapted population therefore supplies the DNA fragment pool with only the beneficial allele 1. The adapting population consists of two genotypes 0 and 1 and undergoes mutation and potentially transformation. This population has a higher growth rate than the nontransforming population. However, bacteria of genotype 0 in the adapting population are selected against and are disfavored in competition with the adapted nontransforming bacteria.
The two populations grow from different parts of the grid and compete with each other. Figure 5 reveals that in the absence of transformation, the adapted species is initially favored and occupies most of the space. This Figure 5 The number of bacteria along the equator layer of a 5 × 100 space in two adapting and adapted bacterial populations at three transformation rates for the adapting type: u = 0, u = 10 − 3 and u = 10 − 2 . The non-transforming population (brown) has already adapted to the environment and grows from a bacterium of genotype 1 located at position (3,80). The adapting population consists of two genotypes (0: blue, 1: red) and grows from a bacterium located at position (3,20). The frequencies of different genotypes are taken at time points 500, 1000, 2000 and 5000. Parameters take value: r = 0.1 for the adapted population and r = 0.105 for the adapting population, K = 100, m = 10 − 2 , s = 0.01, v = 10 − 2 , μ = 10 − 6 , g = 10 − 1 , c = 0. happens because of selection against genotype 0 in the adapting population. As adaptation proceeds, the adapting population outcompetes the non-transforming population, owing to its higher growth rate.
Transformation has two opposing effects on adaptation in the adapting population: transformation with the free DNA of type 0 released by the adapting species impedes adaptation (the bad genes effect), but transformation with the free DNA of type 1, which is released by the adapted species and diffuses in space, facilitates adaptation. These opposing effects result in varying spatiogenetic patterns in different parts of the transforming population over time ( Figure 5). The bacteria at the frontier of the transforming population are the first to become exposed to the beneficial free DNA of type 1, and therefore, undergo adaptation faster than the internal bacteria, which are predominantly exposed to the conspecific DNA of type 0. Adaptation continues in the transforming population and more bacteria of genotype 1 are formed. In the long term, owing to their higher growth rate, the transforming population gradually out-competes the non-transforming type.
With a high compared to a low transformation rate, although transformation generates more bacteria of genotype 1 in the frontline of the population, the bad genes effect also becomes more pronounced and this outweighs the benefit of transformation. As a result, adaptation is considerably decelerated in the transforming population ( Figure 5). Altogether we conclude that transformation allows bacteria to take advantage of the beneficial free DNA, especially at the frontier of the population, and this can outweigh the bad genes effect.

Discussion
Lysed bacteria are known to supply the free DNA pool in the environment [7,[23][24][25]. This is thought to give rise to the "bad genes effect" of natural transformation, according to which there is an overrepresentation of deleterious mutations released by selectively dead cells into the DNA pool. Previous models of planktonic bacteria considering the dynamics of a free DNA pool have shown that this effect results in a fitness cost of natural transformation that often overcomes potential benefits of transformation [16,21]. Our model shows that spatial structure of bacterial populations in combination with DNA diffusion strongly affects the bad genes effect. Specifically, we found that the bad genes effect is mostly mitigated for intermediate bacterial migration and either very high or low DNA diffusion rates.
Our model rests on the assumption that the genetic composition of the DNA fragment pool can be different from that of the cell population. This is justified because free DNA is known to persist in the environment for long periods of time and can thus to some extent retain a record of genes from previous generations [23]. In a spatial context, this also means that DNA diffusion has the potential to disseminate genes within the population, thereby enabling gene flow without actual bacterial migration. However, DNA diffusion may be restricted to varying degrees. For instance, extracellular DNA is known to serve as an abundant structural polymer in biofilms and to be required for the integrity and stability of the extracellular matrix during biofilm formation [12,13]. Besides, bacteria can utilize free DNA as a potential nutrient [20,26]. These and other factors can potentially limit the diffusion of free DNA in the environment, localize the effect of transformation and consequently reduce the extent to which transformation increases the level of genotypic homogeneity across the population.
Beyond a transient effect of slowing down adaptation, transformation may also lead to a persistent reduction in mean fitness of the population when there is spatial heterogeneity, caused by the biofilm structure, in selection pressure. One possible scenario that we examined assumes that selection for an allele becomes weaker or even negative at the center of a growing population. A case in point is the situation seen in biofilms where bacteria in the interior are often immune to the action of antibiotics (due to low accessibility of antibiotics [27] or reduced metabolism caused by nutrients depletion [28,29]), so that resistance genes are only selected for at the exterior of the biofilm. Such heterogeneous selection can entail a migration load, i.e. a reduction in the mean fitness of the population due to migration of non-adapted individuals. Our results show that transformation can produce an additional fitness load incurred through incorporating DNA that has diffused from parts of the population that are under a different selection pressure.
We also explored a situation where transformation can become beneficial during adaptation due to the acquisition of free DNA fragments originating from other, already adapted populations in the environment. For example, consider a situation where a pathogen invades and adapts to a complex environment like the nasopharynx where the pathogen needs to compete with other bacteria and is exposed to environmental stresses, such as drug treatment. Our results suggest that in a multispecies environment transformation becomes advantageous by allowing bacteria to take advantage of the exogenous DNA in the shared DNA pool that originated from already adapted species. In line with this, prior studies have shown that the rate of transformation increases during colonization of the nasopharynx by multiple strains of pneumococci [30,31]. This effect of free DNA originating from already adapted populations resembles the proposed benefit of transformation in using beneficial genes that the DNA pool retains from the past ('the genetic time travel effect') [32]. Similarly, Szollosi et al. [33] suggested that horizontal gene transfer through bacterial migration may be beneficial by enabling bacteria to acquire genes from other spatially distinct populations to readapt faster to changing conditions. Our model does not include evolution at multiple loci, and therefore, does not involve any potential benefit of transformation due to the break up of non-random associations between alleles. Recombination can be beneficial during adaptation by bringing together beneficial mutations that are likely to arise on different backgrounds in finite populations (the Fisher-Muller effect) [34,35]. Martens and Hallatschek [36] showed that recombination accelerates adaptation in spatially structured populations through the Fisher-Muller effect, but their model did not incorporate a free DNA pool. As an additional feature of bacterial recombination, our results suggest that transformation with the free DNA pool potentially affects the fixation of beneficial alleles in structured populations. These findings highlight the importance of considering the dynamics of the free DNA pool to fully account for the dynamics of recombination in bacteria.
It should be noted that in our simulations we neglected the possibility that genes involved in DNA uptake and recombination themselves are subject to homologous recombination. In particular, transformation with nonfunctional alleles of such genes released into the environment by the non-competent bacteria will produce a selfreinforcing drive against transformation so that in the absence of any benefits of transformation the competent genotype will ultimately become extinct [37].
Although our model aims to provide insights into the dynamics of spatially structured bacterial populations undergoing transformation, our model is not specifically tailored to describe bacterial biofilms. Several previous models provide a much more realistic description of biofilm growth. For example, these models explicitly track the concentration of different nutrients and growth limiting/stimulating compounds in different layers of the biofilm and account for heterogeneity in position, biophysical and physiological properties of bacteria during biofilm formation over time see [38] for a review. Incorporating evolutionary dynamics such as those involving natural transformation into such individual-based biofilm models represents a substantial conceptual and computational challenge for future studies.

Conclusions
This study was an attempt to elucidate the connection between horizontal gene transfer and formation of structured population in bacteria. There is growing interest among molecular microbiologists to understand this connection as researchers have realized that most bacteria live in highly structured populations and horizontal gene transfer plays a major role in determining the biological repertoire of microorganisms. Experimental tests of the above models are needed to gain a better understanding of the evolutionary dynamics of bacteria during colonization of new environments.

Methods
In order to model evolution in a spatially structured population of bacteria, we consider a two-dimensional L × P grid of cells. In each of these grid cells, the bacteria grow at a growth rate r that is restricted by the same carrying capacity K. The bacteria migrate to adjacent grid cells at a rate v, and we consider all bacteria in the 8-cell neighborhood as adjacent. There is no migration beyond the borders of the grid.
We assume each bacterium has a single locus with two alleles (0 and 1) and the bacteria undergo forward (1 → 0) and backward (0 → 1) mutations at the same rate μ. The bacteria die at a certain rate that depends on their allelic state (see below). Upon death, each bacterium releases its genomic allele into the medium (initially the same subpopulation). In the main text, we assume that DNA persists in the environment (no degradation) but may diffuse between grid cells at a rate g. In contrast to bacterial migration, we assume that the DNA may diffuse out of the grid of subpopulations.
The bacteria undergo natural transformation at a rate u per bacterium and encounter DNA molecules present in the same grid cell. An imported DNA fragment replaces the genomic allele through homologous recombination. This may lead to the conversion of a genotype to the other type (provided the allele that is taken up is different from the original one), and it also leads to a reduction of fragments in the pool of free DNA. Besides DNA diffusion and transformation, other environmental factors can limit the availability of environmental DNA, such as DNA degradation and DNA consumption by bacteria as a nutrient (see Discussion). To account for this, we include a rate − c − at which DNA becomes unavailable to the bacteria. The effect of this parameter is studied in the Appendix.
Taken together, the dynamics of the bacterial population and the DNA pool are described by the following system of differential equations: