Sebastian J Schreiber
email: sschreiber@ucdavis.edu

Ruian Ke

Claude Loverdo

Miran Park

Prianna Ahsan

James O Lloyd-Smith
email: jlloydsmith@ucla.edu

Cross-scale dynamics and the evolutionary emergence of infectious diseases

Keywords:

When emerging pathogens encounter new host species for which they are poorly adapted, they must evolve to escape extinction. Pathogens experience selection on traits at multiple scales, including replication rates within host individuals and transmissibility between hosts. We analyze a stochastic model linking pathogen growth and competition within individuals to transmission between individuals. Our analysis reveals a new factor, the cross-scale reproductive number of a mutant virion, that quantifies how quickly mutant strains increase in frequency when they initially appear in the infected host population. This cross-scale reproductive number combines with viral mutation rates, single-strain reproductive numbers, and transmission bottleneck width to determine the likelihood of evolutionary emergence, and whether evolution occurs swiftly or gradually within chains of transmission. We find that wider transmission bottlenecks facilitate emergence of pathogens with short-term infections, but hinder emergence of pathogens exhibiting cross-scale selective conflict and long-term infections. Our results provide a framework to advance the integration of laboratory, clinical and field data in the context of evolutionary theory, laying the foundation for a new generation of evidence-based risk assessment of emergence threats.

Introduction

Emerging infectious diseases are rising in frequency and impact and are placing a growing burden on public health and world economies [START_REF] Jones | Global trends in emerging infectious diseases[END_REF][START_REF] Woolhouse | Human viruses: discovery and emergence[END_REF][START_REF] Morse | Prediction and prevention of the next pandemic zoonosis[END_REF][START_REF] Howard | Emerging virus diseases: can we ever expect the unexpected?[END_REF]. Nearly all of these emergence events involve pathogens that are exposed to novel environments such as zoonotic pathogens entering human populations from non-human animal reservoirs, or human pathogens exposed to antimicrobial drugs [START_REF] Jones | Global trends in emerging infectious diseases[END_REF]. In these novel environments, pathogens may experience new selective forces acting at multiple biological scales, leading to reduced replication rates within hosts or less efficient transmission between hosts. When these novel environments are sufficiently harsh, emergence only occurs when the pathogen adapts sufficiently quickly to avoid extinction. As genetic sequencing of pathogens becomes increasingly widespread, there are clear signs of such rapid adaptation [5][6][START_REF] Xu | Rapid adaptation of avian h7n9 virus in pigs[END_REF][START_REF] Jonges | Emergence of the virulence-associated pb2 e627k substitution in a fatal human case of highly pathogenic avian influenza virus a (h7n7) infection as determined by illumina ultra-deep sequencing[END_REF][START_REF] Zhu | Genetic tuning of avian influenza A (H7N9) virus promotes viral fitness within different species[END_REF][10][START_REF] Xiang | Convergent evolution of human-isolated h7n9 avian influenza a viruses[END_REF], but we lack a cohesive framework to understand how this process might work across scales. Theoretical studies have shed important insights into circumstances under which this evolutionary emergence is possible, but either have focused on the host-to-host transmission dynamics and treated within-host dynamics only implicitly [START_REF] Antia | The role of evolution in the emergence of infectious diseases[END_REF][START_REF] Iwasa | Evolutionary dynamics of invasion and escape[END_REF][START_REF] André | The effect of disease life history on the evolutionary emergence of novel pathogens[END_REF][15], or have accounted for explicit within-host dynamics only along a fixed transmission chain [START_REF] Peck | Connecting within-host dynamics to the rate of viral molecular evolution[END_REF][START_REF] Geoghegan | Pathogen population bottlenecks and adaptive landscapes: overcoming the barriers to disease emergence[END_REF]. Here, we introduce and analyze a model explicitly linking these two biological scales and demonstrate how within-host viral competition, infection duration, transmission dynamics within a host population, and the size of transmission bottlenecks determine the likelihood of evolutionary emergence. This analysis sheds new light on factors governing pathogen emergence, addresses long-standing questions about evolutionary aspects of emergence, and lays the foundation for making risk assessments which integrate outcomes from in vitro and in vivo experiments with findings from sequence-based surveillance in the field.

Recent empirical findings have highlighted the need for a new generation of theory on pathogen emergence, which addresses the current frontiers of dynamics within hosts and across scales. For most pathogens, and certainly for RNA viruses and single-stranded DNA viruses, individual hosts often are not dominated by single pathogen genotypes [START_REF] Grenfell | Unifying the epidemiological and evolutionary dynamics of pathogens[END_REF][START_REF] Pybus | Evolutionary analysis of the dynamics of viral infectious disease[END_REF]. Furthermore, at the host population scale, pathogen allele frequencies at a given locus exhibit a range of dynamics from rapid selective sweeps for drug resistance or immune escape [START_REF] Pennings | Loss and recovery of genetic diversity in adapting populations of HIV[END_REF][START_REF] Lim | Viral quasi-species evolution during hepatitis Be antigen seroconversion[END_REF][START_REF] Kijak | Rare hiv-1 transmitted/founder lineages identified by deep viral sequencing contribute to rapid shifts in dominant quasispecies during acute and early infection[END_REF] to gradually changing frequencies [START_REF] Domingo | Viral quasispecies evolution[END_REF][START_REF] Linster | Identification, characterization, and natural selection of mutations driving airborne transmission of a/h5n1[END_REF]. Together, these observations lead to the long-standing question of whether adaptive evolution of viruses occurs within single hosts by rapid fixation of beneficial mutants, or more slowly by a gradual shift of allele frequencies along chains of transmission [START_REF] Lemey | Hiv evolutionary dynamics within and among hosts[END_REF][START_REF] Holmes | Viral evolution in the genomic age[END_REF]. A recent wave of studies tracking changes in within-host genetic diversity through chains of transmission among hosts [START_REF] Murcia | Intra-and interhost evolutionary dynamics of equine influenza virus[END_REF][START_REF] Bull | Contribution of intra-and interhost dynamics to norovirus evolution[END_REF][START_REF] Hughes | Transmission of equine influenza virus during an outbreak is characterized by frequent mixed infections and loose transmission bottlenecks[END_REF][START_REF] Stack | Inferring the inter-host transmission of influenza a virus using patterns of intra-host genetic variation[END_REF][START_REF] Morelli | Evolution of foot-and-mouth disease virus intra-sample sequence diversity during serial transmission in bovine hosts[END_REF][START_REF] Orton | Observing micro-evolutionary processes of viral populations at multiple scales[END_REF][START_REF] Vrancken | The Genealogical Population Dynamics of HIV-1 in a Large Transmission Chain: Bridging within and among Host Evolutionary Rates[END_REF][START_REF] Vrancken | Accurate quantification of withinand between-host HBV evolutionary rates requires explicit chain modelling[END_REF] provide unique opportunities to address this question, but a theoretical framework is needed.

Empirical studies, together with analyses at broader population scales, have highlighted the crucial influence of the transmission process -and particularly the population bottleneck associated with transmission -in filtering viral diversity. The existence of transmission bottlenecks has long been recognized, and is hypothesized to play a critical role in pathogen evolution [START_REF] Duarte | Rapid fitness losses in mammalian RNA virus clones due to Muller's ratchet[END_REF][START_REF] Bergstrom | Transmission bottlenecks as determinants of virulence in rapidly evolving pathogens[END_REF][START_REF] Novella | Exponential fitness gains of RNA virus populations are limited by bottleneck effects[END_REF][38][START_REF] John | Genetic bottlenecks in intraspecies virus Current opinion in[END_REF][START_REF] Leclair | The impact of population bottlenecks on microbial adaptation[END_REF]. Recent studies have reported that bottleneck widths vary considerably among pathogens and routes of transmission [START_REF] Varble | Influenza a virus transmission bottlenecks are defined by infection route and recipient host[END_REF][START_REF] Frise | Contact transmission of influenza virus between ferrets imposes a looser bottleneck than respiratory droplet transmission allowing propagation of antiviral resistance[END_REF], and perhaps across different phases of host adaptation [43]. Narrow transmission bottleneck sizes of 1 to 2 viral genotypes are common for HIV-1 [44][START_REF] Tully | Differences in the selection bottleneck between modes of sexual transmission influence the genetic composition of the hiv-1 founder virus[END_REF][START_REF] Samuel Mundia Kariuki | The hiv-1 transmission bottleneck[END_REF] and hepatitis C virus [START_REF] Wang | Hepatitis C virus transmission bottlenecks analyzed by deep sequencing[END_REF][START_REF] Bull | Sequential bottlenecks drive viral evolution in early acute hepatitis C virus infection[END_REF], and bottlenecks of 1 to 3 viruses are reported for influenza in ferret respiratory droplet transmission experiments [START_REF] Varble | Influenza a virus transmission bottlenecks are defined by infection route and recipient host[END_REF][START_REF] Frise | Contact transmission of influenza virus between ferrets imposes a looser bottleneck than respiratory droplet transmission allowing propagation of antiviral resistance[END_REF][START_REF] Wilker | Selection on haemagglutinin imposes a bottleneck during mammalian transmission of reassortant H5n1 influenza viruses[END_REF] and in some studies of natural human transmission [START_REF] John T Mccrone | Stochastic processes constrain the within and between host evolution of influenza virus[END_REF][START_REF] Valesano | Influenza viruses lower within-host diversity than influenza a viruses in human hosts[END_REF]. Much wider bottleneck estimates, of 30 to over 100 viruses, have been reported for natural transmission of influenza in horses [START_REF] Hughes | Transmission of equine influenza virus during an outbreak is characterized by frequent mixed infections and loose transmission bottlenecks[END_REF] and swine [52]; for ferret transmission experiments via direct contact [START_REF] Varble | Influenza a virus transmission bottlenecks are defined by infection route and recipient host[END_REF][START_REF] Frise | Contact transmission of influenza virus between ferrets imposes a looser bottleneck than respiratory droplet transmission allowing propagation of antiviral resistance[END_REF]; and for transmission of Ebola virus among humans [START_REF] Emmett | High-resolution genomic surveillance of 2014 ebolavirus using shared subclonal variants[END_REF]. While wide bottlenecks were also reported for natural influenza transmission among humans [START_REF] Poon | Quantifying influenza virus diversity and transmission in humans[END_REF][START_REF] Sobel | Transmission bottleneck size estimation from pathogen deep-sequencing data, with an application to human influenza a virus[END_REF], this was determined to be a bioinformatic artefact [56].

A major frontier in understanding viral adaptation is how the transmission process influences evolution at population scales. Past work has emphasized the potentially deleterious effect of genetic drift [START_REF] Duarte | Rapid fitness losses in mammalian RNA virus clones due to Muller's ratchet[END_REF][START_REF] Novella | Exponential fitness gains of RNA virus populations are limited by bottleneck effects[END_REF][START_REF] John | Genetic bottlenecks in intraspecies virus Current opinion in[END_REF], but a rising tide of studies reports direct selection for transmissibility. This can arise as a strong selection bias at the transmission bottleneck, where strains present at low or undetectable frequencies in the donor host are preferentially transmitted to the recipient [43,[START_REF] Wilker | Selection on haemagglutinin imposes a bottleneck during mammalian transmission of reassortant H5n1 influenza viruses[END_REF][START_REF] Boeras | Role of donor genital tract hiv-1 diversity in the transmission bottleneck[END_REF][START_REF] Carlson | Selection bias at the heterosexual HIV-1 transmission bottleneck[END_REF], or it can be measured directly via experimental infection and transmission studies [START_REF] Linster | Identification, characterization, and natural selection of mutations driving airborne transmission of a/h5n1[END_REF][START_REF] Hurt | Assessing the viral fitness of oseltamivir-resistant influenza viruses in ferrets using a competitive-mixtures model[END_REF][START_REF] Mccaw | A mathematical framework for estimating pathogen transmission fitness and inoculum size using data from a competitive mixtures animal model[END_REF][START_REF] Imai | Experimental adaptation of an influenza H5 HA confers respiratory droplet transmission to a reassortant H5 HA/h1n1 virus in ferrets[END_REF] (though we emphasize that enhanced transmissibility is not inevitable, and depends on availability of suitable adaptive genotypes [START_REF] Zaraket | Mammalian adaptation of influenza a (h7n9) virus is limited by a narrow genetic bottleneck[END_REF]). Overall transmission rates can be viewed as being determined by total viral loads, weighted by genotype-specific transmissibilities [START_REF] Carlson | Selection bias at the heterosexual HIV-1 transmission bottleneck[END_REF]. Importantly, the transmissibility trait can vary independently from viral replication fitness within hosts, so there is potential for conflicts in selection across scales. Indeed, there is clear evidence that HIV-1 has certain genotypes that transmit more efficiently, but then the within-host population tends to evolve toward lower-transmission strains during an infection [START_REF] Samuel Mundia Kariuki | The hiv-1 transmission bottleneck[END_REF][START_REF] Carlson | Selection bias at the heterosexual HIV-1 transmission bottleneck[END_REF][START_REF] Shaw | HIV transmission[END_REF][START_REF] Alizon | Within-host and between-host evolutionary rates across the HIV-1 genome[END_REF][START_REF] Lythgoe | Is hiv short-sighted? insights from a multistrain nested model[END_REF]; a similar phenomenon has been reported for H5N1 influenza [START_REF] Wilker | Selection on haemagglutinin imposes a bottleneck during mammalian transmission of reassortant H5n1 influenza viruses[END_REF] and H9N2 influenza [START_REF] Sorrell | Minimal molecular constraints for respiratory droplet transmission of an avian-human h9n2 influenza a virus[END_REF]. In an extreme example, Plasmodium parasites were found to rapidly evolve resistance to an antimalarial drug, but at the cost of complete loss of transmissibility [START_REF] Goodman | Parasites resistant to the antimalarial atovaquone fail to transmit by mosquitoes[END_REF]. Experimental evolution studies have highlighted how antagonistic pleiotropy can lead to tradeoffs between viral replication and the extracellular survival that is required for transmission [START_REF] De | Viruses' life history: towards a mechanistic basis of a trade-off between survival and reproduction among phages[END_REF]69], and a similar tradeoff has been postulated for environmental transmission of avian influenza in the field [START_REF] Handel | A multi-scale analysis of influenza a virus fitness trade-offs due to temperature-dependent virus persistence[END_REF]. Together these findings contribute to a growing evidence base that cross-scale conflicts in selection may inhibit the emergence of new viral strains in many systems [reviewed in 15].

Collectively these empirical findings highlight the need for a theory of evolutionary emergence that accounts explicitly for the within-host dynamics of competing viral strains, transmission bottlenecks, and host-to-host transmission dynamics [START_REF] Gog | Seven challenges in modeling pathogen dynamics within-host and across scales[END_REF]. To this end, we introduce and analyze a model which integrates previous work on stochastic models of evolutionary emergence and deterministic models explicitly coupling within-and between-host dynamics [START_REF] Antia | The role of evolution in the emergence of infectious diseases[END_REF][START_REF] André | The effect of disease life history on the evolutionary emergence of novel pathogens[END_REF][START_REF] Peck | Connecting within-host dynamics to the rate of viral molecular evolution[END_REF][START_REF] Geoghegan | Pathogen population bottlenecks and adaptive landscapes: overcoming the barriers to disease emergence[END_REF][START_REF] Mccaw | A mathematical framework for estimating pathogen transmission fitness and inoculum size using data from a competitive mixtures animal model[END_REF][START_REF] Lythgoe | Is hiv short-sighted? insights from a multistrain nested model[END_REF][72][START_REF] Coombs | Evaluating the importance of within-and between-host selection pressures on the evolution of chronic pathogens[END_REF][74][START_REF] Childs | Linked within-host and between-host models and data for infectious diseases: a systematic review[END_REF]. Our analysis allows us to address several fundamental questions about the emergence of novel pathogens: What factors limit evolutionary emergence for pathogens with different life histories? Why do some apparently 'nearby' adaptive mutants fail to emerge? How do bottleneck sizes influence the likelihood of emergence? Do evolutionary changes occur swiftly within individual hosts, or gradually across chains of transmission? Moreover, our analysis allows us to examine the relative importance of genetic diversity in zoonotic reservoirs versus the acquisition of new mutations following spillover into humans [START_REF] Parrish | Cross-species virus transmission and the emergence of new epidemic diseases[END_REF][START_REF] Woolhouse | Human. viruses: discovery and emergence[END_REF][START_REF] Orr | The population genetics of evolutionary rescue[END_REF]. Specifically, we address the long-standing question of how much emergence risk is increased if the "spillover inoculum" includes some genotypes bearing adaptive mutations for the novel host? Finally, our analysis enables us to unify findings from previous theoretical studies, and propose mechanistic interpretations of phenomenological parameters from earlier work.

Models and Methods

Our stochastic multiscale model of evolutionary emergence follows a finite number of individuals in a large, susceptible host population exposed to a pathogen from a reservoir population (Fig 1A). Although our framework represents many types of pathogens and can be extended to any number of strains, we focus on the case of a viral pathogen with two strains: a wild-type maladapted for the novel environment and a mutant strain potentially adapted for the novel environment. The cross-scale model with explicit within-host dynamics. Formally, the cross-scale model is a continuous time, age-dependent, multi-type branching process [START_REF] Harris | The theory of branching processes[END_REF][START_REF] Athreya | Branching processes[END_REF]. The "type" of individual corresponds to the composition of the initial virus population (i.e. the founding viral population that initiates the infection), and the "age" of an individual corresponds to the time since their initial infection. Within an infected host, the viral dynamics determine how the viral load and viral composition change over time due to competition between strains and mutation events. Transmission events are determined by the viral load and composition of the host and, consequently, are age-dependent. Below, we describe the model at each scale and the biological processes we consider in detail. The mean-field analogue of our model is an age-structured partial differential equation model introduced by Coombs et al. [START_REF] Coombs | Evaluating the importance of within-and between-host selection pressures on the evolution of chronic pathogens[END_REF].

Within-host scale model. Infection of a host usually starts locally at the site of viral entry or first tissue contact. This local spread involves a small number of viruses, their infection of host cells at the exposure interface and possibly the innate immune response to infection [START_REF] Gallagher | Causes and consequences of spatial within-host viral spread[END_REF][START_REF] Lionel | of type i interferon responses[END_REF]. During this period, infection is stochastic and establishment of infection is not guaranteed [START_REF] Lionel | of type i interferon responses[END_REF][START_REF] Huang | Principles of effective and robust innate immune response to viral infections: a multiplex network analysis[END_REF]. When one or more virions survive the period of initial local spread, they establish lineages that comprise the productive infection. These virions are termed as transmitted founder viruses [44]. Here, we explicitly define the number of transmitted founder viruses that establish productive infection as the bottleneck width N . This quantity can be estimated using viral genetic sequencing data, for example in [44,[START_REF] Sobel | Transmission bottleneck size estimation from pathogen deep-sequencing data, with an application to human influenza a virus[END_REF]. Our within-host model starts with the transmitted founder viruses by assuming an initial viral load N , and hence considers the period of established productive infection only (as with other within-host models [START_REF] Baccam | Kinetics of influenza a virus infection in humans[END_REF][START_REF] Ruy M Ribeiro | Estimation of the initial viral growth rate and basic reproductive number during acute hiv-1[END_REF] and cross-scale deterministic models [START_REF] Coombs | Evaluating the importance of within-and between-host selection pressures on the evolution of chronic pathogens[END_REF]). The initial viral exposure and stochastic local infection process are implicitly incorporated into the transmission term in the population scale model as described below, and consequently, we consider a successful transmission event as a transmission event leading to an established infection.

The within-host dynamics are modeled with coupled differential equations where v(t) = (v w (t), v m (t)) denotes the vector of viral abundances (1)

dv i dt = (1 -µ)r i v i + µr j v j if v w + v m ≤ K (1 -µ)r i v i + µr j v j -v i vm+vw (r w v w + r m v m
) else where i = j are either w or m, for wild-type and mutant strains respectively, and µ is the mutation rate between these strains. At time t = 0, v(0) = (v w (0), v m (0)) corresponds to the initial viral load of an infected individual, and v w (0) + v m (0) = N . Our within-host model is similar in structure to the quasi-species model of Lythgoe et al. [START_REF] Lythgoe | Is hiv short-sighted? insights from a multistrain nested model[END_REF].

In this model, the viral population initially increases exponentially because of the availability of a large number of target cells. The wild-type and mutant strains increase exponentially at rates, r w and r m , respectively. These dynamics are consistent with the viral dynamics predicted by standard multistrain within-host models when target cells are abundant [START_REF] Bonhoeffer | Virus dynamics and drug therapy[END_REF][START_REF] Canini | Impact of different oseltamivir regimens on treating influenza a virus infection and resistance emergence: insights from a modelling study[END_REF][START_REF] Ke | Superinfection and cure of infected cells as mechanisms for hepatitis c virus adaptation and persistence[END_REF]. The viral load saturates at time T e with a maximal viral load K (Fig 1B). We assume that after T e , the viral population size stays constant at K, and the frequencies of the wild-type and the mutant change due to their fitness differences. We further assume that the infectious period starts when v w (t) + v m (t) > 0 and ends after T days. For some acute infections, viral load usually decreases rapidly after viral peak (e.g., influenza A infections [START_REF] Baccam | Kinetics of influenza a virus infection in humans[END_REF]), and thus T is close to T e . For other acute infections, such as SARS-CoV-2 [START_REF] Edward | for the Singapore 2019 Novel Coronavirus Outbreak Research Team. Epidemiologic Features and Clinical Course of Patients Infected With SARS-CoV-2 in Singapore[END_REF] infection, viral load remains at a high level after peak viremia for a longer period of time, in the range of weeks. In this case, T > T e . For chronic infections (though our work does not necessarily consider the full range of evolutionary processes involved in chronic infections) such as HIV and Hepatitis C [91] infections, viral loads usually reach a set-point and can stay roughly constant for an extended period of time, in the range of years. In this case, T is much greater than T e . Overall, this within-host model serves as a flexible framework to describe a range of viral dynamics from both acute and chronic infections, while maintaining simplicity to enable analysis.

Population scale model. At the scale of the host population, the transmission dynamics are modeled using a multi-type branching process. Each infectious individual encounters a Poisson-distributed number of susceptible individuals at a rate of β individuals per day. Then, the number of contacts of an infected individual during the infectious period is Poisson distributed with mean βT . Each contact results in a successful transmission event with probability p(E) where E is the effective viral load at the time t of transmission (see below). Similar to the deterministic model of Lythgoe et al. [START_REF] Lythgoe | Is hiv short-sighted? insights from a multistrain nested model[END_REF], p(E) is an increasing function of E. Our main analyses assume that the transmission function p(E) is linear, but nonlinear transmission functions yield nearly identical results (Figs. Appendix-2 through 4).

The effective viral load E is calculated as

E = b w v w (t) + b m v m (t)
, where b w and b m are the transmissibilities of the wild-type and the mutant, respectively. Here b w and b m account for the survival of the viruses through a range of processes during transmission, including their likelihoods of being shed from the donor host, surviving the environment outside of a host, and reaching and infecting the target cells in an uninfected host. Furthermore, as explained in the within-host model section, these parameters also account for the likelihoods of the viruses to survive initial local infection and establish a productive infection in the recipient host. Viruses may face different challenges and selection pressures to overcome the barriers in each of these processes. Here, for simplicity and generality, a single parameter is used to summarize the transmissibility of different viruses because little is known or measured about the ability of a virus to overcome these barriers. More explicit models can be constructed as the relevant data become available.

In the event of successful transmission, there are N virions (the transmitted founder viruses) that establish the productive infection. In the model, these N virions are sampled binomially from the source individual's viral load weighted by the transmissibilities of the viral strains. Thus, the probability of infecting an individual with a viral load of ṽ = (ṽ w , ṽm ) with ṽw + ṽm = N equals

ψ(v(t), ṽ) = N ! ṽw !ṽ m ! b w v w (t) b w v w (t) + b m v m (t) ṽw b m v m (t) b w v w (t) + b m v m (t) ṽm .
Under these assumptions, during their infectious period, an infected individual of type v(0) infects a Poisson distributed number of individuals with viral load ṽ, and the mean of this distribution equals

F (v(0), ṽ) = T 0 βψ(v(t), ṽ)p(b w v w (t) + b m v m (t)) dt.
Overall, by explicitly modeling the cross-scale dynamics, our model simultaneously tracks the number of infected hosts and the viral loads within each infected host (Fig 1D). The structure of our stochastic model is similar to Peck et al. [START_REF] Peck | Connecting within-host dynamics to the rate of viral molecular evolution[END_REF]'s stochastic model of molecular viral evolution along transmission chains. However, our model accounts for stochastic transmission dynamics rather than conditioning on a chain of transmission, and explicitly accounts for the dynamics of competing viral strains. It also has similarities with Geoghegan et al. [START_REF] Geoghegan | Pathogen population bottlenecks and adaptive landscapes: overcoming the barriers to disease emergence[END_REF]'s cross-scale, stochastic model of a single transmission event from a donor host to a recipient host. Like our model, Geoghegan et al. [START_REF] Geoghegan | Pathogen population bottlenecks and adaptive landscapes: overcoming the barriers to disease emergence[END_REF]'s model has constant transmission bottlenecks, multinomial sampling from donor to host, and explicit within host dynamics with exponential growth and ceiling phases. Their model, however, focuses on a single transmission event and assumes that all virions are equally likely to be transmitted from donor to host, i.e. it assumes no selection based on transmissibility.

Methods. To solve the probabilities of emergence, we use the discrete-time branching process given by censusing the infected population at the beginning of each generation of infection. This discrete-time process is known as the embedded process [START_REF] Harris | The theory of branching processes[END_REF][START_REF] Athreya | Branching processes[END_REF]. All the statistics of this embedded process are given by the probability generating map G : [0, 1] N +1 → [0, 1] N +1 where N + 1 is the number of types of initial viral loads i.e. all combinations of wild-type and mutant virions for N virions [START_REF] Harris | The theory of branching processes[END_REF][START_REF] Athreya | Branching processes[END_REF]. We index the coordinates by the initial number of mutant virions 0, 1, 2, . . . , N within an infected individual and have

G i (s) = exp j F ((i, N -i), (j, N -j))(s j -1) .
The i-th coordinate of q(t) = G t (0, . . . , 0) is the probability of extinction by generation t when there is initially one infected individual with initial viral load (i, N -i). The probability of emergence is given by 1 -q where q = lim t→∞ q(t) is the asymptotic extinction probability. The limit theorem of branching processes implies that q = (q 0 , . . . , q N ) is the smallest (with respect to the standard ordering of the positive cone), non-negative solution of the equation q = G(0, . . . , 0). These extinction probabilities can be non-zero if and only if the dominant eigenvalue of the Jacobian matrix DG(1, 1, . . . , 1) is greater than one. Equivalently, the reproductive number given by the dominant eigenvalue of the next generation matrix of DG(1, 1, . . . , 1) is greater than one [START_REF] Diekmann | Mathematical epidemiology of infectious diseases[END_REF]. Note that the linear map s → DG(1, 1, . . . , 1)s corresponds to the mean-field dynamics of the embedded multi-type branching process.

For the numerical work, we used linear, logarithmic, and saturating functions for the transmission probability function p. All gave similar results but we present the linear case as most analytical results were derived for this case. To compute the asymptotic extinction probabilities, we iterated the probability generating map G for 2, 000 generations. For the individual based simulations, we solved the within-host differential equations using matrix exponentials and renormalizing these exponentials when the viral load reached the value K. Between host transmission events were determined by a time-dependent Poisson process with rate function p(b w v w (t) + b m v m (t)), and multinomial sampling was used to determine the initial viral load of an infected individual.

Results

The probability of evolutionary emergence. We first focus on the scenario of a single individual in the host population getting infected by the wild-type strain. We assume that the mean number of individuals infected by this individual (the reproductive number R w of the wild-type) is less than one. Hence, in the absence of mutations, there is no chance of a major outbreak [START_REF] Diekmann | Mathematical epidemiology of infectious diseases[END_REF]. However, if the wild-type strain produces a mutant strain whose reproductive number R m is greater than one, there is a chance for a major outbreak. The mutant strain might have a higher reproductive number than the wild-type strain because it replicates more rapidly within the host or because it transmits more effectively to new hosts (or both). We define these within-host and between-host selective advantages as s = r m -r w and τ = log(b m ) -log(b w ), respectively.

Consistent with theoretical expectations, a non-zero probability of evolutionary emergence requires the mutant's reproductive number R m to be greater than one (Fig 2). However, the mixture of selective advantages or disadvantages of the mutant strain that give rise to R m > 1 depends in a complex manner on the pathogen's life history traits, such as the duration of the (α) of a mutant virion -the mean number of mutant virions transmitted to susceptible individuals by an infected individual whose initial viral load contains 1 mutant virion and N -1 wild type virions. When α is less than one, evolutionary emergence becomes unlikely.

To understand these complexities, we determine the conditions under which the mutant's reproductive number R m exceeds one, and then present analytic approximations for the emergence probability when R m > 1.

Cross-scale selection and the mutant reproductive number R m . The reproductive numbers of the wild-type strain (R w ) and mutant strain (R m ) can be calculated as the product of the contact rate, the average transmissibility of the strain during the infectious period, and the infection duration (see, Coombs et al. [START_REF] Coombs | Evaluating the importance of within-and between-host selection pressures on the evolution of chronic pathogens[END_REF] and Appendix). These reproductive numbers are positively correlated with the contact rate, infection duration, transmissibility, and viral per-capita growth rates. The influence of the maximal viral load K depends on the infection duration. For short-term infections, defined here as infections with a relatively short saturated phase (i.e. T -T e T e ), increasing K has little effect on a strain's reproductive number. For long-term infections, defined here as as infections with a long saturated phase (i.e. T -T e T e ), reproductive numbers increase with K.

Whether a selective advantage at either scale results in the mutant reproductive number R m exceeding one depends on the duration of the infection. For short-term infections, most transmissions occur towards the end of the infectious period T , when the infectious load is the highest. By the end of the infectious period, the mutant viral density has increased approximately by a factor of e sT more than the wild-type, and transmission for each mutant virion is exp(τ ) more likely than for a wild-type virion. Refining this intuition, we derive the approximation (Appendix)

(2) log R m ≈ log R w + τ + s(T -1/r w ).
This approximation shows that a sufficiently strong selective advantage at either scale can result in the mutant reproductive number exceeding one (R m > 1) despite a selective disadvantage at the other scale (confirmed by exact calculations in Fig 2A ,B). For short-term infections where viral dynamics are dominated by the exponential phase, the longer the duration of infection, the greater the influence of the within-host selective advantage compared to the between-host selective advantage (e.g., steep contours in Fig 2A).

For long-term infections, the viral load will tend to K for both purely wild-type or purely mutant infections. Thus, the only difference will be in transmissibility and we get the approximation (Appendix)

(3) log R m ≈ log R w + τ.
This approximation implies that a between-host selective advantage is required for a long-term infection to be capable of evolutionary emergence (confirmed by exact calculations in Fig 2C ).

When viral dynamics are dominated by the saturated phase at fixed K, a within-host selective advantage has little impact on the average viral load during the infectious period of an individual solely infected with the mutant strain and, consequently, provides a minimal increase in the mutant reproductive number.

Going beyond the mutant reproductive number. When the mutant strain has a reproductive number greater than one, there is a non-zero probability of a major outbreak that is well-approximated by the product of three terms (compare Fig. 2 to Fig. Appendix-6):

(4)

S w × I w→m × P m
where S w is the mean size of a minor outbreak due to the wild type, I w→m is the mean number of individuals infected with a mutant virion by an individual initially only infected with the wild type, and P m is the probability an individual infected with one mutant virion causes a major outbreak. The magnitude of the probability P m depends on the mutant reproductive number, R m , as in previous theory; however we show below that it is also determined strongly by a new quantity, the cross-scale reproductive number α of a mutant virion. Our approximation (4), which can be viewed as a multiscale extension of earlier theory [START_REF] Antia | The role of evolution in the emergence of infectious diseases[END_REF][START_REF] Iwasa | Evolutionary dynamics of invasion and escape[END_REF], highlights three key ingredients, in addition to R m > 1, for evolutionary emergence. First, the size of the minor outbreak produced by the wild type determines the number of opportunities for the mutant strain to appear within a host. The average size of this minor outbreak equals S w = 1 1-Rw , as noted by earlier studies [START_REF] Antia | The role of evolution in the emergence of infectious diseases[END_REF][START_REF] Iwasa | Evolutionary dynamics of invasion and escape[END_REF]. If the wild strain is badly maladapted, then it is expected not to spread to multiple individuals (e.g. if R w < 1/2, then 1 1-Rw < 2) and opportunities for transmission of mutant virions are very limited. Alternatively, if the wild strain is only slightly maladapted to the new host, then, even without any mutations, the pathogen is expected to spread to many individuals (e.g. if R w = 0.95, then 1 1-Rw = 20), thereby providing greater opportunities for evolutionary emergence. Our analysis implies that higher contact rates, within-host viral growth rates, viral transmissibility, and maximal viral loads (for long infectious periods) facilitate these larger reproductive values.

Second, the mutant strain must be transmitted successfully to susceptible individuals -the second term I w→m of our approximation (4). For an individual initially infected only with the wild-type strain, I w→m equals the product of the contact rate, the infection duration, and the likelihood that a mutant virion is transmitted during a contact event, averaged over the full course of infection (Appendix). The likelihood of transmitting mutant virions on the t th day of infection is proportional to the product of the transmission bottleneck width (N ), the within-host frequency of the mutant strain, and the transmissibility b m of the mutant strain. This highlights an important distinction between short-term and long-term infections. For short-term infections where sT is small, there is insufficient time for the frequency of mutants to rise within a host, so transmission events with mutant virions are rare (< 1/1, 000 for all black contour lines in Fig 2A,B). This is a key obstacle to evolutionary emergence in short-term infections. In contrast, for long-term infections where the mutant strain has a substantial within-host selective advantage, the mutant strain is transmitted frequently (e.g. the expected number of events > 1 for some contours in Fig 2C,D).

Finally, even if the mutant strain is successfully transmitted, an individual infected with the mutant strain needs to give rise to a major outbreak which occurs with probability P m , see equation ( 4). This requires the mutant strain to rise in frequency in the infected host population. A mean field analysis for larger bottleneck sizes (N > 5 in the simulations) reveals that mutant frequency initially grows geometrically by the cross-scale reproductive number α of a mutant virion-the number of mutant virions, on average, transmitted by an individual initially infected with a single mutant virion and N -1 wild type virions (Appendix). If this cross-scale reproductive number is greater than one, then each mutant virion replaces itself with more than one mutant virion in the next generation of infection, and the frequency of mutant virions increases in the infected host population. If the cross-scale reproductive number α is less than one, the frequency of mutants decreases, thereby hindering evolutionary emergence.

For short-term infections, the cross-scale reproductive number α is equal to the ratio of the basic reproductive numbers:

(5) α = R m R w Thus for short-term infections there is no additional condition required for emergence. Whenever the mutant reproductive number R m exceeds one, there is a mean tendency for the mutant strain to increase in frequency once it has been successfully transmitted to susceptible individuals (i.e. α > 1 because R m > 1 > R w ). The greater the ratio R m /R w , the more rapid the increase in frequency.

For long-term infections, there is sufficient time for within-host selection to change the frequency of the mutant strain within a host. Larger transmission bottlenecks increase the likelihood that these changes in frequency are transmitted between hosts. For these long infectious periods and larger bottlenecks, a within-host selective disadvantage reduces the cross-scale reproductive number α (Appendix):

(6) α ≈ exp(τ + sT /2) for s sufficiently small.

Hence, the cross-scale reproductive number α may be less than one even when the mutant reproductive number R m is greater than one. This phenomenon, which arises from the interplay of dynamics at within-host and between-host scales, moderated by the transmission bottleneck width, explains the puzzling behavior about the emergence probabilities noted earlier (the white region bounded by solid and dashed red lines in Fig 2D).

The importance of these frequency dynamics can be visualized via individual-based outbreak simulations, and cobwebbing diagrams summarizing the mean field dynamics. When the mutant reproductive number R m is greater than one but its cross-scale reproductive number α is less than one, mutant virions may be transmitted but the resulting mixed infections are invariably taken over by purely wild-type infections (Fig 3A). Only pure mutant infections can escape this "relapse" to wild-type, and then only if the mutation rate µ is low enough that new wild-type virions are very slow to appear. When the within-host selective disadvantage is weak and the between-host selective advantage is strong, the cross-scale reproductive number α may be slightly greater than one and the mutant strain can drift to higher frequencies within the infected host population (Fig 3B). For large within-host selective advantages, the cross-scale reproductive number α is large and the mutant strain can sweep rapidly to fixation in the infected host population (Fig 3C). Thus, in addition to revealing a new condition needed for evolutionary emergence, the cross-scale reproductive number α summarizes the conditions under which evolution occurs swiftly or gradually within chains of transmission.

The dueling effects of transmission bottlenecks. Wider bottlenecks increase the likelihood of evolutionary emergence for pathogens with a short infectious period, but can hinder or facilitate evolutionary emergence of long-term infections (Fig 4A,B). For short-term infections, evolutionary emergence is constrained primarily by the transmission of mutant virions by individuals initially infected with only the wild strain. Wider transmission bottlenecks alleviate this constraint, especially when the mutant strain is expected to increase rapidly within the infected population (α 1; Fig 4A). When the mutant strain rises slowly in the infected host population (α slightly greater than one), the emergence probability is insensitive to the bottleneck size, regardless of infection duration.

For long-term infections for which the mutant strain's reproductive number R m is greater than one, but the cross-scale reproductive number α is less than one, emergence probabilities decrease sharply with bottleneck size (Fig 4B andAppendix). Because a mutant reproductive number R m greater than one requires a between-host selective advantage (τ > 0) for a long-term infection, the cross-scale reproductive number α is less than one only if there is a within-host selective disadvantage (s < 0) so that mixed infections tend to be taken over by the wild-type. Consequently, the mutant virus can start an epidemic only when a host is infected with an initial

Step 1: Wildtype strain spills over into novel host

Step 2: Minor outbreak of wild-type strain

Major barrier when:

Basic reproductive number of wild-type strain (R w ) much less than one

Step 3: First transmission of mutant strain

Major barrier when:

Infectious period is short OR infectious period is long and within-host selection favors wild-type (s<0)

Step 4: Increase in frequency of mutant strain Major barrier when: viral load composed of mutant particles only, an event that becomes increasingly unlikely for larger bottleneck sizes N .

Mutant spillover events hasten evolutionary emergence. When the mutant strain is circulating in the reservoir, the index case can begin with a mixed infection which invariably makes evolutionary emergence more likely (Fig 4C ,D). For short-term infections, spillover doses that contain low or high frequencies of mutants have a roughly equal impact on emergence, and the magnitudes of these increases are relatively independent of the cross-scale reproductive number α (Fig 4C). This arises because the initial production and transmission of the mutant strain is the primary constraint on evolutionary emergence for short-term infections with R m > 1 (black contours in Fig 2A ,B). Consequently, mutant spillover events of any size are sufficient to overcome this constraint.

For long-term infections, the impact of mutant spillover depends on the cross-scale reproductive number α. When α is less than one, only spillover doses with high frequencies of mutants have a significant effect on emergence (i.e. bottom three curves in Fig 4D). When the cross-scale reproductive number α is greater than one, the effect mimics short-term infections and mutant spillover events of any size can substantially increase the chance of emergence (top three curves in Fig 4C,D).

Discussion

We presented a cross-scale model for evolutionary emergence of novel pathogens, linking explicit representations of viral growth and competition within host individuals to viral transmission between individuals. Our work identifies four steps to evolutionary emergence summarized in Figure 5 and four ingredients (see, equation ( 4)) that govern these steps: (i) the reproductive number of the wild type which determines the size of a minor outbreak of this strain, (ii) the rate at which individuals infected initially with the wild-type strain transmit the mutant strain, and (iii) the cross-scale reproductive number α of a mutant virion which corresponds to the mean number of mutant virions transmitted by an individual whose initial infection only included one mutant virion, and (iv) the reproductive number of the mutant strain. Prior studies of evolutionary emergence [START_REF] Antia | The role of evolution in the emergence of infectious diseases[END_REF][START_REF] Iwasa | Evolutionary dynamics of invasion and escape[END_REF][START_REF] André | The effect of disease life history on the evolutionary emergence of novel pathogens[END_REF][15] identified the importance of the single strain reproductive numbers, R m and R w , and a phenomenological 'mutation rate', but ingredients (iii)-(iv) are new mechanistic insights arising from the cross-scale dynamics. By analyzing these ingredients of evolutionary emergence, we show how the probability of emergence is governed by selection pressures at within-host and between-host scales, the width of the transmission bottleneck, and the infection duration. We also map the conditions under which different broad-scale patterns are observed, from rapid selective sweeps to slower diffusion of new types. While our study has focused on within-host and between-host scales of selection, it could be generalized readily to other types of cross-scale dynamics where selection may act differently at different scales, such as within-farm and between-farm scales where genetic data have given insights into the emergence of high-pathogenicity avian influenza strains [START_REF] Fusaro | Unexpected inter-farm transmission dynamics during a highly pathogenic avian influenza epidemic[END_REF].

Previous theoretical studies of evolutionary emergence of novel pathogens [START_REF] Antia | The role of evolution in the emergence of infectious diseases[END_REF][START_REF] Iwasa | Evolutionary dynamics of invasion and escape[END_REF][START_REF] André | The effect of disease life history on the evolutionary emergence of novel pathogens[END_REF][15] have assumed infected individuals are, at any point in time, infected primarily by a single pathogen strain. Consequently, shifts from infection with one strain to infection with another must occur abruptly, relative to other processes. Such abrupt shifts could correspond to within-host selective sweeps or, if mutant strains remain at low frequency, to rare events in which only the mutant strain is transmitted. The seminal studies [START_REF] Antia | The role of evolution in the emergence of infectious diseases[END_REF][START_REF] Iwasa | Evolutionary dynamics of invasion and escape[END_REF] showed that under these conditions the probability of emergence is proportional to the frequency of these events, which they bundled together into a phenomenological "mutation rate".

Our cross-scale analysis identifies the mechanistic counterpart to this phenomenological "mutation rate", which is the probability that an individual infected initially with the wild-type strain ends up transmitting at least one virion of the mutant strain (Step 3 in Fig 5). This quantity, which is approximated by the black contours in Fig 2, is governed chiefly by the ability of the mutant strain to reach an appreciable frequency within the host over the course of an infection. This is evident from the strong dependence on the strength of within-host selection-which surprisingly is much stronger than the dependence on the transmission advantage of mutant virions-and the higher values found for larger bottleneck widths, which favor transmission of low-frequency mutants through a straight-forward sampling effect. This sampling effect is consistent with the theoretical work of Geoghegan et al. [START_REF] Geoghegan | Pathogen population bottlenecks and adaptive landscapes: overcoming the barriers to disease emergence[END_REF], and the experimental study of Frise et al. [START_REF] Frise | Contact transmission of influenza virus between ferrets imposes a looser bottleneck than respiratory droplet transmission allowing propagation of antiviral resistance[END_REF], who found larger bottlenecks increased the likelihood of mutant viral strains being transmitted between hosts. The duration of infection plays a crucial role, and our analysis showed that achieving this first transmission of the adaptive mutant is a key barrier to evolutionary emergence for short-term infections (Fig 2A,B). This finding aligns with the recent observation that putative immune-escape mutants of pandemic H1N1 influenza, which should have a within-host fitness advantage, were generated readily in infected humans but did not reach high within-host frequency and have been detected very rarely at the consensus level (i.e. they have failed to emerge) [START_REF] Dinis | Deep sequencing reveals potential antigenic variants at low frequencies in influenza a virus-infected humans[END_REF]. While more investigation is needed to determine the relevant s and τ parameters for these strains, these data are consistent with the mechanism we identify whereby these variants may be adaptive but have insufficient time to reach high enough frequencies to avoid being lost in transmission bottlenecks.

Our analysis highlights an additional factor, the cross-scale reproductive number α of a mutant virion, previously unrecognized in models neglecting within-host diversity and analyses centered on R 0 for pure infections. Even after the mutant strain has been transmitted, it needs to increase in frequency at the scale of the infected host population (Step 4 in Fig 5). Specifically, each transmitted mutant virion, on average, needs to replace itself with more than one transmitted mutant virion in the next generation of infected hosts. When this occurs, it sets up a positive feedback along chains of infections: individuals with a higher frequency of the mutant strain tend to infect more individuals, which in turn provides more opportunities to transmit, on average, higher frequencies of the mutant strain to the next generation. Conversely, when this between-generation cross-scale reproductive number α is less than one, the positive feedback leads to lower and lower frequencies of the mutant strain within the infected host population. This positive feedback mechanism is stronger for wider transmission bottlenecks (≥ 5 virions in our numerical explorations), which better preserve the mutant frequency from one host to the next. Interestingly, this 5 virion threshold to define a wider transmission bottleneck is consistent with an earlier modeling study, which found that bottleneck sizes above 5 virions eliminated fitness losses in serial transfers of RNA viruses between cell culture plates [START_REF] Leclair | The impact of population bottlenecks on microbial adaptation[END_REF].

The directionality of the positive feedback is more complex, and depends on multiple factors including the infection duration and the presence or absence of cross-scale conflicts. For long-term infections, mutant frequencies can drop deterministically within a host, and hence prevent emergence, even if the mutant strain has a reproductive number greater than one. This occurs when the mutant strain has a within-host selective disadvantage and between-host selective advantage (upper left quadrant of Fig 2D ); the long infectious period allows time for the within-host disadvantage to drive the mutant strain to lower frequency and, thereby, set up the positive feedback effectively preventing evolutionary emergence. In contrast, for short-term infections the mutant strain tends to rise in frequency whenever the mutant reproductive number is greater than one, because there is insufficient time for any within-host disadvantage to act. In particular, evolutionary emergence may occur despite within-host selective disadvantages, a possibility excluded by previous theory [15]. Collectively these two results imply that, in the face of cross-scale conflict and wide transmission bottlenecks, longer infectious periods can inhibit, rather than facilitate [START_REF] André | The effect of disease life history on the evolutionary emergence of novel pathogens[END_REF], evolutionary emergence (Fig 2B ,D). Related to this result, Geoghegan et al. [START_REF] Geoghegan | Pathogen population bottlenecks and adaptive landscapes: overcoming the barriers to disease emergence[END_REF] found that longer durations of the infectious period would lower the probability that a donor would infect the recipient. In their case, this occurred because fitness of the mutant was assumed to be lower in the donor host species and higher in the recipient species. Hence, a longer infectious period could purge any mutants arising in the donor and result in the recipient only receiving wild-type virions.

Previous theoretical studies examining the evolutionary consequences of cross-scale conflict [e.g. 65, 72, 73] differ from ours in several ways. Notably, they consider longer-term evolution for endemic diseases using deterministic models, rather than the inherently stochastic, shorter-term dynamics of evolutionary emergence. Using multiscale endemic SIR models, Coombs et al. [START_REF] Coombs | Evaluating the importance of within-and between-host selection pressures on the evolution of chronic pathogens[END_REF] found that pathogen strains competitively superior at the within-host scale could be displaced by competitively inferior strains that had higher reproductive numbers at the epidemiological scale. This phenomenon was driven by non-equilibrium within-host dynamics, where early fluctuations in strain frequencies could have disproportionate influence if host survival was short. Our work reveals the converse case, where strains with lower reproductive numbers at the epidemiological scale (in fact, less than one) can prevent evolutionary emergence if they have a within-host advantage, by causing the adapted strains to have a cross-scale reproductive number α of less than one. Consistent with our result, Lythgoe et al. [START_REF] Lythgoe | Is hiv short-sighted? insights from a multistrain nested model[END_REF] showed found that deterministic, multistrain models could produce equilibrium states dominated by strains that were competitively superior at the within-host scale, despite reducing the reproductive number at the epidemiological scale. Parallel to our finding that cross-scale conflict occurred only for long-term infections, Lythgoe et al. [START_REF] Lythgoe | Is hiv short-sighted? insights from a multistrain nested model[END_REF]'s short-sighted evolution was most pronounced when within-host dynamics occurred at a faster time-scale.

Our cross-scale analysis also enables us to address two long-standing and interrelated questions in emerging pathogen research, regarding the influence of transmission bottleneck size on emergence probability and the importance of "pre-adapted" mutations circulating in the animal reservoir [START_REF] Geoghegan | Pathogen population bottlenecks and adaptive landscapes: overcoming the barriers to disease emergence[END_REF][START_REF] Gog | Seven challenges in modeling pathogen dynamics within-host and across scales[END_REF][START_REF] Parrish | Cross-species virus transmission and the emergence of new epidemic diseases[END_REF][START_REF] Woolhouse | Human. viruses: discovery and emergence[END_REF][START_REF] Orr | The population genetics of evolutionary rescue[END_REF][START_REF] Pepin | Identifying genetic markers of adaptation for surveillance of viral host jumps[END_REF]. In both cases, the answer depends on the cross-scale reproductive number α of a mutant virion that governs the frequency feedback. Under most circumstances, wider bottlenecks boost the probability of emergence (Fig 4A ,B), because they favor the onward transmission of mutant virions when they are rare; this is particularly vital for the first transmission of mutant virions (i.e. Step 3 in Fig. 5). The exception is for long-term infections with α < 1, such that the mutant tends to decline in frequency in the infected host population. Under these circumstances, wider bottlenecks hinder emergence by propagating reductions in the frequency of the mutant strain more efficiently from host to host (Step 4 in Fig. 5). Conventional thinking about the influence of bottlenecks on viral adaptation emphasizes fitness losses due to genetic drift and the effects of Muller's ratchet [35-37, 39, 40], which become more severe for narrower bottlenecks. Contrary to these negative effects of narrow bottlenecks, our findings highlight that narrower bottlenecks can aid emergence in long-term infections with a cross-scale conflict in selection (Fig 4B). Here the adaptive gain in transmissibility at population scales can be impeded by the selective disadvantage at the within-host scale, but, intriguingly, this disadvantage is neutralized by genetic drift arising from narrow bottlenecks. Given the evidence for cross-scale evolutionary conflicts for HIV-1 [START_REF] Carlson | Selection bias at the heterosexual HIV-1 transmission bottleneck[END_REF][START_REF] Shaw | HIV transmission[END_REF][START_REF] Alizon | Within-host and between-host evolutionary rates across the HIV-1 genome[END_REF][START_REF] Lythgoe | Short-sighted virus evolution and a germline hypothesis for chronic viral infections[END_REF], our results suggest the possibility that HIV-1's narrow transmission bottleneck [44] could play a role in the emergence of novel strains (e.g. drug resistant strains).

Similar mechanisms dictate the influence of mutant viral strains circulating in the reservoir, particularly for long-term infections (Fig 4C,D). If the cross-scale reproductive number α of a mutant virion is greater than one, so that the mutant frequency rises easily in the infected host population, then even low frequencies of mutants in the reservoir lead to substantial risk of emergence. Indeed, for long-term infections with α > 1, emergence becomes almost certain when there are mutants in the initial spillover inoculum. Conversely, when the cross-scale reproductive number α is less than one, emergence probability scales with the proportion of mutants in the initial dose, and when α 1, the initial dose must consist almost entirely of the mutant strain in order to pose any major risk. These findings yield direct lessons for the growing enterprise of conducting genetic surveillance on zoonotic pathogens in their animal reservoirs [START_REF] Russell | The potential for respiratory droplet transmissible A/h5n1 influenza virus to evolve in a mammalian host[END_REF][START_REF] Davis | Use of highly pathogenic avian influenza A (H5N1) gain-of-function studies for molecular-based surveillance and pandemic[END_REF][START_REF] Watanabe | Circulating avian influenza viruses closely related to the 1918 virus have pandemic potential[END_REF][START_REF] Carroll | The global virome project[END_REF]. A crucial requirement for effective genetic surveillance is the ability to identify genotypes of concern; the integration of various research approaches to address this question, and estimate key quantities, is an on-going research challenge [101][START_REF] Geoghegan | Virological factors that increase the transmissibility of emerging human viruses[END_REF][START_REF] Lipsitch | Science forum: Viral factors in influenza pandemic risk assessment[END_REF]. Risk to humans increases if there is any non-zero proportion of mutant viruses in the spillover inoculum, so tracking the presence of such mutants is beneficial. Surprisingly, the quantitative frequency of mutants in the initial dose has little impact on emergence probability in most scenarios, with the one exception of long-term infections with α < 1. Collectively, these results suggest that any knowledge of the cross-scale reproductive number α and mutant reproductive numbers can help to refine our goals for genetic surveillance, and that in many circumstances presence/absence detection is sufficient.

While there are not sufficient data from past emergence events to test our model's conclusions, recent studies combining animal transmission experiments with deep sequencing have exhibited many phenomena aligned with our findings. Moncla et al. [43] conducted deep sequencing analyses of H1N1 influenza viruses, in the context of ferret airborne transmission experiments that examined the adaptation of avian-like viruses to the mammalian host. Their results provide in-depth insights into selection within hosts and at transmission bottlenecks, for a range of mutations on genetic backgrounds that change as adaptation proceeds (i.e. equivalent to numerous separate implementations of our model of a single mutational step). They observe a fascinating range of dynamics: some mutations appeared to have α moderately above 1, exhibiting modest increases in frequency between generations, but achieved this outcome with different traits (e.g. S113N on the HA190D225D background exhibited strong within-host selection and no evident transmission advantage, while D265V showed weak within-host selection but its frequency rises in transmission). Another mutation (I187T on the 'Mut' background) appeared to have α 1 and exhibited strong selection at both scales; notably, this mutation is widespread in 17/17 human-derived isolates of the post-emergence 1918 virus, consistent with the successful and rapid emergence our model would predict. Moncla et al. also present substantial evidence of cross-scale conflict in selection, as one mutation (G225D on 'Mut' background) exhibited declining frequencies within ferrets but rose to fixation in 2/2 transmission events, while numerous mutations in the HA2 region rose in frequency within the host but were eliminated in transmission. Another study examined a set of 'gain-of-function' mutations in H5N1 influenza in ferrets, and reported a slow rise in frequency when the virus was passaged between ferrets by intranasal inoculation, then rapid fixation of these mutations during airborne transmission [START_REF] Linster | Identification, characterization, and natural selection of mutations driving airborne transmission of a/h5n1[END_REF]; the airborne transmission data are consistent with strong between-host selection and a high α value (though we emphasize that circulating H5N1 viruses required substantial modification to the favorable genetic background used in those experiments). Intriguingly, Moncla et al. synthesized their results with those of earlier studies [START_REF] Varble | Influenza a virus transmission bottlenecks are defined by infection route and recipient host[END_REF][START_REF] Wilker | Selection on haemagglutinin imposes a bottleneck during mammalian transmission of reassortant H5n1 influenza viruses[END_REF][START_REF] Zaraket | Mammalian adaptation of influenza a (h7n9) virus is limited by a narrow genetic bottleneck[END_REF] to hypothesize that the 'stringency' of the transmission bottleneck varies systematically during the course of viral adaptation, with loose bottlenecks prevailing when viruses first encounter a new host species (and perhaps again when the virus is host-adapted), and much tighter bottlenecks at the key juncture in host adaptation when a genotype with greater transmissibility is available to be selected. If this hypothesis is correct, then our findings can be applied to each adaptive step independently, and may help to identify which viral traits are most crucial to adaptive steps subject to tighter or looser bottlenecks.

Our results focus on systems where there is one major rate-limiting step to emergence, and the viral population can be represented by one wild-type and one mutant strain. This is a simplification of most viral emergence problems, but will apply directly to systems where a single large-effect mutation is the primary barrier to emergence of a supercritical strain, as for Venezuelan equine encephalitis virus emerging from rodents to horses [START_REF] Anishchenko | Venezuelan encephalitis emergence mediated by a phylogenetically predicted viral mutation[END_REF]. While it is possible to extend our exact computations and analysis of the cross-scale reproductive number of a mutant virion to systems with multiple mutational steps, the present analysis already provides insights into more complex evolutionary scenarios. For evolutionary trajectories that proceed through a fixed series of genotypes, the probability of emergence can be approximated by extension of our equation ( 4), as in previous work [START_REF] Antia | The role of evolution in the emergence of infectious diseases[END_REF][START_REF] Iwasa | Evolutionary dynamics of invasion and escape[END_REF]15]. If emergence requires multiple mutational steps which pass through a fitness valley, then the scale at which this valley occurs matters. A within-host fitness valley in replication rates would hinder pathogens with long-term infections and larger bottleneck widths, more than those with smaller bottlenecks. A between-host fitness valley in transmissibility could hinder evolutionary emergence of pathogens causing long-term infections more than those causing short-term infections, unless the within-host landscape is sufficiently favorable to allow traversing the valley within a single host's long-term infection. Recent studies have also highlighted the importance of considering the broader genotype space, which can reveal indirect paths that circumvent fitness valleys [START_REF] Wu | Adaptation in protein fitness landscapes is facilitated by indirect paths[END_REF], alternative genotypes that yield similar phenotypes [43], and the costs imposed by deleterious mutants on higher mutation rates [START_REF] Loverdo | Evolutionary invasion and in the presence of deleterious mutations[END_REF].

Our analysis also focuses on simple "logistic-like" model for within-host viral dynamics. This simplification allows us to study how evolutionary emergence is limited by different factors for pathogens dominated by exponential versus saturated phases of viral growth, while maintaining analytical tractability. Future important extensions would be to allow within-host fitness to alter the carrying capacity in the saturated phase, as well as identifying the relative contributions of stochastic within-host dynamics [START_REF] Geoghegan | Pathogen population bottlenecks and adaptive landscapes: overcoming the barriers to disease emergence[END_REF], immune responses, and host heterogeneity on viral emergence. Some of these aims would be addressed by using a more mechanistic model for the within-host dynamics, incorporating resource limitation [72,[START_REF] Coombs | Evaluating the importance of within-and between-host selection pressures on the evolution of chronic pathogens[END_REF] or immune pressure [START_REF] Antia | Within-host population dynamics and the evolution and maintenance of microparasite virulence[END_REF]. We have assumed that the bottleneck width N is fixed for a given pathogen. This is broadly consistent with currently available data [44, [START_REF] Wang | Hepatitis C virus transmission bottlenecks analyzed by deep sequencing[END_REF][START_REF] Bull | Sequential bottlenecks drive viral evolution in early acute hepatitis C virus infection[END_REF], but it will be important to explore the consequences of variation in bottleneck width arising from different routes of transmission, or possibly from changing viral loads [38,[START_REF] John | Genetic bottlenecks in intraspecies virus Current opinion in[END_REF]. Among other possible impacts, this may alter the conclusion that emergence probability is minimally affected by the functional dependence of transmission probability on viral load. The computational and analytical framework developed here can be extended to account for these additional complexities. Other important extensions can explore the impact of clonal competition on emergence probabilities [START_REF] Strelkowa | Clonal interference in the evolution of influenza[END_REF][START_REF] Gerrish | The fate of competing beneficial mutations in an asexual population[END_REF][START_REF] Good | Distribution of fixed beneficial mutations and the rate of adaptation in asexual populations[END_REF][START_REF] Ogbunugafor | Competition along trajectories governs adaptation rates towards antimicrobial resistance[END_REF] or the potential for complementation to rescue pathogen strains from deep fitness valleys-a mechanism that depends on wide transmission bottlenecks [112].

Our cross-scale analysis opens the door for a new generation of integrative risk assessment models for pathogen emergence, which will integrate growing streams of data collected in laboratories and field surveillance programs [START_REF] Carroll | The global virome project[END_REF]101,[START_REF] Lipsitch | Science forum: Viral factors in influenza pandemic risk assessment[END_REF]. At present we rely on the intuition of scientists to link together the discoveries from targeted experiments, massively parallel phenotypic screens, experimental evolution, clinical medicine, and field epidemiology and disease ecology. Mathematical and computational models that connect biological scales using mechanistic can make unique contributions to this transdisciplinary enterprise, by formally integrating diverse empirical findings and by identifying the crucial knowledge gaps to focus future research. The work presented here is a step on the path to realizing this potential.

it follows that log R m R w ≈ τ log 1 + s r w r w T e -1 1 + r w T s .
As log(1 + x) ≈ x for small x and |s| r w by assumption, we obtain R R w ≈ τ + s r w r w T e -1 r w T s + 1 .

Equation (3) in the main text follows in the case that T s T s in which case the second term is approximately zero.

Derivation of the Emergence Probability Approximation. For small mutation likelihood µ, we derive a mathematically explicit version of the approximation (4) for the emergence probability from the main text. As stated in the main text, this approximation is given by the product of three terms: the expected number of secondary, wild-type cases produced during a fade-out, the mean number of infected with mutant virions by an individual initially infected only with the wild-type, and the probability of emergence from an individual infected with a single mutant virion. As noted in the main text, the first term is given by 1 1-Rw . The second term requires more work. To derive an analytic approximation for this term, notice that the mean number of individuals infected with mutant virions by an individual only infected with the wild type equals

T 0 βp (v w (t)b w + v m (t)b m ) ψ((v w (t), v m (t)), (N -, ))dt
where v w (t), v m (t) is the solution of the within host viral dynamics with v w (0) = N, v m (0) = 0, and ψ((v w , v m ), (ṽ w , ṽm )) is the probability of an individual with viral load (v w , v m ) infecting an individual with a viral load of (ṽ w , ṽm ) where ṽw + ṽm = N . The solution (v m (t), v m (t)) is given by

v i (t) = V i (t) if V w (t) + V m (t) ≤ K and K V i (t) V w (t) + V m (t) otherwise
where V w (t), V m (t) are the solutions to

dV w dt = r w (1 -µ)V w + r m µV m V w (0) = N dV m dt = r m (1 -µ)V m + r w µV w V m (0) = 0.
Ignoring back mutations (i.e. setting r m µ = 0 and r m (1 -µ) to r m ), the solutions for

V w (t), V m (t) are approximately V w (t) ≈ N exp(r w t) V m (t) ≈ µN r w r w -r m (exp(r w t) -exp(r m t))
if r w = r m , and V m (t) ≈ µN r w t exp(r w t)

if r w = r m = r. Since x a+x ≈ x/a to first order near 0, the weighted frequency, x m (t), of mutant strain is approximately

x m (t) = b m V m (t) b w V w (t) + b m V m (t) ≈ exp(τ )µr w exp(st) -1 s where s = r m -r w and b m b w = exp(τ )
if s = 0, and x m (t) ≈ µr t exp(τ ) if s = 0. We have

ψ((v w (t), v m (t)), (N -, )) = N ! !(N -)! x w (t) N -x m (t) .
For ≥ 2, these terms are order 2 and therefore will be ignored. Hence, the only term of interest is = 1:

ψ((v w (t), v m (t)), (N -1, 1
)) ≈ µN r w exp(τ ) exp(st) -1 s if s = 0 and µN r w t exp(τ ) otherwise

We also can approximate (assuming p is differentiable)

p(b w V w (t) + b m V m (t)) ≈ p(b w V w (t)) + O(µ) = p(b w min{K, N exp(r w t)}) + O(µ)
We drop the O(µ) term as it will only lead to higher order terms in the approximation. Putting all of this together gives the following approximation for the mutant force of infection

(A-3) β T 0 µp(b w min{K, N exp(r w t)})N r w exp(τ ) exp(st) -1 s dt if s = 0, and (A-4) β T 0 µp(b w min{K, N exp(r w t)})N r w exp(τ )tdt if s = 0.
In the case of a linear transmission function = x, we can write down explicit expressions for (A-3) and (A-4). There are two cases to consider. First suppose that N exp(r w T ) ≤ K i.e. the is short-term. Then, integrating and simplifying yields the following approximation for the mutant force of infection The points x = 0 and x = 1 are points for h corresponding to a mutant-free and wild-type-free states. Stability of the fixed point x = 0 is determined by Carrying out the integration, in general, is complicated by the fact that the time at which V w (t) + V m (t) = K has no explicit formula when s = 0 and, in general, this saturation time will depend on x.

In the special case of short-term infections (i.e. there is only exponential growth), we get T 0 min{K, (N -1) exp(r w t)}f (t, N )dt with N stems from the dependence of f (t, N ) with N . Since a → a/(1 + a) is an increasing function bounded above by 1 for positive a, the expression exp(τ + st)/(N -1)/(1 + exp(τ + st)/(N -1)) decreases when N increases. As N → (a/(1 + a)) N -1 is a decreasing function of N ≥ 1 for a > 0, we get that the probability of emergence decreases at least exponentially with the bottleneck size, as claimed in the main text. Fig Appendix-1 illustrates that these approximations work especially when s is sufficiently negative.

Numerics with Nonlinear Transmission Functions

To explore the robustness of our numerical results to the assumption of a linear transmission function, we redid our numerical analysis with two non-linear transmission functions

Figure 1 .

 1 Figure 1. The cross-scale dynamic of evolutionary emergence. An individual is initially infected from the reservoir host population (panel A) with only the wild type viral strain (in blue). Within an infected individual (panel B), the viral load increases at an exponential rate until saturating at day T e and ending after T days. Mutations ensure individuals typically have a mixed infection with wild-type (blue) and mutant (red) viral strains (panel B). The likelihood of transmission between individuals, and the composition of the infecting dose (panel C), depend on the size and composition of the infected individual's viral load at the time of contact, and on the transmissibility of each strain. As the infection spreads in the population (panel A), the frequency of the mutant virions among infected individuals varies (panel D) and, ultimately, determines whether evolutionary emergence occurs. In D, each horizontal line marks the infectious period of an individual whose infection was initiated with that percentage of the mutant strain and the vertical arrows represent transmission events between individuals.

  infection (Fig 2A,B vs. C,D) and the transmission bottleneck width (Fig 2A,C vs. B,D). Notably, for long-term infections with a large transmission bottleneck size, the emergence probability can be effectively zero (i.e. < 10 -16 ) for mutant strains whose reproductive number exceeds one (white region bounded by the solid red curve in Fig 2D) -a finding not explained by classical theory. As we shall show, this outcome is predicted by a new quantity, the cross-scale reproductive number

Figure 2 .

 2 Figure 2. The joint effects of within-host and between-host selective advantage of the mutant on the probability of emergence for pathogens with short-term (A,B) and long-term (C,D) infectious periods, and with transmission bottlenecks of size N = 1 (A,C) and N = 25 (B,D). Colorations correspond to log 10 of the emergence probability. The critical value of the mutant reproductive number R m equaling one is drawn in solid red. Black contour lines correspond to log 10 of the number of mutant virions transmitted by an individual initially only infected with the wild strain. In D, the critical value of the cross-scale reproductive number, α = 1, of a mutant virion is shown as a red dashed line and the white circles correspond to the τ and s values used in Fig 3. Parameters: K = 10 7 , βT = 30, T = 7.5 < 12.9 = T e (short-term infection) and T = 30 > 12.9 = T e (long-term infection), b w chosen so that R 0 = 0.75 for wild type, r w = 1.25 and µ = 10 -7 .

Figure 3 .

 3 Figure 3. Frequency dynamics of the mutant strain in the host population. For longterm infections with moderate to large transmission bottlenecks (N > 5), individualbased simulations corresponding to three values of the cross-scale reproductive number α of a mutant virion illustrate (A) the mutant strain decreasing in frequency (despite an index case initially only infected with the mutant strain) when the crossscale reproductive number α is less than one, (B) a gradual sweep to fixation of the mutant strain when α ≈ 1, and (C) fast sweeps to fixation for large values of α > 1. In these individual based simulations, each horizontal line marks the infectious period of an individual whose infection was initiated with that percentage of the mutant strain and the vertical arrows represent transmission events between individuals. In the bottom half of the figure, the mean field dynamics corresponding to each of the individual-based simulations are plotted as cobwebbing diagrams. The solid black curves correspond to the expected frequency of the mutant strain in the infected host population in the next generation given the frequency in the current generation. Thin blue lines indicate how the expected frequencies change across multiple generations. The colored backgrounds represent the expected number of individuals infected with a certain percentage of the mutant strain (vertical axis) by an individual with an initial percentage of the mutant strain (horizontal axis). Parameter values as in Fig 2D indicated with black asterisks.

Figure 4 .

 4 Figure 4. Effects of bottleneck size and mixed infections of the index case on evolutionary emergence of short-term and long-term infections. Different curves correspond to different tendencies, as measured by the cross-scale reproductive number α, for the mutant strain to increase in frequency in the infected host population. In (A) and (B), bottleneck size has negative effect on emergence when the cross-scale reproductive number α is less than one and a positive effect when α is greater than one. In (C) and (D), index cases initially infected with higher percentages of the mutant strain are more likely to lead to emergence. -∞ corresponds to numerical values of 10 -16 or smaller. Parameters: K = 10 7 , βT = 150, T = 7.5 for short-term infections and T = 30 for long-term infections, b w chosen so that R 0 = 0.75 for the wild strain, r w = 1.25, τ = 1, s chosen to achieve the α values reported in the legend, and µ = 10 -7 . N = 25 in (C) and (D).

Figure 5 .

 5 Figure 5. The major steps and barriers for evolutionary emergence.

βµN 2 b w r w s≈βµN 2 b

 2 exp(τ ) exp((r w + s)T ) -1 r w + s -(exp(r w T ) -1 r w .Assuming r w s (and thus r w /(r w + s) 1 -s/r w ),(A-5) βµN 2 b w exp(τ ) (for small s) (1+sT /2)T exp(r w T ) -exp((r w + s)T )w exp(τ ) T exp(r w T ) -exp(r w T ) -1r w if s = 0. Now rather than writing out the entire expression for the case N exp(r w T ) ≥ K, lets write down things for when the time in the saturated phase is much, much longer than the time in the exponential phase. Then, integrating and simplifying yields the following approximation for the mutant force of infection (A-6) βµN Kb w r w exp(τ ) exp(sT ) -1 s -T /s ≈ (small s) (1+sT /3)T 2 /2

  i b i v i (t))y(t)dt T 0 p( i b v (t))dt x=0 T 0 p( i b i v i (t))dt 2 x=0 -T 0 p( i b i v i (t))dt T 0 i b i v i (t))y(t)dt x=0 T 0 p( i b i v i (t))dt i b i v i (t))y(t)dt x=0 β T 0 p(b w v w (t))dt ≈ β T 0 p( i b i v i (t))y(t)dt x=1/N β T 0 p(b w v w (t))dt for N1. h (0) corresponds to α described in the main text and the final expression has the verbal interpretation given in the main text.In the special case of a linear transmission function, p(x) = x, we get the simplified expression(A-8) h(x) = T 0 b m v m (t)dt T b i v i (t)dt where v w (t) = N (1 -x)e rwt if v w (t) + v m (t) ≤ K, otherwise K (1 -x)e rwt (1 -x)e rwt + xe rmt v m (t) = N xe rmt if v w (t) + v m (t) ≤ K, otherwise K xe rmt (1 -x)e rwt + xe rmt

Figure Appendix- 1 . 1 =

 11 Figure Appendix-1. Approximation (A-12) (dashed lines) vs. numerical resolution of the generating maps (R code) (solid lines)

= 1 -

 1 exp(-x) in Fig Appendix-2 and p(x) = log(1 + x) in Fig Appendix-4. Differences the emergence probabilities for the nonlinear and linear transmission functions are shown in Figs Appendix-3 through 4. As these figures demonstrate, we nearly get the same results.

Figure Appendix- 2 .

 2 Figure Appendix-2. Emergence probabilities for the transmission function p(x) = 1 -exp(-x) with all other parameters as indicated in Fig 2.

Figure Appendix- 3 .

 3 Figure Appendix-3. Contour plots of 1, 000 × the absolute value of the difference between the emergence probabilities for the transmission functions p(x) = 1-exp(-x) and p(x) = x. Parameters as indicated in Fig 2.

Figure Appendix- 4 .

 4 Figure Appendix-4. Emergence probabilities for the transmission function p(x) = log(1 + x) with all other parameters as indicated in Fig 2.

Figure Appendix- 6 .

 6 Figure Appendix-6. The analytic approximation based on (4) for the exact computations of the emergence probabilities in Fig 2 in the main text.

Figure Appendix- 7 .

 7 Figure Appendix-7. Contour plots of 1, 000 × the absolute value in the difference between the analytic approximation from (4) and the exact computations for the emergence probabilities. Parameters as in Fig 2 in the main text.

Acknowledgments. The authors thank two anonymous reviewers and Joshua Weitz for providing valuable feedback that greatly improved the quality of this paper. This work was supported by U.S. National Science Foundation Grants EF-0928987 and DMS-1716803 to SJS, and EF-0928690 and DEB-1557022 to JLS, and DARPA PREEMPT D18AC00031 to JLS. The content of the information does not necessarily reflect the position or the policy of the U.S. government, and no official endorsement should be inferred.

Appendix

Derivation of the Single Strain Reproductive Numbers. When the dynamics only exhibit exponential growth (i.e. N exp(r i T ) < K) and there is a linear transmission function, the basic reproductive numbers equal (A-1) R i = βb i N exp(r i T ) -1 r i for = w, m.

When the within-host dynamics saturate (i.e. N exp(r i T ) > K), the basic reproductive number equals

where T e = log(K/N )/r i is the length of exponential phase and s = T -T e is the length of saturated phase. These expressions for the single strain reproductive numbers are equivalent to evaluating the integral presented in equation ( 22) of Coombs et al. [START_REF] Coombs | Evaluating the importance of within-and between-host selection pressures on the evolution of chronic pathogens[END_REF] for our within-host model. We also note that our assumption of small mutation rates and w < R m implies that the multiscale reproductive number R 0 in the sense of Coombs et al. [START_REF] Coombs | Evaluating the importance of within-and between-host selection pressures on the evolution of chronic pathogens[END_REF] and Lythgoe et al. [START_REF] Lythgoe | Is hiv short-sighted? insights from a multistrain nested model[END_REF] (i.e. the dominant eigenvalue of the next generation matrix of DG(1, 1, . . . , 1) is (approximately) R m .

We derive two approximations of R i under the assumption that s is small, exp(r i T ) 1, and K N . First, assume that the infection is short-term in which case T e = T . Then provided s is sufficiently small to ensure that the mutant type doesn't saturate, R i are given by (A-1). The log ratio, provided exp(

which yields (2) in the main text. Now assume that the infection is long-term in which case T e < T , and that if s < 0, |s| is sufficiently small to ensure that the mutant type also saturates before time T . Then the basic reproductive numbers R i are given by (A-2

if s = 0, and

Putting this all together, (4) for an short-term (respectively long-term) infection with s = 0 becomes the product of 1 1-Rw , (A-5) (respectively (A-6)), and the probability of an outbreak starting one infected with N -1 wild type virions and 1 mutant type virions. The final probability term can be calculated exactly using the generating functions described in the Models and Methods section of the main Derivation of the Mean Field Frequency Dynamics. To understand how the viral of infected individuals across generations, we derive a mean field approximation for the dynamics of the mean mutant viral load at the beginning of each generation of disease spread. To this end, we define a map from : [0, 1] → [0, 1] where x ∈ [0, 1] represents the current mean mutant viral load in the population at the beginning of the infectious period and h(x) is the mean at the beginning of infectious period in the next generation. Our derivation of this mean field dynamic is done in the limit of large N ↑ ∞ and µ ↓ 0. None-the-less, as shown by the dashed red line in Fig 2D, this approximation works quite well away from this limit.

We begin by approximating the mean initial mutant viral count in individuals infected by an individual with V w (0) = N -and V m (0) = . Recall, the force of infection for producing individuals initially infected with j mutant viral particles is given by

where y(t) = bmvm(t) bwvw(t)+bmvm(t) is the within-host frequency of the mutant strain, and (v w (t), v m (t)) is the solution of the within-host viral dynamics with initial condition w (0) = N -, v m (0) = . Weighting this term by j and summing over j yields the expected number of mutant viral particles in an individual infected by our type (N , ) infected individual:

Now if we let x = /N denote the initial fraction, then dividing the previous integral by the net number of viral particles infecting new individuals yields our desired update rule h(x) := β

Note that h(x) is a function of x as the solution of (V w (t), V m (t)) depends on its initial condition

For x close to 0, we have the time at the dynamics saturate, T e , is given approximately by

Let T s = T -T e and assume that T T e , T e where T e is the length of the exponential phase for an individual infected only with the strain. Then

as claimed in the main text.

Estimating the Probability of Emergence when α < 1. When α is less than 1, the frequency of mutant virus decrease in an infected host, and consequently, even if the adapted virus may emerge, the probability of emergence is very low, and even lower when the bottleneck size, N , increases. Here, we provide an approximation for the emergence probability when α < 1, which explains why the probability of emergence decreases dramatically when N increases.

When the outbreak starts, the first individual is infected with wild-type only. When s < 0, the mutation-selection balance can be reached relatively quickly, and for negative enough, the proportion of mutant is small. So the probability to transmit at least one mutant is roughly equal to the probability to transmit one mutant, which is N exp(τ )r w µ/|s| where r w µ/|s| is the proportion of the mutant type, and exp(τ ) is its relative transmissibility. Then, if s is small enough, then the reproductive number of an individual with a mixed transmission is close to w of the wild-type. Thus, the number of transmissions in a wild-type outbreak can be used (R w /(1 -R w )). For an individual infected with a mixed infection, what will lead to emergence are the contacts for which only the mutant is transmitted. The number of such contacts is:

This can be re-written as:

As most cases of mixed infection will be cases started with a mix of one mutant and -1 wild-type viral particles, V m /V w = exp(st)/(N -1). Thus previous expression is equal to: β T 0 b w min{K, (N -1) exp(r w t)} (exp(τ + st)/(N -1)) N (1 + exp(τ + st)/N -1) N -1 dt.

Last, an individual infected with mutant viruses alone has to lead to a successful outbreak, which happens at approximately the same probability than in the case with no back mutations, with