Competitive exclusion strengthens selection for transmissibility and increases the benefit of recombination for within-host adaptation

Pathogens experience selection at multiple scales, given the need to transmit between hosts and replicate within them. This presents the challenge of cross-scale selective conflict when adaptations to one scale compromise fitness at another, such as mutations that improve transmissibility but make individuals less competitive within hosts. Selection operates differently at these scales, with tight transmission bottlenecks subjecting pathogen populations to genetic drift, and large population sizes within hosts enabling efficient selection for beneficial mutations. Compounding the reduction in diversity by transmission bottlenecks is the occupant-intruder competitive strategy exhibited by some pathogens, where the first variant to colonize a host prevents later arriving variants from contributing to infection, preventing immigration and turning transmission into a “founder takes all” contest. Here, we used multiple modeling approaches to examine how this behavior affects the efficiency of selection for both transmissibility and within- host fitness. We find that in the face of a trade-off, selection for transmissibility is maximized under a tight transmission bottleneck that minimizes within-host competition during colonization. While mutations with increased within-host fitness are favored during within-host replication, an occupant-intruder strategy prevents these mutants from displacing established residents and propagating across the host population, leading to their extinction if they are insufficiently transmissible. Finally, a model of competition on the scale of the host population revealed that competitive exclusion limits the propagation of mutations with improved within-host fitness, unless resident populations can incorporate alleles from intruding variants by recombination. Thus, competitive exclusion may facilitate the improvement and maintenance of pathogen transmissibility, with directional recombination allowing resident populations to mitigate the potential loss of within-host fitness imposed by this occupant-intruder strategy. Author Summary Transmission is a defining feature of infectious diseases, and so a better understanding of how transmissibility evolves is important for improving disease surveillance and prevention. Successful transmission is often achieved by a small number of individuals which, after establishing residency in a host, may prevent newcomers from participating in infection. Here, we use modeling to examine how competitive exclusion of challengers by resident populations affects the balance between within-host competitive ability and transmissibility. We find that competitive exclusion strengthens selection for transmissibility by disproportionately benefitting the first variant to colonize a host and preventing mutants that may be more competitive but less transmissible from displacing established residents. Competitive exclusion also limits the propagation of mutants that improve within-host fitness without reducing transmissibility, however, increasing the advantage of recombination that allows resident populations to acquire beneficial alleles from challengers. Competitive strategies that allow pathogens to “claim ownership” of hosts may thus help pathogen populations maintain transmissibility, with genetic recombination facilitating within-host adaptation through the incorporation of beneficial alleles from challengers.


47
Pathogen life history is defined by replication to large population sizes within individuals hosts 48 and the need to transmit to new ones before clearance or host death. Pathogens thus face selection 49 at both the within-and between-host scales, presenting a challenge for evolution when adaptations 50 at one scale reduce fitness at another. Within-host adaptation may be short-sighted, for example, 51 favoring growth in the current host while totally compromising transmissibility [1]. And on the 52 epidemiological scale, selection for transmissibility occurs at the interface between hosts, but 53 mutations that increase transmissibility may be selected against during within-host growth, even 54 This phenomenon has been described for multiple taxonomically diverse pathogens, such as 78 influenza A viruses (IAV) and Streptococcus pneumoniae [9,10]. In both cases, co-infection by 79 different genotypes of the same pathogen in animal models can occur only when both arrive at the 80 same time or within several hours of each other. After 18 hours, guinea pigs inoculated with one 81 IAV variant can no longer be superinfected by a second variant, which in vitro experiments 82 attribute to the prevention of cellular co-infection [9]. Furthermore, once Streptococcus 83 pneumoniae in the mouse nasopharynx reach a quorum after approximately 6 hours of 84 colonization, they begin producing bacteriocins and cognate immunity proteins that later arriving 85 planktonic cells do not, leading to efficient killing of superinfecting bacteria, in a process referred 86 to as fratricide [10]. This turns transmission into a "founder takes all" contest, in which the first 87 variants to arrive become the dominant genotype in the recipient host, and prevents the founder 88 variant(s) from being displaced by a variant that is less transmissible but more fit during within-89 host competition. This strengthens selection for transmissibility, but also prevents immigration of 90 variants with greater within-host fitness, thereby making within-host adaptation reliant on 91 mutation. 92 Once infection is established, microorganisms typically grow to large population sizes 93 within the host. In contrast to the genetic drift that may occur during transmission, selection 94 operates more efficiently in these large within-host populations, with within-host adaptation being 95 observed in many human infections with pathogens such as Staphylococcus aureus and S. 96 pneumoniae [11,12]. Novel genotypes favored by selection may be generated by mutation during 97 within-host replication, or when the presence of multiple viral or bacterial genotypes within the 98 same host causes genes from one genotype to enter the background of the other. Recombination 99 or reassortment in viruses carries the additional requirement of cellular coinfection, as recombinant 100 genomes are generated by template switching during replication in the cell and reassortant progeny 101 are generated by the packaging of genome segments from different sources. Gene flow between 102 coinfecting bacterial populations, however, may be less restricted, as it can occur through multiple 103 mechanisms such as uptake of free DNA of dead bacteria (transformation), direct exchange 104 between cells through a pilus (conjuation), or hitchhiking of bacterial DNA in bacteriophages 105 (transduction). These processes have been shown to accelerate adaptation in multiple pathogen 106 systems, including Φ6 bacteriophage [13,14], influenza A virus [15,16], and S. pneumoniae [17, 107 18]. While competitive exclusion generally prevents superinfecting variants from replicating and 108 contributing to infection directly, the incorporation of alleles from these newcomers by an 109 established resident population may serve as a second method of within-host adaptation. 110 Here we use multiple modeling approaches to predict how interactions between founder 111 effects at the transmission bottleneck, competitive exclusion, and gene flow affect the efficiency 112 of selection for novel alleles that affect both within-host fitness and transmissibility. We find that 113 competitive exclusion can strengthen selection for transmissibility by imposing tight transmission 114 bottlenecks and preventing displacement by superinfecting variants with greater within-host 115 fitness, and that gene flow enables resident populations to selectively incorporate alleles that 116 improve within-host fitness, thereby balancing between-and within-host fitness. 117

118
We used three models to consider how selection within hosts, during transmission between 119 two hosts, and on the scale of the host population affect the balance of transmissibility and within-120 host fitness. In the first set of models shown in Figs 1 and 2, we use probabilistic models of 121 population genetics to consider how the probability an allele is transmitted or reaches fixation in 122 one host is shaped by its initial frequency, relative transmissibility or within-host fitness, and the 123 . CC-BY 4.0 International license available under a (which was not certified by peer review) is the author/funder, who has granted bioRxiv a license to display the preprint in perpetuity. It is made The copyright holder for this preprint this version posted June 20, 2020. ;https://doi.org/10.1101https://doi.org/10. /2020 size of the transmission bottleneck. In the second model shown in Fig 3, we use a branching 124 process model to consider the fate of a novel allele that arises during infection, and how its relative 125 transmissibility and within-host fitness affect its chances of extinction or fixation on the host 126 population scale. In the third set of models shown in Figs 4 and 5, we use a compartmental 127 susceptible-infected-susceptible (SIS) model in which multiple variants compete for hosts to 128 consider the balance between transmissibility and within-host fitness on the epidemiological scale. 129 A summary of the parameters, and the models in which they are relevant, is provided in Table 1. 130 The efficiency of selection in transmission and the within-host environment. 131 Novel alleles may arise during the course of infection in a host, but must be transmitted to 132 new hosts to avoid extinction. To evaluate the probability of a novel allele being transmitted, we 133 developed a probabilistic model in which the likelihood an allele is transmitted depends on its 134 frequency, p, in the donor host, and the extent to which it improves transmissibility, expressed as 135 a selection coefficient, st. In Fig 1A, we examine how both p and st affect the probability of that 136 an individual variant carrying an allele will colonize the recipient host. When st is low, an allele is 137 likely to be transmitted only if it is nearly ubiquitous in the donor population. Even very beneficial 138 alleles with high st, though, must still be present at moderate frequencies to have an appreciable 139 chance of transmission. 140 New individuals entering an already colonized host are unlikely to contribute meaningfully 141 to infection, but beneficial alleles from these individuals may be incorporated into a resident 142 population through recombination. To evaluate the conditions under which this process could 143 facilitate the fixation of novel alleles, we considered the probability that a novel allele benefitting 144 within-host fitness with selection coefficient sr would fix after being introduced to a within-host 145 population a given number of times, whether by recombination or de novo mutation (Fig 1B). We 146 . CC-BY 4.0 International license available under a (which was not certified by peer review) is the author/funder, who has granted bioRxiv a license to display the preprint in perpetuity. It is made The copyright holder for this preprint this version posted June 20, 2020. ;https://doi.org/10.1101https://doi.org/10. /2020 observe that even slightly beneficial alleles are much more likely to reach fixation upon 147 incorporation than neutral ones, which require ~100 independent introductions to have a 50% 148 chance of fixing. The required number of introductions required for an allele to have a 50% chance 149 of fixation is shown in Fig 1C, revealing that alleles with selection coefficients of at least 0.347 150 are likely to fix after just one introduction event. These probabilities depend on the effective size 151 of the colonizing population and are therefore sensitive to perturbations by environmental factors 152 such as host immunity or antimicrobial therapies. 153

Selection at the transmission bottleneck in the face of a trade-off. 154
Pathogen populations grow to large sizes within a host, but transmission is often 155 characterized by a tight bottleneck in which few individuals colonize a new host. To determine the 156 effect of transmission bottlenecks on the efficiency of selection during transmission, we considered 157 how the size of such a bottleneck affected the probability that an allele would be transmitted, as in 158 Fig 1A. In this model, a trade-off exists between transmissibility and within-host fitness, such that 159 increases in transmissibility come at the cost of within-host fitness. The relative fitness of a novel 160 variant is thus described by two distinct selection coefficients, st and sr, denoting changes in 161 transmissibility and within-host fitness, respectively. The functional form of this trade-off parallels 162 that considered by Farahpour et al. [19] and depends on a shape parameter , which can vary from 163 0 (no trade-off) to 1 (absolute trade-off between transmissibility and within-host fitness) (Fig 2A). 164 As increases, increases to transmissibility carry more severe costs, which presents two challenges 165 to selection for transmissibility. First, mutant individuals that are co-transmitted with wild-type 166 ones must then compete for dominance in the new host to establish infection, and so the advantage 167 of a mutant in transmission may be outweighted by a disadvantage in competition during the early 168 stages of colonization. Second, as the mutant allele will be present at low frequency when first 169 . CC-BY 4.0 International license available under a (which was not certified by peer review) is the author/funder, who has granted bioRxiv a license to display the preprint in perpetuity. It is made The copyright holder for this preprint this version posted June 20, 2020. ;https://doi.org/10.1101https://doi.org/10. /2020 generated, the competitive disadvantage faced by the mutant may prevent it from reaching an 170 appreciable frequency in the donor host. We explore this problem in Fig 2B,  In order for a novel allele to emerge in the pathogen population, it must first be transmitted 186 from the host in which it was generated, and from there be propagated across the host population. 187 We model both of these processes to predict the fate of a novel allele based on its transmissibility 188 and within-host fitness relative to those of the wild-type ancestor variant. In this model, "within-189 host fitness" refers to both competitive ability within a co-infected host (sr = 1 -wr for wr < 1, or 190 sr = 1 1 for wr > 1), and the duration of infection when the host is infected with a mutant variant 191 ( , ). "Transmissibility" refers to both the relative probability that a mutant individual 192 . CC-BY 4.0 International license available under a (which was not certified by peer review) is the author/funder, who has granted bioRxiv a license to display the preprint in perpetuity. It is made The copyright holder for this preprint this version posted June 20, 2020. ; https://doi.org/10.1101/2020.06.18.158956 doi: bioRxiv preprint is transmitted from a co-infected host (Pr , , + ) and the relative infectivity of 193 hosts infected with a mutant variant ( mut = wt,mut* wt). The relative R0 of this mutant, compared to 194 the wild-type ancestor, is the product of its relative transmissibility and within-host fitness (Fig  195   3A). 196 The probability that an allele is successfully transmitted depends on both its frequency in 197 that host and its relative transmissibility, as shown in Fig 1A. Therefore, we explicity modeled the 198 within-host frequency of a novel allele as a Wright-Fisher process to calculate the average number 199 of new mutant infections caused by the initial host in which the mutation occurred (Fig 3B). These 200 simulations show a strong effect of within-host fitness, which helps variants reach higher 201 frequencies shortly after being generated and allows them to cause an appreciable number of 202 secondary infections even if they are less transmissible. Without such an advantage, alleles that 203 are deleterious or even neutral with respect to within-host fitness are less likely to escape the host 204 in which they are generated, as their initially low frequency is not increased by selection. This 205 strong influence of within-host fitness on the initial fate of a novel allele may thus constrain the 206 emergence of mutations that improve transmissibility and ultimately R0, especially ones that carry 207 even a slight cost to within-host fitness. 208 Once a novel variant is successfully transmitted, it may still go extinct if each transmission 209 chain originiating from the initial host ends. To estimate the probability that all transmission from 210 the initial host terminates, indicating extinction, or at least one chain continues indefinitely, 211 indicating fixation of the novel allele in the pathogen population, we used a branching process 212 model (Fig 3C). This model calculates the probability that all of an individual's offspring 213 eventually go extinct based on the expected reproductive success of each individual, which 214 epidemiologically corresponds to the number of secondary cases caused by a single infected 215 . CC-BY 4.0 International license available under a (which was not certified by peer review) is the author/funder, who has granted bioRxiv a license to display the preprint in perpetuity. It is made The copyright holder for this preprint this version posted June 20, 2020. ; https://doi.org/10. 1101/2020 individual, R0 in a totally susceptible population or Re, the effective reproductive number, in a 216 partially susceptible one. When competitive exclusion is perfectly efficient, partitioning wild-type 217 and mutant pathogens into distinct hosts, the Re of a novel variant is simply the product of its 218 relative effects on transmissibility and infection duration, Re = mut * . This results in a 219 boundary in which alleles that increase transmissibility at the cost of within-host fitness or vice 220 versa may emerge only if they increase R0. If superinfection is allowed to occur, however, than a 221 variant with greater within-host fitness may displace a less competitive resident population from 222 an already colonized host. This increases the relative importance of within-host fitness on the host 223 population scale, reducing the Re of mutants that sacrifice within-host fitness for gains in 224 transmissibility, while increasing the Re of mutants that have made the opposite trade by 225 prioritizing within-host fitness. By extension, this causes some mutants with decreased R0 to have 226 Re > 1 and therefore a chance of fixing, while others with increased R0 may have Re < 1, preventing 227 fixation. Competitive exclusion thus enhances selection for transmissibility on the host population 228 by 1) limiting the propagation of mutants with reduced R0, and 2) preventing more transmissible 229 mutants with increased R0 from being displaced by superinfection. 230

Competition in the face of a trade-off between transmissibility and infection duration. 231
Traits that promote pathogen transmission adversely can affect within-host survival and 232 vice versa. To determine how a trade-off between transmissibility and within-host fitness shapes 233 epidemiological fitness, we considered a SIS model in which each variant has a distinct 234 transmissibility, wt, and within-host fitness, wr, with the range of possible values being constrained 235 by the trade-off shown in Fig 2A (Fig 4A). Each of these parameters affects R0 in a similar manner 236 to that in the preceding section, i.e., for a given variant i with wt,i and wr,i, i = 0 * wt,i and 237 , , where 0 and 0 are the maximum achievable transmissibility and minimum achievable rate 238 . CC-BY 4.0 International license available under a (which was not certified by peer review) is the author/funder, who has granted bioRxiv a license to display the preprint in perpetuity. It is made The copyright holder for this preprint this version posted June 20, 2020. ; https://doi.org/10.1101/2020.06.18.158956 doi: bioRxiv preprint of clearance, respectively. The relative R0 of a variant is then equal to the product wt,iwr,i, with the 239 maximum R0 acheivable for a given trade-off ( ) occurring where wt = wr = 1 - (Fig 4B). As 240 increases and the trade-off becomes more concave, the value of this maximum achievable R0 241 decreases (Fig 4C). 242 To determine how these variants that differ in both transmissibility and within-host fitness 243 compete on the epidemiological scale, we analyzed the dynamics of an epidemic in which 100 244 hosts are initially infected, each with a different variant having wt from 0.01 to 1 and corresponding 245 wr. We observe that more transmissible variants predominate during the early stages of an 246 epidemic, as they rapidly infect the available susceptible hosts, but are then displaced by the variant 247 with optimal R0 (Fig 4D, 4E). The dominance of this optimal variant occurs rapidly when is 248 close to 0 or 1, but intermediate values, e.g. 0.3 -0.6, allow prolonged coexistence of variants that 249 are more transmissible or persist for longer, but are ultimately suboptimal, resulting in more 250 diverse epidemics (Fig 4F). Similarly, the optimal variant takes longest to reach fixation at 251 intermediate values of (Fig 4G). 252

Balancing between-and within-host fitness by competitive exclusion and recombination. 253
The preceding results demonstrate that competitive exclusion allows a pathogen population 254 to balance transmissibility and within-host fitness in the face of a trade-off between the two, but 255 can also facilitate clonal interference in which beneficial mutations compete with each other. To 256 explore how pathogens might mitigate this detrimental effect of comepetitive exclusion, we 257 considered a SIS model in which variants differ in transmissibility and within-host fitness, but 258 where each aspect of fitness is governed by a separate locus and no trade-off exists between the 259 two traits. Additionally, mutations may occur in infected hosts, altering a variant's transmissibility 260 or within-host fitness. Finally, interaction between different variants can occur through three 261 . CC-BY 4.0 International license available under a (which was not certified by peer review) is the author/funder, who has granted bioRxiv a license to display the preprint in perpetuity. It is made The copyright holder for this preprint this version posted June 20, 2020. ; https://doi.org/10.1101/2020.06.18.158956 doi: bioRxiv preprint different modes of competition. In the first, termed "displacement," a superinfecting variant with 262 greater within-host fitness may displace a less fit resident variant. In the second, termed 263 "exclusion," resident variants cannot be displaced by superinfecting variants. In the third, termed 264 "exclusion + recombination," residents cannot be displaced, but may incorporate alleles from 265 challengers through recombination. The biological mechanism of recombination would depend on 266 the agent in question, such as transformation in bacteria or reassortment in segmented viruses, but 267 it is presumed that alleles from challengers enter the background of the resident population. 268 To determine how the competitive modes described above affected a pathogen's 269 exploration of a fitness landscape, we analyzed changes in pathogen transmissibility and within-270 host fitness over time on the epidemiological scale. The epidemic begins with some hosts infected 271 with variants that have uniformly low within-host fitness but vary in transmissibility, and some 272 hosts infected with poorly transmitting variants that differ in within-host fitness. As in Fig 4, we 273 observe that the most transmissible variants quickly predominate as they infect the available 274 susceptible hosts (Fig 5A). When displacement by superinfection is allowed, these variants are 275 readily displaced by those with greater within-host fitness, with average transmissibility 276 decreasing as average within-host fitness increases (Fig 5B). Emergence of the genotype with 277 maximum fitness in both dimensions is driven by mutations that improve the transmissibility of 278 the most competitive variants. Competitive exclusion allows these more transmissible variants to 279 avoid displacement by more competitive challengers and maintain their early advantage, but 280 emergence of the optimal genotype is conversely driven by mutations that improve within-host 281 fitness. This process is notably slower, as variants with greater within-host fitness can only be 282 propagated by causing new infections. The coupling of competitive exclusion and recombination, 283 however, allows the alleles conferring high within-host fitness to be incorporated onto the 284 . CC-BY 4.0 International license available under a (which was not certified by peer review) is the author/funder, who has granted bioRxiv a license to display the preprint in perpetuity. It is made The copyright holder for this preprint this version posted June 20, 2020. ; https://doi.org/10.1101/2020.06.18.158956 doi: bioRxiv preprint background of the most transmissible variants, resulting in a rapid increase in the average R0 of 285 circulating variants compared to the other two modes (Fig 5C). 286

287
We report that cross-scale selective conflict shapes the balance between transmissibility and 288 within-host fitness in two ways. First, the high efficiency of selection for growth within the host 289 allows mutants with greater within-host fitness to predominate, even if they greatly compromise 290 transmissibility. Second, the dependence of a variant's transmission probability on its within-host 291 frequency hinders selection for mutants that improve transmissibility but not within-host fitness. 292 Left unchecked, this could allow selection to favor variants with greater within-host fitness but 293 lower R0, but competitive exclusion prevents the propagation of these mutants on the 294 epidemiological scale. The same occupant-intruder strategy may delay within-host adaptation, 295 however, by subjecting populations to genetic drift in transmission and preventing immigration of 296 variants with greater within-host fitness. Pathogens exhibiting this occupant-intruder strategy can 297 thus adapt to the within-host environment faster by incorporating beneficial alleles from intruders. 298 A limitation of this study is that our model does not allow for variation in host susceptibility 299 to infection, which may significantly impact the early spread of a mutant. Recent theoretical work 300 by Morris et al., for example, found that infection history creates strong selection at the point of 301 transmission for antibody escape variants [20]. As escape from the first host in which a mutation 302 appears is an important first step in emergence, the probability that such an escape mutant emerges 303 would depend strongly on the local frequency of hosts with those antibodies. 304 Transmission bottlenecks have previously been studied for many infectious agents such as 305 HIV, IAV, S. pneumoniae [2][3][4][5]21]. More general theoretical work predicted that transmission 306 mutants may be favored by tight bottlenecks in organisms, but that such bottlenecks would be rare 307 . CC-BY 4.0 International license available under a (which was not certified by peer review) is the author/funder, who has granted bioRxiv a license to display the preprint in perpetuity. It is made The copyright holder for this preprint this version posted June 20, 2020. ; https://doi.org/10.1101/2020.06.18.158956 doi: bioRxiv preprint for directly transmitted pathogens like ones that replicate in the respiratory tract [22]. Our model 308 agrees that in the face of a growth-transmission trade-off, transmission mutants have the greatest 309 chance of establishing new infections under a tight transmission bottleneck that allows them to 310 avoid competition during colonization, but predicts that competitive exclusion may promote 311 selection for transmission even in respiratory pathogens like IAV and S. pneumoniae. More recent 312 theory has investigated the influence of transmission bottlenecks on the evolution of an emerging 313 pathogen, specifically with R0 < 1, and the probability that a mutation prevents its extinction in the 314 human population [23,24]. These models, like ours, find that tight transmission bottlenecks can 315 aid selection for transmissibility through a founder effect, and that wide bottlenecks can prevent 316 the emergence of mutations that improve transmissibility at the expense of within-host fitness, 317 even if they improve R0. Our model diverges from theirs in that it considers a host-adapted 318 pathogen with R0 > 1 at an endemic equilibrium with Re = 1, and so mutants can have a reduced 319 R0 that is still greater than one. This allowed us to show that cross-scale selective conflict, in 320 addition to hindering the emergence of more transmissible but less competitive variants as shown 321 by Schreiber et al., can also facilitate the emergence of mutants with greater within-host fitness 322 but ultimately lower R0 [24]. 323 In conjunction with previous empirical studies of transmission, our model underscores the 324 importance of transmission in purging variants that result from short-sighted within-host evolution 325 [25,26]. Deleterious mutations such as defective viral genomes, for example, are consistently 326 generated in vivo and replicated with help from abundant cellular coinfection, but transmission is 327 often driven by individual virions, selecting against mutants that are not viable at low MOI 328 conditions [26][27][28][29]. Relaxing selection for transmission, however, selects for within-host fitness 329 without consideration for transmissibility. Serial passage experiments in mice, for example, have 330 . CC-BY 4.0 International license available under a (which was not certified by peer review) is the author/funder, who has granted bioRxiv a license to display the preprint in perpetuity. It is made The copyright holder for this preprint this version posted June 20, 2020. The balance between transmissibility and within-host fitness parallels an invasion-persistence 343 trade-off in other organisms-some genotypes may more readily disperse and colonize new 344 hosts/territories, but are less persistent and thus fare poorly when present in the same environment 345 as less dispersable but more competitive genotypes. This trade-off is evident in several S. 346 pneumoniae genes, such as toxin pneumolysin [40,41], capsule serotype (for example, serotype 4 347 compared to 23F) [40,42], and the aforementioned dltB [30,43], which promote transmissibility 348 at the expense of within-host fitness. Whether these genes are favored by selection and maintained 349 depends on the relative importance of transmissibility and within-host fitness, as shown by the loss 350 of dltB in serial passage where transmission is more certain. In Pseudomonas aeruginosa, selection 351 readily favors a hyperswarming phenotype that doubles the rate of dispersal at a modest 10% 352 reduction in growth rate [44]. By contrast, our results find that selection for comparable 353 . CC-BY 4.0 International license available under a (which was not certified by peer review) is the author/funder, who has granted bioRxiv a license to display the preprint in perpetuity. It is made The copyright holder for this preprint this version posted June 20, 2020. (which was not certified by peer review) is the author/funder, who has granted bioRxiv a license to display the preprint in perpetuity. It is made The copyright holder for this preprint this version posted June 20, 2020. ; https://doi.org/10.1101/2020.06.18.158956 doi: bioRxiv preprint little evidence of recombination driving strongly selected traits such as antibiotic resistance [50], 377 or that DNA acquired through transformation is also useful as a nutrient [51]. However, our results 378 highlight the potential benefits of transformation when a population is not panmictic but structured 379 into distinct hosts-the same occupant-intruder strategy that enchances selection for 380 transmissibility also hinders selection for within-host fitness by imposing genetic drift during 381 transmission and preventing immigration, but recombination allows the incorporation of alleles 382 from challengers onto the background of established resident populations. In contrast to direct 383 competition between a resident and challenger, this directional recombination, in conjunction with 384 efficient selection due to high within-host population size, allows resident populations to 385 selectively retain alleles that improve within-host fitness. Occupant-intruder strategies and 386 recombination may thus play important roles in mitigating cross-scale selective conflicts for 387 infectious agents. 388

populations. 391
The probability that a given allele is transmitted depends on its frequency, p, in the population 392 attempting to colonize the susceptible host, and its selection coefficient, st. The probability that a 393 single individual carrying an allele is transmitted is estimated by: 394 (2) 397 was used to estimate the probability that an allele entering a population by mutation or 398 recombination would eventually reach fixation [52]. N was set at a previously estimated effective 399 . CC-BY 4.0 International license available under a (which was not certified by peer review) is the author/funder, who has granted bioRxiv a license to display the preprint in perpetuity. It is made The copyright holder for this preprint this version posted June 20, 2020. When solved for sr, this inequality reveals the minimum selection coefficient required for fixation 410 to be likely after a single introduction event. 411

Fitness trade-offs and population bottlenecks in transmission. 412
When infection is established by multiple individuals, the probability of that an allele is 413 present in the initially colonizing population depends upon the number of individuals transmitted, 414 B, and is governed by the binomial distribution: 415 (which was not certified by peer review) is the author/funder, who has granted bioRxiv a license to display the preprint in perpetuity. It is made The copyright holder for this preprint this version posted June 20, 2020. ; https://doi.org/10.1101/2020.06.18.158956 doi: bioRxiv preprint Combining (6) and (7)  It is important to note that this model is sensitive to the R0 of the wild-type ancestor, which here 479 was set at 1.5. 480

SIS model with invasion-persistence trade-off. 481
To investigate how trade-offs between transmissibility and within-host fitness affect the selection 482 for both traits on the scale of the host population, we define a Susceptible-Infected-Susceptible 483 (SIS) model using a system of ordinary differential equations (ODEs): 484 CC-BY 4.0 International license available under a (which was not certified by peer review) is the author/funder, who has granted bioRxiv a license to display the preprint in perpetuity. It is made The copyright holder for this preprint this version posted June 20, 2020.  (21)  492 where is the maximum achievable transmission coefficient, and is the minimum achievable 493 rate of clearance. The transmission fitness of each type, wt, ranges from 0.01 to 0.99 in increments 494 of 0.01, for a total of 99 types. The system was initialized with 1 infected individual of each type, 495 and 9,901 susceptible individuals, for a total population size of 10,000 hosts. The dynamics were 496 then realized using the R package deSolve. 497

SIS model with within-host competition, competitive exclusion, and recombination. 498
To determine how superinfection exclusion and recombination affect selection for both 499 transmissibility and within-host fitness, we define an SIS model in which the two traits are 500 governed by independent loci, with Itr denoting an individual infected with a pathogen of wt = t 501 and wr = r. The change in susceptible individuals is the same as (18): 502 The change in each class of infected individuals follows one of three ecological regimes, referred 504 to herein as "displacement," "exclusion," and "exclusion + recombination." Where resident 505 pathogens may be displaced by superinfecting pathogens that are more fit ("Displacement"): 506 . CC-BY 4.0 International license available under a (which was not certified by peer review) is the author/funder, who has granted bioRxiv a license to display the preprint in perpetuity. It is made The copyright holder for this preprint this version posted June 20, 2020. ; https://doi.org/10.1101/2020.06.18.158956 doi: bioRxiv preprint Finally, in the case where superinfection exclusion occurs, but DNA from challengers is available 512 for uptake by the resident population: 513 Possible wt and wr values ranged from 0.1 to 1 in increments of 0.1, as well as 0.01. The system 516 was initialized with 2,000 hosts: 1,895 susceptible hosts, 5 hosts infected with pathogens of each 517 wt type and wr = 0.1, and 5 hosts infected with pathogens of each wr type with wt = 0.1, so that the 518 alleles conferring efficient transmission and replication are present initially, but in different hosts. 519 The dynamics were then realized using the R package deSolve. (which was not certified by peer review) is the author/funder, who has granted bioRxiv a license to display the preprint in perpetuity. It is made The copyright holder for this preprint this version posted June 20, 2020. (which was not certified by peer review) is the author/funder, who has granted bioRxiv a license to display the preprint in perpetuity. It is made The copyright holder for this preprint this version posted June 20, 2020. ;https://doi.org/10.1101https://doi.org/10. /2020 727 . CC-BY 4.0 International license available under a (which was not certified by peer review) is the author/funder, who has granted bioRxiv a license to display the preprint in perpetuity. It is made The copyright holder for this preprint this version posted June 20, 2020. ;https://doi.org/10.1101https://doi.org/10. /2020

R0
Average number of secondary infections caused by one infected host.

Re
Effective number of secondary infections caused by one infected host. Fig 3. 730 . CC-BY 4.0 International license available under a (which was not certified by peer review) is the author/funder, who has granted bioRxiv a license to display the preprint in perpetuity. It is made

(WT) or wtwr (mutant) in
The copyright holder for this preprint this version posted June 20, 2020. ;https://doi.org/10.1101https://doi.org/10. /2020  CC-BY 4.0 International license available under a (which was not certified by peer review) is the author/funder, who has granted bioRxiv a license to display the preprint in perpetuity. It is made The copyright holder for this preprint this version posted June 20, 2020. ;https://doi.org/10.1101https://doi.org/10. /2020  B. The probability of fixation was calculated for a novel allele improving within-host fitness 738 with selection coefficient sr that is introduced into a within-host population times. Gray 739 dashed line represents the probability of fixation of a neutral allele. 740 C. The number of independent introduction events required for an allele with varying sr to 741 have a 50% chance of fixation was calculated. Dashed line denotes the minimum selection 742 coefficient for an allele to have a 50% chance of fixation after just one introduction. 743 744 . CC-BY 4.0 International license available under a (which was not certified by peer review) is the author/funder, who has granted bioRxiv a license to display the preprint in perpetuity. It is made The copyright holder for this preprint this version posted June 20, 2020. ;https://doi.org/10.1101https://doi.org/10. /2020  . CC-BY 4.0 International license available under a (which was not certified by peer review) is the author/funder, who has granted bioRxiv a license to display the preprint in perpetuity. It is made The copyright holder for this preprint this version posted June 20, 2020.  . CC-BY 4.0 International license available under a (which was not certified by peer review) is the author/funder, who has granted bioRxiv a license to display the preprint in perpetuity. It is made The copyright holder for this preprint this version posted June 20, 2020. ; https://doi.org/10.1101/2020.06.18.158956 doi: bioRxiv preprint Figure 3 -Mutants with increased within-host fitness but reduced transmissibility are likely 759 to be transmitted initially, but competitive exclusion prevents the fixation of mutations that 760 ultimately decrease R0. For a pathogen population at an endemic equilibrium (Re = 1), the fate of 761 a novel allele with a given effect on both transmissibility and within-host fitness was considered. 762 A. The R0 of a mutant, relative to the wild-type ancestor, was calculated based on its relative 763 transmissibility and within-host fitness. Gray solid line represents the boundary below 764 which mutants have reduced R0. Regions bordered by the gray solid line and a white dashed 765 line represent mutations that increase R0 by increasing within-host fitness at a cost to 766 transmissibility or vice versa. 767 B. The number of secondary mutant infections caused by the host in which a mutation arises 768 was calculated for the mutations shown in a). 769 C. The probability of fixation is shown for mutants that have an Re > 1. As in A), the gray line 770 denotes the boundary below which mutants have a lower R0 than wild-type. Red line 771 denotes the boundary below which mutants have R0 < 1. In the facet labeled 772 "Displacement," a variant with greater within-host fitness may superinfect and displace a 773 less fit resident population, while in the facet labeled "Exclusion," competitive exclusion 774 is perfectly efficient and later arriving challengers cannot contribute to infection. 775 776 . CC-BY 4.0 International license available under a (which was not certified by peer review) is the author/funder, who has granted bioRxiv a license to display the preprint in perpetuity. It is made The copyright holder for this preprint this version posted June 20, 2020. (which was not certified by peer review) is the author/funder, who has granted bioRxiv a license to display the preprint in perpetuity. It is made The copyright holder for this preprint this version posted June 20, 2020. ; https://doi.org/10.1101/2020.06.18.158956 doi: bioRxiv preprint G. The length of time taken for the variant with optimal R0 to outcompete other variants and 797 reach 99% frequency is shown for a range of values. 798 799 . CC-BY 4.0 International license available under a (which was not certified by peer review) is the author/funder, who has granted bioRxiv a license to display the preprint in perpetuity. It is made The copyright holder for this preprint this version posted June 20, 2020. ; https://doi.org/10.1101/2020.06.18.158956 doi: bioRxiv preprint (which was not certified by peer review) is the author/funder, who has granted bioRxiv a license to display the preprint in perpetuity. It is made The copyright holder for this preprint this version posted June 20, 2020. ; https://doi.org/10.1101/2020.06.18.158956 doi: bioRxiv preprint Figure 5 -An occupant-intruder strategy for excluding challengers selects for 800 transmissibility, while recombination facilitates the incorporation of alleles that improve 801 within-host fitness. An SIS model was used to examine the evolution of both transmissibility and 802 within-host fitness when no trade-off exists between the two, during an epidemic that begins with 803 some hosts carrying more transmissible variants with low within-host fitness, and some carrying 804 poorly transmissible variants with high within-host fitness. Three different modes of competition 805 govern interactions between two infected hosts: 1) "Displacement," in which a variant with greater 806 within-host fitness may superinfect and displace a less fit variant through competition, 2) 807 "Exclusion," in which superinfecting variants are efficiently killed and displacement is impossible, 808 and 3) "Exclusion + Recombination," in which superinfecting variants are killed, but the resident 809 population may incorporate within-host fitness alleles from challengers by recombination. 810 A. The prevalences of variants is shown over time for three different modes of competition. 811 Lines are colored by the relative R0 of a variant compared to the R0 of the optimal genotype 812 with maximum transmissibility and within-host fitness. 813 B. The average transmissibility (dashed lines) and within-host fitness (solid lines) of 814 circulating variants are shown over time for each mode of competition. 815 C. The average R0 of circulating variants, relative to the maximum achievable R0, is shown 816 over time for each mode of competition. 817 . CC-BY 4.0 International license available under a (which was not certified by peer review) is the author/funder, who has granted bioRxiv a license to display the preprint in perpetuity. It is made The copyright holder for this preprint this version posted June 20, 2020. ; https://doi.org/10. 1101/2020