Loïc Marrec

M Raphaël

Voituriez Directeur De Thèse

M Guillaume

Achaz Rapporteur

M Luis-

Miguel Chevin

Rapporteur Mme

D Florence

Examinatrice M Ébarre

Houchmandzadeh Bahram

Mme Examinateur

Lesne Annick

Mme Examinatrice

Anne-Florence Bitbol

Keywords: simulation methods

tinée à l'extinction dans un environnement qui se dégrade progressivement, par exemple en présence d'une concentration d'antimicrobien qui augmente. Dans le cinquième chapitre, nous abordons l'impact de la structure de la population sur l'évolution en introduisant un nouveau modèle qui généralise les modèles existants, lequel nous permettra à l'avenir d'étudier l'évolution de la résistance aux antimicrobiens dans des populations microbiennes subdivisées. Enfin, dans le dernier chapitre, nous examinons la propagation de la résistance aux antimicrobiens dans une population d'hôtes, en intégrant les effets de structure induits par l'immunité. v

Résumé long

Et voici le moment que vous attendiez tous, celui des remerciements. Ces deux pages sont de loin les plus délicates à écrire, tant il est compliqué de concilier la pudeur avec l'expression sincère de ma reconnaissance. Celles et ceux qui me connaissent sauront qu'offrir au lecteur cette balade dans l'intimité de l'auteur m'est difficile, mais il serait injuste de ne pas remercier celles et ceux qui ont contribué, de près ou de loin, directement ou indirectement, au succès de cette thèse. Ces quelques mots, parfois sobres, ne sauraient refléter l'estime, l'amitié, l'amour que je vous porte.

Je remercie vivement Florence Débarre, Bahram Houchmandzadeh et Annick Lesne d'avoir accepté de participer à mon jury de thèse. Merci à Guillaume Achaz et Luis-Miguel Chevin d'avoir chacun écrit un rapport dans les conditions difficiles qui ont découlé de la crise sanitaire.

Je remercie chaleureusement Anne-Florence Bitbol, ma directrice de thèse officieuse, de m'avoir fait confiance pour porter ce projet, et de m'avoir accompagné durant ces trois années sans jamais m'avoir lâché. Je lui suis très reconnaissant d'avoir saisi la moindre occasion pour m'enseigner quelque chose, allant de la rédaction d'articles aux présentations, en passant par la diplomatie en sciences. J'ai beaucoup appris à ses côtés, et j'espère que je serai capable de reproduire son souci du détail et sa rigueur.

Je remercie Raphaël Voituriez d'avoir accepté le rôle de directeur de thèse officiel et la paperasse qui l'accompagne, mais aussi pour son regard porté sur mon travail et ses conseils.

Je remercie les autres membres de l'équipe théorique, actuels ou passés, pour les collaborations et discussions, scientifiques ou non. xxi

i

Abstract

Understanding the evolution of antimicrobial resistance within a host and its spread in a population of hosts are of paramount importance in order to fight this major public health issue.

The ability of microbes to adapt to new, even deteriorating environments, explains the emergence of antimicrobial resistance. In a population undergoing antimicrobial treatment, the emergence and fixation of a resistant mutation may prevent the population from going extinct. Population genetics tells us that the forces affecting the outcome of evolutionary dynamics, such as natural selection and migration, depend on environment and on population geographic structure. In an antimicrobial-free environment, natural selection favors sensitive microbes because resistant mutants experience a fitness cost, i.e. a slower reproduction. However, in an environment with antimicrobials, drugs kill sensitive microbes or stop their division, so natural selection favors resistant mutants. Thus, resistance evolution within a host can be strongly affected by variations of antimicrobial concentration. In addition, during an infection within a host, microbial populations are divided between different organs. Because the resulting smaller effective population sizes mean that fluctuations are more important, and because some population structures may be either amplifiers or suppressors of natural selection, population structure is likely to impact the evolution of resistance within a host. Finally, a microbial infection induces an immune response from the infected host and may lead to the use of antimicrobials, and both may impact the spread of microbes, including resistant ones.

In this thesis, we are interested in the impacts of environmental variability and population structure on the evolution of resistance in a microbial population, as well as its spread in a host population. More specifically, we address these issues by developing stochastic theoretical models and using methods inspired by out-of-equilibrium statistical physics. In the first chapter, we define the key concepts and present the issues raised by antimicrobial resistance. After explaining why environmental variability and population structure likely impact the evolution of antimicrobial resistance, we briefly review the state of the art. The second and third chapters deal with the emergence of resistance in microbial populations of fixed and variable size, respectively, undergoing periodic antimicrobial treatments. We then investigate in the fourth chapter the evolutionary rescue by mutants of a microbial population destined for extinction in a gradually deteriorating environment, e.g. in the presence of an increasing antimicrobial concentration. In the fifth chapter, we address the impact of the population structure on evolution by introducing a new model that generalizes existing models, which will allow us in the future to study the evolution of antimicrobial resistance in subdivided microbial populations. Finally, in the last chapter, we look at the spread of antimicrobial resistance in a population of hosts, incorporating population structure effects specifically induced by immunity.

iii

Résumé court

Comprendre l'évolution de la résistance aux antimicrobiens dans un hôte et sa propagation dans une population d'hôtes est d'une importance capitale pour lutter contre ce problème majeur de santé publique.

La capacité des microbes à s'adapter à de nouveaux environnements, y compris des environnements qui se dégradent, explique l'émergence de la résistance aux antimicrobiens. Dans une population soumise à un traitement antimicrobien, l'émergence et la fixation d'une mutation résistante peuvent empêcher l'extinction de la population. La génétique des populations nous apprend que les forces qui affectent l'issue de la dynamique évolutive, comme la sélection naturelle et la migration, dépendent de l'environnement et de la structure géographique de la population. Dans un environnement sans antimicrobiens, la sélection naturelle favorise les microbes sensibles car les mutants résistants ont un coût de fitness, c'est-à-dire qu'ils se reproduisent plus lentement. Cependant, dans un environnement avec des antimicrobiens, les médicaments tuent les microbes sensibles aux antimicrobiens ou arrêtent leur division, de sorte que la sélection naturelle favorise les mutants résistants. Ainsi, l'évolution de la résistance au sein d'un hôte peut être fortement influencée par les variations de concentration d'antimicrobien. De plus, au cours d'une infection au sein d'un hôte, les populations microbiennes sont subdivisées entre différents organes. Comme la plus petite taille effective de population qui en résulte rend les fluctuations plus importantes, et comme certaines structures de population sont soit des amplificateurs soit des suppresseurs de la sélection naturelle, la structure est susceptible d'avoir un impact sur l'évolution de la résistance chez un hôte. Enfin, une infection microbienne induit une réponse immunitaire de l'hôte infecté et peut entraîner l'utilisation d'antimicrobiens: ces deux éléments peuvent agir sur la propagation des microbes, y compris des microbes résistants.

Dans cette thèse, nous nous intéressons aux impacts de la variabilité environnementale et de la structure de la population sur l'évolution de la résistance dans une population microbienne, ainsi que sur sa propagation dans une population hôte. Plus spécifiquement, nous abordons ces questions en développant des modèles théoriques stochastiques et en utilisant des méthodes inspirées de la physique statistique hors d'équilibre. Dans le premier chapitre, nous définissons les notions clés et présentons les problématiques soulevées par la résistance aux antimicrobiens. Après avoir expliqué pourquoi la variabilité environnementale et la structure de population impactent probablement l'évolution de la résistance aux antimicrobiens, nous faisons un bref état de l'art. Les deuxième et troisème chapitres traitent de l'émergence de la résistance dans les populations microbiennes de taille fixe et de taille variable, respectivement, qui subissent des traitements antimicrobiens périodiques. Nous étudions ensuite dans le quatrième chapitre le sauvetage évolutif par des mutants d'une population microbienne des-

Introduction

La compréhension de l'évolution et de la propagation de la résistance est d'une importance capitale pour lutter contre le problème majeur de santé publique que pose la résistance aux antimicrobiens. La découverte des antibiotiques et des antiviraux a constitué l'une des plus grandes avancées médicales du XXe siècle, permettant de traiter de nombreuses maladies infectieuses majeures. Cependant, avec l'utilisation croissante des antimicrobiens, les micro-organismes pathogènes ont tendance à développer des résistances à ces médicaments, lesquels deviennent alors inutiles. La résistance aux antimicrobiens est devenue un problème majeur et urgent de santé publique dans le monde entier, menaçant d'être la première cause de mortalité au monde d'ici 2050 devant le cancer (voir Fig. 1).

Figure 1: Résistance aux antimicrobiens. Prévisions des décès attribuables à la résistance aux antimicrobiens chaque année d'ici 2050. Le nombre de décès dans le monde chaque année dus à la résistance aux antimicrobiens pourrait atteindre 10 millions. Les continents les plus touchés seraient l'Asie et l'Afrique. Illustration originale de [START_REF] Jim | UK Review on Antimicrobial Resistance[END_REF].

Certaines questions intéressantes, mais non exhaustives, sont les suivantes : quelles conditions favorisent ou entravent l'évolution de la résistance ? Comment optimiser les traitements antimicrobiens ? Cette thèse fournit modestement quelques éléments de réponse, en utilisant une modélisation théorique basée sur des processus stochastiques et en utilisant des outils inspirés de la physique statistique hors d'équilibre, avec l'espoir de contribuer à la compréhension de la résistance aux antimicrobiens comme un défi majeur du XXIe siècle. vi Evolution de la résistance aux antimicrobiens dans une population microbienne de taille fixe Les mutations qui confèrent une résistance aux antimicrobiens sont souvent associées à un coût de fitness, c'est-à-dire à une reproduction plus lente [START_REF] Mustonen | Molecular evolution under fitness fluctuations[END_REF][START_REF] Rivoire | The value of information for populations in varying environments[END_REF][START_REF] Melbinger | The impact of environmental fluctuations on evolutionary fitness functions[END_REF]. En effet, l'acquisition d'une résistance implique généralement soit une modification de la cible moléculaire de l'antimicrobien, qui altère souvent sa fonction biologique, soit la production de protéines spécifiques, ce qui entraîne un coût métabolique [START_REF] Rivoire | The value of information for populations in varying environments[END_REF]. Cependant, les micro-organismes résistants acquièrent fréquemment des mutations ultérieures qui compensent le coût initial de la résistance. Ces microorganismes sont appelés "résistants compensés" [START_REF] Desponds | Fluctuating fitness shapes the clone size distribution of immune repertoires[END_REF][START_REF] Wienand | Evolution of a fluctuating population in a randomly switching environment[END_REF][START_REF] Regoes | Pharmacodynamic functions: a multiparameter approach to the design of antibiotic treatment regimens[END_REF][START_REF] Jacobs | Optimisation of antimicrobial therapy using pharmacokinetic and pharmacodynamic parameters[END_REF]. L'acquisition de la résistance est donc souvent irréversible, même si l'antimicrobien est retiré de l'environnement [START_REF] Rivoire | The value of information for populations in varying environments[END_REF][START_REF] Desponds | Fluctuating fitness shapes the clone size distribution of immune repertoires[END_REF].

En l'absence d'antimicrobien, le paysage adaptatif du micro-organisme, qui représente sa fitness (c'est-à-dire son taux de reproduction) en fonction de son génotype, comporte une vallée, puisque la première mutation de résistance diminue la fitness, tandis que les mutations compensatoires l'augmentent. Cependant, cette vallée du paysage adaptatif, qui existe en l'absence d'antimicrobien, disparaît au-dessus d'une certaine concentration d'antimicrobien biostatique, car la division du micro-organisme sensible aux antimicrobiens est entravée. Ainsi, le paysage adaptatif du microorganisme dépend fortement de la présence ou de l'absence d'antimicrobien. La prise en compte de ce type d'interaction entre le génotype et l'environnement constitue un problème fondamental, même si la plupart des expériences ont traditionnellement porté sur la comparaison de différents mutants dans un environnement unique [START_REF] Taute | Evolutionary constraints in variable environments, from proteins to networks[END_REF]. En particulier, des analyses théoriques récentes montrent que des paysages adaptatifs variables peuvent avoir un important impact évolutif [START_REF] Mustonen | Molecular evolution under fitness fluctuations[END_REF][START_REF] Rivoire | The value of information for populations in varying environments[END_REF][START_REF] Melbinger | The impact of environmental fluctuations on evolutionary fitness functions[END_REF][START_REF] Desponds | Fluctuating fitness shapes the clone size distribution of immune repertoires[END_REF][START_REF] Wienand | Evolution of a fluctuating population in a randomly switching environment[END_REF].

Comment les échelles de temps de l'évolution et de la variation du paysage adaptatif se comparent-elles et interagissent-elles ? Quel est l'impact de la variabilité temporelle du paysage adaptatif sur l'évolution de la résistance aux antimicrobiens ? Afin de répondre à ces questions, nous avons construit un modèle minimal qui conserve les aspects fondamentaux de l'évolution de la résistance aux antimicrobiens, comme le coût de fitness et sa compensation. En nous concentrant sur le cas d'une population microbienne homogène de taille fixe, nous avons réalisé une étude stochastique complète de l'acquisition de la résistance de novo en présence d'alternances périodiques de phases d'absence et de présence d'un antimicrobien qui arrête la division cellulaire. Ces alternances peuvent représenter, par exemple, un traitement où la concentration chez le patient est inférieure à la concentration minimale d'inhibition entre les prises de médicaments [START_REF] Regoes | Pharmacodynamic functions: a multiparameter approach to the design of antibiotic treatment regimens[END_REF]. En combinant des approches analytiques et numériques, nous avons montré que ces alternances accélèrent considérablement l'évolution de la résistance par rapport aux cas d'absence ou de présence continue d'antimicrobiens, en particulier pour les popula-vii tions plus grandes. Nous avons pleinement quantifié cet effet et avons mis en lumière les différents régimes en jeu (voir Fig. 2A). A : Alternances symétriques : Temps total d'évolution de la résistance aux antimicrobiens en fonction de la période et de la taille de la population microbienne. Ligne horizontale supérieure : limite du régime déterministe. Ligne horizontale inférieure : limite du régime neutre. Courbe quasi verticale : période égale à deux fois le temps moyen de disparition d'un linéage mutant résistant. Ligne diagonale : période égale à la taille de population. Notons qu'aucune donnée n'est présentée pour les demi-périodes inférieures à l'inverse de la taille de population en raison du caractère discret de notre modèle, qui ne peut traiter que des échelles de temps supérieures ou égales à la durée d'une génération. B : Alternances asymétriques : Temps total d'évolution de la résistance aux antimicrobiens en fonction des durées des phases d'absence et de présence d'antimicrobien. Ligne verticale : durée de la phase sans antimicrobien égale au temps moyen de disparition d'un linéage mutant résistant. Ligne horizontale : durée de la phase avec antimicrobien égale au temps moyen de fixation d'un linéage mutant résistant. Ligne diagonale : durée de la phase sans antimicrobien égale à la durée de la phase avec antimiccrobien.

Pour les alternances asymétriques, caractérisées par une durée différente des phases avec et sans antimicrobien, nous avons démontré l'existence d'un minimum pour le temps pris par la population microbienne pour faire évoluer pleinement la résistance aux antimicrobiens, survenant lorsque les deux phases ont des durées du même ordre (voir Fig. 2B). Cette situation viii réaliste accélère considérablement l'évolution de la résistance aux antimicrobiens. En effet, l'un des objectifs de la conception du traitement est que la concentration d'antimicrobien dépasse la conentration minimum d'inhibition pendant au moins 40 à 50% du temps [START_REF] Jacobs | Optimisation of antimicrobial therapy using pharmacokinetic and pharmacodynamic parameters[END_REF], ce qui implique que les traitements actuels peuvent comporter les alternances qui favorisent le plus l'évolution de la résistance aux antimicrobiens selon nos résultats [START_REF] Regoes | Pharmacodynamic functions: a multiparameter approach to the design of antibiotic treatment regimens[END_REF][START_REF] Jacobs | Optimisation of antimicrobial therapy using pharmacokinetic and pharmacodynamic parameters[END_REF].

Evolution de la résistance aux antimicrobiens dans une population microbienne de taille variable

Précédemment, nous avons discuté l'évolution de la résistance aux antimicrobiens dans les populations microbiennes de taille fixe. La taille constante des populations facilite les calculs analytiques et nous a permis de quantifier pleinement l'impact d'une présence périodique d'antimicrobiens sur l'évolution de la résistance. Cependant, elle ne nous a pas permis d'étudier les extinctions induites par les antimicrobiens, ni l'impact des antimicrobiens biocides, lesquels tuent les micro-organismes. C'est pourquoi nous avons développé un modèle stochastique qui intègre les variations de la composition et de la taille des populations microbiennes, c'est-à-dire la génétique et la dynamique des populations microbiennes. Bien qu'ayant une origine commune dans les événements stochastiques de naissance, de décès et de mutation, et donc étant intrinsèquement couplés, ces phénomènes sont rarement considérés ensemble dans les études théoriques [START_REF] Melbinger | Evolutionary game theory in growing populations[END_REF]. Cependant, il est particulièrement crucial de les aborder tous les deux lorsqu'on étudie l'évolution de la résistance aux antimicrobiens, car l'objectif d'un traitement antimicrobien est d'éradiquer une population microbienne, ou du moins d'en réduire sensiblement la taille, alors que l'évolution de la résistance correspond à une modification de la composition génétique de la population. Notre modèle général nous a permis d'intégrer pleinement la stochasticité de l'apparition et de l'établissement des mutations [START_REF] Ewens | Mathematical Population Genetics 1: Theoretical Introduction[END_REF][START_REF] Rouzine | Transition between stochastic evolution and deterministic evolution in the presence of selection: General theory and application to virology[END_REF][START_REF] Daniel | Evolutionary Dynamics. Les Houches, Session LXXXV, Complex Systems[END_REF][START_REF] Patwa | The fixation probability of beneficial mutations[END_REF][START_REF] Daniel | The rate at which asexual populations cross fitness valleys[END_REF], ainsi que celle de l'extinction des populations, dont l'importance pratique a été récemment mise en évidence [START_REF] Coates | Antibiotic-induced population fluctuations and stochastic clearance of bacteria[END_REF][START_REF] Teimouri | Theoretical investigation of stochastic clearance of bacteria: First-passage analysis[END_REF][START_REF] Alexander | Stochastic bacterial population dynamics prevent the emergence of antibiotic resistance[END_REF].

Dans ce cadre, nous nous sommes demandé si une population microbienne soumise à des alternances de phases de présence et d'absence d'antimicrobien développe une résistance, ce qui correspond à un échec du traitement et au sauvetage de la population microbienne par la résistance [START_REF] Alexander | Evolutionary rescue: Linking theory for conservation and medicine[END_REF], ou s'éteint, ce qui correspond à un succès du traitement. En d'autres termes, nous nous sommes demandé si la population microbienne résiste ou périt.

Nous avons étudié à la fois l'impact des antimicrobiens biocides, qui tuent les micro-organismes, et des antimicrobiens biostatiques, qui empêchent les micro-organismes de se diviser. Nous avons montré que les alternances rapides de phases avec et sans antimicrobien ne permettent pas d'éradiquer la population microbienne avant que les mutants résistants ne se fixent, à moins que le taux de décès avec l'antimicrobien ne soit suffisamment élevé. À l'inverse, les périodes d'alternance intermédiaires sont efficaces pour un plus large éventail de modes d'action antimicrobiens, mais la probabilité d'extinction de la population, et donc de succès du traitement, que nous avons entièrement quantifiée, n'est pas égale à un, car la résistance peut sauver la population, et cet effet dépend de la taille de la population microbienne. Nous avons constaté que la plage de paramètres où le traitement antimicrobien est efficace est plus large pour les antimicrobiens biocides que pour les antimicrobiens biostatiques (voir Figs. 3A et B). Cependant, nous avons également montré que les antimicrobiens biocides et les biostatiques imparfaits permettent un mécanisme supplémentaire de sauvetage par la résistance par rapport aux antimicrobiens biostatiques qui arrêtent complètement la division. Cela met en lumière les mérites respectifs des différents modes d'action des antimicrobiens. Enfin, nous avons trouvé une concentration critique de médicaments qui dépend de la taille de la population en dessous de laquelle les antimicrobiens ne peuvent pas éradiquer les populations microbiennes (voir Figs. 4A, B et C).

Sauvetage évolutif dans un environnement qui se détériore progressivement

Précédemment, nous avons développé des modèles pour investiguer l'évolution de la résistance aux antimicrobiens dans des populations microbiennes soumises à des alternances périodiques de présence et d'absence d'antimicrobien. Dans ces modèles, la transition d'un environnement avec antimicrobien à un en-vironnement sans antimicrobien, et vice-versa, est abrupte. Comprendre comment une population d'organismes vivants peut survivre dans un environnement qui se détériore progressivement est une question fondamentale de l'évolution [START_REF] Waxman | A unified treatment of the probability of fixation when population size and the strength of selection change over time[END_REF][START_REF] Uecker | On the fixation process of a beneficial mutation in a variable environment[END_REF][START_REF] Peischl | Establishment of new mutations in changing environments[END_REF], qui est particulièrement pertinente dans le contexte de l'évolution de la résistance aux antimicrobiens, qui se produit souvent dans un environnement variable, lorsque l'antimicrobien est ajouté à un milieu ou administré à un patient [START_REF] Lin | Complex interplay of physiology and selection in the emergence of antibiotic resistance[END_REF][START_REF] Levin-Reisman | Antibiotic tolerance facilitates the evolution of resistance[END_REF]. En effet, même lorsque l'antimicrobien est ajouté instantanément, la baisse de fitness qui en résulte est progressive [START_REF] Lin | Complex interplay of physiology and selection in the emergence of antibiotic resistance[END_REF]. En outre, l'évolution de la résistance tend à être favorisée par une augmentation progressive de la concentration d'antimicrobien [START_REF] Toprak | Evolutionary paths to antibiotic resistance under dynamically sustained drug stress[END_REF][START_REF] Zhang | Acceleration of emergence of bacterial antibiotic resistance in connected microenvironments[END_REF][START_REF] Greulich | Mutational pathway determines whether drug gradients accelerate evolution of drug-resistant cells[END_REF][START_REF] Rutger Hermsen | On the rapidity of antibiotic resistance evolution facilitated by a concentration gradient[END_REF][START_REF] Baym | Spatiotemporal microbial evolution on antibiotic landscapes[END_REF]. Dans un environnement qui se détériore, l'aptitude des organismes de type sauvage diminue avec le temps. Dans le cas simple des micro-organismes asexués, si l'on considère que la fitness est le taux de division, l'aptitude des micro-organismes peut alors devenir inférieure à leur taux de mortalité, ce qui entraîne une diminution de la taille de la population, conduisant finalement à l'extinction [START_REF] Coates | Antibiotic-induced population fluctuations and stochastic clearance of bacteria[END_REF]. Cependant, la population microbienne peut être sauvée par une mutation mieux adaptée au nouvel environnement, et qui rétablit une croissance positive de la population : ce phénomène est appelé sauvetage évolutif [START_REF] Alexander | Evolutionary rescue: Linking theory for conservation and medicine[END_REF][START_REF] Martin | The probability of evolutionary rescue: towards a quantitative comparison between theory and evolution experiments[END_REF][START_REF] Gonzalez | Evolutionary rescue: an emerging focus at the intersection between ecology and evolution[END_REF][START_REF] Carlson | Evolutionary rescue in a changing world[END_REF]. Un environnement qui se détériore progressivement a un impact sur la taille de la population et sur la fitness de l'organisme de type sauvage, qui peuvent tous deux avoir une forte incidence sur le sort d'une mutation [START_REF] Uecker | On the fixation process of a beneficial mutation in a variable environment[END_REF]. L'étude du sauvetage évolutif d'une population dans un environnement qui se détériore progressivement nécessite la prise en compte de variations simultanées et continues dans le temps de la fitness, de la taille et de la composition de la population, ce qui la rend complexe. L'impact d'une sélection variable a récemment fait l'objet d'un intérêt important, principalement dans le cas de changements instantanés entre différents états d'environnement, mettant en évidence leur fort effet sur l'évolution [START_REF] Mustonen | Molecular evolution under fitness fluctuations[END_REF][START_REF] Rivoire | The value of information for populations in varying environments[END_REF][START_REF] Melbinger | The impact of environmental fluctuations on evolutionary fitness functions[END_REF][START_REF] Wienand | Evolution of a fluctuating population in a randomly switching environment[END_REF][START_REF] Kussell | Polymer-population mapping and localization in the space of phenotypes[END_REF][START_REF] Cvijović | Fate of a mutation in a fluctuating environment[END_REF][START_REF] Skanata | Evolutionary Phase Transitions in Random Environments[END_REF][START_REF] Peter | Intrinsic noise in systems with switching environments[END_REF][START_REF] Mayer | Transitions in optimal adaptive strategies for populations in fluctuating environments[END_REF][START_REF] Meyer | Noise-induced stabilization and fixation in fluctuating environment[END_REF][START_REF] Danino | Stability of twospecies communities: Drift, environmental stochasticity, storage effect and selection[END_REF][START_REF] Marrec | Quantifying the impact of a periodic presence of antimicrobial on resistance evolution in a homogeneous microbial population of fixed size[END_REF][START_REF] Trubenová | Surfing on the seascape: Adaptation in a changing environment[END_REF][START_REF] Marrec | Resist or perish: fate of a microbial population subjected to a periodic presence of antimicrobial[END_REF]. Malgré sa pertinence pratique, le cas d'une fitness variant continuellement a été comparativement moins étudié, l'accent ayant été mis sur la stabilisation de la sélection [START_REF] Burger | Evolution and extinction in a changing environment[END_REF][START_REF] Gomulkiewicz | Demographic and genetic constraints on evolution[END_REF] ou sur le sort d'une seule mutation bénéfique [START_REF] Waxman | A unified treatment of the probability of fixation when population size and the strength of selection change over time[END_REF][START_REF] Uecker | On the fixation process of a beneficial mutation in a variable environment[END_REF][START_REF] Peischl | Establishment of new mutations in changing environments[END_REF]. En outre, la plupart des travaux sur le sauvetage évolutif considèrent un changement d'environnement abrupt [START_REF] Martin | The probability of evolutionary rescue: towards a quantitative comparison between theory and evolution experiments[END_REF][START_REF] Orr | Population extinction and the genetics of adaptation[END_REF][START_REF] Bell | Evolutionary rescue can prevent extinction following environmental change[END_REF][START_REF] Anciaux | Evolutionary Rescue over a Fitness Landscape[END_REF]. Nous avons abordé le sauvetage évolutif dans un environnement qui change progressivement et qui se détériore du point de vue des organismes de type sauvage.

L'adaptation à un nouvel environnement peut se faire de multiples façons. Un mutant spécialisé particulièrement bien adapté à ce nouvel environnement peut émerger. Une autre possibilité est l'apparition d'un mutant généraliste, qui est capable de se développer à la fois dans l'environnement initial et dans l'environnement final, tout en étant moins adapté que les spécialistes dans leurs environnements favoris respectifs [START_REF] Mayer | Transitions in optimal adaptive strategies for populations in fluctuating environments[END_REF][START_REF] Donaldson-Matasci | Phenotypic diversity as an adaptation to environmental uncertainty[END_REF][START_REF] Wang | Evolving generalists in switching rugged landscapes[END_REF][START_REF] Sachdeva | Tuning environmental timescales to evolve and maintain generalists[END_REF]. Parmi les exemples concrets de généralistes, on peut citer les micro-organismes xii multirésistants et les anticorps largement neutralisants [START_REF] Wang | Evolving generalists in switching rugged landscapes[END_REF][START_REF] Nourmohammad | Host-Pathogen Coevolution and the Emergence of Broadly Neutralizing Antibodies in Chronic Infections[END_REF].

Dans notre travail, nous avons considéré une population microbienne soumise à une détérioration progressive de l'environnement, de sorte que la fitness et la taille de la population de type sauvage se dégradent progressivement, et que l'extinction serait certaine en l'absence d'adaptation. Nous avons étudié la probabilité de fixation des mutants généralistes et spécialisés en fonction du moment où ils apparaissent lors de la détérioration de l'environnement (voir Fig. 5A). A : Probabilité de fixation des mutants généralistes (notés G) et spécialisés (notés S) en fonction de leur temps d'apparition dans un environnement en cours de détérioration, pour différentes capacités porteuses (notées K). Les pointillés verticaux marquent le milieu de la transition environnementale. Panneau principal : échelle linéaire ; encadré : échelle semi-logarithmique. B : Probabilité de sauvetage de différents types de mutants, généralistes (notés G) ou spécialisés (notés S), par rapport au produit de la capacité porteuse et de la probabilité de mutation lors de la division, pour différentes capacités porteuses (notées K). La ligne verticale en pointillé marque les paramètres pour lesquels le produit est égal à 1. Les marqueurs correspondent à des moyennes sur des résultats de simulations stochastiques . Les lignes pointillées et pleines correspondent à nos prévisions analytiques pour les mutants généralistes et spécialisés, respectivement.

Nous avons obtenu une expression pour la probabilité que la population soit sauvée par une mutation adaptative, évitant ainsi l'extinction. Cette probabilité augmente avec une forme sigmoïdale lorsque le produit de la capacité porteuse et de la probabilité de mutation augmente. En outre, nous avons constaté que le sauvetage devient plus probable pour les populations de petite taille et/ou pour les faibles probabilités de mutation si la dégradation de l'environnement est plus lente, ce qui illustre l'impact clé de la rapidité de la dégradation de l'environnement sur le sort d'une popula-tion. Nous avons également comparé les mutants généralistes et spécialisés, et nous avons montré que ces derniers sont légèrement plus efficaces pour sauver la population que les mutants généralistes. Nous avons exprimé le temps moyen d'apparition des mutants qui sauvent la population et le temps moyen d'extinction de ceux qui ne le font pas.

Construction d'un modèle universel de populations structurées

Les modèles que nous avons développés précédemment portent sur des populations microbiennes homogènes et bien mélangées. Cependant, de tels modèles donnent une bonne description des microbes dans une suspension liquide bien agitée dans un bécher, mais de peu de situations naturelles. Par exemple, lors d'une infection, les populations microbiennes sont subdivisées entre différents organes et entre différents hôtes. De plus, la plupart des populations microbiennes présentent une certaine structure géographique. Même les bactéries qui se développent sur une boîte de Pétri entrent en compétition plus fortement avec leurs voisins qu'avec d'autres bactéries.

La structure des populations peut avoir des conséquences majeures sur la façon dont les populations microbiennes évoluent [START_REF] Korona | Evidence for multiple adaptive peaks from populations of bacteria evolving in a structured habitat[END_REF]. Les populations structurées, avec leur compétition locale, ont des tailles de population effectives plus petites. Cela peut permettre le maintien d'une plus grande diversité génétique, en raison de l'importance accrue des fluctuations stochastiques. Certaines études qui ont examiné l'impact de la subdivision des populations sur la dynamique de l'évolution ont montré que la structure des populations accélère l'adaptation [START_REF] Cooper | Evolution at 'sutures' and 'centers': Recombination can aid adaptation of spatially structured populations on rugged fitness landscapes[END_REF], tandis que d'autres non [START_REF] Kryazhimskiy | Population subdivision and adaptation in asexual populations of saccharomyces cerevisiae[END_REF]. Ainsi, l'évolution des populations structurées nécessite une étude théorique plus approfondie.

Les populations structurées peuvent être décrites par des individus situés aux noeuds d'un graphe, avec des probabilités que la progéniture d'un individu remplace un autre individu le long de chaque arête du graphe [START_REF] Lieberman | Evolutionary dynamics on graphs[END_REF]. Il est important de noter que ces modèles ont montré que des structures spécifiques peuvent amplifier ou réduire l'impact de la sélection naturelle. Toutefois, dans ces modèles, les résultats de l'évolution peuvent dépendre fortement des détails de la dynamique, par exemple du fait que chaque événement de naissance précède un événement de mort ou l'inverse [START_REF] Kaveh | The duality of spatial death–birth and birth–death processes and limitations of the isothermal theorem[END_REF][START_REF] Hindersin | Most undirected random graphs are amplifiers of selection for birth-death dynamics, but suppressors of selection for death-birth dynamics[END_REF][START_REF] Pattni | Evolutionary graph theory revisited: when is an evolutionary process equivalent to the moran process[END_REF]. Ce manque d'universalité soulève des questions quant à l'applicabilité aux populations microbiennes réelles.

Dans cette partie, qui est toujours en cours au moment de la rédaction de cette thèse, nous avons construit un modèle plus réaliste où une population structurée est composée de sous-populations, non limitées à un seul individu, entre lesquelles des migrations d'individus sont possibles [START_REF] Houchmandzadeh | The fixation probability of a beneficial mutation in a geographically structured population[END_REF] et sont indépendantes des événements de naissance et de mort. Nous avons étudié la probabilité de fixation d'une mutation dans différentes structures en fonction de la fitness des mutants avec différents paramètres de migration, puis xiv nous avons comparé notre modèle avec les modèles existants. Nous avons montré que la clique et l'anneau ne sont ni des amplificateurs ni des suppresseurs de la sélection naturelle, alors que deux populations connectées, l'étoile et la ligne, sont des suppresseurs de la sélection naturelle pour beaucoup de valeurs de paramètres. Cela contraste avec les résultats des modèles précédents [START_REF] Lieberman | Evolutionary dynamics on graphs[END_REF], où l'étoile est un amplificateur de la sélection naturelle dans la dynamique naissance-mort. Cependant, nous avons montré que notre modèle donne des résultats similaires aux modèles existants de Naissancemort et de Mort-naissance pour les mêmes ratios du taux de reproduction total et du taux de migration total dans chaque sous-population (voir Fig. 6).

Ainsi, notre modèle généralise ces modèles existants, et permet de choisir sans ambiguïté les paramètres impliqués dans ces modèles. Le fait qu'aucun amplificateur ne semble subsister dans notre modèle est particulièrement intéressant.

Propagation de la résistance aux antimicrobiens dans une population d'hôtes

La résistance aux antimicrobiens est un problème majeur de santé publique car la résistance qui se développe chez un hôte, comme nous l'avons étudiée précédemment, peut se propager à d'autres individus.

xvi Plus précisément, la prise d'un traitement antibiotique contre une souche bactérienne pathogène peut favoriser l'émergence d'une résistance médicamenteuse chez d'autres bactéries, en particulier dans l'intestin, et ces bactéries résistantes peuvent alors être transmises, par exemple par la voie fécaleorale. Il s'agit d'une préoccupation importante car l'utilisation des antibiotiques est très répandue : par exemple, environ un quart des Français sont traités par des antibiotiques chaque année [START_REF] Carlet | Rapport du groupe de travail spécial pour la préservation des antibiotiques[END_REF][START_REF]Projet de loi de financement de la sécurité sociale -annexe 1 : Programmes de qualité et d'efficience -programme de qualité et d'efficience maladie -sous-indicateur numéro 9-2[END_REF]. En outre, les antibiotiques sont souvent administrés systématiquement aux animaux de ferme, et la résistance aux médicaments des bactéries qu'ils abritent peut se propager aux humains [START_REF] Dahms | Mini-review: Epidemiology and zoonotic potential of multiresistant bacteria and clostridium difficile in livestock and food[END_REF][START_REF] Landers | A review of antibiotic use in food animals: Perspective, policy, and potential[END_REF], bien que l'ampleur de cet effet soit contestée [START_REF] Harrison | Genomic surveillance reveals low prevalence of livestockassociated methicillin-resistant staphylococcus aureus in the east of england[END_REF]. Nous avons développé un modèle multi-échelle de l'interaction entre l'utilisation d'antibiotiques et la propagation de la résistance dans une population hôte, en nous concentrant sur un aspect important de l'immunité intra-hôte.

Si le système immunitaire dans l'intestin se contentait de tuer massivement les bactéries, il pourrait déstabiliser le microbiote. Il doit donc recourir à d'autres stratégies. L'immunoglobuline A (IgA), un isotype d'anticorps qui est le principal effecteur de la réponse immunitaire adaptative sécrétée dans l'intestin, ne tue pas ses bactéries cibles et ne les empêche pas de se reproduire. Il a récemment été démontré chez la souris que l'effet principal de l'IgA est en fait d'enchaîner les bactéries filles lors de la division [START_REF] Schumann-Moor | High-avidity iga protects the intestine by enchaining growing bacteria[END_REF]. Il est important de noter que les agrégats de bactéries ainsi formés ne peuvent pas s'approcher des cellules épithéliales, ce qui empêche une infection systémique et protège l'hôte. En outre, l'interaction des bactéries pathogènes avec les cellules épithéliales peut déclencher une inflammation, qui peut activer la réponse SOS de la bactérie, augmentant ainsi le transfert horizontal de gènes entre les bactéries. La croissance en agrégats constitue donc un mécanisme possible de l'immunité acquise pour réduire le transfert horizontal dans l'intestin [START_REF] Médéric | Inflammation boosts bacteriophage transfer between salmonella spp[END_REF]. En outre, comme les agrégats de bactéries médiés par les IgA sont principalement clonaux, le transfert horizontal se produirait très probablement entre des bactéries voisines très proches, ce qui le rend inefficace pour fournir de nouveaux gènes. Ces effets contribuent sans équivoque à réduire l'émergence de la résistance aux antibiotiques chez l'hôte. Nous avons étudié un autre effet, plus subtil. La présence de bactéries en agrégats clonaux diminue la diversité génétique effective au sein de l'hôte, et les bactéries transmises sont également moins diverses. Nous avons démontré que cela peut entraver la propagation de la résistance aux antibiotiques à l'échelle de la population hôte.

De nouvelles mutations se produisent lors de la réplication bactérienne au sein d'un hôte, mais ce qui est crucial pour la santé publique, c'est de savoir si ces bactéries résistantes aux mutants peuvent se propager au sein de la population hôte. Nous avons donc proposé un modèle multi-échelle qui combine la dynamique intra-hôte avec un processus de branchement stochastique à l'échelle inter-hôte. Une telle description est appropriée au début de la propagation épidémique, lorsque très peu d'hôtes sont infectés. Par exemple, un xvii hôte peut être infecté par une nouvelle souche bactérienne, qui peut acquérir une résistance aux antibiotiques par mutation, et qui est suffisamment similaire à d'autres souches circulantes pour qu'une partie de la population hôte soit immunisée contre elle. Nous avons considéré deux types d'hôtes : Les hôtes "immunisés" sécrètent des anticorps IgA contre cette nouvelle souche de bactéries dans leur intestin, les agrégeant ainsi lors de la division, tandis que les hôtes "naïfs" ne le font pas. Quelle est la probabilité que, à partir d'un individu infecté, cette nouvelle souche bactérienne envahisse la population hôte ? Tout d'abord, en nous concentrant sur le cas où le premier hôte est infecté par un mélange de bactéries sensibles et résistantes, nous avons démontré que l'agrégation des bactéries par l'immunité diminue la probabilité de propagation de la nouvelle souche (voir Fig. 7A).

Nous avons ensuite montré que cet effet peut être inversé si les hôtes immunisés et naïfs ont un nombre différent de contacts avec d'autres hôtes, et une probabilité de traitement différente, ce qui peut se produire si les hôtes immunisés sont des porteurs sains (voir Figs. 7B et C). Nous avons démontré en outre la robustesse de nos résultats à des modèles plus réalistes de la dynamique de la population bactérienne à l'intérieur de l'hôte en incluant les mutations, la stochasticité, un coût de fitness de la résistance et sa compensation. Ensuite, nous avons développé des approximations analytiques pour la diminution de la probabilité de propagation due à l'immunité dans le cas où seules des bactéries sensibles sont initialement présentes et où la souche bactérienne doit acquérir une mutation de résistance pour se propager. Enfin, nous avons discuté des implications de nos résultats, notamment sur l'interaction entre la vaccination et les antibiotiques. Les hôtes naïfs et immunisés ne diffèrent que par l'agrégation des bactéries. Dans A, chaque hôte, immunisé ou naïf, est traité avec la même probabilité et transmet des bactéries à un même nombre moyen d'hôtes (à moins qu'il n'ait été infecté par aucune bactérie résistante et traité). Dans B, chaque hôte, immunisé ou naïf, est traité avec la même probabilité et les hôtes immunisés transmettent des bactéries à un nombre moyen d'hôtes plus grand que les hôtes naïfs. Les lignes pleines correspondent à la résolution numérique de nos prédictions analytiques, tandis que les symboles correspondent aux résultats des simulations. Panneau principal : échelle linéaire ; encadré : échelle semi-logarithmique. C : Le rapport des probabilités d'extinction dans une population totalement immunisée par rapport à une population totalement naïve, pour un nombre initial de bactéries résistantes dans le premier hôte égal à 3, est indiqué pour un nombre moyen de transmissions par hôte immunisé supérieur ou égal au nombre moyen de transmissions par hôte naïf et pour une probabilité de traitement des hôtes immunisés inférieure ou égale à la probabilité de traitement des hôtes naïfs. Les valeurs correspondant aux hôtes naïfs sont indiquées par un point intitulé "N ". La courbe solide désigne les valeurs pour lesquelles le ratio est égal à un. Carte de chaleur interpolée à partir des résolutions numériques de nos prédictions analytiques ; échelle de couleur logarithmique.

Conclusion et quelques perspectives

Dans cette thèse, nous avons étudié l'impact de la variabilité environnementale et de la structure de la population sur l'évolution et la propagation de la résistance aux antimicrobiens. Plus précisément, nous avons développé des modèles stochastiques minimaux et génériques, qui capturent les ingrédients biologiques clés de la résistance aux antimicrobiens, en utilisant des méthodes inspirées de la physique statistique hors d'équilibre. Nos approches sont à la fois analytiques et numériques, et peuvent être réutilisées pour d'autres problèmes théoriques de génétique des populations.

Ce travail ouvre de nombreuses possibilités d'extensions théoriques. En particulier, il serait très intéressant d'inclure d'autres effets qui permettent aux microbes de survivre aux traitements antimicrobiens sans acquérir de mutations de résistance. La tolérance aux antibiotiques, qui tend à précéder la résistance en cas d'exposition intermittente aux antibiotiques [START_REF] Levin-Reisman | Antibiotic tolerance facilitates the evolution of resistance[END_REF], permet aux populations bactériennes de survivre aux traitements antibiotiques, même à des concentrations bien supérieures à la concentration minimale d'inhibition (MIC) [START_REF] Etthel | Antibiotics: Combatting tolerance to stop resistance[END_REF]. Un autre effet intéressant est la persistance, qui définit la capacité d'une sous-population d'une population bactérienne clonale à survivre à des concentrations élevées de traitement antibiotique [START_REF] Windels | Bacterial persistence promotes the evolution of antibiotic resistance by increasing survival and mutation rates[END_REF]. Il serait possible de distinguer la résistance, la tolérance et la persistance dans des modèles théoriques en utilisant un indicateur quantitatif récemment introduit, en plus de la MIC, c'est-à-dire la durée minimale d'élimination (MDK) [START_REF] Brauner | Distinguishing between resistance, tolerance and persistence to antibiotic treatment[END_REF]. Une autre extension intéressante consisterait à envisager la possibilité de concentrations supérieures à la concentration de prévention des mutants, de sorte que les microbes résistants soient également affectés par le médicament [START_REF] Levin-Reisman | Antibiotic tolerance facilitates the evolution of resistance[END_REF][START_REF] Bauer | Exploiting ecology in drug pulse sequences in favour of population reduction[END_REF]. Il serait intéressant de modéliser explicitement le transfert horizontal de gènes des mutations de résistance et aussi de comparer l'impact des alternances périodiques à celui des changements aléatoires de d'environnement [START_REF] Mustonen | Molecular evolution under fitness fluctuations[END_REF][START_REF] Rivoire | The value of information for populations in varying environments[END_REF][START_REF] Melbinger | The impact of environmental fluctuations on evolutionary fitness functions[END_REF][START_REF] Desponds | Fluctuating fitness shapes the clone size distribution of immune repertoires[END_REF][START_REF] Peter | Intrinsic noise in systems with switching environments[END_REF][START_REF] Wienand | Evolution of a fluctuating population in a randomly switching environment[END_REF][START_REF] Meyer | Noise-induced stabilization and fixation in fluctuating environment[END_REF][START_REF] Danino | Stability of twospecies communities: Drift, environmental stochasticity, storage effect and selection[END_REF]. D'autres effets tels que les propriétés physiologiques cellulaires [START_REF] Lin | Complex interplay of physiology and selection in the emergence of antibiotic resistance[END_REF], le retard phénotypique [START_REF] Carballo-Pacheco | Phenotypic delay: mechanistic models and their implications for the evolution of resistance to antibiotics[END_REF] ou la dépendance en la densité de l'efficacité du médicament [START_REF] Hallinen | Delayed antibiotic exposure induces population collapse in enterococcal communities with drug-resistant subpopulations[END_REF] peuvent encore enrichir la réponse des populations microbiennes aux concentrations variables d'antimicrobiens.

Je remercie Alexis Prevost et Aleksandra Walczak d'avoir parrainé cette thèse, de s'être assurés de son bon déroulement, et de s'être portés garants de ma santé physique et mentale.

Merci à Didier Chatenay d'avoir créé les conditions de travail qui font la renommée du Laboratoire Jean Perrin, et merci à Georges Débregeas de les faire perdurer. Je souhaite remercier ici l'ensemble du LJP, dont chaque membre contribue à sa manière à cette superbe atmosphère pour laquelle on se lève tous les matins sans rechigner. J'ai une pensée particulière pour les doctorantes et pour les doctorants avec qui ce fut un plaisir de partager une maison au 15 Rue Saint-Roch, un bureau, des repas, des cafés, des bières, du pastis, des bastons en salle microbio, etc. Si j'ai pris tant de plaisir à venir travailler au laboratoire, c'est grâce à eux. Merci à Marie-Nicole Colonnette et à Malika Pierrat d'avoir rendu les démarches administratives plus douces. In this introduction, we first define what a microbe and an antimicrobial are. Then we explain our motivations through a historical overview of the issues raised by antimicrobial resistance. After briefly reviewing some relevant biological details of antimicrobial resistance, we explain why environmental variability and population structure likely impact the evolution and spread of antimicrobial resistance. A brief state of the art on the impact of environmental variability and structure on the evolution of microbial populations leads us to the questions we want to answer, and the goals we want to achieve. Finally, we present the structure of the thesis manuscript.

Once upon a time there were microbes and antimicrobials

This thesis focuses on the evolution of antimicrobial resistance in a microbial population, as well as its spread in a host population. Let us first define the key notions in this topic.

A microorganism, or microbe, is a living organism, invisible to the naked eye, which can only be observed with the aid of a microscope. It includes archaea, bacteria, microscopic fungi and yeasts, protozoa, viruses and microscopic algae [START_REF] Daniel | [END_REF][START_REF] Tan | Chlamydia Biology: From Genome to Disease[END_REF]. Notes that viruses are not always considered as microbes, since they cannot metabolize or replicate autonomously outside a host cell. Microorganisms make up just over 15% of the Earth's biomass [START_REF] Yinon | The biomass distribution on earth[END_REF]. Typically, there are about 50 million bacterial cells per gram of soil, about one million per milliliter of freshwater and about 10 trillion in the human body. The latter figure, which includes microbes in the human microbiota, shows that human interactions with microbes are important. Note that the human microbiota includes all microbial communities, residing on or within human tissues and biofluids. Although some of these microbes are involved in the healthy functioning of human organisms, others are pathogenic and cause infectious diseases. This pathogenicity explains the use of antimicrobials, which are defined in the following paragraph. Microorganisms are believed to have been the first life forms to develop on Earth. Although terrestrial physical characteristics have changed significantly over the past 3.4 -3.7 billion years, genetic variation has allowed microbes to evolve and survive in new environments. This capacity to adapt to new environmental conditions, even deteriorating ones, is precisely what we will try to quantify in this thesis.

An antimicrobial is an agent that affects the growth or the death of microorganisms in a negative way. More specifically, agents that kill microbes are called biocidal, while those that slow their growth are called biostatic. In addition to grouping them by their impact on microbes, antimicrobials can be classified according to the type of microbes on which they act against. For instance, antibiotics are antimicrobial medicines used against bacteria, while antifungals are used against fungi. Thus, the addition of antimicrobials to a microbial culture deteriorates its environment and stresses the microbes. When the antimicrobial treatment is effective, the microbial population eventually goes extinct. That is why antimicrobials are of great interest in medicine, since they help to control pathogenic microbes. They are also of interest in microbiology because they can eliminate undesirable microbes in experiments. However, as we will see in the next section, some microbial populations may adapt and survive drug treatment because of antimicrobial-resistant microbes. Fig. 1.1 shows an example of an antimicrobial susceptibility testing where disks that diffuse different antimicrobials are placed on a petri dish containing a microbial culture [START_REF] Reller | Antimicrobial Susceptibility Testing: A Review of General Principles and Contemporary Practices[END_REF]. As can be seen in this figure, some antimicrobials are successful in killing microbes, resulting in empty dark gray halos around some disks, while others are ineffective. In the latter cases, the microbes are resistant to these antimicrobials. Figure 1.1: Antimicrobial susceptibility testing. Microbial susceptibility to antimicrobials is tested by placing disks that diffuse antimicrobials on a petri dish containing a microbial culture. Some antimicrobials are successful in killing microbes, resulting in empty dark gray halos around some disks, while others are ineffective. For more details, see [START_REF] Reller | Antimicrobial Susceptibility Testing: A Review of General Principles and Contemporary Practices[END_REF]. Original illustration from Wikimedia Commons.

Historical overview of antimicrobial resistance

While we were defining what a microbe and an antimicrobial are, we mentioned antimicrobial resistance, which is precisely the subject of this thesis. In what follows, we briefly explore the chronology of antimicrobial resistance. This overview is an opportunity to explain our motivations for studying this topic.

Until the beginning of the twentieth century, one of the main causes of human mortality was infection by microorganisms such as bacteria and fungi. For example, the Black Death killed 25 million Europeans around 1350, about half of the European population at that time. Over the years, hygiene has helped to reduce the infectious disease related death rate. In 1928, Alexander Fleming observed that the fungus Penicillium notatum inhibits the reproduction of bacterial cultures. The discovery of this first antimicrobial opened a new era for medicine and has constituted one of the greatest medical advances of the twentieth century, allowing many major infectious diseases to be treated. However, antibiotic resistance to sulfonamides, the first synthetic antibiotics, appeared only a few years after their introduction in 1936. Indeed, with the increasing use of antimicrobials, pathogenic microorganisms tend to become resistant to these drugs, which then become useless. Thus, antimicrobial resistance compromises the effective prevention and treatment of infections caused by microbes. Because many new antimicrobials were discovered and synthesized in the years that followed, antimicrobial resistance did not receive much attention from the scientific community [START_REF] Singer | Antibiotic resistance-the interplay between antibiotic use in animals and human beings[END_REF]. However, it causes today the death of 700,000 people a year worldwide. Antimicrobial resistance has grown because of widespread use of antimicrobial and the decrease of new drug discoveries, and this figure could rise to 10 million by 2050, making antimicrobial resistance the leading cause of death before cancer [START_REF] Jim | UK Review on Antimicrobial Resistance[END_REF] (see Fig. 1.2). Figure 1.2: Antimicrobial resistance. Predictions of deaths attributable to antimicrobial resistance every year by 2050. The number of deaths worldwide each year due to antimicrobial resistance could be as high as 10 million. The continents most affected would be Asia and Africa. Original illustration from [START_REF] Jim | UK Review on Antimicrobial Resistance[END_REF].

That is why understanding both the evolution and the spread of resistance is of paramount importance in order to fight the major public health issue raised by antimicrobial resistance. Some interesting, but not exhaustive, questions are: what conditions favor or challenge the evolution of resistance? How to optimize antimicrobial treatments? This thesis modestly provides some elements of answer, using theoretical modeling based on stochastic processes, with the hope to contribute to the understanding of antimicrobial resistance as a major challenge of the twentieth century.

RUGGED FITNESS LANDSCAPE

Resistance mutation, fitness cost and compensation -Rugged fitness landscape

Since the emergence of antimicrobial resistance, many studies have focused on the causes and consequences of resistance in microbes, i.e at the cellular level. These observations are important to build relevant quantitative models that will allow us to study the evolution of antimicrobial resistance in a microbial community, as well as its spread in a host population. This section addresses the following questions: how does a microbe acquire resistance? Does this resistance have a biological impact on the microbe that acquires it? A microbe can acquire antimicrobial resistance through a genetic mutation affecting its chromosome, or through foreign genetic material, such as a plasmid, carrying one or more resistance genes from another microbe. Note that a mutation could also affect a plasmid, and lead to de novo resistance. In this thesis, we focus on this first type of resistance acquisition, called de novo chromosomal resistance. As an example, the typical mutation probability per nucleotide and per generation in Escherichia coli bacteria is ∼ 10 -10 [START_REF] Wielgoss | Mutation rate dynamics in a bacterial population reflect tension between adaptation and genetic load[END_REF]. Resistant microbes can operate through different mechanisms to protect themselves from antimicrobials. For instance, resistance mutations can modify the molecular target of the drug, seal the microbe's membrane against the drug, or produce an enzyme that destroys the drug, thus making the antimicrobial ineffective.

Mutations that confer antimicrobial resistance are often associated with a fitness cost, i.e. a slower reproduction in the absence of drug [START_REF] Borman | Resistance of human immunodeficiency virus type 1 to protease inhibitors: selection of resistance mutations in the presence and absence of the drug[END_REF][START_REF] Andersson | antibiotic resistance and its cost: is it possible to reverse resistance? nat rev microbiol 8: 260-271[END_REF][START_REF] Abel Zur Wiesch | Population biological principles of drug-resistance evolution in infectious diseases[END_REF]. Indeed, as previously mentioned, the acquisition of resistance often alters the biological function of the drug target, or involves the production of specific proteins, which entails a metabolic cost. This results in a selective disadvantage of resistant microbes compared to sensitive ones in an antimicrobialfree environment. As an example, the fitness cost of streptomycin resistance in Escherichia coli bacteria is ∼ 10% [START_REF] Schrag | Adaptation to the fitness costs of antibiotic resistance in ¡i¿escherichia coli¡/i¿[END_REF]. However, resistant microorganisms frequently acquire subsequent mutations that compensate for the initial cost of resistance. These microorganisms are called "resistant-compensated" [START_REF] Schrag | Adaptation to the fitness costs of antibiotic resistance in ¡i¿escherichia coli¡/i¿[END_REF][START_REF] Levin | Compensatory mutations, antibiotic resistance and the population genetics of adaptive evolution in bacteria[END_REF][START_REF] Paulander | Multiple mechanisms to ameliorate the fitness burden of mupirocin resistance in salmonella typhimurium[END_REF][START_REF] Sousa | Potential for adaptation overrides cost of resistance[END_REF]. The acquisition of resistance is therefore often irreversible, even if the antimicrobial is removed from the environment [START_REF] Andersson | antibiotic resistance and its cost: is it possible to reverse resistance? nat rev microbiol 8: 260-271[END_REF][START_REF] Schrag | Adaptation to the fitness costs of antibiotic resistance in ¡i¿escherichia coli¡/i¿[END_REF]. Moreover, in several actual situations, the effective mutation rate towards compensation tends to be higher than the one towards the return to sensitivity, since multiple mutations can compensate for the initial cost of resistance.

As a result of all that has been described above, in the absence of antimicrobial, the adaptive landscape of the microorganism, which represents its fitness as a function of its genotype, involves a valley, since the first resistance mutation decreases fitness, while compensatory mutations increase it (see Fig. 1.3). However, this fitness valley, which exists in the absence Figure 1.3: Fitness landscape. Adaptive fitness landscape in the absence of antimicrobial showing the evolution of streptomycin resistance in Escherichia coli. CAB281, STR1, STR12 and STR12tr denote streptomycinsensitive, spontaneous streptomycin-resistant, resistant-compensated and sensitive-compensated strains, respectively. Sensitive-uncompensated and resistant compensated strains occupy different adaptive peaks separated by a valley. Original illustration from [START_REF] Schrag | Adaptation to the fitness costs of antibiotic resistance in ¡i¿escherichia coli¡/i¿[END_REF]. of antimicrobial, disappears above a certain concentration of biostatic antimicrobial, as the growth of the antimicrobial-sensitive microbe is impaired. Thus, the adaptive landscape of the microbe depends drastically on whether the antimicrobial is present or absent. Note that biocidal antimicrobials do not impact the fitness of sensitive microbes but increase their death rate, while that of resistant microbes remains constant. Thus, an environment with such drugs applies selective pressure on sensitive microbes and also selects for resistance. Taking into account this type of interaction between genotype and environment constitutes a fundamental problem, even though most experiments have traditionally focused on comparing different mutants in a unique environment [START_REF] Taute | Evolutionary constraints in variable environments, from proteins to networks[END_REF]. In particular, recent theoretical analyses show that variable adaptive landscapes can have a dramatic evolutionary impact [START_REF] Mustonen | Molecular evolution under fitness fluctuations[END_REF][START_REF] Rivoire | The value of information for populations in varying environments[END_REF][START_REF] Melbinger | The impact of environmental fluctuations on evolutionary fitness functions[END_REF][START_REF] Desponds | Fluctuating fitness shapes the clone size distribution of immune repertoires[END_REF][START_REF] Wienand | Evolution of a fluctuating population in a randomly switching environment[END_REF].

Population genetics

In the previous section, we explained that antimicrobial-susceptible microbes can mutate into resistant microbes, and that the latter can mutate into resistant-compensated microbes. We have also shown that the fitness landscape of microbes depends on the environment. But do these mutations, when they occur, become established in a microbial population? How does the fixation of mutations depend on the environment or population struc-ture? To begin to answer these questions, we will discuss population genetics here [START_REF] Ewens | Mathematical Population Genetics 1: Theoretical Introduction[END_REF][START_REF] Gillespie | Population genetics: a concise guide[END_REF][START_REF] Nowak | Evolutionary Dynamics: Exploring the Equations of Life[END_REF]. This subfield of genetics, which is also part of evolutionary biology, quantitatively studies the genetic composition of populations and the changes in this composition that result from various evolutionary forces. These include mutation, selection, genetic drift and migration. Some of these keywords appeared earlier in the introduction of this thesis, and this section is an opportunity to define them in more detail, and to illustrate them in the context of antimicrobial resistance.

Natural selection arises from the fact that some genes in a population carry a survival or reproduction advantage over others. This is quantitatively described by fitness, which is defined in this thesis as the reproduction rate of a microbe in a given environment. Fitter individuals have more offspring. Then, natural selection converts differences in fitness into changes in the frequency of genotypes in a population over successive generations. How does natural selection operate in the context of antimicrobial resistance? Consider a microbial population composed of two types of individuals, namely sensitive and resistant microbes. As a reminder, the latter have a selective disadvantage in the absence of antimicrobial due to their fitness cost of resistance. Thus, in an antimicrobial-free environment, natural selection selects sensitive microbes. However, in an environment with antimicrobial, the fitness of sensitive individuals is reduced by the drugs, and therefore resistant microbes become more fit. They then benefit from natural selection (see Fig. 1.4.A). This leads to the crucial point that drugs actively select for resistance to them. More generally, this example illustrates the impact of the environment on natural selection. Therefore, in this thesis we will focus, among other things, on the impact of environmental variability on the evolution of antimicrobial resistance.

Mutation is one of the main sources of genetic variation. It is a modification of the genetic information in the genome. More specifically, the DNA sequence (RNA for some viruses) can change in two ways, either by substitution of one base pair by another as a result of an error during replication, or by breaks in the sugar-phosphate backbone of the DNA with loss, addition or inversion of DNA between the two breaks. For example, an initially fully sensitive population may diversify genetically when sensitive microbes divide and mutate into resistant mutants, and when resistant mutants divide and mutate into resistant-compensated microbes (see Fig. 1.4.B). Since the majority of mutations are deleterious [START_REF] Eyre | The distribution of fitness effects of new mutations[END_REF], natural selection tends to eliminate the resulting mutants. However, when the rate at which deleterious mutants appear is equivalent to the rate at which selection eliminates these mutants, the result is an equilibrium number of deleterious mutants in the population. This is known as the mutation-selection balance, and this mechanism allows genetic variation to be maintained in populations. Thus, the mutation rate can change the outcome of the evolutionary process, as well as the evolutionary path followed to get there. This parameter will therefore be important to take into account.

Genetic drift is the change in the frequency of a genotype due to chance (see Fig. 1.4.C). Because births and deaths of individuals are random events, they induce demographic noise in finite sized population. Finite size effects and sampling noise are sources of stochasticity. Unlike natural selection, genetic drift is not impacted by differences in fitness, but rather by population sizes. Indeed, the smaller the population size, the stronger the stochastic effects. Thus, it is interesting to note that the evolution of antimicrobial resistance in a microbial population may depend on its size. In small populations, genetic drift may dominate natural selection, while the opposite may be true in larger populations. Genetic drift particularly impacts the bottleneck effect [START_REF] Ewens | Mathematical Population Genetics 1: Theoretical Introduction[END_REF][START_REF] Gillespie | Population genetics: a concise guide[END_REF], i.e. when the size of a population is suddenly reduced, and the founder effect [START_REF] Mode | Stochastic Processes in Genetics and Evolution: Computer Experiments in the Quantification of Mutation and Selection[END_REF], i.e. when a small group of individuals separates from a population to form a colony. The latter effect occurs in the spread of a microbial infection, and more specifically in the transfer of a number of microbes from one infected host to another, which then becomes contaminated. Also, the value of the fitness cost may have an impact on evolutionary forces. More specifically, when the selective advantage of a genotype is less than 1 divided by the effective population size, genetic drift dominates natural selection [START_REF] Zimmer | Evolution: The Triumph of an Idea[END_REF].

Gene flow, or gene migration, is the transfer of genetic variation from one population to another thanks to the migration of individuals (see Fig. 1.4.D). This mechanism is likely to occur both in the evolution of antimicrobial resistance within a host and in its spread within a host population. Indeed, during an infection, microbial populations are subdivided between different organs, and between different hosts. Moreover, most microbial populations feature some geographical structure, and even bacteria growing on a Petri dish compete more strongly with their neighbors than with other bacteria. In a structured population, competition is local, and once one type of individuals dominates in a subpopulation, it can spread more easily to others through migration. The question then arises as to whether or not antimicrobial resistance evolves more easily in a structured population or in an unstructured population.

To sum up, natural selection and genetic drift are two mechanisms that reduce genetic diversity, the first by favoring the most fit genotypes and the second randomly regardless of fitness. In contrast, mutation and migration are sources of genetic diversification. Taking these four evolutionary forces into account is essential to understand the genetic evolution of a population. The examples we have used to illustrate these evolutionary forces, and those reported in Fig. 1.4, show that these evolutionary forces depend on the environment and population structure. Therefore, in this thesis we will investigate the impact of environmental variability and population structure on the evolution and spread of antimicrobial resistance. These are important theoretical challenges because most models traditionally assume constant [START_REF] Moran | Random processes in genetics[END_REF]. At each time step, an individual is chosen at random for reproduction and another one is chosen for elimination. Hence, the total number of individuals in the population stays constant. A: Natural selection. sensitive microbes are selected in an antimicrobial-free environment, while resistant mutants are selected in an environment with antimicrobial. Indeed, sensitive microbes are fitter than resistant microbes in the absence of antimicrobial, while they cannot divide in the presence of antimicrobial. B: Mutation. A microbe from a fully sensitive population mutates when it divides into a resistant microbe. The population becomes genetically diverse and now has two genotypes. C: Genetic drift. Assuming that sensitive and resistant microbes have the same fitness, the microbial population goes from ∼33% mutant individuals to zero mutant individuals. D: Gene flow. A resistant microbe from a fully resistant population is selected for reproduction, migrates to a fully sensitive population and replaces a sensitive microbe chosen to die. Then genetic diversity increases.

environments and homogeneous populations. This is the type of challenge for which physics can be useful, especially with the tools of out-of-equilibrium statistical physics. Indeed, in particular after Motoo Kimura's use of the diffusion equation to calculate the fixation probability of beneficial, neutral and deleterious alleles [START_REF] Watterson | Motoo kimura's use of diffusion theory in population genetics[END_REF], it became clear that stochastic processes can help investigate theoretical population genetics issues.

State of the art

Before we begin to study the evolution and spread of antimicrobial resistance, let us have a brief and non-exhaustive look at what has already been done on this issue, with a particular focus on the impact of environmental variability and on the impact of population structure. This will allow us to know how to improve existing models in order increase our knowledge of antimicrobial resistance.

Many studies have investigated the evolution of antimicrobial resistance in a context of specific drug treatments [START_REF] Lipsitch | The population dynamics of antimicrobial chemotherapy[END_REF]. An important point is that treatments are designed to eradicate microbial populations and not be toxic to the patients taking them, but they are not designed to minimize antimicrobial resistance [START_REF] Meredith | Bacterial temporal dynamics enable optimal design of antibiotic treatment[END_REF]. Some work shows how environmental changes can contribute to the emergence of resistant microbes. For instance, antimicrobial resistance emerges more often in a microbial population undergoing a gradual drug treatment than in a microbial population undergoing an abrupt drug treatment [START_REF] Wu | Dynamics of evolutionary rescue in changing environments and the emergence of antibiotic resistance[END_REF]. Also, imperfect adherence to therapy allows resistant microbes to grow and dominate microbial populations after a while [START_REF] Wahl | Adherence and drug resistance: Predictions for therapy outcome[END_REF]. Thus, all the studies cited previously show the impact of environmental changes on the emergence of antimicrobial resistance, and therefore how crucial it is to study the interactions between time scales of evolution and environment. However, most studies neglect stochastic effects, which can have a significant impact on evolutionary dynamics [START_REF] Ewens | Mathematical Population Genetics 1: Theoretical Introduction[END_REF][START_REF] Daniel | Evolutionary Dynamics. Les Houches, Session LXXXV, Complex Systems[END_REF][START_REF] Ewens | James f. crow and the stochastic theory of population genetics[END_REF]. Besides, a transition between stochastic evolution and deterministic evolution exists and depends on population size, mutation rate, and selective coefficient [START_REF] Rouzine | Transition between stochastic evolution and deterministic evolution in the presence of selection: General theory and application to virology[END_REF]. A simple example illustrates this: in a deterministic system, the frequency in a population of a mutation that is slightly deleterious will come to an equilibrium equal to the mutation rate divided by the selection coefficient, while in a stochastic system the population will finally only contain one variant or the other [START_REF] Rouzine | Transition between stochastic evolution and deterministic evolution in the presence of selection: General theory and application to virology[END_REF]. Therefore, stochastic and deterministic approaches may provide different evolutionary outcomes for the fate of resistance mutations. Note that the deterministic approach is appropriate when the product of the population size by the mutation rate is large [START_REF] Rouzine | Transition between stochastic evolution and deterministic evolution in the presence of selection: General theory and application to virology[END_REF][START_REF] Daniel | Evolutionary Dynamics. Les Houches, Session LXXXV, Complex Systems[END_REF]. Such large sizes can be reached in some established infections [START_REF] Hughes | Evolutionary consequences of drug resistance: Shared principles across diverse targets and organisms[END_REF], but microbial populations go through very small bottleneck sizes [START_REF] Gutiérrez | Virus population bottlenecks during within-host progression and host-to-host transmission[END_REF], when an infection is transmitted. Moreover, established microbial populations are structured, even within a single patient [START_REF] Marle | Compartmentization of the gut viral reservoir in hiv-1 infected patients[END_REF], and competition is local, which decreases the effective value of the population size. In these latter cases, stochastic effects may be significant. Although previous studies did take stochasticity into account, several did not include compensation of the cost of resistance [START_REF] Nissen-Meyer | Analysis of effects of antibiotics on bacteria by means of stochastic models[END_REF][START_REF] Hansen | How to use a chemotherapeutic agent when resistance to it threatens the patient[END_REF]. Taking compensation into account leads to a valley fitness landscape and may induce nontrivial evolutionary dynamics [START_REF] Daniel | The rate at which asexual populations cross fitness valleys[END_REF][START_REF] Daniel | The rate of fitness-valley crossing in sexual populations[END_REF].

Most studies that have investigated the evolution of antimicrobial resistance considered homogeneous populations [START_REF] Lipsitch | The population dynamics of antimicrobial chemotherapy[END_REF][START_REF] Meredith | Bacterial temporal dynamics enable optimal design of antibiotic treatment[END_REF][START_REF] Wu | Dynamics of evolutionary rescue in changing environments and the emergence of antibiotic resistance[END_REF][START_REF] Wahl | Adherence and drug resistance: Predictions for therapy outcome[END_REF]. However, such a model gives a good description of microbes in a well-agitated medium, but of few natural situations. As we already described earlier, during an infection, microbial populations are subdivided between different organs, and between different hosts [START_REF] Marle | Compartmentization of the gut viral reservoir in hiv-1 infected patients[END_REF]. Moreover, most microbial populations feature some geographical structure, which can have major consequences on the way microbial populations evolve [START_REF] Tarnita | Evolutionary dynamics in set structured populations[END_REF][START_REF] Nowak | Evolutionary dynamics in structured populations[END_REF]. For instance, a previous work showed that population subdivision strongly accelerates fitness valley crossing [START_REF] Bitbol | Quantifying the role of population subdivision in evolution on rugged fitness landscapes[END_REF]. Indeed, the different subpopulations forming a subdivided population perform quasi-independent explorations of the fitness landscape in parallel, and migration can then spread beneficial mutations throughout the population. However, recent experiments investigating the evolutionary dynamics of subdivided populations produced mixed results, some showing faster adaptation of subdivided populations [START_REF] Cooper | Evolution at 'sutures' and 'centers': Recombination can aid adaptation of spatially structured populations on rugged fitness landscapes[END_REF], while others not [START_REF] Kryazhimskiy | Population subdivision and adaptation in asexual populations of saccharomyces cerevisiae[END_REF]. Thus the question of the impact of the structure on the evolution of a population is not definitively resolved. Interest in the impact of structure on the evolution of populations has led to the research field of Evolutionary graph theory [START_REF] Nowak | Evolutionary Dynamics: Exploring the Equations of Life[END_REF]. In this framework, structured populations are modeled as graphs where each node represents an individual, with probabilities that the offspring of an individual replaces another one along each edge [START_REF] Lieberman | Evolutionary dynamics on graphs[END_REF]. Many studies have provided analytical results for probabilities and fixation times in such structured populations, and have shown that some structures are amplifiers or suppressors of natural selection [START_REF] Broom | An analysis of the fixation probability of a mutant on special class of non-directed graphs[END_REF][START_REF] Shakarian | A review of evolutionary graph theory with applications to game theory[END_REF][START_REF] Frean | The effect of population structure on the rate of evolution[END_REF][START_REF] Monk | Martingales and fixation probabilities of evolutionary graphs[END_REF][START_REF] Askari | Analytical calculation of average fixation time in evolutionary graphs[END_REF]. However, in these models, evolutionary outcomes can drastically depend on the details of the dynamics, e.g. whether each birth event precedes a death event or the opposite [START_REF] Kaveh | The duality of spatial death–birth and birth–death processes and limitations of the isothermal theorem[END_REF][START_REF] Hindersin | Most undirected random graphs are amplifiers of selection for birth-death dynamics, but suppressors of selection for death-birth dynamics[END_REF][START_REF] Pattni | Evolutionary graph theory revisited: when is an evolutionary process equivalent to the moran process[END_REF]. In a few other models, each node in the graph represents a subpopulation of fixed size. But in these models, the evolutionary outcome also depends on the details of the dynamics. This brief and non-exhaustive state of art shows that many interesting studies investigated the antimicrobial resistance. However, many of them do not include in their models the compensation of fitness costs or stochastic effects or do not incorporate both variable population size and variable composition. Moreover, the lack of universality existing structured population models, that results from the choice of dynamics, raises issues for applicability to real microbial populations. Here, we aim to contribute to fill these gaps in our knowledge, by building new models that will improve our understanding of the evolution and resistance to antimicrobials, with a particular focus on the impact of environmental variability and population structure.

Outline of this thesis

This thesis aims to develop minimal and generic models to understand both the evolution and spread of antimicrobial resistance. Chapters 2, 3 and 4 are devoted to the evolution of antimicrobial resistance in a microbial population. Stochastic models are developed that assess the impact of environmental variability on the fixation of resistance mutations. More specifically, the second and third chapters address the impact of periodic antimicrobial presence on the evolution of resistance in microbial populations of fixed and variable size, respectively The fourth chapter focuses more generally on the impact of a gradually deteriorating environment and on the rescue by mutation of a population destined for extinction by mutation. The fifth chapter proposes a new model of structured populations and compares it to existing models. This model aims to solve the problem of the lack of universality of existing models with respect to the choice of dynamics. Finally, the last chapter focuses on the spread of antimicrobial resistance in a host population related to immunity. In what follows, we outline the content of each chapter in more detail.

In Chapter 2, we consider a homogeneous microbial population of fixed size subjected to periodic alternations of phases of absence and presence of an antimicrobial that stops growth. Combining analytical approaches and stochastic simulations, we quantify how the time necessary for fit resistant bacteria to take over the microbial population depends on the alternation period. We demonstrate that fast alternations strongly accelerate the evolution of resistance, reaching a plateau for sufficiently small periods. Furthermore, this acceleration is stronger in larger populations. For asymmetric alternations, featuring a different duration of the phases with and without antimicrobial, we shed light on the existence of a minimum for the time taken by the population to fully evolve resistance. The corresponding dramatic acceleration of the evolution of antimicrobial resistance likely occurs in realistic situations, and may have an important impact both in clinical and experimental situations.

In Chapter 3, we pursue our study of the impact of periodic alternations of absence and presence of antimicrobial on resistance evolution in a microbial population, using a stochastic model that includes variations of both population composition and size, and fully incorporates stochastic population extinctions. We show that fast alternations of presence and absence of antimicrobial are inefficient to eradicate the microbial population and strongly favor the establishment of resistance, unless the antimicrobial increases enough the death rate. We further demonstrate that if the period of alternations is longer than a threshold value, the microbial population goes extinct upon the first addition of antimicrobial, if it is not rescued by resistance. We express the probability that the population is eradicated upon the first addition of antimicrobial, assuming rare mutations. Rescue by re-sistance can happen either if resistant mutants preexist, or if they appear after antimicrobial is added to the environment. Importantly, the latter case is fully prevented by perfect biostatic antimicrobials that completely stop division of sensitive microorganisms. By contrast, we show that the parameter regime where treatment is efficient is larger for biocidal drugs than for biostatic drugs. This sheds light on the respective merits of different antimicrobial modes of action.

In Chapter 4, we investigate the evolutionary rescue of a microbial population in a gradually deteriorating environment, in contrast to the models in Chapters 2 and 3 where environmental change is abrupt. We consider a population destined for extinction in the absence of mutants, which can only survive if adaptive mutants arise and fix. We show that mutants that appear later during the environment deterioration have a higher probability to fix. We demonstrate that the rescue probability of the population increases with a sigmoidal shape when the product of the carrying capacity and of the mutation probability increases. Furthermore, we find that rescue becomes more likely for smaller population sizes and/or mutation probabilities if the environment degradation is slower, which illustrates the key impact of the rapidity of environment degradation on the fate of a population. We also show that specialist mutants are slightly more efficient at rescuing the population than generalist ones. We further express the average time of appearance of the mutants that do rescue the population and the average extinction time of those that do not. Our methods can be applied to other situations with continuously variable fitnesses and population sizes, and our analytical predictions are valid beyond the weak-mutation regime.

In Chapter 5, we focus on the fate of a mutation in a structured population, after having concentrated on well-mixed populations in Chapters 2, 3, and 4. More specifically, we develop a graph-structured population model that generalizes the existing models in which each node is considered either as a single individual or as a population of fixed size. In our model, each node is a deme of variable size, and migrations are independent of birth and death events. We calculate analytically the fixation probability of a mutant lineage for different population structures in the rare migration regime, and verify our predictions with numerical simulations. We find that many structures are suppressors of natural selection in our models, including some that are known as natural selection amplifiers in existing models. Despite this striking difference, our model is consistent with the existing models when the ratios of total reproduction rate to total migration rate in each deme are matched between models.

In Chapter 6, we develop a multi-scale model of the interaction between antibiotic use and resistance spread in a host population, focusing on an important aspect of within-host immunity. Antibodies secreted in the gut enchain bacteria upon division, yielding clonal clusters of bacteria. We demonstrate that immunity-driven bacteria clustering can hinder the spread of a novel resistant bacterial strain in a host population. We quantify this effect both in the case where resistance preexists and in the case where acquiring a new resistance mutation is necessary for the bacteria to spread. We further show that the reduction of spread by clustering can be countered when immune hosts are silent carriers, and are less likely to get treated, and/or have more contacts. We demonstrate the robustness of our findings to including stochastic within-host bacterial growth, a fitness cost of resistance, and its compensation. Our results highlight the importance of interactions between immunity and the spread of antibiotic resistance, and argue in the favor of vaccine-based strategies to combat antibiotic resistance.

Note that each chapter can be read independently of the others, and that analytical and numerical details are presented at the end of each chapter in an Appendix section. The work presented in this chapter was published in the following article: Marrec L, Bitbol AF. Quantifying the impact of a periodic presence of antimicrobial on resistance evolution in a homogeneous microbial population of fixed size. J Theor Biol. 2018;457:190-198. In this chapter, we consider a homogeneous microbial population of fixed size subjected to periodic alternations of phases of absence and presence of an antimicrobial that stops growth. We quantify how the time necessary for fit resistant bacteria to take over the microbial population depends on the alternation period. We demonstrate that fast alternations strongly accelerate the evolution of resistance, reaching a plateau for sufficiently small periods. Furthermore, this acceleration is stronger in larger populations. For asymmetric alternations, featuring a different duration of the phases with and without antimicrobial, we shed light on the existence of a minimum for the time taken by the population to fully evolve resistance. The corresponding dramatic acceleration of the evolution of antimicrobial resistance likely occurs in realistic situations, and may have an important impact both in clinical and experimental situations.

Introduction

We explained in Chapter 1 that mutations conferring antimicrobial resistance are often associated with a fitness cost, i.e. a slower reproduction [START_REF] Borman | Resistance of human immunodeficiency virus type 1 to protease inhibitors: selection of resistance mutations in the presence and absence of the drug[END_REF][START_REF] Andersson | antibiotic resistance and its cost: is it possible to reverse resistance? nat rev microbiol 8: 260-271[END_REF][START_REF] Abel Zur Wiesch | Population biological principles of drug-resistance evolution in infectious diseases[END_REF], and that resistant microorganisms, called "resistant-compensated", frequently acquire subsequent mutations compensating for the initial cost of resistance [START_REF] Schrag | Adaptation to the fitness costs of antibiotic resistance in ¡i¿escherichia coli¡/i¿[END_REF][START_REF] Levin | Compensatory mutations, antibiotic resistance and the population genetics of adaptive evolution in bacteria[END_REF][START_REF] Paulander | Multiple mechanisms to ameliorate the fitness burden of mupirocin resistance in salmonella typhimurium[END_REF][START_REF] Sousa | Potential for adaptation overrides cost of resistance[END_REF]. The acquisition of resistance is therefore often irreversible, even if the antimicrobial is removed from the environment [START_REF] Andersson | antibiotic resistance and its cost: is it possible to reverse resistance? nat rev microbiol 8: 260-271[END_REF][START_REF] Schrag | Adaptation to the fitness costs of antibiotic resistance in ¡i¿escherichia coli¡/i¿[END_REF]. Thus, in the absence of antimicrobial, the adaptive landscape of the microorganism, which represents its fitness (i.e. its reproduction rate) as a function of its genotype, involves a valley, since the first resistance mutation decreases fitness, while compensatory mutations increase it. However, this fitness valley, which exists in the absence of antimicrobial, disappears above a certain concentration of biostatic antimicrobial, as the growth of the antimicrobial-sensitive microorganism is impaired. Thus, the adaptive landscape of the microorganism depends drastically on whether the antimicrobial is present or absent. Taking into account this type of interaction between genotype and environment constitutes a fundamental problem, even though most experiments have traditionally focused on comparing different mutants in a unique environment [START_REF] Taute | Evolutionary constraints in variable environments, from proteins to networks[END_REF]. In particular, recent theoretical analyses show that variable adaptive landscapes can have a dramatic evolutionary impact [START_REF] Mustonen | Molecular evolution under fitness fluctuations[END_REF][START_REF] Rivoire | The value of information for populations in varying environments[END_REF][START_REF] Melbinger | The impact of environmental fluctuations on evolutionary fitness functions[END_REF][START_REF] Desponds | Fluctuating fitness shapes the clone size distribution of immune repertoires[END_REF][START_REF] Wienand | Evolution of a fluctuating population in a randomly switching environment[END_REF].

How do the timescales of evolution and variation in the adaptive landscape compare and interact? What is the impact of the time variability of the adaptive landscape on the evolution of antimicrobial resistance? In order to answer these questions, we construct a minimal model retaining the fundamental aspects of antimicrobial resistance evolution. Focusing on the case of a homogeneous microbial population of fixed size, we perform a complete stochastic study of de novo resistance acquisition in the presence of periodic alternations of phases of absence and presence of an antimicrobial that stops growth. These alternations can represent, for example, a treatment where the concentration within the patient falls under the Minimum Inhibitory Concentration (MIC) between drug intakes [START_REF] Regoes | Pharmacodynamic functions: a multiparameter approach to the design of antibiotic treatment regimens[END_REF]. Combining analytical and numerical approaches, we show that these alternations substantially accelerate the evolution of resistance with respect to the cases of continuous absence or continuous presence of antimicrobial, especially for larger populations. We fully quantify this effect and shed light on the different regimes at play. For asymmetric alternations, featuring a different duration of the phases with and without antimicrobial, we demonstrate the existence of a minimum for the time taken by the population to fully evolve resistance, occurring when both phases have durations of the same order. This realistic situation dramatically accelerates the evolution of resistance. Finally, we discuss the implications of our findings, in particular regarding antimicrobial dosage.

Model

The action of an antimicrobial drug can be quantified by its MIC, the minimum concentration that stops the growth of a microbial population [START_REF] Andersson | antibiotic resistance and its cost: is it possible to reverse resistance? nat rev microbiol 8: 260-271[END_REF]. We focus on biostatic antimicrobials, which stop microbial growth (vs. biocidal antimicrobials, which kill microorganisms). We model the action of the antimicrobial in a binary way: below the MIC ("absence of antimicrobial"), growth is not affected, while above it ("presence of antimicrobial"), sensitive microorganisms cannot grow at all. The usual steepness of pharmacodynamic curves around the MIC [START_REF] Regoes | Pharmacodynamic functions: a multiparameter approach to the design of antibiotic treatment regimens[END_REF] justifies our simple binary approximation, and we also present an analysis of the robustness of this hypothesis (Supplementary Material, Section 2.5.6). Within this binary approximation, there are two adaptive landscapes. Assuming that the drug fully stops the growth of sensitive microorganisms, but does not affect that of resistant ones, and considering compensatory mutations that fully restore fitness, these two adaptive landscapes can be described by a single parameter δ, representing the fitness cost of resistance (Fig. 2.1A). We focus on asexual microorganisms, and fitness simply denotes the division rate of these organisms. The fitness of sensitive microorganisms in the absence of antimicrobials is taken as reference. In this framework, we investigate the impact of a periodic presence of antimicrobial, assuming that the process starts without antimicrobial (Fig. 2.1B-C). We denote by µ 1 and µ 2 the mutation rates (or mutation probabilities upon each division) for the mutation from S to R and for the one from R to C, respectively. In several actual situations, the effective mutation rate towards compensation tends to be higher than the one towards the return to sensitivity, since multiple mutations can compensate for the initial cost of resistance [START_REF] Levin | Compensatory mutations, antibiotic resistance and the population genetics of adaptive evolution in bacteria[END_REF][START_REF] Paulander | Multiple mechanisms to ameliorate the fitness burden of mupirocin resistance in salmonella typhimurium[END_REF][START_REF] Hughes | Evolutionary consequences of drug resistance: Shared principles across diverse targets and organisms[END_REF]. Therefore, we do not take into account back-mutations.

Still because of the abundance of possible compensatory mutations, generally µ 1 µ 2 [START_REF] Levin | Compensatory mutations, antibiotic resistance and the population genetics of adaptive evolution in bacteria[END_REF][START_REF] Poon | The coupon collector and the suppressor mutation estimating the number of compensatory mutations by maximum likelihood[END_REF]. We present general analytical results as a function of µ 1 and µ 2 , and analyze in more detail the limit µ 1 µ 2 , especially in simulations. All notations introduced are summed up in Table 2.1.

We focus on a homogeneous microbial population of fixed size N , which can thus be described in the framework of the Moran process [START_REF] Ewens | Mathematical Population Genetics 1: Theoretical Introduction[END_REF][START_REF] Moran | Random processes in genetics[END_REF], where fitnesses are relative (see Appendix, Section 2.5.2 and Fig. 2.6). Assuming a constant size simplifies the analytical treatment and is appropriate for instance to describe turbidostat experiments, where the dilution rate is adjusted so that turbidity (and hence population size) is constant [START_REF] Myers | CULTURE CONDITIONS AND THE DEVELOPMENT OF THE PHOTOSYNTHETIC MECHANISM : II. AN APPARATUS FOR THE CONTINUOUS CULTURE OF CHLORELLA[END_REF]. If a population only features sensitive individuals (with zero fitness) in the presence of antimicrobial, we consider that no division occurs, and the population remains static. We always express time in number of generations, which corresponds (unless no cell can divide) to the number of Moran steps divided by the population size N .

Throughout, we start from a microbial population where all individuals are S (sensitive), and we focus on the time t f C it takes for the C (resistantcompensated) type to fix in the population, i.e. to take over the population. Then, the population has fully evolved resistance de novo.

Results

A periodic presence of antimicrobial can drive resistance evolution

In this section, we study how alternations of absence and presence of antimicrobial can drive the de novo evolution of resistance. We present analytical predictions for the time needed for the population to evolve resistance, and then we compare them to numerical simulation results. We first focus on the rare mutation regime N µ 1 1, where at most one mutant lineage exists in the population at each given time. The frequent mutation regime is briefly discussed, and more detail regarding the appropriate deterministic treatment in this regime is given in Supplementary Material, Section 2.5.3. Here, we consider the case of symmetric alternations with period T (Fig. 2.1B). Asymmetric alternations (Fig. 2.1C) will be discussed later.

Time needed for resistant microorganisms to start growing

Resistant (R) mutants can only appear during phases without antimicrobial. Indeed, mutations occur upon division, and sensitive (S) bacteria cannot divide in the presence of antimicrobial (Fig. 2.1). However, R mutants are less fit than S individuals without antimicrobial. Hence, the lineage of an R mutant will very likely disappear, unless it survives until the next addition of antimicrobial. More precisely, without antimicrobial, the fixation probability p SR of a single R mutant with fitness 1 -δ, in a population of size N where all other individuals are of type S and have fitness 1, is ∼ 1/N if the mutation from S to R is effectively neutral (N δ 1), and ∼ δe -N δ if δ 1 and N δ 1 [START_REF] Ewens | Mathematical Population Genetics 1: Theoretical Introduction[END_REF]. Let us denote by τ d R the average time an R lineage would drift before going extinct without antimicrobial [START_REF] Ewens | Mathematical Population Genetics 1: Theoretical Introduction[END_REF] (see Appendix, Section 2.5.2). If antimicrobial is added while R mutants exist in the population, i.e. within ∼ τ d R after a mutation event, then the R population will grow fast and fix, since S individuals cannot divide with antimicrobial. Hence, each time antimicrobial is added, any R lineage that was destined for extinction without antimicrobial but that survived until the addition of drug is rescued. Through this phenomenon, periodic alternations of absence and presence of antimicrobial can substantially accelerate resistance evolution: we will quantify this effect. Note that here, we disregard the very few R lineages destined for fixation without antimicrobial, because we aim to study the acceleration of resistance evolution due to the alternations. The spontaneous evolution of resistance without antimicrobial is discussed and compared to our alternation-driven process in the Appendix, Section 2.5.4.

It is crucial to calculate the average waiting time t a R until an R lineage is rescued by the addition of antimicrobial. Indeed, this constitutes the key step of alternation-driven resistance takeover. Three timescales impact t a R . The first one is the timescale of the environment, namely the half-period T /2. The two other ones are intrinsic timescales of the evolution of the population without antimicrobial: the average time between the appearance of two independent R mutants, 1/(N µ 1 ), and the average lifetime τ d R of the lineage of an R mutant destined for extinction without antimicrobial. Note that τ d R is generally quite short. Indeed, τ d R ≈ log N for large N if δ = 0, and τ d R decreases as δ increases, as deleterious R mutants are out-competed by S microorganisms; for instance, τ d R ≈ 2.6 generations if δ = 0.1 in the limit where N 1 and N δ 1 [START_REF] Ewens | Mathematical Population Genetics 1: Theoretical Introduction[END_REF] (see Appendix, Section 2.5.2). Hence, in the rare mutation regime, τ d R 1/(N µ 1 ). What matters is how the environment timescale T /2 compares to these two evolution timescales (see Fig. 2.2A-C). Our arguments based on comparing average timescales are approximate, but they yield explicit analytical predictions in each regime where timescales are separated, which we then test through numerical simulations.

(A) If T /2 τ d R (Fig. 2.2A): The lineage of the first R mutant that appears is likely to still exist upon the next addition of antimicrobial, and to be rescued, which yields t a R = 2/(N µ 1 ). Indeed, mutations from S to R can only occur without antimicrobial, i.e. half of the time.

(B) If τ d R T /2 1/(N µ 1 ) (Fig. 2.2B): At most one mutation yielding an R individual is expected within each half-period. The lineage of this mutant is likely to survive until the next addition of antimicrobial only if the mutant appeared within the last ∼ τ d R preceding it, which has a probability p = 2τ d R /T . Hence, 1/(N µ 1 ), where 1/(N µ 1 ) is the average time between the appearance of two independent R mutants without antimicrobial. C: T /2 1/(N µ 1 ). In (B) and (C), not all R lineages live until the next addition of antimicrobial, and in (C) multiple R lineages arise within a half-period. D: Example of a simulation run. The fractions of S, R and C microorganisms are plotted versus time. Inset: end of the process, with full resistance evolution. As in (A-C), antimicrobial is present during the gray-shaded time intervals (shown only in the inset given their duration). Parameters: µ 1 = 10 -5 , µ 2 = 10 -3 , δ = 0.1, N = 10 2 and T = 50 (belonging to regime B).

t a R = 2/(N µ 1 p) = T /(N µ 1 τ d R ).
(C) If T /2
1/(N µ 1 ) (Fig. 2.2C): Since the half-period is much larger than the time 1/(N µ 1 ) between the appearance of two independent mutants without antimicrobial, several appearances and extinctions of R lineages are expected within one half-period. Hence, the probability that a lineage of R exists upon a given addition of antimicrobial is q = N µ 1 τ d R , which corresponds to the fraction of time during which R mutants are present in the phases without antimicrobial. Specifically, q is the ratio of the average lifetime of the lineage of an R mutant destined for extinction without antimicrobial to the average time between the appearance of two independent R mutants without antimicrobial. Since additions of antimicrobial occur every T , we have t a R = T /q = T /(N µ 1 τ d R ), which is the same as in case (B). In fact, the demonstration presented for case (C) also holds for case (B).

In conclusion, we obtain

t a R = T N µ 1 min τ d R , T /2 . (2.1) Hence, if T /2 τ d R , t a R is independent from the period T of alternations, while if T /2 τ d R , t a R is proportional to T .

Time needed for the population to fully evolve resistance

We are interested in the average time t f C it takes for the population to fully evolve resistance, i.e. for the C (resistant-compensated) type to fix. An example of the process is shown in Fig. 2.2D. It takes on average t a R for R mutants to be rescued by the addition of antimicrobial. Then they rapidly grow, since S individuals cannot divide. If the phase with antimicrobial is long enough, R mutants take over during this phase, with a probability 1 and an average fixation timescale τ f R ≈ log N for N 1 [START_REF] Ewens | Mathematical Population Genetics 1: Theoretical Introduction[END_REF] (see Appendix, Section 2.5.2). If T /2 τ f R , fixation cannot occur within a single halfperiod, and the R lineage will drift longer, but its extinction remains very unlikely. Indeed, while R individuals are the only ones that can divide with antimicrobial, we assume that they experience only a minor disadvantage without antimicrobial (1 -δ vs. 1, generally with δ 1 [START_REF] Andersson | antibiotic resistance and its cost: is it possible to reverse resistance? nat rev microbiol 8: 260-271[END_REF], see Fig. 2.1A). Hence, if T /2 τ f R , and neglecting changes in frequencies in the absence of antimicrobial, R mutants will take ∼ 2τ f R to fix. Once the R type has fixed in the population, the appearance and eventual fixation of C mutants are independent from the presence of antimicrobial, since only S microorganisms are affected by it (see Fig. 2.1A). The first C mutant whose lineage will fix takes an average time t a C = 1/(N µ 2 p RC ) to appear once R has fixed, where p RC is the fixation probability of a single C mutant in a population of size N where all other individuals are of type R. In particular, if N δ 1 then p RC = 1/N , and if δ 1 and N δ 1 then p RC ≈ δ [START_REF] Ewens | Mathematical Population Genetics 1: Theoretical Introduction[END_REF] (see Appendix, Section 2.5.2). The final step is the fixation of this successful C mutant, which will take an average time τ f C , of order N in the effectively neutral regime N δ 1, and shorter for larger δ given the selective advantage of C over R [START_REF] Ewens | Mathematical Population Genetics 1: Theoretical Introduction[END_REF] (see Appendix, Section 2.5.2). Note that we have assumed for simplicity that the fixation of R occurs before the appearance of the first successful C mutant, which is true if

t a C τ f R , i.e. 1/(N µ 2 p RC )
log N . This condition is satisfied if the second mutation is sufficiently rare. Otherwise, our calculation will slightly overestimate the actual result.

Combining the previous results yields

t f C ≈ t a R + τ f R + t a C + τ f C , (2.2)
where t a R is given by Eq. 2.1, while t a C = 1/(N µ 2 p RC ), and τ f R ≈ log N and τ f C N . In the rare mutation regime, the contribution of the two fixation times τ f R and τ f C will be negligible. If in addition µ 1 µ 2 , which is realistic (cf. Methods), then t f C will be dominated by

t a R . If µ 1 ≈ µ 2 , t f C will be dominated by t a R if T > max 2τ d R , τ d R /p RC . Indeed, if T < 2τ d R ,

Comparison of analytical predictions and simulation results

Fig. 2.3A shows simulation results for the average total fixation time t f C of C individuals in the population. This time is plotted as a function of the period T of alternations for different population sizes N . As predicted above (see Eq. 2.1), we observe two regimes delimited by

T = 2τ d R . If T 2τ d R , t f C does not depend on T , while if T 2τ d R
, it depends linearly on T . In Fig. 2.3A, we also plot our analytical prediction from Eqs. 2.1 and 2.2 in these two regimes (solid lines). The agreement with our simulated data is excellent for small and intermediate values of T , without any adjustable parameter. Interestingly, the transition between these two regimes occurs for periods of about 5 generations, which would correspond to a few hours for typical bacteria, thus highlighting the practical importance of these two regimes. In Fig. 2.3A, the smallest values reported for t f C are of order 100 generations, corresponding to a few days, and are thus relevant to an actual treatment, while some other values are larger than the timescales involved in a treatment. Here, we quantitatively analyze the phenomena for a wide range of parameters. A more detailed comparison to actual situations, employing realistic values of population sizes and mutation rates, is presented in the Discussion.

Importantly, Fig. 2.3A shows that t f C reaches a plateau for small N and large T , which is not predicted by our analysis of the alternation-driven evolution of resistance. This plateau corresponds to the spontaneous fitness valley crossing process [START_REF] Daniel | The rate at which asexual populations cross fitness valleys[END_REF], through which resistance mutations appear and fix in the absence of drug. Note that such a plateau would also be reached for larger N , but for periods T longer than those considered in Fig. 2.3A (see Fig. 2.3B, black lines). What ultimately matters is the shortest process among the alternation-driven one and the spontaneous valley-crossing one. In Fig. 2.3A, horizontal solid lines at large T represent our analytical predictions for the valley-crossing time (see Appendix, Section 2.5.4). Fig. (resistant-compensated) individuals in a population of N individuals subjected to symmetric alternations of absence and presence of antimicrobial with period T . Data points correspond to the average of simulation results, and error bars (often smaller than markers) represent 95% confidence intervals. 2 to 10 4 replicate simulations were performed in each case (the smallest numbers of replicates were used for the largest populations, whose evolution is quasi-deterministic). In both panels, solid lines correspond to our analytical predictions in each regime. Parameter values: µ 1 = 10 -5 , µ 2 = 10 -3 , and δ = 0.1. A: t f C as function of T . Vertical dashed line: T = 2τ d R . B: t f C as function of N . Left vertical dashed line: limit of the neutral regime, N = 1/δ. Right vertical dashed line: limit of the deterministic regime, N = 1/µ 1 . Horizontal purple line: analytical prediction for valley crossing by neutral tunneling in the presence of alternations (see Appendix, Section 2.5.4). Black lines: analytical predictions for fitness valley crossing times in the absence of alternations (see Appendix, Section 2.5.4). at small T . In other regimes, resistance evolution is achieved by spontaneous valley crossing. In the limit T → ∞ of continuous absence of antimicrobial (black data points in Fig. 2.3B), only valley crossing can occur, and the black solid lines correspond to our analytical predictions for this process (see Appendix, Section 2.5.4).

Until now, we focused on the rare mutation regime. In the large-population, frequent-mutation regime N 1/µ 1 1, the dynamics of the population can be well-approximated by a deterministic model with replicator-mutator differential equations [START_REF] Traulsen | Coevolutionary dynamics: From finite to infinite populations[END_REF][START_REF] Foster | Stochastic evolutionary game dynamics[END_REF] (see Appendix, Section 2.5.3). Then, several lineages of mutants can coexist. If T /2 1/(N µ 1 ), it is almost certain that some R mutants exist in the population upon the first addition of antimicrobial, which entails t a R = T /2. The horizontal purple solid line plotted at large T in Fig. 2.3A, and the horizontal solid lines at large N in Fig. 2.3B, both correspond to this deterministic prediction. In the Appendix, Section 2.5.3, we study the deterministic limit of our stochastic model, and demonstrate that it matches the results obtained in Fig. 2.3A for N = 10 5 and N = 10 6 over the whole range of T (see Fig. 2.7).

The comparison to the spontaneous fitness valley crossing process (Fig. 2.3B, black curve and Appendix, Section 2.5.4) demonstrates that periodic alternations of absence and presence of antimicrobial can dramatically accelerate resistance evolution compared to continuous absence of antimicrobial. Recall that within our model, sensitive microorganisms cannot divide with antimicrobial, so resistance cannot evolve at all in continuous presence of antimicrobial. Another possible comparison would be to a continuous presence of a low dose of antimicrobial (below the MIC), but this goes beyond our binary model of antimicrobial action (see Appendix, Section 2.5.6 for a discussion of the domain of validity of this model). Alternations are really essential: R mutants appear without antimicrobial, and each addition of antimicrobial rescues the existing R lineages that would be destined to extinction without antimicrobial.

Asymmetric alternations

We now turn to the more general case of asymmetric alternations of phases of absence and presence of antimicrobial, with respective durations T 1 and T 2 , and T = T 1 + T 2 (see Fig. 2

.1C).

The average time t a R when R mutants first exist in the presence of antimicrobial, and start growing, can be obtained by a straightforward generalization of the symmetric alternation case Eq. 2.1. What matters is how the duration T 1 of the phase without antimicrobial, where S individuals can divide and mutate, compares to the average time τ d R an R lineage would drift before extinction without antimicrobial. If T 1 τ d R , the first R mutant takes an average time T /(N µ 1 T 1 ) to appear, and is likely to be rescued by the next addition of antimicrobial. If T 1 τ d R , the fraction of time during which R mutants are present in the phases without antimicrobial is N µ 1 τ d R , and antimicrobial is added every T , so t a R = T /(N µ 1 τ d R ). Hence, we obtain

t a R = T N µ 1 min(τ d R , T 1 ) . (2.3)
Once the R mutants have taken over the population, the appearance and fixation of C mutants is not affected by the alternations. Hence, Eq. 2.2 holds for asymmetric alternations, with t a R given by Eq. 2. C of C individuals in a population subjected to asymmetric alternations of absence and presence of antimicrobial (respective durations: T 1 and T 2 ). Data points correspond to the average of simulation results (over 10 to 10 3 replicates), and error bars (sometimes smaller than markers) represent 95% confidence intervals. In both panels, solid lines correspond to our analytical predictions in each regime. In particular, black lines are analytical predictions for fitness valley crossing times in the absence of alternations (see Appendix, Section 2.5.4). Parameter values: µ 1 = 10 -5 , µ 2 = 10 -3 , δ = 0.1 and N = 10 3 . A: t f C as function of T 1 for different T 2 . Dashed line:

T 1 = τ d R . B: t f C as function of T 2 for different T 1 . Dashed line: T 2 = τ f R .
For T 2 τ f R , Fig. 2.4A shows that t f C features a striking minimum, which gets higher but wider for longer T 2 . This can be fully understood from our analytical predictions. Indeed, when T 1 is varied starting from small values at fixed T 2 τ f R , different regimes can be distinguished:

• When T 1 τ d R τ f R T 2 , Eq. 2.3 yields t a R = T /(N µ 1 T 1 ) ≈ T 2 /(N µ 1 T 1 ) ∝ 1/T 1 . • When τ d R T 1 T 2 , Eq. 2.3 gives t a R = T /(N µ 1 τ d R ) ≈ T 2 /(N µ 1 τ d R ), which is independent from T 1 .
• As T 1 reaches and exceeds T 2 , the law

t a R = T /(N µ 1 τ d R ) still holds. It yields t a R ≈ T 1 /(N µ 1 τ d R ) ∝ T 1 when τ d R T 2 T 1 .
Hence, the minimum of t a R is T 2 /(N µ 1 τ d R ) ∝ T 2 and is attained for τ d R T 1 T 2 : it gets higher but wider for larger T 2 . In the opposite regime where T 2 τ d R τ f R , Fig. 2.4A shows that t f C also features a minimum as a function of T 1 :

• When T 1 T 2 τ d R , Eq. 2.3 yields t a R = T /(N µ 1 T 1 ) ≈ T 2 /(N µ 1 T 1 ) ∝ 1/T 1 . • When T 2 T 1 τ d R , the same law gives t a R = T /(N µ 1 T 1 ) ≈ 1/(N µ 1 ), which is independent from T 1 . • When T 2 τ d R
T 1 , R lineages eventually tend to go extinct, even once they have started growing thanks to an addition of antimicrobial (see Appendix, Section 2.5.5 and Fig. 2.8B). Then, alternations do not accelerate resistance evolution, and spontaneous valley crossing dominates (black horizontal line in Fig 2 .4A).

Hence, the minimum of t a R is 1/(N µ 1 ) and is attained for T 2 T 1 τ d R : then, the first R mutant that appears is likely to be rescued by the next addition of antimicrobial, thus driving the complete evolution of resistance in the population. For T 2 ≤ T 1 τ d R , t a R is between once and twice this minimum value.

A similar analysis can be conducted if T 2 is varied at fixed T 1 (Fig. 2.4B); it is presented in the Appendix, Section 2.5.5. In a nutshell, for asymmetric alternations, a striking minimum for the time of full evolution of resistance by a population occurs when both phases have durations of the same order. Interestingly, the minimum generally occurs when the phases of antimicrobial presence are shorter than those of absence, i.e. T 2 ≤ T 1 (except if T 2 τ d R ). In addition to this minimum, Fig. 2.4 also shows a regime of parameters, when T 1 T 2 and T 1 τ d R , where the evolution of resistance actually takes longer than fitness valley crossing in the absence of antimicrobial (black lines in Fig. 2.4). Comparing the timescales involved (see Appendix, Section 2.5.4) shows that in this regime, if T 2 T 1 δ/µ 2 , the alternation-driven process is faster than the valley-crossing process in the presence of alternations, and thus dominates, but it is slower than the valley-crossing process in the absence of antimicrobial. Hence, in this case, the drug actually slows down the evolution of resistance. Qualitatively, this is because the antimicrobial prevents mutants from arising when it is present.

Discussion

Main conclusions

Because of the generic initial fitness cost of resistance mutations, alternations of phases of absence and presence of antimicrobial induce a dramatic time variability of the adaptive landscape associated to resistance evolution, which alternates back and forth from a fitness valley to an ascending landscape. Using a general and minimal theoretical model which retains the key biological ingredients, we have shed light on the quantitative implications of these time-varying patterns of selection on the time it takes for resistance to fully evolve de novo in a homogeneous microbial population of fixed size. Combining analytical approaches and simulations, we showed that resistance evolution can be driven by periodic alternations of phases of absence and presence of an antimicrobial that stops growth. Indeed, the addition of antimicrobial is able to rescue resistant lineages that were destined to go extinct without antimicrobial.

We found that fast alternations strongly accelerate the evolution of resistance. In the limit of short alternation periods, the very first resistant mutant that appears is likely to ultimately lead to full resistance of the population, as it will generally be rescued by the next addition of antimicrobial before going extinct, which would be its most likely fate without antimicrobial. For larger periods T , the time needed for resistance to evolve increases linearly with T , until it reaches the spontaneous valley-crossing time with alternations, which constitutes an upper bound. Our complete stochastic model allowed us to investigate the impact of population size N , beyond the limit N 1/µ 1 addressed by deterministic models. We showed that the acceleration of resistance evolution is stronger for larger populations, eventually reaching a plateau in the deterministic limit. Over a large range of intermediate parameters, the time needed for the population to fully evolve resistance scales as T /N . These results are summed up in Fig. 2.5A.

For asymmetric alternations, featuring different durations T 1 and T 2 of the phases of absence and presence of antimicrobial, we have shed light on the existence of a minimum for the time taken by the population to fully evolve resistance. This striking minimum occurs when both phases have durations of the same order, generally with T 1 ≤ T 2 . Moreover, the minimum value reached for the time of resistance evolution decreases for shorter alternation periods. These results are summed up in Fig. 2.5B.

Context

Given the usual steepness of pharmacodynamic curves [START_REF] Regoes | Pharmacodynamic functions: a multiparameter approach to the design of antibiotic treatment regimens[END_REF], we have modeled the action of a biostatic antimicrobial in a binary way, with no growth inhibition under the MIC and full growth inhibition of S microorganisms above it (see Model). An analysis of the robustness of this approximation is presented in the Supplementary Material, Section 2.5.6, showing that it is appropriate if the rise time, i.e. the time needed for the fitness of sensitive microorganisms to switch from a low value to a high value and vice-versa when antimicrobial is removed or added, is short enough (see Fig. Here N = 10 3 , so the first resistant mutant appears after an average time T /(N µ 1 T 1 ) = 10 2 T /T 1 . evolutionary timescales at play, then the fitness versus time function is effectively binary.

Our model assumes that the size of the microbial population remains constant. While this is realistic in some controlled experimental setups, e.g. turbidostats [START_REF] Myers | CULTURE CONDITIONS AND THE DEVELOPMENT OF THE PHOTOSYNTHETIC MECHANISM : II. AN APPARATUS FOR THE CONTINUOUS CULTURE OF CHLORELLA[END_REF], microbial populations involved in infections tend to grow, starting from a small transmission bottleneck, and the aim of the antimicrobial treatment is to make them decrease in size and eventually go extinct. In the case of biostatic antimicrobials, which prevent bacteria from growing, populations can go extinct due to spontaneous and immune systeminduced death. Our model with constant population size should however be qualitatively relevant at the beginning and middle stages of a treatment (i.e. sufficiently after transmission and before extinction).

Implications for clinical and experimental situations

The situation where the phases of absence and presence of antimicrobial have similar durations (T 1 ≈ T 2 ) yields a dramatic acceleration of resistance evolution, and is unfortunately clinically realistic. Indeed, a goal in treatment design is that the serum concentration of antimicrobial exceeds the MIC for at least 40 to 50% of the time [START_REF] Jacobs | Optimisation of antimicrobial therapy using pharmacokinetic and pharmacodynamic parameters[END_REF], which implies that actual treatments may involve the alternations that most favor resistance evolution according to our results [START_REF] Regoes | Pharmacodynamic functions: a multiparameter approach to the design of antibiotic treatment regimens[END_REF][START_REF] Jacobs | Optimisation of antimicrobial therapy using pharmacokinetic and pharmacodynamic parameters[END_REF]. Besides, bacteria divide on a timescale of about an hour (yielding a τ d R of order of a few hours), and antimicrobial is often taken every 8 to 12 hours in treatments by the oral route, so the alternation period does not last for many generations: this is close to our worst-case scenario of short symmetric periods.

In this worst case scenario, full de novo resistance evolution can result from the appearance of the very first R mutant, which takes T /(N µ 1 T 1 ). Indeed, its lineage is likely to be rescued by the next addition of antimicrobial. Under the conservative assumption that only one resistance mutation is accessible, taking µ 1 ∼ 10 -10 , which is the typical mutation probability per nucleotide and per generation in Escherichia coli bacteria [START_REF] Wielgoss | Mutation rate dynamics in a bacterial population reflect tension between adaptation and genetic load[END_REF], and taking δ ∼ 0.1 [START_REF] Schrag | Adaptation to the fitness costs of antibiotic resistance in ¡i¿escherichia coli¡/i¿[END_REF], we find that this duration is less than a day (∼ 10 -20 generations) for N ∼ 10 9 , and a few days for N ∼ 10 8 , numbers that can be reached in infections [START_REF] Hughes | Evolutionary consequences of drug resistance: Shared principles across diverse targets and organisms[END_REF][START_REF] Abel Zur Wiesch | Population biological principles of drug-resistance evolution in infectious diseases[END_REF]. For such large populations, the fixation of the C (compensated) mutant will take more time, but once R is fixed (which takes ∼ 1 day after the appearance of the first R mutant), C is very likely to fix even if the treatment is stopped. This is due to the large number of compensatory mutations, which yields a much higher effective mutation rate toward compensation than toward reversion to sensitivity [START_REF] Levin | Compensatory mutations, antibiotic resistance and the population genetics of adaptive evolution in bacteria[END_REF][START_REF] Paulander | Multiple mechanisms to ameliorate the fitness burden of mupirocin resistance in salmonella typhimurium[END_REF][START_REF] Hughes | Evolutionary consequences of drug resistance: Shared principles across diverse targets and organisms[END_REF]. In addition, many mutations to resistance are often accessible, yielding higher effective µ 1 , e.g. µ 1 ∼ 10 -8 for rifampicin resistance in some wild isolates of E. coli [START_REF] Sousa | Potential for adaptation overrides cost of resistance[END_REF], meaning that smaller populations can also quickly become resistant in the presence of alternations. Recall that we are only considering de novo resistance evolution, without pre-existent resistant mutants, or other possible sources of resistance, such as horizontal gene transfer, which would further accelerate resistance acquisition.

In summary, an antimicrobial concentration that drops below the MIC between each intake can dramatically favor de novo resistance evolution. More specifically, we showed that the worst case occurs when T 1 ≤ T 2 , which would be the case if the antimicrobial concentration drops below the MIC relatively briefly before each new intake. Our results thus emphasize how important it is to control for such apparently innocuous cases, and constitute a striking argument in favor of the development of extendedrelease antimicrobial formulations [START_REF] Gao | Recent advances in materials for extended-release antibiotic delivery system[END_REF].

While the parameter range that strongly accelerates resistance evolution should preferably be avoided in clinical situations, it could be tested and har-nessed in evolution experiments. Again, these parameters are experimentally accessible. Controlled variations of antimicrobial concentration are already used experimentally, in particular in morbidostat experiments [START_REF] Toprak | Evolutionary paths to antibiotic resistance under dynamically sustained drug stress[END_REF], where the population size is kept almost constant, which matches our model. In Ref. [START_REF] Toprak | Evolutionary paths to antibiotic resistance under dynamically sustained drug stress[END_REF], a dramatic and reproducible evolution of resistance was observed in ∼ 20 days when periodically adjusting the drug concentration to constantly challenge E. coli bacteria. Given our results, it would be interesting to test whether resistance evolution could be made even faster by adding drug in a turbidostat with a fixed periodicity satisfying

T 1 ≤ T 2 τ d R .
2.5 Appendix

Fixation probabilities and fixation times in the Moran process

Here, we discuss in detail the fixation probabilities and mean fixation times in the Moran process, which are used throughout the main text. These quantities are already known [START_REF] Ewens | Mathematical Population Genetics 1: Theoretical Introduction[END_REF][START_REF] Foster | Stochastic evolutionary game dynamics[END_REF], but we present a derivation for the sake of pedagogy and completeness. Our derivation is based on the general formalism of first passage times, and gives the same results as those obtained in the literature, often using other methods [START_REF] Ewens | Mathematical Population Genetics 1: Theoretical Introduction[END_REF][START_REF] Foster | Stochastic evolutionary game dynamics[END_REF]. Next, we use the general expressions obtained to express the various fixation probabilities and fixation times used in the main text.

The Moran process

The Moran model [START_REF] Ewens | Mathematical Population Genetics 1: Theoretical Introduction[END_REF][START_REF] Moran | Random processes in genetics[END_REF] is a simple stochastic process used to describe the evolution of the composition of asexual populations of finite and constant size. It allows one to incorporate variety-increasing processes such as mutation and variety-reducing processes such as natural selection.

In the Moran model, at each time step, an individual is chosen at random to reproduce and another one is chosen to die (see Figure 2.6). Hence, the total number of individuals in the population stays constant. Note that we will consider that the same individual can be selected to reproduce and die at the same step. Natural selection can be introduced by choosing the individual that reproduces with a probability proportional to its fitness. To implement mutations upon division, one can allow the offspring to switch type with a certain probability at each step. When a mutant arises within the Moran model at constant fitness, its lineage can either disappear or fix in the population, i.e. take over the whole population. The outcome is not fully determined by fitness differences as in a deterministic case, but also by stochastic fluctuations, also known as genetic drift. Here, we focus on the evolution of population composition under genetic drift and selection alone. In the rare mutation regime, these processes are much faster than the time between the occurrence of two mutations, so mutation can be neglected during the process of fixation of one type. The Moran model allows us to compute explicit expressions for quantities such as fixation probabilities and fixation times [START_REF] Ewens | Mathematical Population Genetics 1: Theoretical Introduction[END_REF][START_REF] Taylor | A symmetry of fixation times in evolutionary dynamics[END_REF] (see below).

Let us consider a population of N individuals of two types A and B, which have fitnesses f A and f B , respectively. We denote the number of A individuals by j. Thus N -j represents the number of B individuals. Let us study the evolution of j at one step of the Moran process (for an example, see Figure 2.6). The transition probabilities associated to the Moran process read [START_REF] Ewens | Mathematical Population Genetics 1: Theoretical Introduction[END_REF]:

           Π j→j+1 = N -j N f A j f A j + f B (N -j) Π j→j-1 = j N f B (N -j) f A j + f B (N -j) Π j→j = 1 -Π j→j+1 -Π j→j-1 .
(2.4)

The Moran process is a discrete-time Markov process, since the probabilities of states j after one step only depend upon the present value of j. Let us take the limit of continuous time and write the master equation Ṗ = R A P giving the probability of being at state j at time t:

d dt        P 0 P 1 P 2 . . . P N        =            -Π 0→1 Π 1→0 0 • • • 0 Π 0→1 -(Π 1→0 + Π 1→2 ) Π 2→1 (0) . . . 0 Π 1→2 -(Π 2→1 + Π 2→3 ) . . . 0 . . . (0) . . . . . . Π N →N -1 0 • • • 0 Π N -1→N -Π N →N -1                   P 0 P 1 P 2 . . . P N        . (2.5)
This Markov chain has two absorbing states, namely j = 0 and j = N , which correspond to the fixation of B and A individuals, respectively. Once these states are reached, no more changes can occur, in the absence of mutation.

It follows that all the components of the first and the last columns of R A equal to 0 (see Eq. 2.5), so R A is not invertible. In the following, we will denote by R A the reduced transition rate matrix in which the rows and the columns corresponding to the absorbing states (j = 0, j = N ) are removed, and by R -1 A its inverse. Let us note that R A is a tridiagonal matrix, which allows for major simplifications of analytical calculations [START_REF] Ewens | Mathematical Population Genetics 1: Theoretical Introduction[END_REF]. Note that in order to obtain the transition rate matrix associated to B individuals, one just needs to apply the reversal j ↔ N -j. This corresponds to using the matrix R B = JR A J where J is the anti-identity matrix. For instance, in 2 dimensions, J = 0 1 1 0 .

General fixation probabilities and fixation times

Definitions. The fixation probability φ A j 0 represents the probability that A individuals finally succeed and take over the population, starting from j = j 0 individuals of type A. In particular, φ A 0 = 0 and φ A N = 1. Similarly, φ B j 0 is the fixation probability of the B individuals, still starting from j = j 0 individuals of type A.

Mean fixation times are the mean times to reach one of the absorbing states. The unconditional fixation time t j 0 is the average time until fixation in either j = 0 or j = N , when starting from a number j = j 0 of A individuals. The conditional fixation time t A j 0 corresponds to the average time until fixation in j = N , when starting from j 0 , provided that type A fixes. Note that in what follows, we will express the fixation times in numbers of steps of the Moran process. Conversion to generations can then be performed by dividing the number of Moran steps by N .

In the following, we present a derivation of the fixation probabilities and of the fixation times in the Moran process [START_REF] Ewens | Mathematical Population Genetics 1: Theoretical Introduction[END_REF][START_REF] Foster | Stochastic evolutionary game dynamics[END_REF] that uses the general formalism of mean first passage times [START_REF] Sekimoto | Stochastic Energetics[END_REF].

Fixation probabilities. Assuming that at t = 0, the system is at state j = j 0 , let us focus on the fixation probability φ A j 0 of the A type in the population. The stochastic process stops at the time τ F P when j fixes, i.e. first reaches one of the absorbing states {j = 0, j = N }. Hence, integrating over all values of τ F P , under the condition that fixation finally occurs in j = N , yields

φ A j 0 = ∞ 0 p( τ F P ∈ [t, t+dt]|j 0 , j ∞ = N ) = Π N -1→N ∞ 0 P N -1 (t)dt . (2.6)
In the last expression, we have taken advantage of the fact that the only way to fix in j = N between t and t + dt is to be in state j = N -1 at time t and then to transition from N -1 to N (see Eq. 2.5). We have thus introduced the probability P N -1 (t) of being in state j = N -1 at time t, starting in state j = j 0 at time 0. More generally, the probability P i (t) can be considered.

Integrating the Master equation Eq. 2.5 to determine P i (t), with the initial condition P i (0) = δ i j 0 , where δ i j 0 denotes the Kronecker delta, which is equal to 1 if i = j 0 and 0 otherwise, yields

φ A j 0 = -Π N -1→N ( R -1 A ) N -1 j 0 . (2.7)
A similar reasoning gives the fixation probability φ B j 0 of the B type, still starting from j 0 individuals of type A and N -j 0 individuals of type B:

φ B j 0 = -Π 1→0 ( R -1 A ) 1 j 0 . (2.8)
These two probabilities satisfy φ A j 0 + φ B j 0 = 1 since there are 2 absorbing states in the process.

Mean fixation times.

Let us now focus on the mean fixation times, still assuming that at t = 0, the system is at state j = j 0 . The probability that fixation in one of the absorbing states {j = 0, j = N } occurs between t and t + dt reads:

p( τ F P ∈ [t, t + dt] | j 0 ) = N -1 i=1 P i (t) - N -1 i=1 P i (t + dt) = - N -1 i=1 dP i dt dt , (2.9)
where, as above, P i (t) represents the probability of being in state i at time t starting in j 0 at time 0 (note that the initial condition j 0 is omitted for brevity). Thus, the unconditional fixation time can be expressed as:

t j 0 = E[ τ F P | j 0 ] = ∞ 0 t p( τ F P ∈ [t, t + dt] | j 0 ) (2.10) = - N -1 i=1 ∞ 0 t dP i dt dt = N -1 i=1 ∞ 0 P i (t) dt . (2.11)
Here, we used Eq. 2.9, where the sums run over all the states that are not absorbing (1 ≤ i ≤ N -1). We also performed an integration by parts, and used [t P i (t)] ∞ 0 = 0 for 1 ≤ i ≤ N -1, which holds because the probability of reaching an absorbing state of the Markov chain tends to 1 as t → ∞. Integrating the Master equation Eq. 2.5 to determine P i (t), with the initial condition P i (0) = δ i j 0 , gives

t j 0 = - N -1 i=1 ( R -1 A ) i j 0 .
(2.12)

To express the conditional fixation time t A j 0 of type A, starting from j 0 A individuals, we need to take into account the condition that fixation finally occurs in state j = N :

p( τ F P ∈ [t, t + dt] | j 0 , j ∞ = N ) = N -1 i=1 p(i | j 0 , j ∞ = N )(t) - N -1 i=1 p(i | j 0 , j ∞ = N )(t + dt) . (2.13)
The Bayes relation gives:

p(j | j 0 , j ∞ = N ) = φ A j φ A j 0 P j . (2.14)
By using the same method as for the unconditional fixation time, one obtains:

t A j 0 = - 1 φ A j 0 N -1 i=1 φ A i ( R -1 A ) i j 0 . (2.15)
Similarly, the conditional fixation time of the B type, starting from j 0 A individuals, reads:

t B j 0 = - 1 φ B j 0 N -1 i=1 φ B N -i ( R -1 B ) i N -j 0 . (2.16)
It is straightforward to verify that Eqs. 2.12, 2.15 and 2.16 are linked by the relation:

t j 0 = φ B j 0 t B j 0 + φ A j 0 t A j 0 .
(2.17)

Neutral drift. Let us first consider the case without selection f A = f B . In this case, the Moran process can be seen as a non-biased random walk, since individuals of both types are equally likely to be picked for reproduction and death. Fixation eventually happens due to fluctuations. This process, called neutral drift [START_REF] Ewens | Mathematical Population Genetics 1: Theoretical Introduction[END_REF] corresponds to diffusion in physics. The transition rates of the system (2.4) simplify as follows:

     Π j→j+1 = Π j→j-1 = j(N -j) N 2 Π j→j = 1 -2 j(N -j) N 2 .
(

Note that here, j can denote the number of A or B individuals indifferently. Indeed, the symmetry j ↔ N -j entails R A = R B = R, and the transition rate matrix is centrosymmetric, i.e. R = JRJ. For consistency, we will continue to call j the number of A individuals. The fixation probability φ A j 0 can be obtained from Eq. 2.7. It involves elements of the inverse of the transition rate matrix. Solving R R -1 = I, where I is the identity matrix, gives

( R -1 ) N -1 i = - i N N -1 for 1 ≤ i ≤ N -1 . (2.19)
Hence,

φ A j 0 = j 0 N . (2.20)
Taking advantage of the centrosymmetry of R (see above), a property which transfers to R and R -1 , and entails ( R -1 ) 1 j 0 = ( R -1 ) N -1 N -j 0 , we can apply Eq. 2.8, yielding

φ B j 0 = N -j 0 N . ( 2

.21)

Note that φ A j 0 + φ B j 0 = 1, as expected. Let us now express the fixation times, focusing on the fate of a single mutant of type B, which corresponds to j 0 = N -1. To compute the unconditional fixation time t N -1 , we again need elements of the inverse of the transition rate matrix (see Eq. 2.12), which are given by

( R -1 ) i N -1 = - N N -i . (2.22)
Using Eqs. 2.12 and 2.22, we obtain:

t N -1 = N N -1 i=1 1 i . (2.23)
Similarly, using Eqs. 2.15, 2.20 and 2.22, we obtain the conditional fixation time of type A:

t A N -1 = N 2 N -1 N i=2 1 i . (2.24)
Finally, using Eqs. 2.16, 2.20 and 2.22, and making use of the centrosymmetry of R -1 (see above), yields the conditional fixation time of type B:

t B N -1 = N (N -1) . (2.25)
Selection. Let us now study the more general case involving selection. For this, let us consider two types A and B having different fitnesses f A and f B , and let us introduce γ = f A /f B . Note that with selection, the transition rate matrices R A and R B = JR A J are different. In order to compute the fixation probability φ A j 0 , we need some elements of the inverse of the transition rate matrix R -1

A , which are given by:

( R -1 A ) N -1 i = - N N -1 1 -γ -i 1 -γ -N N -1 + γ -1 for 1 ≤ i ≤ N -1 . (2.26)
Then, using the previous result and Eq. 2.7, one obtains:

φ A j 0 = 1 -γ -j 0 1 -γ -N , (2.27)
and φ A j 0 + φ B j 0 = 1 yields:

φ B j 0 = 1 -γ N -j 0 1 -γ N .
(2.28)

Let us now turn to the fixation times. According to Eq. 2.12, we need to compute other elements of the inverse of the transition rate matrix R -1

A . Those satisfy:

( R -1 A ) i N -1 = N i(N -i) 1 -γ i 1 -γ N (i -iγ -N ) for 1 ≤ i ≤ N -1.
(2.29)

Using Eqs. 2.12 and 2.29, the unconditional fixation time reads:

t N -1 = N 1 -γ N N -1 i=1 (N + iγ -i)(1 -γ i ) i(N -i) . (2.30)
To compute the conditional fixation time t A N -1 , we substitute Eqs. 2.27 and 2.29 in Eq. 2.15, obtaining:

t A N -1 = N (1 -γ N )(1 -γ 1-N ) N -1 i=1 (N + iγ -i)(1 -γ i )(1 -γ -i ) i(N -i) . (2.31)
A similar reasoning can be used to obtain the conditional fixation time t B N -1 starting from Eq. 2.16. In order to express the required (

R -1 B ) j 1 , we combine the relation R B = J R A J, which implies R -1 B = J R -1
A J, together with Eq. 2.29, and obtain

( R -1 B ) i 1 = N i(N -i) 1 -γ N -i 1 -γ N (iγ -i -N γ) for 1 ≤ i ≤ N -1. (2.32)
This finally yields

t B N -1 = N (1 -γ N )(1 -γ) N -1 i=1 (N + iγ -i)(1 -γ i )(1 -γ N -i ) i(N -i) .
(2.33)

Fixation probabilities and fixation times used in the main text

Let us now make an explicit link between the general expressions obtained above and the fixation probabilities and fixation times used in the main text.

Fixation probabilities. First, in the main text, p SR represents the probability that a single resistant (R) mutant fixes without antimicrobial in a population of size N where all other individuals are of type S. Without antimicrobial, f S = 1 and f R = 1 -δ. Considering S as type A and R as type B, we have γ = f S /f R = 1/(1 -δ), and our initial condition is j 0 = N -1. Hence, Eq. 2.28 yields

p SR = φ R N -1 = 1 -(1 -δ) -1 1 -(1 -δ) -N . (2.34)
In particular, in the effectively neutral case where δ 1 and N δ 1, it yields

p SR ≈ -δ 1 -e -N log(1-δ) ≈ -δ 1 -e N δ ≈ 1 N , (2.35)
i.e. we recover the result of the neutral case δ = 0 (see Eq. 2.20). Conversely, in the regime where δ 1 and N δ 1, Eq. 2.34 yields

p SR ≈ -δ 1 -e N δ ≈ δe -N δ .
(2.36)

Second, p RC denotes the fixation probability of a single C individual in a population of size N where all other individuals are of type R. Independently of antimicrobial presence, f R = 1 -δ and f C = 1. Considering R as type A and C as type B, we have γ = f R /f C = 1 -δ, and our initial condition is j 0 = N -1. Hence, Eq. 2.28 yields

p RC = φ C N -1 = δ 1 -(1 -δ) N . (2.37)
In particular, in the effectively neutral case where δ 1 and N δ 1, it yields

p RC = δ 1 -e N log(1-δ) ≈ δ 1 -e -N δ ≈ 1 N , (2.38)
i.e. we again recover the result of the neutral case δ = 0 (see Eq. 2.20).

Conversely, in the regime where δ 1 and N δ 1, Eq. 2.37 yields

p RC ≈ δ 1 -e -N δ ≈ δ . (2.39)
Finally, p SC denotes the fixation probability of a single C mutant in a population of S individuals, without antimicrobial. In this case, f S = f C = 1, so we are in the neutral case, and Eq. 2.20 yields p SC = 1/N . Fixation times. First, τ d R denotes the average time it takes for the lineage of a single R mutant to disappear in the absence of antimicrobial. Hence, it is equal to the fixation time of the S type in a population that initially contains N -1 individuals of type S and 1 individual of type R. Considering S as type A and R as type B, we have γ = f S /f R = 1/(1 -δ) without antimicrobial, and our initial condition is

j 0 = N -1, so τ d R is equal to t S N -1 /N (see Eq. 2.

31). Recall that t S

N -1 needs to be divided by the population size N because we expressed it in numbers of steps of the Moran process, while τ d R has to be expressed in numbers of generations. While the general formula Eq. 2.31 is rather complex, in the neutral case δ = 0, it reduces to the much simpler expression in Eq. 2.24, which yields

τ d R ≈ log N for N 1. For δ > 0, τ d
R is shorter than in the neutral case, because the R mutants are outcompeted by S individuals. Note that a good approximation to the exact formula in Eq. 2.31 can be obtained within the diffusion approach [START_REF] Ewens | Mathematical Population Genetics 1: Theoretical Introduction[END_REF] (see the Fokker-Planck equation below).

Second, τ f R denotes the average time needed for the R mutants take over with antimicrobial, starting from one R mutant and N -1 S individuals.

Considering S as type A and R as type B, we have γ = f S /f R = 0 with antimicrobial, and our initial condition is [START_REF] Kussell | Polymer-population mapping and localization in the space of phenotypes[END_REF], with γ = 0. Using Eq. 2.33, we obtain

j 0 = N -1. Then τ f R is equal to t R N -1 /N (see Eq. 2.
τ f R = N -1 i=1 1 i , (2.40)
which entails τ f R ≈ log N for N 1. Finally, τ f C denotes the average time needed for the C mutants to take over, starting from one C mutant and N -1 R individuals. Considering R as type A and C as type B, we have γ = f R /f C = 1 -δ, independent whether antimicrobial is present or absent, and our initial condition is

j 0 = N -1. Hence, τ f C is given by t C N -1 /N (see Eq. 2.33). In the neutral case δ = 0, t C N -1
reduces to Eq. 2.25, and thus τ f C ≈ N for N 1. For δ > 0, it is shorter, as selection favors the fixation of C, and again a good approximation to the exact formula in Eq. 2.33 can be obtained within the diffusion approach [START_REF] Ewens | Mathematical Population Genetics 1: Theoretical Introduction[END_REF] (see the Fokker-Planck equation below).

Large populations: deterministic limit

If stochastic effects are neglected, the dynamics of a microbial population can be described by coupled differential equations on the numbers of individuals of each genotype [START_REF] Ewens | Mathematical Population Genetics 1: Theoretical Introduction[END_REF]. This deterministic approach is appropriate if the number N of competing microorganisms satisfies N µ 1 1 [START_REF] Rouzine | Transition between stochastic evolution and deterministic evolution in the presence of selection: General theory and application to virology[END_REF]. Here, we derive and study the deterministic limit of the complete stochastic model studied in the main text.

From the stochastic model to the deterministic limit

Here, we present a full derivation of the deterministic limit of the stochastic model based on the Moran process (see above). This derivation closely follows those of Refs. [START_REF] Traulsen | Coevolutionary dynamics: From finite to infinite populations[END_REF][START_REF] Foster | Stochastic evolutionary game dynamics[END_REF] and is presented here for the sake of pedagogy and completeness. Starting from the Master equation of our stochastic model, we obtain a Fokker-Planck equation, corresponding to the diffusion approximation [START_REF] Ewens | Mathematical Population Genetics 1: Theoretical Introduction[END_REF], and then a deterministic differential equation, in the limits of increasingly large population sizes.

Let us first recall the Master equation corresponding to the Moran process, where j denotes the number of A individuals and N -j the number of B individuals, as above:

dP j (t) dt =P j-1 (t) Π j-1→j + P j+1 (t) Π j+1→j -P j (t) (Π j→j-1 + Π j→j+1 ) . (2.41)
The notations in Eq. 2.41 are the same as in the previous section, and time is expressed in number of steps of the Moran process. Let us now introduce the reduced variables x = j/N , τ = t/N , as well as ρ(x, τ ) = N P j (t). Then, since one step of the Moran process occurs each time unit, Eq. 2.41 can be rewritten as:

ρ(x, τ + 1/N ) -ρ(x, τ ) = ρ(x -1/N, τ ) Π + (x -1/N ) + ρ(x + 1/N, τ ) Π -(x + 1/N ) -ρ(x, τ ) Π -(x) + Π + (x) , (2.42)
with

Π -(x) = Π j→j-1 = f B x(1 -x) f A x + f B (1 -x) and Π + (x) = Π j→j+1 = f A x(1 -x) f A x + f B (1 -x)
.

(2.43)

Diffusion approximation. For N 1, considering that jumps are small at each step of the Moran process, i.e. 1/N

x and 1/N τ , the probability density ρ(x, τ ) and the transition probabilities Π ± (x) can be expanded in a Taylor series around x and τ . This expansion, known as a Kramers-Moyal expansion [START_REF] Gardiner | Handbook of Stochastic Methods for Physics[END_REF], yields, to first order in 1/N :

∂ρ(x, τ ) ∂τ = - ∂ ∂x [ρ(x, τ )a(x)] + 1 2 ∂ 2 ∂x 2 ρ(x, τ )b 2 (x) (2.44) with a(x) = Π + (x) -Π -(x) and b 2 (x) = Π + (x) + Π -(x) N .
(2.45)

Eq. 2.44 is known as a diffusion equation, or a Fokker-Planck equation, or a Kolmogorov forward equation [START_REF] Gardiner | Handbook of Stochastic Methods for Physics[END_REF], and a(x) corresponds to the selection term (known as the drift term in physics), while b 2 (x) corresponds to the genetic drift term (known as the diffusion term in physics). Deterministic limit. In the limit N → ∞, retaining only the zerothorder terms in 1/N , Eq. 2.44 reduces to:

∂ρ(x, τ ) ∂τ = - ∂ ∂x [ρ(x, τ )a(x)] . (2.46)
Let us focus on the average value of x, denoted by x . Using Eq. 2.44 yields

d x dτ = 1 0 ∂ρ(x, τ ) ∂τ x dx = - 1 0 ∂ ∂x [ρ(x, τ ) a(x)] dx (2.47) = -[x ρ(x, τ ) a(x)] 1 0 + 1 0 ρ(x, τ ) a(x) dx (2.48) = a(x) (2.49)
The first term of right hand side of Eq. 2.48 vanishes because a(0) = a(1) = 0. In the limit N → ∞, the distribution of x is very peaked around its mean, so x ≈ x and a(x) ≈ a(x), yielding:

dx dτ = x(1 -x) ∆f f , (2.50)
where ∆f = f A -f B denotes the difference of the fitnesses of the two types, while f

= f A x + f B (1 -x)
is the average fitness in the population. Eq. 2.50 is an ordinary differential equation known as the adjusted replicator equation [START_REF] Traulsen | Coevolutionary dynamics: From finite to infinite populations[END_REF]. Recall that τ corresponds to the number t of steps of the Moran process divided by the total number N of individuals in the population. Hence, τ is the time in numbers of generations used in the main text, and Eq. 2.50 is the proper deterministic limit for our stochastic process. Note that in the framework of the Moran process, fitnesses are only relative. If one wanted to account for absolute fitness effects, so that a whole population reproduces faster if its average fitness is higher, one would need to include an additional rescaling of time τ = τ / f . Note that if f is constant, this rescaling yields a standard replicator equation:

dx dτ = x(1 -x)∆f . (2.51)

Deterministic description of the evolution of antimicrobial resistance

System of ordinary differential equations. Let us now come back to our model of the evolution of antimicrobial resistance, with three types of microorganisms (see Fig. 2.1A). In the limit of large populations, the complete stochastic model described in the main text will converge to a deterministic system of ordinary differential equations, as demonstrated above. Generalizing Eq. 2.51, by considering three types of individuals and taking into account mutations, yields a system of replicator-mutator equations [START_REF] Foster | Stochastic evolutionary game dynamics[END_REF]:

     ṡ = f S (1 -µ 1 )s -f s ṙ = f R (1 -µ 2 )r + f S µ 1 s -f r s + r + c = 1 , (2.52)
where s, r and c are the population fractions of S (sensitive), R (resistant) and C (resistant-compensated) microorganisms, respectively, while f S , f R and f C denote their fitnesses, f = f S s + f R r + f C c denotes the average fitness in the population, and dots denote time derivatives. To illustrate that Eq. 2.52 generalizes Eq. 2.51, consider the case where c = 0 and µ 1 = 0: the first equation of Eq. 2.51 then yields ṡ

= f S s -[f S s + f R (1 -s)]s = s(1 -s)(f S -f R ).
As demonstrated above, the deterministic limit of our stochastic model yields adjusted replicator equations (see Eq. 2.50). For the sake of simplicity, the present analytical discussion focuses on standard replicator equations (see Eq. 2.51).

The system of equations Eq. 2.52 only concerns population fractions, and constitutes the large-population limit N → ∞ of our stochastic model at constant N . It is mathematically convenient to note that the same equations are obtained in the case of a population in which microorganisms have an exponential growth. This model, which enables us to recover the system 2.52, is governed by the following system of linear differential equations:

     ṄS = f S (1 -µ 1 )N S ṄR = f R (1 -µ 2 )N R + f S µ 1 N S ṄC = f C N C + f R µ 2 N R , (2.53)
where N S , N R and N C are the numbers of sensitive, resistant and resistantcompensated microorganisms, respectively. It is straightforward to show that the population fractions obtained from this exponential growth model satisfy Eq. 2.52: hence, this simple deterministic model allows one to understand the evolution of large microbial populations described by the Moran model (even though the total population is constant in the Moran model).

Analytical resolution. Being linear, the system in Eq. 2.53 is straightforward to solve analytically:

  N S N R N C   =    0 0 1 0 1 f S µ 1 f S (1-µ 1 )-f R (1-µ 2 ) 1 f R µ 2 f R (1-µ 2 )-f C f S µ 1 f R µ 2 (f S (1-µ 1 )-f R (1-µ 2 ))(f S (1-µ 1 )-f C )      β 1 e f C t β 2 e f R (1-µ 2 )t β 3 e f S (1-µ 1 )t   (2.54)
where β 1 , β 2 and β 3 can be expressed from the initial conditions N S (0), N R (0) and N C (0). The fractions s, r and c can then be obtained from this solution, e.g. through s = N S /(N S + N R + N C ).

Limiting regimes and characteristic timescales. As in the main text, we are going to focus on the case where the population initially only comprises sensitive microorganisms, i.e. s(0) = 1. In the case of periodic alternations of absence and presence of antimicrobial, a small fraction of R microorganisms will appear within the first half-period without antimicrobial. The subsequent evolution of the population composition can be separated into three successive regimes. In the first one, it suffices to consider S and R microorganisms, as the fraction of C is negligible, because the appearance of C requires an additional mutation. The second regime is more complex, and involves all three types of microorganisms, as the growth of C microorganisms makes the fractions of S and R microorganisms decrease. Then, provided that antimicrobial has been present for a sufficient time, the fraction of S microorganisms becomes negligible, because they cannot divide with antimicrobial. Hence, the third regime only involves R and C microorganisms, and does not depend on the presence or absence of antimicrobial, because the fitnesses of R and C are unaffected. Here, we determine analytically the main timescales involved in these first and third regimes.

First regime: S vs. R. Let us consider the first regime where there are almost only S and R microorganisms. We are interested in the population fractions s(t) and r(t), with s(t) + r(t) ≈ 1. Eq. 2.52 then gives:

ṡ = s (∆f 1 -s ∆f 2 ) , (2.55)
where we have defined ∆f

1 = f S (1 -µ 1 ) -f R and ∆f 2 = f S -f R . Note that we expect ∆f 1 ≈ ∆f 2 ,
s(t) = s 0 e ∆f 1 t 1 -s 0 ∆f 2 ∆f 1 + s 0 ∆f 2 ∆f 1 e ∆f 1 t , (2.56)
where s 0 is the fraction of S microorganisms at the beginning of the first regime (taken as t = 0 here). In the presence of antimicrobial (f S = 0), the previous expression can be simplified, using ∆f

1 = ∆f 2 = -(1 -δ).
This allows us to identify the characteristic time τ 1 of the decay of s, as R microorganisms take over:

τ 1 = -1 ∆f 1 = 1 1 -δ . (2.57)
The duration t 1 of the first regime in the presence of antimicrobial is governed by τ 1 . More precisely, Eq. 2.56 yields:

t 1 = 1 1 -δ log s 0 (1 -s 1 ) s 1 (1 -s 0 ) , (2.58)
where s 1 is the fraction of S microorganisms at the end of the first regime, at which point the fraction of C microorganisms is no longer negligible.

Third regime: R vs. C. Let us now turn to the third regime, assuming that antimicrobial has been present for a long enough time to allow S microorganisms to become a small minority. Eq. 2.52 then gives:

ṙ = r (∆f 3 -r ∆f 4 ) , (2.59
)

with ∆f 3 = f R (1 -µ 2 ) -f C = -δ(1 -µ 2 ) -µ 2 and ∆f 4 = f R -f C = -δ,
independently of whether antimicrobial is present or not. Again, we generally expect ∆f 3 ≈ ∆f 4 . The solution of Eq. 2.59 reads

r(t) = r 2 (1 -µ 2 + µ 2 /δ) e -(δ(1-µ 2 )+µ 2 )t 1 -µ 2 + µ 2 /δ -r 2 + r 2 e -(δ(1-µ 2 )+µ 2 )t ≈ µ 2 1 µ 2 δ r 2 e -δt 1 -r 2 + r 2 e -δt , (2.60)
where r 2 is the fraction of R microorganisms at the beginning of the third regime (taken as t = 0 here). Hence, the characteristic time τ 3 of the decay of r reads:

τ 3 = 1 µ 2 + δ(1 -µ 2 ) ≈ µ 2 1 µ 2 δ 1 δ . (2.61)
The duration t 3 of the third regime in the presence of antimicrobial is governed by τ 3 . More precisely, Eq. 2.60 yields:

t 3 ≈ µ 2 1 µ 2 δ 1 δ log r 2 (1 -r 3 ) r 3 (1 -r 2 ) . (2.62)
where r 3 is the fraction of R microorganisms at the end of this regime, when C has become dominant in the population. Note that the timescales obtained here are governed by selection (through the relevant fitness differences δ and 1 -δ). This stands in contrast with the results from our stochastic model (see main text) where mutation rates are crucial, especially through the waiting time before resistant mutants appear. In the deterministic description considered here, small fractions of resistant mutants appear right away, so this consideration is irrelevant. However, mutation rates come into play in the durations of the different regimes within the deterministic model, through the fractions of each type of microorganisms at the beginning and at the end of each regime, but with a weak logarithmic dependence (see Eqs. 2.58-2.62).

Comparison of stochastic and deterministic results

As in the main text, we now focus on the impact of a periodic presence of antimicrobial on the time it takes for a population to fully evolve resistance. For large microbial populations satisfying N 1/µ 1 , we wish to check that the system of differential equations in Eq. 2.52 recovers the results obtained with our stochastic model. To this end, we solve the system in Eq. 2.52 numerically in the case of a periodic presence of antimicrobial. Note that complete fixation of a genotype does not happen in the deterministic model. Conversely, in the stochastic model, for a population of size N , the fixation of C corresponds to the discrete Moran step where the fraction c jumps from 1 -1/N to 1. Hence, for our comparison between the deterministic results and the stochastic ones obtained for N microorganisms, we consider that C effectively fixes in the deterministic model when the fraction c reaches 1 -1/N . In addition, for exactness, we use a numerical resolution of the system in Eq. 2.52 where time is rescaled through t → t/ f . Indeed, the proper deterministic limit of our stochastic model corresponds to modified replicator equations, such as Eq. 2.50 (see above). Fig. 2.7 shows that the deterministic model yields results very close to those obtained through the stochastic model, in the case of large population sizes N ≥ 1/µ 1 . We recover the regimes described in the main text, with a plateau for short periods, and a linear dependence on T for larger ones. Moreover, the relative error made by using the deterministic model instead of the stochastic one is less than ∼ 20% (resp. ∼ 10%) for all data points with N = 10 5 (resp. N = 10 6 ) in Fig. 2.7.

Total time of full resistance evolution

Total time of full resistance evolution

Period T Period T Let us now present an analytical approximation for t f C , based on the different timescales computed previously. As the population is initially only composed of S microorganisms, they will remain dominant during the first half-period without antimicrobial, since they are fitter than R mutants (and we assume that T /2 is not large enough to extend to the point where C starts being important, which would then correspond to the valley crossing case). Afterwards, R microorganisms start growing fast during the second half-period. Note that in the deterministic case, there is always a nonzero fraction of resistant microorganisms at the end of the first half-period without antimicrobial, contrary to the stochastic case studied in the main text.

Hence, we compute the fraction s 0 = s(T /2) of S microorganisms at the end of the first half period, by using results for the above-described first regime without antimicrobials. This fraction s 0 = s(T /2) is then taken as the initial condition of the first regime with antimicrobial. Then, for simplicity, we assume that s decays until it reaches s 1 ≈ 0.1 (so r 1 ≈ 0.9), while remaining in the first regime described above, in the presence of antimicrobial. We then assume the duration of the second regime is negligible, and consider that the third regime process starts right away, with a fraction r 2 ≈ 0.9. As explained above, we consider that the third regime ends upon effective fixation of C, i.e. when c reaches 1 -1/N , which implies r 3 = 1/N . Using Eqs. 2.58 and 2.62, we obtain:

t f C ≈ T 2 + 1 1 -δ log 9 s(T /2) 1 -s(T /2) + 1 δ log (9(N -1)) , (2.63)
where s(T /2) is obtained by using Eq. 2.56 in the absence of antimicrobial:

s(T /2) = e (µ 2 +δ(1-µ 2 )-µ 1 )T /2 1 -µ 2 +δ(1-µ 2 ) µ 2 +δ(1-µ 2 )-µ 1 1 -e (µ 2 +δ(1-µ 2 )-µ 1 )T /2 . ( 2.64)
Eqs. 2.63-2.64 yield good approximations of the analytical results obtained by numerical resolution of Eq. 2.52, as can be seen on Fig. 2.7. More precisely, the relative error made by using this approximation instead of the full numerical resolution is less than ∼ 13% for all parameters in Fig. 2.7.

For T 2/δ, Eq. 2.64 reduces to s(T /2)

≈ 1 -µ 1 /[µ 2 + δ(1 -µ 2 )] ≈ 1 -µ 1 /δ,
so only the first term in Eq. 2.63 then depends on T . Hence, this term becomes dominant for large T , yielding t f C ≈ T /2 in this limit. This asymptotic behavior is again consistent with our predictions from the stochastic model (see main text). The horizontal purple solid line at large T in Fig. 2.3A, and the horizontal solid lines at large N in Fig. 2.3B, both correspond to t f C ≈ T /2, showing excellent agreement with our stochastic simulations as well.

Conversely, for small periods, the first term of Eq. 2.63 can be neglected, so the dependence on T of t f C is weaker (Eq. 2.64 reduces to s(T /2) ≈ 1 -µ 1 T /2 for T 2/δ, so a weak logarithmic dependence on T remains, due to the second term of Eq. 2.63). It is interesting to note that the third term of t f C in Eq. 2.63 also increases logarithmically with N . This stands in contrast with the case of smaller populations, where our stochastic study showed that t f C essentially decreases linearly with N (see main text). This change of behavior as N increases can be seen on Fig. 2.3A in the regime of small T (in particular, for large N , the purple data points corresponding to N = 10 6 are then slightly higher than the blue ones corresponding to N = 10 5 ; see also Fig. 2.7, where the y-axis range and scale are the same on panels A and B).

Comparison to spontaneous fitness valley crossing

No antimicrobial: Crossing of a symmetric fitness valley Let us compare the alternation-driven evolution of resistance to what would happen in the absence of alternations of phases of absence and presence of antimicrobial. If a population composed only of S (sensitive) microorganisms is subjected to a continuous presence of antimicrobial, it will not evolve resistance, because divisions are blocked (see Fig. 2.1A). Conversely, a population of S microorganisms that is never subjected to antimicrobial can spontaneously evolve resistance. In our model, this will eventually happen. This process is difficult and slow, because of the initial fitness cost of resistance: it requires crossing a fitness valley (see Fig. 2.1A). Fitness valley crossing has been studied in detail [START_REF] Daniel | The rate at which asexual populations cross fitness valleys[END_REF][START_REF] Daniel | The rate of fitness-valley crossing in sexual populations[END_REF][START_REF] Bitbol | Quantifying the role of population subdivision in evolution on rugged fitness landscapes[END_REF][START_REF] Nowak | The role of chromosomal instability in tumor initiation[END_REF][START_REF] Weinreich | Rapid evolutionary escape by large populations from local fitness peaks is likely in nature[END_REF], but usually in the case where the final mutant has a higher fitness than the initial organism. In the evolution of antimicrobial resistance, compensatory mutations generally yield microorganisms with antimicrobial-free fitnesses that are similar to, but not higher than those of sensitive microorganisms [START_REF] Borman | Resistance of human immunodeficiency virus type 1 to protease inhibitors: selection of resistance mutations in the presence and absence of the drug[END_REF][START_REF] Andersson | antibiotic resistance and its cost: is it possible to reverse resistance? nat rev microbiol 8: 260-271[END_REF][START_REF] Schrag | Adaptation to the fitness costs of antibiotic resistance in ¡i¿escherichia coli¡/i¿[END_REF]. Hence, we here extend the known results for fitness valley crossing by constantsize homogeneous asexual populations [START_REF] Daniel | The rate at which asexual populations cross fitness valleys[END_REF] to "symmetric" fitness valleys, where the final genotype has no selective advantage compared to the initial one. Briefly, the main difference with Ref. [START_REF] Daniel | The rate at which asexual populations cross fitness valleys[END_REF] is that the probability of establishment of the second mutant (C) in a population with a majority of non-mutants (S) is 1/N instead of being given by the selective advantage s of the second mutant. This probability plays an important role in the tunneling case.

There are two different ways of crossing a fitness valley. In sequential fixation, the first deleterious mutant fixes in the population, and then the second mutant fixes. In tunneling [START_REF] Nowak | The role of chromosomal instability in tumor initiation[END_REF], the first mutant never fixes in the population, but a lineage of second mutants arises from a minority of first mutants, and fixes. For a given valley, characterized by δ (see Fig. 2.1A), population size N determines which mechanism dominates. Sequential fixation requires the fixation of a deleterious mutant through genetic drift, and dominates for small N , when stochasticity is important. Tunneling dominates above a certain N [START_REF] Daniel | The rate at which asexual populations cross fitness valleys[END_REF][START_REF] Weinreich | Rapid evolutionary escape by large populations from local fitness peaks is likely in nature[END_REF]. Let us study these two mechanisms in the regime of rare mutations N µ 1 1 where stochasticity is crucial. In sequential fixation, the average time τ SF to cross a valley is the sum of those of each step involved [START_REF] Daniel | The rate at which asexual populations cross fitness valleys[END_REF]. Hence τ SF = 1/(N µ 1 p SR ) + 1/(N µ 2 p RC ), where p SR (resp. p RC ) is the fixation probability of a single R (resp. C) individual in a population of size N where all other individuals are of type S (resp. R). Fixation probabilities are known in the Moran process (see Appendix, Section 2.5.2). In particular, if N δ

1 then p SR ≈ p RC ≈ 1/N for our symmetric valley, so τ SF ≈ 1/µ 1 + 1/µ 2 (≈ 1/µ 1 if µ 1 µ 2 ), while if δ 1 and N δ 1 then p SR ≈ δe -N δ and p RC ≈ δ p SR , so τ SF ≈ e N δ /(N µ 1 δ).
In tunneling, the key timescale is that of the appearance of a successful first (R) mutant, i.e. a first mutant whose lineage will give rise to a second (C) mutant that will fix in the population [START_REF] Daniel | The rate at which asexual populations cross fitness valleys[END_REF]. Neglecting subsequent second mutation appearance and fixation times, the average tunneling time reads τ T ≈ 1/(N µ 1 p 1 ), where p 1 is the probability that a first mutant is successful [START_REF] Daniel | The rate at which asexual populations cross fitness valleys[END_REF]. Upon each division of a first mutant, the probability of giving rise to a second mutant that will fix is p = µ 2 p SC , where p SC is the fixation probability of a single C mutant in a population of S individuals. For our symmetric valley, p SC = 1/N , so p = µ 2 /N . In the neutral case δ = 0, Ref. [START_REF] Daniel | The rate at which asexual populations cross fitness valleys[END_REF] demonstrated that the first-mutant lineages that survive for at least ∼ 1/ √ p generations, and reach a size ∼ 1/ √ p, are very likely to be successful, and fully determine the rate at which successful first mutants are produced. Since the lineage of each new first mutant has a probability ∼ √ p of surviving for at least ∼ 1/ √ p generations [START_REF] Daniel | The rate at which asexual populations cross fitness valleys[END_REF], the probability that a first mutant is successful is

p 1 ∼ √ p ∼ µ 2 /N . If δ > 0, a first mutant remains effectively neutral if its lineage size is smaller than 1/δ [15]. Hence, if δ < µ 2 /N , p 1 ∼ µ 2 /N still holds. (This requires N µ 2 1
, otherwise the first mutant fixes before its lineage reaches a size N/µ 2 .) Finally, if δ > µ 2 /N , the lineage of a first mutant will reach a size at most ∼ 1/δ, with a probability ∼ δ and a lifetime ∼ 1/δ [START_REF] Daniel | The rate at which asexual populations cross fitness valleys[END_REF], yielding

p 1 ∼ µ 2 /(N δ).
Given the substantial cost of resistance mutations (δ ∼ 0.1 [START_REF] Andersson | antibiotic resistance and its cost: is it possible to reverse resistance? nat rev microbiol 8: 260-271[END_REF][START_REF] Schrag | Adaptation to the fitness costs of antibiotic resistance in ¡i¿escherichia coli¡/i¿[END_REF]) and the low compensatory mutation rates (in bacteria µ 2 ∼ 10 -8 [START_REF] Andersson | antibiotic resistance and its cost: is it possible to reverse resistance? nat rev microbiol 8: 260-271[END_REF]), let us henceforth focus on the case where δ > µ 2 /N (which is appropriate for all N ≥ 1 with the values mentioned). Then τ T ≈ 1/(N µ 1 p 1 ) ≈ δ/(µ 1 µ 2 ), and two extreme cases can be distinguished:

(A) N δ 1 (effectively neutral regime): Then, τ SF ≈ 1/µ 1 (for µ 1 µ 2 ) and τ T ≈ δ/(µ 1 µ 2 ). Given the orders of magnitude above, generally δ > µ 2 in resistance evolution. Hence, sequential fixation is fastest, and the valley crossing time τ V reads:

τ V = τ SF ≈ 1 µ 1 . (2.65) (B) δ 1 and N δ 1: Then, τ V = min (τ SF , τ T ) ≈ min e N δ N µ 1 δ , δ µ 1 µ 2 .
(2.66)

The transition from sequential fixation to tunneling [START_REF] Daniel | The rate at which asexual populations cross fitness valleys[END_REF] occurs when N δe -N δ = µ 2 /δ. We have focused on the rare mutation regime N µ 1 1. If mutations are more frequent, the first successful lineage of R mutants that appears may not be the one that eventually fixes, so the valley-crossing time becomes shorter [START_REF] Daniel | The rate at which asexual populations cross fitness valleys[END_REF]. In Fig. 2.3B, the black simulation data points were obtained without any antimicrobial. The population then evolves resistance by valley crossing. The black curves correspond to our analytical predictions in Eq. 2.65 for N 1/δ and in Eq. 2.66 for N 1/δ. In the latter regime, the transition from sequential fixation to tunneling occurs at N ≈ 65 for the parameters of Fig. 2.3B. The agreement between simulation results and analytical predictions is excellent, with no adjustable parameter.

Alternation-driven process vs. valley-crossing process

Now that we have studied the spontaneous crossing of a symmetric fitness valley without any antimicrobial, let us come back to our periodic alternations of phases of absence and presence of antimicrobial. Resistance can then evolve by two distinct mechanisms, namely the alternation-driven process and the spontaneous valley-crossing process. It is important to compare the associated timescales, in order to assess which process will happen faster and dominate. This will shed light on the acceleration of resistance evolution by the alternations. For generality, we consider asymmetric alternations.

With alternations, spontaneous valley crossing can still happen, but new R lineages cannot appear with antimicrobial, because S individuals cannot divide (see Fig. 2.1A). Since the appearance of a successful R mutant is usually the longest step of valley crossing (see above), the average valley crossing time τ V with alternations will be longer by a factor T /T 1 than that without antimicrobial (τ V ), if more than one antimicrobial-free phase is needed to cross the valley, i.e. if T 1 τ V . Eqs. 2.65 and 2.66 then yield

τ V ≈ T T 1 µ 1 for N δ 1 , (2.67)
τ V ≈ T T 1 min e N δ N µ 1 δ , δ µ 1 µ 2
for δ 1 and N δ 1 .

(2.68)

Conversely, if T 1 τ V , valley crossing generally happens within the first antimicrobial-free phase. Hence, the average valley crossing time τ V is given by Eqs. 2.65 and 2.66. (Recall that the process is assumed to begin with an antimicrobial-free phase.)

We can now compare the timescales of the valley-crossing process to those of the alternation-driven process. For simplicity, let us assume that the dominant timescale in the latter process is the time t a R it takes to first observe an R organism in the presence of antimicrobial, i.e.

t f C ≈ t a R (see Eq. 2.
2). This is the case in a large and relevant range of parameters, especially if µ 1 µ 2 , as discussed above. Note also that the final step of fixation of the successful C lineage, which can become long in large populations (up to ∼ N in the neutral case, see Appendix, Section 2.5.2), is the same in the alternation-driven process and in the valley-crossing process, so it does not enter the comparison. The expression of t a R in Eq. 2.3 should thus be compared to the valley crossing time. If T 1 τ V , valley crossing happens before any alternation, and is thus the relevant process, with time τ V given by Eqs. 2.65 and 2.66. Let us now conduct our comparison of t a R and τ V for T 1 τ V , where Eqs. 2.67 and 2.68 hold. (A) If T 1 τ d R (recall that τ d R is the average lifetime of an R lineage without antimicrobial, before it goes extinct): The alternation-driven process, with timescale t a R = T /(N µ 1 T 1 ) (see Eq. 2.3), dominates. Indeed, if N δ 1, τ V is given by Eq. 2.67, so for all N > 1, t a R < τ V . And if N δ 1 and δ 1, Eq. 2.68 yields t a R /τ V ≈ δe -N δ 1 in the sequential fixation regime, and

t a R /τ V ≈ µ 2 /(N δ) 1 in the tunneling regime. Hence, if T 1 τ d R
, the alternation-driven process dominates. Thus, alternations of absence and presence of antimicrobial strongly accelerate resistance evolution. For instance, in Fig. 2.3A, for N = 100 and T /2 τ d R , the alternation-driven process takes t a R = 2/(N µ 1 ) = 2 × 10 3 generations, while valley crossing takes τ V = δ/(µ 1 µ 2 ) = 10 7 generations without antimicrobial: alternations yield a speedup of 4 orders of magnitude. The speedup is even stronger for larger populations. Conversely, for T 1 T 2 , while the alternation-driven process is shorter than the valley-crossing process in the presence of alternations, it can nevertheless be longer than the valley-crossing process in the absence of antimicrobial. In this case, the drug actually slows down the evolution of resistance. When T 1 T 2 and T 1 τ d R , in the tunneling regime, provided that 1/N δ 2 µ 2 /N , valley crossing takes δ/(µ 1 µ 2 ) in the absence of antimicrobial (see Eq. 2.66), and T 2 δ/(T 1 µ 1 µ 2 ) in the presence of alternations satisfying T 1 T 2 (see Eq. 2.68). Meanwhile, the switchdriven process takes T 2 /(T 1 N µ 1 ) (see above). Hence, if T 2 T 1 N δ/µ 2 , the alternation-driven process dominates, but it is slower than the valleycrossing process in the absence of antimicrobial: the drug then slows down resistance evolution. This effect can be seen on Fig. 2.4 for T 1 T 2 and

T 1 τ d R . (B) If T 1 τ d R : Then t a R = T /(N µ 1 τ d R ) (see Eq. 2.
3). If N δ 1, valley crossing by sequential fixation is the dominant process. Indeed, Eq. 2.67 yields

t a R /τ V ≈ T 1 /τ d R 1. If N δ 1 and δ 1, Eq. 2.68 yields t a R /τ V ≈ δe -N δ T 1 /τ d R in the sequential fixation regime, and t a R /τ V ≈ µ 2 T 1 /(N δτ d R )
in the tunneling regime. A transition from the alternation-driven process to valley crossing occurs when these ratios reach 1. Qualitatively, if N is large enough and/or if T 1 is short enough, the alternation-driven process dominates.

For example, in Fig. 2.4A, parameters are such that the dominant mechanism of valley crossing is tunneling, so t a R /τ V reaches 1 for

T 1 = N δτ d R /µ 2 ≈ 2.
V ≈ δ/(µ 1 µ 2 ) if T 1 max(T 2 , τ d R ).
Similarly, in Fig. 2.3A, horizontal solid lines at large T correspond to the valley crossing times in Eqs. 2.67 or 2.68, depending on N . In Fig. 2.3B, in the regime of small N and large T , resistance evolution is achieved by tunneling-type valley crossing, yielding a plateau in the neutral regime N 1/δ (see Eq. 2.67, plotted as a horizontal purple line) and an exponential increase for intermediate N (see Eq. 2.68). For larger N , we observe a T -dependent transition to the alternation-driven process, which can be fully understood using the ratio t a R /τ V (see above).

Detailed analysis of asymmetric alternations

Particular regimes

Here, we examine whether R mutants will fix during a single phase with antimicrobial, of duration T 2 . The fixation time of the lineage of an R mutant in the presence of antimicrobial is τ f R ≈ log N for N 1 [START_REF] Ewens | Mathematical Population Genetics 1: Theoretical Introduction[END_REF] (see above). If T 2 τ f R , fixation will happen within T 2 . In the opposite case, the fixation of R is not likely to occur within a single phase with antimicrobial. Two situations exist in this case (see Fig.

N = 10 3 , T 1 = 10 -1 , T 2 = 10 -2 . B: T 2 τ f R and T 1 τ d R : the R lineage goes extinct. Parameters: N = 10 2 , T 1 = 10 2 , T 2 = 1. In both (A) and (B), µ 1 = 10 -5 , µ 2 = 10 -3 and δ = 0.1. (A) If T 2 τ f R and T 1 τ d R (Fig. 2.8A):
The R lineage will drift for multiple periods, but its extinction is unlikely, as for symmetric alternations. This effect can induce a slight increase of the total time of resistance evolution, which is usually negligible.

(B) If T 2 τ f R and T 1 τ d R (Fig. 2.8B):
The R lineage is likely to go extinct even after it has started growing in the presence of antimicrobial. This typically implies T 1 T 2 , since τ f R ≈ log N and τ d R log N for N 1 (see above). Hence, this case is specific to (very) asymmetric alternations.

Spontaneous valley crossing then becomes the fastest process of resistance evolution (see Appendix, Section 2.5.4).

Varying T 2 at fixed T 1

In the main text, we present a detailed analysis of what happens when T 1 is varied at fixed T 2 (see Fig. 2.4A). Here, we present a similar analysis if T 2 is varied at fixed T 1 . Fig. 2.4B shows the corresponding simulation results, together with our analytical predictions from Eqs. 2.2 and 2.3. In particular, a minimum is observed in Fig. 2.4B when varying T 2 for T 1 τ d R :

• When T 2 τ d R T 1 , valley crossing dominates. • When τ d R T 2 T 1 , Eq. 2.3 gives t a R = T /(N µ 1 τ d R ) ≈ T 1 /(N µ 1 τ d R ), which is independent from T 2 . • As T 2 is further increased, t a R = T /(N µ 1 τ d R ) increases, becoming pro- portional to T 2 when T 2 T 1 .
Hence, the minimum of

t a R is T 1 /(N µ 1 τ d R ) and is attained for τ d R T 2 T 1 . In the opposite case where T 1 τ d R , Eq. 2.3 still gives t a R = T /(N µ 1 T 1 ). Thus, t a R reaches a plateau t a R = 1/(N µ 1 ) for T 2 T 1 τ d R
, which means that the first R mutant yields the full evolution of resistance (as seen above). Then, t a R becomes proportional to T 2 for T 2 T 1 . Note that valley crossing is always slower than the alternation-driven process when T 1 τ d R (see above), so no plateau is expected at large T 2 in this case.

Robustness of the binary antimicrobial action model

Throughout our study, we have modeled the action of the antimicrobial in a binary way: below the MIC ("absence of antimicrobial"), growth is not affected, while above it ("presence of antimicrobial"), sensitive microorganisms cannot grow at all (see Model section in the main text). The relationship between antimicrobial concentration and microorganism fitness is termed the pharmacodynamics of the antimicrobial [START_REF] Regoes | Pharmacodynamic functions: a multiparameter approach to the design of antibiotic treatment regimens[END_REF][START_REF] Jacobs | Optimisation of antimicrobial therapy using pharmacokinetic and pharmacodynamic parameters[END_REF]. Our binary approximation is motivated by the usual steepness of pharmacodynamic curves around the MIC [START_REF] Regoes | Pharmacodynamic functions: a multiparameter approach to the design of antibiotic treatment regimens[END_REF]. However, this steepness is not infinite, and it is different for each antimicrobial. Here, we investigate the robustness of our binary model.

If one goes beyond the binary model and accounts for the smoothness of the pharmacodynamic curve, one additional factor enters the determination of the time dependence of fitness. It is the time dependence of the antimicrobial concentration, typically in a treated patient, which is known as pharmacokinetics [START_REF] Regoes | Pharmacodynamic functions: a multiparameter approach to the design of antibiotic treatment regimens[END_REF][START_REF] Jacobs | Optimisation of antimicrobial therapy using pharmacokinetic and pharmacodynamic parameters[END_REF]. In fact, the time dependence of the fitness of sensitive microorganisms will be determined by a combination of pharmacodynamics and pharmacokinetics. Experimental pharmacodynamic curves are well-fitted by Hill functions, and pharmacokinetic curves are often modeled by exponential decays of drug concentration after intake [START_REF] Regoes | Pharmacodynamic functions: a multiparameter approach to the design of antibiotic treatment regimens[END_REF]. The fitness versus time curve upon periodic antimicrobial intake will be a smooth periodic function resulting from the mathematical function composition of these two empirical relationships. The main feature of this curve will be how smooth or steep it is, which can be characterized by its rise time, i.e. the time it takes to rise from a value of f S close to 0 to one close to 1. Recall that the fitness f S of sensitive microorganisms ranges between 0 at very high antimicrobial concentrations and 1 without antimicrobial. In practice, we chose to define the rise time as the time taken to rise from f S = 0.1 to f S = 0.9.

Thus motivated, we consider a smooth and periodic fitness versus time relationship f S (t) (see Fig. 2.9A), and we study the impact of the rise time Θ on the evolution of antimicrobial resistance in a microbial population. In practice, our smooth function, shown in Fig. 2.9A, is built using the error function erf(x) = (2/ √ π)

x 0 e -u 2 du, such that over each period of duration T :

f S (t) =1 - 1 2 1 + erf 2 Θ t -nT - T 2 (2.69) if nT + T 4 ≤ t < nT + 3T 4 , f S (t) = 1 2 1 + erf 2 Θ (t -nT -T ) (2.70) if nT + 3T 4 ≤ t < (n + 1)T + T 4 ,
where n is a non-negative integer. In addition, we take f S (t) = 1 for 0 ≤ t ≤ T /4, i.e. we start without antimicrobial at t = 0, and the first decrease of fitness occurs around t = T /2, in order to be as close as possible to our binary approximation (see Fig. 2.1B). Finally, as an extremely smooth case, we consider the case of a fitness f S modeled by a sine function of period T , with the same initial condition and phase as our function with variable smoothness.

We have performed stochastic simulations using the model described in the main text, but with the fitness versus time relationship given in Eqs. 2.69-2.70. Fig. 2.9 shows that for small rise times Θ, the dependence on the period T of the total time t f C of full resistance evolution is the same as with our binary approximation, provided that the rise time is much smaller than the period, Θ T . Conversely, for small Θ satisfying Θ ≥ T , in which case our function is very smooth even though the absolute rise time is short, the behavior of t f C is similar to that obtained for the sine function. For larger values of Θ, namely Θ 10, the binary case is no longer matched when Θ T , and instead, a behavior intermediate between the binary case Period T Total time of full resistance evolution and the sine case is observed. This intermediate behavior gets closer to that observed in the sine case as Θ is increased.

These results can be rationalized as follows. When Θ is smaller than the relevant evolutionary timescales identified in the main text (τ d R , τ f R and 1/(N µ 1 ), the shortest ones being τ d R and τ f R for N µ 1 1), no relevant evolutionary process process can happen during a single smooth rise or decay of the fitness. If in addition Θ is much smaller than the environmental timescale T , then the fitness versus time function is steep and effectively binary. However, if Θ is not much smaller than T , then the function is smooth, and the binary approximation is inappropriate. Finally, if Θ is longer than the shortest relevant evolutionary timescales (τ d R , τ f R ), then relevant evolutionary processes can happen within a single smooth rise or decay of the fitness, and the behavior is more complex. In a nutshell, our binary approximation is appropriate provided that the rise time satisfies Θ min(T,

τ d R , τ f R ).
Chapter 3

Evolution of antimicrobial resistance in a microbial population of variable size The work presented in this chapter was published in the following article: Marrec L, Bitbol AF. Resist or perish: fate of a microbial population subjected to a periodic presence of antimicrobial. PLoS Comput Biol. 2020;16(4):1-19.

In this chapter, we study the impact of periodic alternations of absence and presence of antimicrobial on resistance evolution in a microbial population, using a stochastic model that includes variations of both population composition and size, and fully incorporates stochastic population extinctions. We show that fast alternations of presence and absence of antimicrobial are inefficient to eradicate the microbial population and strongly favor the establishment of resistance, unless the antimicrobial increases enough the death rate. We further demonstrate that if the period of alternations is longer than a threshold value, the microbial population goes extinct upon the first addition of antimicrobial, if it is not rescued by resistance. We express the probability that the population is eradicated upon the first addition of antimicrobial, assuming rare mutations. Rescue by resistance can happen either if resistant mutants preexist, or if they appear after antimicrobial is added to the environment. Importantly, the latter case is fully prevented by perfect biostatic antimicrobials that completely stop division of sensitive microorganisms. By contrast, we show that the parameter regime where treatment is efficient is larger for biocidal drugs than for biostatic drugs. This sheds light on the respective merits of different antimicrobial modes of action.

Introduction

In Chapter 2, we investigated the evolution of antimicrobial resistance in fixed-size microbial populations using the Moran model. Constant population sizes facilitate analytical calculations, and allowed us to fully quantify the impact of a periodic presence of antimicrobial on resistance evolution. However, they did not enable us to study antimicrobial-induced extinctions or the impact of biocidal antimicrobials. That is why we propose here a general stochastic model that incorporates variations of both population composition and size, i.e. population genetics and population dynamics. Despite having a common origin in stochastic birth, death and mutation events, and thus being intrinsically coupled, these phenomena are seldom considered together in theoretical studies [START_REF] Melbinger | Evolutionary game theory in growing populations[END_REF]. However, it is particularly crucial to address both of them when studying the evolution of antimicrobial resistance, because the aim of an antimicrobial treatment is to eradicate a microbial population, or at least to substantially decrease its size, while the evolution of resistance corresponds to a change in the genetic makeup of the population. Our general model allows us to fully incorporate the stochasticity of mutation occurrence and establishment [START_REF] Ewens | Mathematical Population Genetics 1: Theoretical Introduction[END_REF][START_REF] Rouzine | Transition between stochastic evolution and deterministic evolution in the presence of selection: General theory and application to virology[END_REF][START_REF] Daniel | Evolutionary Dynamics. Les Houches, Session LXXXV, Complex Systems[END_REF][START_REF] Patwa | The fixation probability of beneficial mutations[END_REF][START_REF] Daniel | The rate at which asexual populations cross fitness valleys[END_REF], as well as that of population extinction, whose practical importance was recently highlighted [START_REF] Coates | Antibiotic-induced population fluctuations and stochastic clearance of bacteria[END_REF][START_REF] Teimouri | Theoretical investigation of stochastic clearance of bacteria: First-passage analysis[END_REF][START_REF] Alexander | Stochastic bacterial population dynamics prevent the emergence of antibiotic resistance[END_REF].

In this framework, we ask whether a microbial population subject to alternations of phases of presence and absence of antimicrobial develops resistance, which corresponds to treatment failure and to rescue of the microbial population by resistance [START_REF] Alexander | Evolutionary rescue: Linking theory for conservation and medicine[END_REF], or goes extinct, which corresponds to treatment success. In other words, we ask whether the microbial population resists or perishes.

We study both the impact of biocidal drugs, that kill microorganisms, and of biostatic drugs, that prevent microorganisms from growing. We show that fast alternations of phases with and without antimicrobial do not permit eradication of the microbial population before resistant mutants fix, unless the death rate with antimicrobial is large enough. Conversely, intermediate alternation speeds are effective for a wider range of antimicrobial modes of action, but the probability of population extinction and therefore of treatment success, which we fully quantify, is not one, because resistance can rescue the population, and this effect depends on the size of the microbial population. We find that the parameter range where antimicrobial treatment is efficient is larger for biocidal drugs than for biostatic drugs. However, we also show that biocidal and imperfect biostatic antimicrobials permit an additional mechanism of rescue by resistance compared to biostatic drugs that completely stop growth. This sheds light on the respective merits of different antimicrobial modes of action. Finally, we find a population size-dependent critical drug concentration below which antimicrobials cannot eradicate microbial populations.

Model and methods

We consider a microbial population with carrying capacity K, corresponding to the maximum population size that the environment can sustain, given the nutrients available. The division rate of each microorganism is assumed to be logistic, and reads f (1 -N/K), where N represents the total population size, while the fitness f is the maximal division rate of the microorganism, reached when N K. This model therefore incorporates population size variations, and allows us to include extinctions induced by the antimicrobial drug.

As in Chapter 2, we consider three types of microorganisms: sensitive (S) microorganisms, whose division or death rate is affected by antimicrobials, resistant (R) microorganisms, that are not affected by antimicrobials but that bear a fitness cost, and resistant-compensated (C) microorganisms that are not affected by antimicrobials and do not bear a fitness cost. In the absence of antimicrobial, their fitnesses (maximal division rates) are denoted by f S , f R and f C , respectively, and their death rates by g S , g R and g C . Values in the presence of antimicrobial are denoted by a prime, e.g. f S . Note that we include small but nonzero baseline death rates, which can model losses or the impact of the immune system in vivo, and allows for population evolution even at steady-state size. Without loss of generality, we set f S = 1 throughout. In other words, the maximum reproduction rate of S microorganisms, attained when population size is much smaller than the carrying capacity, sets our time unit. We further denote by µ 1 and µ 2 the mutation probabilities upon each division for the mutation from S to R and from R to C, respectively. In several actual cases, the effective mutation rate towards compensation is higher than the one towards the return to sensitivity, because multiple mutations can compensate for the initial cost of resistance [START_REF] Levin | Compensatory mutations, antibiotic resistance and the population genetics of adaptive evolution in bacteria[END_REF][START_REF] Paulander | Multiple mechanisms to ameliorate the fitness burden of mupirocin resistance in salmonella typhimurium[END_REF][START_REF] Hughes | Evolutionary consequences of drug resistance: Shared principles across diverse targets and organisms[END_REF]. Thus, we do not take into account back-mutations. Still because of the abundance of possible compensatory mutations, often µ 1 µ 2 [START_REF] Levin | Compensatory mutations, antibiotic resistance and the population genetics of adaptive evolution in bacteria[END_REF][START_REF] Poon | The coupon collector and the suppressor mutation estimating the number of compensatory mutations by maximum likelihood[END_REF]. We provide general analytical results as a function of µ 1 and µ 2 , and we focus more on the limit µ 1 µ 2 , especially in simulations. Our model thus incorporates both population dynamics and population genetics [START_REF] Melbinger | The impact of environmental fluctuations on evolutionary fitness functions[END_REF][START_REF] Melbinger | Evolutionary game theory in growing populations[END_REF][START_REF] Huang | Stochastic game dynamics under demographic fluctuations[END_REF], and is more realistic than descriptions assuming constant population sizes [START_REF] Marrec | Quantifying the impact of a periodic presence of antimicrobial on resistance evolution in a homogeneous microbial population of fixed size[END_REF], e.g. in the framework of the Moran process [START_REF] Ewens | Mathematical Population Genetics 1: Theoretical Introduction[END_REF][START_REF] Moran | Random processes in genetics[END_REF]. Throughout, our time unit corresponds to a generation of sensitive microorganisms without antimicrobial in the exponential phase (reached when N K). The action of an antimicrobial drug can be quantified by its MIC, which corresponds the minimum concentration that stops the growth of a microbial population [START_REF] Andersson | antibiotic resistance and its cost: is it possible to reverse resistance? nat rev microbiol 8: 260-271[END_REF]. More precisely, the MIC corresponds to the concentration such that death rate and division rate are equal [START_REF] Coates | Antibiotic-induced population fluctuations and stochastic clearance of bacteria[END_REF]: in a deterministic framework, above the MIC, the population goes extinct, while below it, it grows until reaching carrying capacity. We investigate the impact of periodic alternations of phases of absence and presence of antimicrobial, at concentrations both above and below the MIC. We consider both biostatic antimicrobials, which decrease the division rate of microorganisms (f S < f S ), and biocidal antimicrobials, which increase the death rate of microorganisms (g S > g S ) [START_REF] Coates | Antibiotic-induced population fluctuations and stochastic clearance of bacteria[END_REF].

We start from a microbial population where all individuals are S (sensitive), without antimicrobial. Specifically, we generally start our simulations with 10 S microorganisms, thus including a phase of initial growth, which can model the development of an infection starting from the bottleneck at transmission [START_REF] Abel | Analysis of bottlenecks in experimental models of infection[END_REF]. Our results are robust to variations of this initial condition, since we mainly consider timescales longer than that of the initial growth of the population to its equilibrium size. Note however that if we started with a very small number of S microorganisms (i.e. 1 or 2), we would need to take into account rapid stochastic extinctions (see Fig. 3.9B).

Antimicrobial both drives the decrease of the population of sensitive microorganisms and selects for resistance. We ask whether resistance fully evolves de novo, leading to the C microorganisms taking over, or whether the microbial population goes extinct before this happens. The first case corresponds to treatment failure, and the second to treatment success. Hence, we are interested in the probability p 0 of extinction of the microbial population before C microorganisms fix in the population, i.e. take over. We also discuss the average time t f ix it takes for the population to fully evolve resistance, up to full fixation of the C microorganisms, and the mean time to extinction before the fixation of the C type t ext .

We present both analytical and numerical results. Our analytical results are obtained using methods from stochastic processes, including the Moran process at fixed population size [START_REF] Ewens | Mathematical Population Genetics 1: Theoretical Introduction[END_REF] and birth-death processes with time varying rates [START_REF] Nissen-Meyer | Analysis of effects of antibiotics on bacteria by means of stochastic models[END_REF][START_REF] Bailey | The Elements of Stochastic Processes with Applications to the Natural Sciences[END_REF][START_REF] Alexander | Pre-existence and emergence of drug resistance in a generalized model of intra-host viral dynamics[END_REF][START_REF] Parzen | Stochastic Processes[END_REF]. Our simulations employ a Gillespie algorithm [START_REF] Daniel T Gillespie | A general method for numerically simulating the stochastic time evolution of coupled chemical reactions[END_REF][START_REF] Daniel T Gillespie | Exact stochastic simulation of coupled chemical reactions[END_REF], and incorporate all individual stochastic division, mutation and death events with their exact rates (see Appendix, Section 3.5.5 for details).

Results

Conditions for a periodic presence of perfect biostatic antimicrobial to eradicate the microbial population

Do periodic alternations of phases with and without antimicrobial allow the eradication of a microbial population, or does resistance develop? We first address this question in the case of a biostatic antimicrobial sufficiently above the MIC to completely stop the growth of S microorganisms (see Fig. 3.1A-B). With such a "perfect" biostatic antimicrobial, the fitness of S microorganisms is f S = 0, while without antimicrobial, f S = 1. Here, we assume that the death rate of S microorganisms is not affected by the antimicrobial, i.e. g S = g S , but the case of a biocidal antimicrobial will be considered next. Note that within our logistic growth model, we consider that S microorganisms that cannot divide still consume resources, e.g. nutrients, in order to self-maintain. They may also still grow in size even if they cannot divide [START_REF] Lin | Complex interplay of physiology and selection in the emergence of antibiotic resistance[END_REF].

A crucial point is how the duration of a phase with antimicrobial, which corresponds here to the half-period T /2 of alternations, compares to the average time τ S needed for a population of S microorganisms to go extinct in the presence of antimicrobial. Indeed, if T /2 τ S , one single phase with antimicrobial suffices to eradicate a microbial population in the absence of resistance. An exact first passage time calculation [START_REF] Marrec | Quantifying the impact of a periodic presence of antimicrobial on resistance evolution in a homogeneous microbial population of fixed size[END_REF][START_REF] Sekimoto | Stochastic Energetics[END_REF] (see Appendix, Section 3.5.1, Eq. 3.16) yields τ S = (1/g S ) × N i=1 (1/i) ≈ log(N )/g S , where N 1 represents the number of microorganisms when antimicrobial is first added, i.e. at T /2. If the phase before antimicrobial is added is much longer than the initial growth timescale of the population, i.e. if T / 21/(f S -g S ) (see Appendix, Section 3.5.1), N can be taken equal to the deterministic equilibrium population size N = K(1 -g S /f S ), obtained by setting the birth rate f S (1 -N/K) equal to the death rate g S . Hence, τ S ≈ log [K(1 -g S /f S )] /g S . Note that in this regime, the initial population size has no impact on τ S , and that the division and death rates are both given by g S . Our simulation results in Fig. 3.1C display an abrupt increase in the probability p 0 that the microbial population goes extinct before developing resistance for T = 2τ S , in good agreement with our analytical prediction.

For fast alternations satisfying T /2 τ S , the phases with antimicrobial are not long enough to eradicate the microbial population, yielding a systematic evolution of resistance, and thus a vanishing probability p 0 of extinction before resistance takes over. This prediction is confirmed by our simulation results in Fig. 3.1C, and an example of resistance evolution in this regime is shown in Fig. 3.1D. In the limit of very fast alternations, we expect an effective averaging of the fitness of S microorganisms, with fS = 0.5. Thus, an R mutant whose lineage will take over the population (i.e. fix) appears after an average time ta R = 1/( Ñ µ 1 g S pSR ) where Ñ µ 1 g S represents the total mutation rate in the population, with Ñ = K(1 -g S / fS ), and where pSR = (1

-fS /f R )/[1 -( fS /f R ) Ñ ]
is the probability that a single R mutant fixes in a population of S microorganisms with constant size Ñ , calculated within the Moran model [START_REF] Ewens | Mathematical Population Genetics 1: Theoretical Introduction[END_REF]. Note that when the effective fitness of S microorganisms is fS , acquiring resistance is beneficial (provided that the fitness cost of resistance is reasonable, namely smaller than 0.5). Subsequently, C mutants will appear and fix, thus leading to the full evolution of resistance in the population. The corresponding average total time t f ix of resistance evolution [START_REF] Marrec | Quantifying the impact of a periodic presence of antimicrobial on resistance evolution in a homogeneous microbial population of fixed size[END_REF] obtained in our simulations agrees well with the analytical expression of ta R for T /2 τ S (see Fig. 3.10C).

Conversely, if T /2 τ S , the microbial population is eradicated by the A: Microbial fitness versus genotype with and without antimicrobial. Genotypes are the following: S: sensitive; R: resistant; C: resistant-compensated. δ represents the fitness cost of resistance. B: Periodic presence of antimicrobial (gray: presence, white: absence), and impact on the fitness of S microorganisms. C: Probability p 0 that the microbial population goes extinct before resistance gets established versus alternation period T , for various carrying capacities K. Markers: simulation results, with probabilities estimated over 10 2 -10 3 realizations. Horizontal solid lines: analytical predictions from Eq. 3.1. Dashed lines: T /2 = τ S . D and E: Numbers of S, R and C microorganisms versus time in example simulation runs for K = 1000, with T = 20 and T = 1000 respectively. In D, resistance takes over, while in E, extinction occurs shortly after antimicrobial is first added. Phases without (resp. with) antimicrobial are shaded in white (resp. gray). Parameter values: f S = 1 without antimicrobial, f S = 0 with antimicrobial, f R = 0.9, first phase with antimicrobial, provided that no resistant mutant preexists when antimicrobial is added to the environment. Indeed, resistance cannot appear in the presence of a perfect biostatic antimicrobial since S microorganisms then cannot divide. Thus, in the absence of existing R mutants, extinction occurs shortly after time T /2 (see Fig. 3.10B), and the situation is equivalent to adding antimicrobial at T /2 and leaving it thereafter, as exem-plified by Fig. 3.1E. Hence, while they are longer than those usually encountered in periodic treatments, the longest periods considered here are relevant to describe extended continuous treatments. Note that although unlikely, fixation of resistance in the absence of antimicrobial will end up happening by spontaneous fitness valley crossing if the first phase without antimicrobial is long enough. Specifically, this will occur if T /2 τ V , where τ V ≈ (f S -f R )/(µ 1 µ 2 g S ) is the average valley crossing time by tunneling, which is the relevant process unless populations are very small [START_REF] Daniel | The rate at which asexual populations cross fitness valleys[END_REF][START_REF] Marrec | Quantifying the impact of a periodic presence of antimicrobial on resistance evolution in a homogeneous microbial population of fixed size[END_REF][START_REF] Nowak | The role of chromosomal instability in tumor initiation[END_REF][START_REF] Weinreich | Rapid evolutionary escape by large populations from local fitness peaks is likely in nature[END_REF]. Accordingly, our simulation results in Fig. 3.11, which includes longer alternation periods than Fig. 3.1, feature three distinct regimes, and vanishing extinction probabilities are obtained for T /2 τ V , as well as for T /2 τ S . Let us now focus on the regime where antimicrobial treatment can induce extinction of the microbial population, namely τ S T /2 τ V , and calculate the extinction probability p 0 . A necessary condition for the population to be rescued by resistance [START_REF] Martin | The probability of evolutionary rescue: towards a quantitative comparison between theory and evolution experiments[END_REF] and avoid extinction is that at least one R mutant be present when antimicrobial is added. In the rare mutation regime Kµ 1

f C = 1, g S = g R = g C = 0.1, µ 1 = 10 -
1, this occurs with probability

p R = τ d R /t app R = N µ 1 g S τ d R , where t app R = 1/(N µ 1 g S )
is the average time of appearance of a resistant mutant, while τ d R is the average lifetime of a resistant lineage (destined for extinction without antimicrobial), both calculated in a population of S individuals with fixed size N = K(1 -g S /f S ) [START_REF] Ewens | Mathematical Population Genetics 1: Theoretical Introduction[END_REF][START_REF] Marrec | Quantifying the impact of a periodic presence of antimicrobial on resistance evolution in a homogeneous microbial population of fixed size[END_REF]. Importantly, the presence of R mutants does not guarantee the rescue of the microbial population, because small subpopulations of R microorganisms may undergo a rapid stochastic extinction. The probability p e R (i) of such an extinction event depends on the number of R microorganisms present when antimicrobial is added, which is i with a probability denoted by p c R (i), provided that at least one R mutant is present. The probability p 0 that the microbial population is not rescued by resistance and goes extinct can then be expressed as:

p 0 = 1 -p R N -1 i=1 p c R (i)(1 -p e R (i)) . (3.1)
The probability p c R (i) can be calculated within the Moran model since the population size is stable around N = K(1 -g S /f S ) before antimicrobial is added. Specifically, it can be expressed as the ratio of the average time τ d R,i the lineage spends in the state where i mutants exist to the total lifetime τ d R of the lineage without antimicrobial:

p c R (i) = τ d R,i /τ d R
(see Appendix, Section 3.5.3). Next, in order to calculate the probability p e R (i) that the lineage of R mutants then quickly goes extinct, we approximate the reproduction rate of the R microorganisms by

f R (1 -(S(t) + R(t))/K) ≈ f R (1 -S(t)/K),
where S(t) and R(t) are the numbers of S and R individuals at time t. Indeed, early extinctions of R mutants tend to happen shortly after the addition of antimicrobials, when S(t) R(t). Thus motivated, we further take the deterministic approximation S(t) = K(1 -g S /f S )e -g S t , while retaining a stochastic description for the R mutants [START_REF] Nissen-Meyer | Analysis of effects of antibiotics on bacteria by means of stochastic models[END_REF][START_REF] Bailey | The Elements of Stochastic Processes with Applications to the Natural Sciences[END_REF]. We then employ the probability generating function φ i (z, t) = ∞ j=0 z j P (j, t|i, 0), where i is the initial number of R microorganisms, which satisfies p e R (i) = lim t→∞ P (0, t|i, 0) = lim t→∞ φ i (0, t). Solving the partial differential equation governing the evolution of φ i (z, t) (see Appendix, Section 3.5.3) yields [START_REF] Alexander | Pre-existence and emergence of drug resistance in a generalized model of intra-host viral dynamics[END_REF][START_REF] Parzen | Stochastic Processes[END_REF]

p e R (i) = lim t→∞ g R t 0 e ρ(u) du 1 + g R t 0 e ρ(u) du i , (3.2)
with

ρ(t) = t 0 g R -f R 1 - S(u) K du . (3.3)
Eq. 3.1 then allows us to predict the probability that the microbial population goes extinct thanks to the first addition of antimicrobial. Fig. 3.1C demonstrates a very good agreement between this analytical prediction and our simulation results in the rare mutation regime Kµ 1 1, and Fig. 3.14 further demonstrates good agreement for each separate term of Eq. 3.1 in this regime. For larger populations, the probability that the microbial population is rescued by resistance increases, and the extinction probability tends to zero for frequent mutations Kµ 1 1 because R mutants are then always present in the population, in numbers that essentially ensure their survival (see Fig. 3.1C). Note that in our simulations presented in Fig. 3.1, we chose µ 1 = 10 -5 for tractability. With realistic bacterial mutation probabilities, namely µ 1 ∼ 10 -10 [78], the rare mutation regime remains relevant for much larger populations.

Biocidal antimicrobials and imperfect biostatic ones allow an extra mechanism of rescue by resistance

How does the mode of action of the antimicrobial impact our results? So far, we considered a perfect biostatic antimicrobial that stops the growth of sensitive microorganisms but does not affect their death rate. Let us now turn to the general case of an antimicrobial that can affect both the division rate and the death rate of sensitive microorganisms, and let us assume that we are above the MIC, i.e. g S > f S . In this section, we present general calculations, but focus most of our discussion on purely biocidal antimicrobials, which increase the death rate of sensitive microorganisms without affecting their growth rate, and compare them to purely biostatic antimicrobials. Again, a crucial point is how the duration T /2 of a phase with antimicrobial compares to the average time τ S needed for a population of S microorganisms to go extinct in the presence of antimicrobial (see Eq. abrupt change in the probability that the microbial population goes extinct before developing resistance for T = 2τ S .

f S = 1, f R = 0.9, f C = 1, g S = 0.1 without antimicrobial, g S = 1.1 with antimicro- bial, g R = g C = 0.1, µ 1 = 10 -
For small periods T /2 τ S , one phase with antimicrobial is not long enough to eradicate the microbial population. However, the alternations may induce an overall decrease in the population over multiple periods, then leading to extinction. This is the case when the deterministic growth timescale 1/(f S -g S ) is larger than the decay timescale 1/(g S -f S ). Equivalently, in the limit of very fast alternations, there is no nonzero stationary population size when fS = (f S + f S )/2 < gS = (g S + g S )/2, yielding the same condition. For a biostatic drug such that g S = g S , this situation cannot happen if g S < f S /2, which is realistic since baseline death rates are usually small. Conversely, for a biocidal drug such that f S = f S , a systematic evolution of resistance will occur if g S < 2f S -g S , while population decay over several periods and extinction will occur if g S > 2f S -g S . These predictions are confirmed by the simulation results in Figs. [START_REF] Mustonen | Molecular evolution under fitness fluctuations[END_REF] [START_REF] Levin | Population dynamics of antibiotic treatment: a mathematical model and hypotheses for time-kill and continuous-culture experiments[END_REF][START_REF] Khan | A mechanism-based pharmacokinetic/pharmacodynamic model allows prediction of antibiotic killing from mic values for wt and mutants[END_REF]. Note that in Fig. 3.2A, the extinction probability is not zero for small periods with K = 10 2 : this is because stochastic extinctions can occur before resistance takes over for such a small equilibrium population size.

For slower alternations satisfying T /2 τ S , the microbial population is eradicated by the first phase with antimicrobial, unless resistance rescues it. Extinction then occurs shortly after time T /2 (see Fig. 3.11B and examples in Fig. 3.2C and F). Importantly, with a biocidal antimicrobial or with an imperfect biostatic one, the microbial population can be rescued by resistance in two different ways: either if resistant bacteria are present when antimicrobial is added, or if they appear afterwards. This second case is exemplified in Fig. 3.3. It can happen because even at high concentration, such antimicrobials do not prevent S microorganisms from dividing, contrarily to a perfect biostatic one. Because of this, rescue by resistance can become more likely than with perfect biostatic antimicrobials. Note that, as in the perfect biostatic case, the spontaneous fixation of resistant mutants without antimicrobial will occur if

T /2 τ V ≈ (f S -f R )/(µ 1 µ 2 g S ) (see Fig. 3.11
). Let us focus on the regime where the treatment can efficiently induce extinction, namely τ S T /2 τ V . The probability p 0 that the microbial population is not rescued by resistance and goes extinct can then be expressed as: Apart from the last term, which corresponds to resistance appearing after antimicrobial is first added, Eq. 3.4 is identical to Eq. 3.1. The quantities p R and p c R (i) are the same as in that case, since they only depend on what happens just before antimicrobial is added. While p e R (i) is conceptually similar to the perfect biostatic case, it depends on f S and g S , and its general calculation is presented in Section 3.5.3 of the Appendix. This leaves us with the new case where resistance appears in the presence of antimicrobial. In the rare mutation regime such that N div µ 1 1, it happens with probability p a R = N div µ 1 , where

p 0 = 1 -p R N -1 i=1 p c R (i)(1 -p e R (i)) 1 -p a R (1 -p e R ) . (3.4)
N div = τ S f S 1 - S(t) K S(t) dt (3.5)
is the number of divisions that would occur in a population of S microorganisms between the addition of antimicrobial (taken as the origin of time here) and extinction. Employing the deterministic approximation for the number S(t) of S microorganisms (see Eq. 3.30), the probability that the lineage of an R mutant that appears at time t 0 quickly goes extinct can be obtained in a similar way as for Eq. 3.2, yielding

p e R (t 0 ) = lim t→∞ g R t t 0 e η(u) du 1 + g R t t 0 e η(u) du , (3.6)
with

η(t) = t t 0 g R -f R 1 - S(u) K du . (3.7)
We then estimate the probability p e R that the lineage of an R mutant that appears after the addition of antimicrobial quickly goes extinct by averaging p e R (t 0 ) over the time t 0 of appearance of the mutant, under the assumption that exactly one R mutant appears:

p e R = ∞ 0 p e R (t 0 ) ℘ a R (t 0 ) dt 0 , (3.8)
with

℘ a R (t 0 ) = S(t 0 ) 1 -S(t 0 ) K ∞ 0 S(t) 1 -S(t) K dt . (3.9)
Eq. 3.4 then yields the probability that the microbial population goes extinct thanks to the first addition of antimicrobial. Fig. 3.2A demonstrates a very good agreement between this analytical prediction and our simulation results in the rare mutation regime Kµ 1 1, and Figs. The extinction probability p 0 depends on the size of the microbial population through its carrying capacity K and on the division and death rates with antimicrobial. Fig. 3.4 shows the decrease of p 0 with K, with p 0 reaching 0 for Kµ 1 1 since resistant mutants are then always present when antimicrobial is added. Moreover, Fig. 3.4 shows that p 0 depends on the antimicrobial mode of action, with large death rates favoring larger p 0 in the biocidal case, and with the perfect biostatic antimicrobial yielding the largest p 0 . Qualitatively, the observed increase of p 0 as g S increases with a biocidal drug mainly arises from the faster decay of the population of S microorganisms, which reduces the probability p a R that an R mutant appears in the presence of antimicrobial. Furthermore, one can show that the extinction probability p 0 is larger for a perfect biostatic antimicrobial than for a perfect biocidal antimicrobial with g S → ∞ (see Appendix, Section 3.5.3). Indeed, S microorganisms survive longer in the presence of a perfect biostatic drug, which reduces the division rate of the R mutants due to the logistic growth term, and thus favors their extinction. Such a competition effect is realistic if S microorganisms still take up resources (e.g. nutrients) even while they are not dividing. Besides, a treatment combining biostatic and biocidal effects yields a larger p 0 than a pure biocidal one inducing the same death rate, thereby illustrating the interest of the additional biostatic effect (see Fig. 3.4). Note that conversely, adding a biocidal to a perfect biostatic slightly decreases p 0 due to the competition effect, as S microorganisms go extinct faster than with the perfect biostatic drug alone.

Sub-MIC drug concentrations and stochastic extinctions

So far, we considered antimicrobial drugs above the MIC, allowing deterministic extinction in the absence of resistance for long enough drug exposure times. However, sub-MIC drugs can also have a major impact on the evolution of resistance, by selecting for resistance without killing large microbial populations, and moreover by facilitating stochastic extinctions in finite-sized microbial populations [START_REF] Coates | Antibiotic-induced population fluctuations and stochastic clearance of bacteria[END_REF][START_REF] Teimouri | Theoretical investigation of stochastic clearance of bacteria: First-passage analysis[END_REF][START_REF] Alexander | Stochastic bacterial population dynamics prevent the emergence of antibiotic resistance[END_REF]. In the sub-MIC regime where f S > g S , the population has a nonzero deterministic equilibrium size

N = K(1 -g S /f S )
p SR = [1 -f S g R /(f R g S )]/[1 -(f S g R /(f R g S )) N ]
is the fixation probability of an R mutant in a population of S individuals with fixed size N (see Appendix, Section 3.5.4, and Ref. [START_REF] Foster | Stochastic evolutionary game dynamics[END_REF]). Therefore, we expect resistance to take over and the extinction probability p 0 to be very small if t a R τ S below the MIC, even for large periods such that τ S < T /2. Fig. 3.5 shows heatmaps of the probability p 0 that the microbial population goes extinct before resistance takes over, in the cases of biostatic and biocidal drugs, plotted versus the period of alternations T and the nondimensional variable R = (g S -f S )/g S , which increases with antimicrobial concentration and is zero at the minimum inhibitory concentration (MIC). In both cases, two main regions are apparent, one with p 0 = 0 and one where p 0 is close to one. The transition between them is well described by the solid line T /2 = τ S such that the time spent with drug is equal to the extinction time τ S of a population of sensitive microbes with drug, except for large periods, where the relevant transition occurs below the MIC (R < 0) and is given by t a R = τ S (dashed line), consistently with our analytical predictions. The ratio R enables us to make a quantitative comparison between biostatic and biocidal drugs. Let us focus first on the transition τ S = t a R . Eq. 3.15 shows that the average time it takes for the sensitive microorganisms to spontaneously go extinct in the presence of antimicrobial can be written as τ S (f S , g S ) = Φ(R)/g S , where Φ is a non-dimensional function. Besides, the average fixation time of a R mutant in a population of S individuals can also be expressed as t a R (f S , g S ) = Ψ(R)/g S , where Ψ is a non-dimensional function. Thus, the transition τ S = t a R will be the same for biostatic and biocidal drugs at a given value of R. Conversely, the transition τ S = T /2, i.e. Φ(R)/g S = T /2, depends on g S , and is thus different for biostatic and biocidal drugs at the same value of R. Specifically, for a given value of R, smaller periods T will suffice to get extinction after the first addition of antimicrobial for a biocidal drug than for a biostatic drug, because g S is increased by biocidal drugs, and hence τ S is smaller in the biocidal case than in the biostatic case. This means that the parameter regime where treatment is efficient is larger for biocidal drugs than for biostatic drugs, as can be seen by comparing Fig. 3.5A and Fig. 3.5B. Significantly above the MIC, another difference is that biocidal drugs become efficient even for short periods T /2 τ S if their concentration is large enough to have g S > 2f S -g S , i.e. R > (f S -g S )/(2f S -g S ) (see above, esp. Figs. 3.2D-E). Numerical simulation results agree well with this prediction (dotted line on Fig. 3

K = 10 3 , µ 1 = 10 -5 , µ 2 = 10 -3 , f S = 1, f R = 0.9, f C = 1, g S = g R = g C = 0.

.5B).

Importantly, the transition between large and small extinction probability when R (and thus the antimicrobial concentration) is varied strongly depends on population size, specifically on carrying capacity (Figs. 3.6 and 3.12), and also depends on antimicrobial mode of action (Fig. 3.6). For small periods where the relevant transition occurs for T /2 = τ S , concentrations above the MIC (R > 0) can actually be necessary to get extinction because one period may not suffice to get extinction, and moreover, the extinction threshold value R is not the same for biostatic and biocidal antimicrobials (see above and Figs. 3.6A-B). Conversely, for large periods where the relevant transition occurs for t a R = τ S , and extinction occurs upon the first addition of drug, the extinction threshold is always below the MIC (R < 0) and it is the same for biostatic and biocidal antimicrobials (see above and Fig. 3.6C).

In both cases, the larger the population, the larger the concentration required to get large extinction probabilities. For large periods (Fig. 3.6C), the transition occurs close to the MIC for large populations, but the smaller the population, the larger the discrepancy between the MIC and the actual transition, as predicted by our analytical estimate based on t a R = τ S (see Fig. 3.12). This is because in small populations, stochastic extinctions of the population are quite fast at weakly sub-MIC antimicrobial. This is a form of inoculum effect, where the effective MIC depends on the size of the bacterial population [START_REF] Alexander | Stochastic bacterial population dynamics prevent the emergence of antibiotic resistance[END_REF]. In the large period regime (Fig. 3.6C), the extinction probability p 0 is well-predicted by Eqs. 3.1 and 3.4 for the R values such at most one R mutant can appear before the extinction of the population (as assumed in our calculation of p a R ). In this regime, the extinction time is close to T /2 (see Fig. 3.13) as extinction is due to the first addition of antimicrobial, while for smaller R values, extinction occurs after multiple periods.

In Figs. 3.6A-B, transitions between small and large values of p 0 in simulated data are observed for smaller threshold values of R than predicted by T /2 = τ S (this can also be seen in Fig. 3.5, where the solid white line is somewhat in the blue zone corresponding to large p 0 ). This is because we have employed the average extinction time τ S , while extinction is a stochastic process. Thus, even if T /2 < τ S , upon each addition of antimicrobial, there is a nonzero probability that extinction actually occurs within the half-period. Denoting by p the probability that a given extinction time is smaller than T /2, the population will on average go extinct after 1/p periods, unless resistance fixes earlier. For instance, a population with carrying capacity K = 10 2 submitted to alternations with T = 10 2.5 is predicted to develop resistance before extinction if R < 0.055. However, for R = -0.1, simulations yield a probability p 0 = 0.99 of extinction before resistance takes over (see Fig. 3.6A). In this case, simulations yield p = 0.3, implying that extinction typically occurs in ∼ 3 periods, thus explaining the large value of p 0 . More generally, the probability distribution function of the extinction time can depend on various parameters, which can impact the discrepancy between the predicted and observed transitions. A more precise calculation would involve this distribution. Note that the distribution of extinction times is known to be exponential for populations with a quasi-stationary state [START_REF] Grimm | The intrinsic mean time to extinction: A unifying approach to analysing persistence and viability of populations[END_REF][START_REF] Ovaskainen | Stochastic models of population extinction[END_REF], but the present situation is more complex because there is no nonzero deterministic equilibrium population size below the MIC, and because the population size at the time when antimicrobial is added is far from the equilibrium value with antimicrobial. Nevertheless, our prediction based on the average extinction time τ S yields the right transition shape (see Fig. 3.5) and the correct expectations for T /2 τ S and T /2 τ S . Solid lines (C): Analytical estimates of p 0 from Eq. 3.1 (biostatic) or Eq. 3.4 (biocidal). For K = 10 2 and 10 3 , the analytical predictions in the biostatic and biocidal case are confounded, while for K = 10 4 we used two shades of green to show the slight difference (light: biostatic, dark: biocidal). Parameter values:

µ 1 = 10 -5 , µ 2 = 10 -3 , f S = 1, f R = 0.9, f C = 1, g S = g R = g C = 0.
1, and g S = 0.1 (biostatic) or f S = 1 (biocidal). All simulations start with 10 S microorganisms.

Discussion

Main results

The evolution of antimicrobial resistance often occurs in variable environments, as antimicrobial is added and removed from a medium or given periodically to a patient, e.g. in a treatment by the oral route [START_REF] Lin | Complex interplay of physiology and selection in the emergence of antibiotic resistance[END_REF][START_REF] Levin-Reisman | Antibiotic tolerance facilitates the evolution of resistance[END_REF]. Alternations of phases of absence and presence of antimicrobial induce a dramatic time variability of selection pressure on microorganisms, and can thus have a strong impact on resistance evolution. Using a general stochastic model which includes variations of both composition and size of the microbial population, we have shed light on the impact of periodic alternations of presence and absence of antimicrobial on the probability that resistance evolves de novo and rescues a microbial population from extinction.

We showed that fast alternations of presence and absence of antimicrobial are inefficient to eradicate the microbial population and strongly favor the establishment of resistance, unless the antimicrobial increases enough the death rate, which can occur for biocidal antimicrobials at high concentration [START_REF] Levin | Population dynamics of antibiotic treatment: a mathematical model and hypotheses for time-kill and continuous-culture experiments[END_REF][START_REF] Khan | A mechanism-based pharmacokinetic/pharmacodynamic model allows prediction of antibiotic killing from mic values for wt and mutants[END_REF]. The corresponding criterion on the death rate g S of sensitive microorganisms with biocidal antimicrobial, namely g S > 2f S -g S , is generally more stringent than simply requiring drug concentrations to be above the MIC during the phases with biocidal antimicrobial, namely g S > f S . Indeed, the population can re-grow without antimicrobial: in this regime, extinction occurs over multiple periods, and involves decaying oscillations. Conversely, for biostatic antimicrobials, as well as for biocidal ones at smaller concentrations, extinction has to occur within a single phase with antimicrobial, and thus the half-period T /2 has to be longer than the average extinction time τ S , which we fully expressed analytically. Importantly, shorter periods suffice for biocidal antimicrobials compared to biostatic ones in order to drive a population to extinction upon the first addition of antimicrobial, at the same value of R = (g S -f S )/g S . Hence, the parameter regime where treatment is efficient is larger for biocidal drugs than for biostatic drugs. If T /2 > τ S , the microbial population goes extinct upon the first addition of antimicrobial, unless it is rescued by resistance. We obtained an analytical expression for the probability p 0 that the population is eradicated upon the first addition of antimicrobial, assuming rare mutations. Note that with realistic bacterial mutation probabilities, namely µ 1 ∼ 10 -10 [78], the rare mutation regime remains relevant even for quite large populations. Moreover, real microbial populations are generally structured, which reduces their effective population size. Rescue by resistance can happen either if resistant mutants preexist upon the addition of antimicrobial, or if they appear after antimicrobial is added to the environment, during the decay of the population. Importantly, the latter case is fully prevented by perfect biostatic antimicrobials that completely stop division of sensitive microorganisms. This sheds light on the respective merits of different antimicrobial modes of action. Finally, we showed that due to stochastic extinctions, sub-MIC concentrations of antimicrobials can suffice to yield extinction of the population, and we fully quantified this effect and its dependence on population size. Throughout, all of our analytical predictions were tested by numerical simulations, and the latter also allowed us to explore cases beyond the rare mutation regime, where resistance occurs more frequently.

Practical relevance

Our results have consequences for actual experimental and clinical situations. First, several of our predictions can be tested experimentally in controlled setups such as that presented in Ref. [START_REF] Lin | Complex interplay of physiology and selection in the emergence of antibiotic resistance[END_REF]. This would allow for an experimental test of the transition of extinction probability between the short-period and the long-period regimes, and of the predicted values of this extinction probability for large periods in the rare mutation regime. Second, the situation where the phases of absence and presence of antimicrobial have similar durations, which we considered here, is unfortunately clinically realistic. Indeed, a goal in treatment design is that the serum concentration of antimicrobial exceeds the MIC for at least 40 to 50% of the time [START_REF] Jacobs | Optimisation of antimicrobial therapy using pharmacokinetic and pharmacodynamic parameters[END_REF]. Because bacteria divide on a timescale of about an hour in exponential growth phase, and because antimicrobial is often taken every 8 to 12 hours in treatments by the oral route, the alternation period lasts for a few generations in treatments: this is the same order of magnitude as the transition we found between the short-period and long-period regimes, meaning that this transition is relevant in clinical cases. Note that while this transition timescale depends on the death and birth rates of sensitive microbes in the presence of antimicrobial (see Eq. 3.15), and therefore on antimicrobial concentration, it does not depend on the value of the mutation rate or on the initial population size (as long as the half-period is longer than the initial population growth timescale, see Appendix, Section 3.5.1), and it depends only weakly on the carrying capacity, e.g. logarithmically in the perfect biostatic case (see Eq. 3.16). Given the relevance of this transition between the short-period and the long-period regimes, it would be very interesting to conduct precise measurements of both division rates and death rates [START_REF] Frenoy | Death and population dynamics affect mutation rate estimates and evolvability under stress in bacteria[END_REF] in actual infections in order to determine the relevant regime in each case. This is all the more important that in the short-period regime, we showed that only large concentrations of biocidal antimicrobials are efficient, while other antimicrobials systematically lead to the de novo evolution of resistance before eradication of the microbial population. This constitutes a striking argument in favor of the development of extendedrelease antimicrobial formulations [START_REF] Gao | Recent advances in materials for extended-release antibiotic delivery system[END_REF]. Conversely, a broader spectrum of modes of action can be successful for longer periods of alternation of drug absence and presence.

Despite the fact that only biocidal antimicrobials at high concentration are efficient for short alternation periods of absence and presence of drug, and the fact that the parameter regime where treatment is efficient is larger for biocidal drugs than for biostatic drugs, biostatic antimicrobials that fully stop division of sensitive microorganisms have a distinct advantage over drugs with other modes of action. Indeed, they prevent the emergence of resistant mutants when drug is present, which is all the more important that such resistant mutants are immediately selected for by the antimicrobial and are thus quite likely to rescue the microbial population and to lead to the fixation of resistance. This argues in favor of combination therapies involving a biostatic and a biocidal antimicrobial. Note however that the combined drugs need to be chosen carefully, because some of them have antagonistic interactions [START_REF] Bollenbach | Nonoptimal microbial response to antibiotics underlies suppressive drug interactions[END_REF], depending on their mode of action.

Appendix

Population with a single type of microorganisms

Master equation

Let us first consider the simple case of a microbial population with a carrying capacity K comprising a single type of microorganisms. These microorganisms have a fitness and a death rate denoted by f and g, respectively. Let j be the number of individuals in the population at time t, satisfying 0 ≤ j ≤ K. The master equation describing the evolution of this population reads for all j:

dP j (t) dt =f 1 - j -1 K (j -1)P j-1 (t) + g(j + 1)P j+1 (t) -f 1 - j K + g jP j (t) . (3.10)
Indeed, recall that f (1 -j/K) is the division rate in the logistic model. We can write this system of equations as Ṗ = RP, where R is the transition rate matrix:

d dt        P 0 P 1 P 2 .
. .

P K        =            0 g 0 • • • 0 0 -g -f (1 -1 K ) 2g (0) . . . 0 f (1 -1 K ) -2g -2f (1 -2 K ) . . . 0 . . . (0) . . . . . . Kg 0 • • • 0 f (1 -K-1 K )(K -1) -Kg                   P 0 P 1 P 2 . . . P K        . (3.11)
This Markov chain has a single absorbing state, namely j = 0, which corresponds to the extinction of the microbial population.

Average spontaneous extinction time

Let us study the average time it takes for the population to spontaneously go extinct, i.e. the mean first-passage time τ S (j 0 ) to the absorbing state j = 0, starting from j 0 microorganisms at t = 0. It can be expressed using the inverse of the reduced transition rate matrix R, which is identical to R except that the row and the column corresponding to the absorbing state j = 0 are removed [START_REF] Marrec | Quantifying the impact of a periodic presence of antimicrobial on resistance evolution in a homogeneous microbial population of fixed size[END_REF][START_REF] Sekimoto | Stochastic Energetics[END_REF]:

τ S (j 0 ) = E[ τ F P | j 0 ] = - K i=1 ( R -1 ) i j 0 . (3.12)
Note that more generally, all the moments of the first-passage time can be obtained using the reduced transition rate matrix R:

E[ τ n F P | j 0 ] = n!(-1) n K i=1 ( R -n ) i j 0 . (3.13)
Here, the elements of the inverse of the reduced transition matrix read for all 1 ≤ j ≤ K,

( R -1 ) i j =            - i-1 k=0 f g i-k-1 K k+1-i (K -k -1)! i g (K -i)! if i ≤ j , - j-1 k=0 f g i-k-1 K k+1-i (K -k -1)! i g (K -i)! if i > j . (3.14)
Substituting Eq. 3.14 in Eq. 3.12 yields

τ S (j 0 ) = 1 g j 0 i=1 i-1 k=0 f g i-k-1 K k+1-i (K -k -1)! i (K -i)! + 1 g K i=j 0 +1 j 0 -1 k=0 f g i-k-1 K k+1-i (K -k -1)! i (K -i)! . (3.15)
If f = 0, e.g. in the presence of a biostatic antimicrobial that perfectly prevents all microorganisms from growing, Eq. 3.15 simplifies to:

τ S (j 0 ) = 1 g j 0 i=1 1 i . (3.16)
Note the formal analogy between Eq. 3.16 and the unconditional fixation time with biostatic antimicrobial (f = 0) in the Moran process, which corresponds to the extinction of the sensitive microbes in a population of fixed size [START_REF] Marrec | Quantifying the impact of a periodic presence of antimicrobial on resistance evolution in a homogeneous microbial population of fixed size[END_REF]. Both situations involve the extinction of microorganisms that do not grow. Formally, the master equation of a Moran process describing a microbial population of fixed size N with two types of individuals A and B whose respective fitnesses are f A = 0 and f B = 1, reads:

dP l (t) dt = l + 1 N P l+1 (t) - l N P l (t) , (3.17)
where l denotes the number of A individuals. The master equation for a logistic growth of a population with a single type of individuals (see Eq. 3.10) with f = 0 is equivalent under the transformation 1/N ← g. Fig. 3.7 shows how τ S (10) depends on the death rate g and the carrying capacity K. In particular, it shows that when g < f , average extinction times become very long for large values of K, while they are short for all K when g > f . In a deterministic description (valid for very large population sizes), g = f indeed corresponds to the transition between a population that decays exponentially and a population that reaches a steady state size. For finite-sized populations, stochasticity makes this transition smoother.

Initial growth of the population

Deterministic approximation and rise time In the deterministic regime, for a population with only one type of microorganisms and a carrying capacity K, the number N of individuals at time t follows the logistic ordinary differential equation:

dN (t) dt = N (t) f 1 - N (t) K -g , (3.18)
where f represents fitness and g death rate. For f = g, the solution reads:

N (t) = K N 0 e (f -g)t (1 -g/f ) K (1 -g/f ) + N 0 (e (f -g)t -1) , (3.19)
where N 0 = N (0) is the initial number of individuals in the population. Note that we recover the usual law of logistic population growth for f > 0 and g = 0 (or for f > g by setting f ← f -g):

N (t) = K N 0 e f t K + N 0 (e f t -1)
.

(3.20)

For f > g, the long-time limit of Eq. 3.19 is K(1 -g/f ). This equilibrium population size can also be found as the steady-state solution of Eq. 3.18, and corresponds to the birth and death rates being equal. The rise time t r (α), at which a fraction α of this equilibrium population size is reached, is given by:

t r (α) = 1 f -g ln αK(1 -g/f ) -αN 0 (1 -α)N 0 . (3.21)
Hence, the initial growth of the population is governed by the timescale 1/(f -g), and features a weaker dependence on carrying capacity K and initial population size N 0 , as illustrated by Fig. 3.8. Probability of rapid initial extinction A microbial population starting with few individuals may go extinct quickly due to stochastic fluctuations, before reaching a substantial fraction of its equilibrium size K(1 -g/f ). Formally integrating the master equation Ṗ = RP with the initial condition j = j 0 allows to express the probability P 0 (t) that a population starting from j 0 microorganisms at t = 0 is extinct at time t: Fig. 3.9 shows the probability P 0 (t r ) that the microbial population goes extinct before the rise time t r versus g for f = 1.

P 0 (t) = (e Rt
We notice that P 0 (t r ) ∼ g/f for small g and/or large K. This result can be proved analytically by assuming that the number of individuals is very small compared to the carrying capacity K and thus grows exponentially, which is relevant when rapid initial extinctions occur. One can then neglect the impact of the carrying capacity K in the master equation Eq. 3.10, yielding:

dP j (t) dt = f (j -1)P j-1 (t) + g(j + 1)P j+1 (t) -(f + g) jP j (t) . (3.23)
The solution of this master equation is given by [START_REF] Kendall | On the generalized "birth-and-death" process[END_REF]:

P j (t) = e (f -g)t 1 -g/f e (f -g)t -g/f 2 e (f -g)t -1 e (f -g)t -g/f j-1 .
(3.24)

In particular, we thus obtain:

P 0 (t) = g f e (f -g)t -1 e (f -g)t -g/f → t→+∞ g f if f > g . ( 3
V = (f S -f R )/(µ 1 µ 2 g S ) (see main text).
In panels B and C, markers are averages over 10 2 -10 3 simulation realizations, error bars (often smaller than markers) represent 95% confidence intervals, and the oblique black line corresponds to T /2. In all panels, colored dashed lines correspond to T /2 = τ S , while black dashed lines correspond to T /2 = τ V . Parameter values: f S = 1, f R = 0.9, f C = 1, g S = 0.1 without antimicrobial, g S = 1.1 with antimicrobial, g R = g C = 0.1, µ 1 = 10 -5 and µ 2 = 10 -3 . All simulations start with 10 S microorganisms.

Here, in the limit of very fast alternations, we expect an effective averaging of death rates, with gS = 0.6 for S microorganisms. Then, an R mutant that will fix in the population appears after an average time ta R = 1/( Ñ µ 1 gS pSR ) where Ñ µ 1 gS represents the total mutation rate in the population, with Ñ = K(1 -gS /f S ) the equilibrium population size, and

where pSR = [1 -f S g R /(f R gS )]/[1 -(f S g R /(f R gS )) Ñ ]
is the probability that a single R mutant fixes in a population of Ñ microorganisms where all other microorganisms are S. Subsequently, C mutants will appear and fix, thus leading to the full evolution of resistance by the population. The corresponding average total time t f ix of resistance evolution [START_REF] Marrec | Quantifying the impact of a periodic presence of antimicrobial on resistance evolution in a homogeneous microbial population of fixed size[END_REF] agrees well with simulation results for T /2 τ S (see Fig. 3.11C).

Population size dependence of the extinction transition 12: Finite size effect on the extinction transition. Value of the ratio R = (g S -f S )/g S such that t a R = τ S , plotted versus the carrying capacity K. This value of R marks the transition between large and small extinction probability p 0 when T /2 > τ S (see main text and Fig. 3.5). Red markers: numerical solutions of the equation t a R = τ S . Black dashed line: expected transition in the large population limit (R = 0, i.e. f S = g S ).

Parameter values: µ 1 = 10 -5 , f S = 1, f R = 0.9, g S = g R = 0.1. Here, results are shown in the biostatic case, and f S was varied, keeping g S = 0.1, but the biocidal case yields the exact same results (see main text).

Dependence of the extinction time on population size and antimicrobial mode of action

µ 1 = 10 -5 , µ 2 = 10 -3 , f S = 1, f R = 0.9, f C = 1, g S = g R = g C = 0.
1, and g S = 0.1 (biostatic) or f S = 1 (biocidal). All simulations start with 10 S microorganisms.

Rescue by resistance

Number of resistant mutants when antimicrobial is added:

p c R (i) Let p c
R (i) be the probability that exactly i R microorganisms are present when antimicrobial is added, provided that a lineage of R mutants then exists. It can be calculated in the framework of the Moran model, provided that the population size is stable around N = K(1 -g S /f S ) before antimicrobial is added, which is correct for T /2 t r , where t r is the rise time (see section 3.5.1). Specifically, p c R (i) can be expressed as a ratio of the sojourn time in state i to the total lifetime of the lineage in the absence of antimicrobial:

p c R (i) = τ d R,i τ d R , (3.26)
where τ d R is the average lifetime without antimicrobial of the lineage of a resistant mutant, assuming that it is destined for extinction, and τ d R,i is the average time this lineage spends with exactly i R individuals before going extinct. They satisfy

τ d R = N -1 i=1 τ d R,i
. Note that we consider lineages destined for extinction in the absence of antimicrobial, because we focus on timescales much shorter than the spontaneous valley crossing time. In fact, in this regime, considering unconditional times yields nearly identical values for p c R (i).

Employing the master equation Ṗ = RP that describes the time evolution of the number of R mutants within the Moran model [START_REF] Ewens | Mathematical Population Genetics 1: Theoretical Introduction[END_REF][START_REF] Marrec | Quantifying the impact of a periodic presence of antimicrobial on resistance evolution in a homogeneous microbial population of fixed size[END_REF], where R is the transition rate matrix, we obtain

τ d R,i = π i π 1 ∞ 0 P i (t)dt = - π i π 1 ( R-1 ) i 1 , (3.27)
where π i is the probability that the R mutants go extinct, starting from i R mutants [START_REF] Ewens | Mathematical Population Genetics 1: Theoretical Introduction[END_REF][START_REF] Marrec | Quantifying the impact of a periodic presence of antimicrobial on resistance evolution in a homogeneous microbial population of fixed size[END_REF], while R is the reduced transition rate matrix, which is identical to the transition rate matrix R, except that the rows and the columns corresponding to the absorbing states i = 0 and i = N are removed [START_REF] Marrec | Quantifying the impact of a periodic presence of antimicrobial on resistance evolution in a homogeneous microbial population of fixed size[END_REF]. Here, we take N = K(1 -g S /f S ), which corresponds to the deterministic equilibrium population size. Finally, we obtain

p c R (i) = π i ( R-1 ) i 1 N -1 k=1 π k ( R-1 ) k 1 . (3.28)
Probability of fast extinction of the resistant mutants: p e R (i) Let us consider the beginning of the first phase with antimicrobial, and take as our origin of time t = 0 the beginning of the phase with antimicrobial. Here, we consider the general case of an antimicrobial that may modify both the division rate and the death rate of sensitive microorganisms. Provided that some resistant microorganisms are present at t = 0, how likely is it that they will undergo a rapid stochastic extinction and not rescue the microbial population and lead to the establishment of resistance? Denoting by i > 0 the number of resistant microorganisms at t = 0, let us estimate the probability p e R (i) that the lineage of R mutants then quickly goes extinct. As explained in the main text, we approximate the reproduction rate of the R microorganisms by

f R (t) = f R 1 - S(t) + R(t) K ≈ f R 1 - S(t) K , (3.29)
where S(t) and R(t) are the numbers of S and R individuals at time t. This is appropriate because early extinctions of R mutants tend to happen shortly after the addition of antimicrobials, when S(t) R(t). Thus motivated, we further employ the deterministic approximation to describe the decreasing number S(t) of S microorganisms:

S(t) = K(1 -g S /f S )S 0 e (f S -g S )t K(1 -g S /f S ) + S 0 (e (f S -g S )t -1) , (3.30)
where S 0 = K(1 -g S /f S ) is the number of sensitive microorganisms when antimicrobial is added. Note that if f S = 0 and g S = g S , i.e. in the perfect biostatic case, we obtain

S(t) = K 1 - g S f S e -g S t , (3.31)
for the decay of the number of S microorganisms with antimicrobial. However, we retain a stochastic description for the rare R mutants, and employ the probability generating function

φ i (z, t) = ∞ j=0 z j P (j, t|i, 0) , (3.32)
where i is the initial number of R microorganisms. Indeed, noticing that

p e R (i) = lim t→∞ P (0, t|i, 0) = lim t→∞ φ i (0, t) (3.33)
will enable us to calculate p e R (i) [START_REF] Alexander | Pre-existence and emergence of drug resistance in a generalized model of intra-host viral dynamics[END_REF][START_REF] Parzen | Stochastic Processes[END_REF]. The probability P (j, t|i, 0) of having j R mutants at time t, starting from i R mutants at time t = 0, satisfies the master equation

∂P (j, t|i, 0) ∂t =f R (t) (j -1) P (j -1, t|i, 0) + g R (j + 1) P (j + 1, t|i, 0) -(f R (t) + g R ) j P (j, t|i, 0) . (3.34)
Here, we neglect mutants that appear after the addition of antimicrobial, and we deal with them in the calculation of p a R and p e R . The generating function defined in Eq. 3.32 satisfies the partial differential equation

∂φ i (z, t) ∂t -(z -1)(f R (t)z -g R ) ∂φ i (z, t) ∂z = 0 . (3.35)
This first-order nonlinear partial differential equation can be solved using the method of characteristics. For this, we rewrite it as:

v. ∇φ i = 0 , (3.36)
where

v = (1, -(z -1)(f B (t)z -g B ))
t and ∇φ i = (∂φ i /∂t, ∂φ i /∂z) t . A characteristic curve r(s) satisfies d r/ds = v( r(s)), which entails

dφ i ds = d r ds . ∇φ i = v. ∇φ i = 0 , (3.37)
implying that φ i is constant along a characteristic curve. Since dφ i /ds = (∂φ i /∂t)(dt/ds) + (∂φ i /∂z)(dz/ds), we obtain the following system of ordinary differential equations along a characteristic curve:

     dt ds = 1 , dz ds = -(z -1)(f R (t)z -g R ) . (3.38)
We choose to integrate it as

   t = s , dz dt = -(z -1)(f R (t)z -g R ) .
(3.39)

The second ordinary differential equation can be solved by introducing y = 1/(z -1), which yields

e ρ(t) z -1 - t 0 f R (u)e ρ(u) du = 1 z 0 -1 , (3.40)
with

ρ(t) = t 0 (g R -f R (u)) du , (3.41)
where we have employed Eqs. 3.29 and 3.31. Eq. 3.40 is the equation of the characteristic line going through the point (0, z 0 ). Because φ i is constant along this line (see Eq. 3.37), we have φ i (z, t) = φ i (z 0 , 0) = z i 0 along this line, where we have used Eq. 3.32. Furthermore, for any (z, t) we can find the appropriate z 0 using Eq. 3.40. This yields the following expression for the generating function:

φ i (z, t) =   1 + e ρ(t) z -1 - t 0 f R (u)e ρ(u) du -1   i , (3.42)
where ρ(t) is given by Eq. 3.41 and f R (t) by Eq. 3.29.

We can now express the probability p e R (i) from Eqs. 3.33 and 3.42:

p e R (i) = lim t→∞ g R t 0 e ρ(u) du 1 + g R t 0 e ρ(u) du i .
(3.43)

Predicting the extinction probability p 0

Here, we test the analytical predictions for each term involved in the extinction probability p 0 of the population above the MIC, both in the perfect biostatic case (see Eq. 3.1) and in the biocidal case (see Eq. 3.4), by comparing them to numerical simulation results. To estimate the probability p R that at least one R mutant is present when antimicrobial is added, and to study the number of R mutants that are then present (Fig. 3.14A-B), simulations are run starting from j 0 = 10 S microorganisms (and no R) as in the rest of our work. We let the population evolve until a specific time, in practice t = 500, when population size is well-equilibrated around the deterministic stationary value K(1 -g S /f S ) without antimicrobial, and we analyze population composition at this time. To estimate the probability p e R of rapid extinction of the R lineage (Figs. 3.14C and 3.16A), we start from a population with i R microorganisms and K(1 -g S /f S ) -i sensitive microorganisms, and we let it evolve with antimicrobial until extinction of the S microorganisms. All these simulations are run with 2 types of microorganisms, S and R (no compensation). In Figs. [START_REF] Mustonen | Molecular evolution under fitness fluctuations[END_REF].14C and 3.16A, we note that p e R does not seem to depend on K. In fact, our analytical estimate for p e R is fully independent of K because it only involves the ratio S(t)/K (see Eqs. 3.43, 3.41 and 3.29), whose deterministic dynamics is independent of K (see Eq. 3.18 with N (t) ← S(t)).

The probability p a R that resistance appears in the presence of antimicrobial involves the number of divisions N div and the mean time to extinction τ S of a population of S microorganisms in the presence of antimicrobial (see main text). To estimate these two intermediate quantities, simulations only involving S microorganisms in the presence of antimicrobial, starting from K(1 -g S /f S ) sensitive microorganisms, are performed (Fig. 3.15A-B). For p a R itself (Fig. 3.16B), simulations with S and R microbes (no compensation), also starting from K(1 -g S /f S ) sensitive microorganisms in the presence of antimicrobial, are performed. The time of appearance of R mutants (Fig. 3.15C-D) and the number of different lineages that appear during the decay of this population (Fig. 3.16C) are also studied.

p R = t app R /τ d R = N µ 1 g S τ d
R (see main text). B: Probability p c R that exactly i R microorganisms are present when antimicrobial is added, provided that at least one R mutant is present, plotted versus the number i of R mutants, for various carrying capacities K. Markers: simulation results, estimated over 10 4 realizations. Solid lines: analytical prediction in Eq. 3.28. Analytical prediction lines for K = 10 4 and K = 10 5 are confounded; note that the prediction holds in the weak mutation regime Kµ 1 1, and thus fails for K = 10 5 here. C: Probability p e R of rapid extinction of the R lineage, plotted versus the number i of R mutants present when adding antimicrobial, for various different carrying capacities K. Markers: simulation results, with probabilities estimated over 10 4 realizations. Black solid line: analytical prediction from Eq. 3.2 (see main text). Parameter values: f S = 1 without antimicrobial, f S = 0 with antimicrobial, f R = 0.9, g S = g R = 0.1 and µ 1 = 10 -5 (A-B) or µ 1 = 0 (C). Markers: simulation results, with probabilities estimated over 10 4 realizations. Red solid line: analytical prediction from Eq. 3.15, with j 0 = K(1 -g S /f S ). B: Number N div of individual division events that occur between the addition of antimicrobial and the extinction of the population of S microorganisms, plotted versus carrying capacity K. Red markers: simulation results, with probabilities estimated over 10 4 realizations. Red solid line: analytical prediction from Eq. 3.5. C and D: Probability density function ℘ a R (t) of the time t of appearance of an R mutant, under the assumption that exactly one R mutant appears between the addition of antimicrobial and the extinction of the population of S microorganisms, for K = 10 3 (C) and K = 10 4 (D). Histograms: simulation results, with 10 3 realizations. Black solid lines: analytical prediction from Eq. 3.9. Parameter values: f S = 1, g S = 0.1 without antimicrobial, g S = 1.1 with antimicrobial, and in panels C and D, f R = 0.9, g R = 0.1 and µ 1 = 10 -5 . R of rapid extinction of the R lineage, plotted versus the number i of R mutants present when adding antimicrobial, for various different carrying capacities K. Markers: simulation results, with probabilities estimated over 10 4 realizations. Black solid line: analytical prediction from Eq. 3.43. B: Probability p a R that resistance appears in the presence of antimicrobial, plotted versus the carrying capacity K. Red markers: simulation results, with probabilities estimated over 10 4 realizations. Red solid line: analytical prediction, p a R = N div µ 1 with N div in Eq. 3.5. C: Probability that i distinct lineages of R mutants appear in the presence of antimicrobial, provided that at least one appears, plotted versus the carrying capacity K. Markers: simulation results, with probabilities estimated over 10 3 realizations. Parameter values: f S = 1, f R = 0.9, g S = 0.1 without antimicrobial, g S = 1.1 with antimicrobial, g R = 0.1 and µ 1 = 0 (panel A) or µ 1 = 10 -5 (panels B and C).

A perfect biostatic antimicrobial yields a larger p 0 than a perfect biocidal antimicrobial For a perfect biostatic antimicrobial, the extinction probability p 0 upon the first addition of drug is given by Eq. 3.1:

p 0 = 1 -p R N -1 i=1 p c R (i)(1 -p e R (i)) , (3.44)
while for a biocidal antimicrobial, the extinction probability p0 upon the first addition of drug is given by Eq. 3.4:

p0 = 1 -p R N -1 i=1 p c R (i)(1 -pe R (i)) 1 -p a R (1 -p e R ) < 1 -p R N -1 i=1 p c R (i)(1 -pe R (i)) . (3.45)
In Eq. 3.45 we have employed tilde symbols to denote the quantities that differ compared to Eq. 3.44. Recall that p R and p c R (i) are the same in both cases. Indeed, these quantities characterize the state of the population when the antimicrobial is added, and thus do not depend on the type of treatment subsequently added.

The perfect biocidal antimicrobial corresponds to g S → ∞. Let us prove that lim g S →∞ p0 < p 0 . From Eqs. 3.44 and 3.45 it is apparent that it suffices to prove that lim g S →∞ pe R (i) < p e R (i) for all i. The expression of both p e R (i) and pe R (i) is given in Eq. 3.43, but it involves the decaying number S(t) of S microorganisms once antimicrobial is added, which is different in these two cases, and is given respectively by Eq. 3.30 with f S = f S in the biocidal case and by Eq. 3.31 in the perfect biostatic case.

Taking the limit g S → ∞ in Eq. 3.43 yields lim g S →∞ pe R (i) = (g R /f R ) i , which corresponds to the extinction probability of a population that starts from i R microorganisms, in the absence of any other microorganisms [START_REF] Coates | Antibiotic-induced population fluctuations and stochastic clearance of bacteria[END_REF]. But for a perfect biostatic antimicrobial,

ρ(t) = t 0 g R -f R 1 - S(u) K du > t 0 [g R -f R ] du = (g R -f R )t , (3.46
) which, using Eq. 3.43, entails that p e R (i) > (g R /f R ) i , i.e. lim g S →∞ pe R (i) < p e R (i) for all i. Therefore, we have shown that lim g S →∞ p0 < p 0 : the extinction probability p 0 is larger for a perfect biostatic antimicrobial than for a perfect biocidal antimicrobial.

Importantly, our proof does not rely on the appearance of resistant microorganisms while antimicrobial is present, which cannot happen with a perfect biostatic antimicrobial, and whose probability tends to zero when g S → ∞ with a biocidal antimicrobial. What makes the perfect biostatic antimicrobial more efficient than the perfect biocidal one is that S microorganisms survive for a longer time, thereby reducing the division rate of R microorganisms due to the logistic term, and favoring their extinction. Such a competition effect is realistic if S microorganisms still take up resources (e.g. nutrients) even while they are not dividing.

Fixation probability of a mutant in a population of constant size

In the main text, in our discussion of sub-MIC concentrations of antimicrobials, we employed the fixation probability p SR of an R mutant in a population of S individuals with fixed size N :

p SR = 1 -f S g R /(f R g S ) 1 -[f S g R /(f R g S )] N .
(3.47)

Here, we briefly justify this formula. Consider a birth-death process in which, at each discrete time step, one individual is chosen with a probability proportional to its fitness to reproduce and another one is chosen with a probability proportional to its death rate to die. Note that at each time step, the total number of individuals in the population stays constant. This model is a variant of the Moran model with selection both on division and on death. Let i be the number of R microorganisms and N -i the number of S microorganisms. At a given time step, the probability T + i that the number of R individuals increases from i to i + 1 satisfies:

T + i = f R i f R i + f S (N -i) g S (N -i) g R i + g S (N -i) , (3.48)
and similarly, the probability T - i that i decreases by 1 is given by:

T - i = f S (N -i) f R i + f S (N -i) g R i g R i + g S (N -i) . (3.49)
The probability p SR that the R genotype fixes in the population, starting from 1 R microorganism, then satisfies [START_REF] Foster | Stochastic evolutionary game dynamics[END_REF]:

p SR = 1 1 + N -1 k=1 k j=1 γ j , (3.50)
where

γ i = T - i T + i = f S g R f R g S . (3.51)
We thus obtain the result announced in Eq. 3.47.

Detailed simulation methods

In this work, the evolution of microbial populations are simulated using a Gillespie algorithm [START_REF] Daniel T Gillespie | A general method for numerically simulating the stochastic time evolution of coupled chemical reactions[END_REF][START_REF] Daniel T Gillespie | Exact stochastic simulation of coupled chemical reactions[END_REF]. Let us denote by j S , j R and j C the respective numbers of S, R and C individuals. The elementary events that can happen are division with or without mutation and death of an individual microbe of either type:

• S k + S --→ 2S: Reproduction without mutation of a sensitive microbe with rate k + S = f e S (1 -(j S + j R + j C )/K)(1 -µ 1 ), with f e S = f S if no antimicrobial is present in the environment or f e S = f S if antimicrobial is present in the environment. • S k SR --→ S +R: Reproduction with mutation of a sensitive microbe with rate k SR = f e S (1 -(j S + j R + j C )/K)µ 1 .
• S k -

S

--→ ∅: Death of a sensitive microbe with rate k - S = g e S , with g e S = g S if no antimicrobial is present in the environment or g e S = g S if antimicrobial is present in the environment.

• R k + R --→ 2R: Reproduction without mutation of a resistant microbe with rate k + R = f R (1 -(j S + j R + j C )/K)(1 -µ 2 ). • R k RC --→ R + C: Reproduction with mutation of a resistant microbe with rate k RC = f R (1 -(j S + j R + j C )/K)µ 2 . • R k - R --→ ∅: Death of a resistant microbe with rate k - R = g R . • C k + C --→ 2C: Reproduction of a resistant-compensated microbe with rate k + C = f C (1 -(j S + j R + j C )/K). • C k - C --→ ∅: Death of a resistant-compensated microbe with rate k - C = g C .
The total rate of events is given by

k tot = (k + S + k SR + k - S )j S + (k + R + k RC + k - R )j R + (k + C + k - C )j C .
Simulation steps are as follows:

1. Initialization: The microbial population starts from j S = 10 sensitive microorganisms, j R = 0 resistant mutant and j C = 0 resistantcompensated mutant at time t = 0 without antimicrobial. The next time when the environment changes is stored in the variable t switch , which is initialized at t switch = T /2, the first time when antimicrobial is added.

2. The time increment ∆t is sampled randomly from an exponential distribution with mean 1/k tot , and the next event that may occur is chosen randomly, proportionally to its probability k/k tot , where k is its rate. For instance, division of a sensitive microorganism without mutation is chosen with probability k + S j S /k tot .

3. If t + ∆t < t switch , time is increased to t + ∆t and the event chosen at

Step 2 is executed.

4. If t + ∆t ≥ t switch , the event chosen at Step 2 is not executed, because an environment change has to occur before. The environment change is performed: time is incremented to t = t switch , and the fitness and death rate of the sensitive microbes are switched from f S to f S and from g S to g S or vice-versa. In addition, t switch is incremented to t switch + T /2, and thus stores the next time when the environment changes.

We go back to

Step 2 and iterate until the total number of microbes is zero (j S + j R + j C = 0) or there are only resistant-compensated mutants (j S = 0, j R = 0 and j C = 0).

Note that

Step 4 introduces an artificial discretization of time, because environment changes occur at fixed times and not with a fixed rate. However, because the total event rate is large unless the population size is very small, the "jump" in time induced by Step 4 is usually extremely small, and the discarded events constitute a tiny minority of events. The resulting error is thus expected to be negligible. The very good agreement between our simulation results and our analytical predictions, in particular for short periods, corroborates this point.

Chapter 4

Evolutionary rescue in a gradually deteriorating environment The work presented in this chapter was published in the following preprint: Marrec L, Bitbol AF. Adapt or perish: Evolutionary rescue in a gradually deteriorating environment. bioRxiv doi: 10.1101/2020.05.05.079616 . 2020.

In this chapter, we theoretically investigate the evolutionary rescue of a microbial population in a gradually deteriorating environment. We show that mutants appearing later have higher fixation probabilities. We demonstrate that the rescue probability of the population increases if the product of the carrying capacity and of the mutation probability increases, and if the environment degradation is slower. We find that specialist mutants rescue the population better than generalists. We express the average appearance time of the mutants that rescue the population. Our methods can be applied to other situations with continuously variable fitnesses and population sizes, and hold beyond the weak-mutation regime.

Introduction

In Chapters 2 and 3, we have developed models to investigate the evolution of antimicrobial resistance in microbial populations subject to periodic alternations of antimicrobial presence and absence. In these models, the transition from an environment with antimicrobial to a free-antimicrobial environment, and vice versa, is abrupt. Understanding how a population of living organisms can survive in a gradually deteriorating environment is a fundamental question in evolution [START_REF] Waxman | A unified treatment of the probability of fixation when population size and the strength of selection change over time[END_REF][START_REF] Uecker | On the fixation process of a beneficial mutation in a variable environment[END_REF][START_REF] Peischl | Establishment of new mutations in changing environments[END_REF], which is particularly relevant to understand antimicrobial resistance evolution, which often occurs in a variable environment, as antimicrobial is added to a medium or given to a patient [START_REF] Lin | Complex interplay of physiology and selection in the emergence of antibiotic resistance[END_REF][START_REF] Levin-Reisman | Antibiotic tolerance facilitates the evolution of resistance[END_REF]. Indeed, even when antimicrobial is added instantaneously, the resulting fitness decrease is gradual [START_REF] Lin | Complex interplay of physiology and selection in the emergence of antibiotic resistance[END_REF]. Moreover, resistance evolution tends to be favored by gradually increasing antimicrobial concentrations [START_REF] Toprak | Evolutionary paths to antibiotic resistance under dynamically sustained drug stress[END_REF][START_REF] Zhang | Acceleration of emergence of bacterial antibiotic resistance in connected microenvironments[END_REF][START_REF] Greulich | Mutational pathway determines whether drug gradients accelerate evolution of drug-resistant cells[END_REF][START_REF] Rutger Hermsen | On the rapidity of antibiotic resistance evolution facilitated by a concentration gradient[END_REF][START_REF] Baym | Spatiotemporal microbial evolution on antibiotic landscapes[END_REF]. In a deteriorating environment, the fitness of wild-type organisms decreases with time. In the simple case of asexual microorganisms, considering that fitness is division rate, the fitness of microorganisms can then become smaller than their death rate, which yields a decrease of population size, eventually leading to extinction [START_REF] Coates | Antibiotic-induced population fluctuations and stochastic clearance of bacteria[END_REF]. However, the population can be rescued by a mutation which is better adapted to the new environment, and restores positive population growth: this phenomenon is called evolutionary rescue [START_REF] Alexander | Evolutionary rescue: Linking theory for conservation and medicine[END_REF][START_REF] Martin | The probability of evolutionary rescue: towards a quantitative comparison between theory and evolution experiments[END_REF][START_REF] Gonzalez | Evolutionary rescue: an emerging focus at the intersection between ecology and evolution[END_REF][START_REF] Carlson | Evolutionary rescue in a changing world[END_REF].

A gradually deteriorating environment impacts the population size and the fitness of the wild-type organism, which can both strongly impact the fate of a mutation [START_REF] Uecker | On the fixation process of a beneficial mutation in a variable environment[END_REF]. Studying the evolutionary rescue of a population in a gradually deteriorating environment requires accounting for simultaneous continuous time variations of fitness, population size and population composition, which makes it complex. Varying patterns of selection have recently been the focus of significant interest, mainly in the case of switches between different environment states, highlighting their strong effect on evolution [START_REF] Mustonen | Molecular evolution under fitness fluctuations[END_REF][START_REF] Rivoire | The value of information for populations in varying environments[END_REF][START_REF] Melbinger | The impact of environmental fluctuations on evolutionary fitness functions[END_REF][START_REF] Wienand | Evolution of a fluctuating population in a randomly switching environment[END_REF][START_REF] Kussell | Polymer-population mapping and localization in the space of phenotypes[END_REF][START_REF] Cvijović | Fate of a mutation in a fluctuating environment[END_REF][START_REF] Skanata | Evolutionary Phase Transitions in Random Environments[END_REF][START_REF] Peter | Intrinsic noise in systems with switching environments[END_REF][START_REF] Mayer | Transitions in optimal adaptive strategies for populations in fluctuating environments[END_REF][START_REF] Meyer | Noise-induced stabilization and fixation in fluctuating environment[END_REF][START_REF] Danino | Stability of twospecies communities: Drift, environmental stochasticity, storage effect and selection[END_REF][START_REF] Marrec | Quantifying the impact of a periodic presence of antimicrobial on resistance evolution in a homogeneous microbial population of fixed size[END_REF][START_REF] Trubenová | Surfing on the seascape: Adaptation in a changing environment[END_REF][START_REF] Marrec | Resist or perish: fate of a microbial population subjected to a periodic presence of antimicrobial[END_REF]. Despite its practical relevance, the case of a continuously varying fitness has been comparatively less studied, with a focus on stabilizing selection [START_REF] Burger | Evolution and extinction in a changing environment[END_REF][START_REF] Gomulkiewicz | Demographic and genetic constraints on evolution[END_REF] or on the fate of a single beneficial mutation [START_REF] Waxman | A unified treatment of the probability of fixation when population size and the strength of selection change over time[END_REF][START_REF] Uecker | On the fixation process of a beneficial mutation in a variable environment[END_REF][START_REF] Peischl | Establishment of new mutations in changing environments[END_REF]. Furthermore, most works on evolutionary rescue consider an abrupt environment change [START_REF] Martin | The probability of evolutionary rescue: towards a quantitative comparison between theory and evolution experiments[END_REF][START_REF] Orr | Population extinction and the genetics of adaptation[END_REF][START_REF] Bell | Evolutionary rescue can prevent extinction following environmental change[END_REF][START_REF] Anciaux | Evolutionary Rescue over a Fitness Landscape[END_REF]. Here we address evolutionary rescue in a gradually changing environment, which deteriorates from the point of view of wild-type organisms.

Adaptation to a new environment can occur in multiple ways. A specialist mutant that is particularly well-adapted to this new environment can emerge. Another possibility is the appearance of a generalist mutant, which is able to grow in both the initial and the final environments, while being less fit than specialists in their respective favorite environments [START_REF] Mayer | Transitions in optimal adaptive strategies for populations in fluctuating environments[END_REF][START_REF] Donaldson-Matasci | Phenotypic diversity as an adaptation to environmental uncertainty[END_REF][START_REF] Wang | Evolving generalists in switching rugged landscapes[END_REF][START_REF] Sachdeva | Tuning environmental timescales to evolve and maintain generalists[END_REF]. Concrete examples of generalists include multi-resistant microorganisms and broadly-neutralizing antibodies [START_REF] Wang | Evolving generalists in switching rugged landscapes[END_REF][START_REF] Nourmohammad | Host-Pathogen Coevolution and the Emergence of Broadly Neutralizing Antibodies in Chronic Infections[END_REF].

In the present work, we consider a microbial population subjected to a gradual environment deterioration, such that the fitness and the size of the wild-type population are gradually decaying, and that extinction would be certain in the absence of adaptation. We study the fixation probability of generalist and specialist adaptive mutants as a function of the time when they appear during the environment deterioration. We obtain an expression for the overall probability that the population is rescued by an adaptive mutation, thereby avoiding extinction. We investigate the dependence of the rescue probability on the rapidity of the environment deterioration, as well as on population size and mutation probability. We also compare generalist and specialist mutants. We further express the average time of appearance of the mutants that do rescue the population and the average extinction time of those that do not.

Model and methods

Population model

We consider a population of asexual microorganisms with carrying capacity K, corresponding to the maximum population size that the environment can sustain, given e.g. the nutrients available. We assume that two types of microorganisms can exist in this population: wild-type (W) and mutant (M). The division rate of each organism is assumed to be logistic [START_REF] Verhulst | Notice sur la loi que la population suit dans son accroissement[END_REF], and reads f i (t)(1-N/K), where N represents the total population size, while the time-dependent fitness f i (t) with i = W or i = M represents the maximal possible division rate of the (wild-type or mutant) organism at time t, which would be reached if N K. The death rates of W and M organisms are respectively denoted by g W and g M . While we assume that the variability of the environment impacts fitnesses and not death rates, our approach can be easily extended to variable death rates. Note that in the case of antimicrobial resistance evolution, variable fitnesses are relevant to model the effect of biostatic antimicrobials, while biocidal ones affect death rates. We further assume that W microorganisms can mutate into M microorganisms with the mutation probability µ upon each division. We do not consider back mutations. Our model thus incorporates both variations of population size (population dynamics) and of composition (population genetics) [START_REF] Melbinger | The impact of environmental fluctuations on evolutionary fitness functions[END_REF][START_REF] Melbinger | Evolutionary game theory in growing populations[END_REF][START_REF] Huang | Stochastic game dynamics under demographic fluctuations[END_REF]. Throughout, our time unit corresponds to a generation of W microorganisms in the initial environment and in the exponential phase (reached when t = 0 and N K). We start from a microbial population composed of N W (0) = N 0 W wildtype microorganisms and no mutant. Specifically, our simulations include a phase of initial growth, which can model e.g. the development of an infection starting from the bottleneck at transmission [START_REF] Abel | Analysis of bottlenecks in experimental models of infection[END_REF]. Our results are robust to variations of this initial condition, since we consider environ-mental timescales longer than that of the initial growth of the population to its equilibrium size. Note that if we started with a very small number of W microorganisms (i.e. 1 or 2), we would need to take into account rapid stochastic extinctions of the population [START_REF] Ovaskainen | Stochastic models of population extinction[END_REF]: we will not consider this regime, and in practice we will start our simulations with N 0 W = 10.

Fitnesses in a deteriorating environment

To model the impact of a continuously deteriorating environment on the fitness of W microorganisms, we choose the Hill function:

f W (t) = 1 1 + (t/θ) n , (4.1)
where n is the Hill coefficient and θ the inflection point, such that f W (θ) = 0.5. This sigmoidal function represents a transition between two different environments, by decreasing from the reference fitness value f W (0) = 1 toward 0 as t increases, with a steepness that is tunable via n. Specifically, the decay is more abrupt manner for larger values of n (see Fig. 4.1A). The Hill function is quite generic in biological contexts, e.g. it is a good model for cooperative reactions, and for the pharmacodynamics of antimicrobials [START_REF] Regoes | Pharmacodynamic functions: a multiparameter approach to the design of antibiotic treatment regimens[END_REF]. Moreover, the methods presented here do not depend on the exact form of the function chosen. We will consider two types of adaptive mutants. First, generalist mutants, denoted by G, are not impacted by gradual changes of the environment and have a constant fitness f G . We choose f G = 0.5 so that G mutants and W organisms have the same time-averaged fitness. Second, specialist mutants, denoted by S, have a fitness described by an increasing Hill function, so that they are better adapted to the final environment, in contrast to W organisms:

f S (t) = (t/θ) m 1 + (t/θ) m . (4.2)
We take the same point of inflection θ for W and S, as it marks the midst of the environmental transition. Conversely, we allow different Hill coefficients n and m, reflecting a different sensitivity of W and S individuals to environmental change (see Fig. 4.1A). Note that S mutants and W organisms have the same time-averaged fitness, and that G mutants are in fact S mutants with m = 0.

Methods

We present both analytical and numerical results. Our analytical results are obtained using methods from stochastic processes, especially from birthdeath processes with time varying rates [START_REF] Uecker | On the fixation process of a beneficial mutation in a variable environment[END_REF][START_REF] Nissen-Meyer | Analysis of effects of antibiotics on bacteria by means of stochastic models[END_REF][START_REF] Bailey | The Elements of Stochastic Processes with Applications to the Natural Sciences[END_REF][START_REF] Alexander | Pre-existence and emergence of drug resistance in a generalized model of intra-host viral dynamics[END_REF][START_REF] Parzen | Stochastic Processes[END_REF]. Importantly, our predictions make quite minimal assumptions and extend beyond the weak-mutation regime where Kµ 1. Our simulations employ a Gillespie algorithm [START_REF] Daniel T Gillespie | A general method for numerically simulating the stochastic time evolution of coupled chemical reactions[END_REF][START_REF] Daniel T Gillespie | Exact stochastic simulation of coupled chemical reactions[END_REF], and incorporate all individual stochastic division, mutation and death events with the associated rates. In principle, the time variability of the division rates imposes a difficulty [START_REF] Thanh | Simulation of biochemical reactions with time-dependent rates by the rejection-based algorithm[END_REF], but the sort duration of time intervals between individual events allows us to neglect rate variations between events (see Appendix, Section 4.5.8 for details). Our model allows us to fully account for the stochasticity of mutation occurrence and establishment [START_REF] Ewens | Mathematical Population Genetics 1: Theoretical Introduction[END_REF][START_REF] Rouzine | Transition between stochastic evolution and deterministic evolution in the presence of selection: General theory and application to virology[END_REF][START_REF] Daniel | Evolutionary Dynamics. Les Houches, Session LXXXV, Complex Systems[END_REF][START_REF] Patwa | The fixation probability of beneficial mutations[END_REF][START_REF] Daniel | The rate at which asexual populations cross fitness valleys[END_REF], as well as that of population extinction [START_REF] Coates | Antibiotic-induced population fluctuations and stochastic clearance of bacteria[END_REF][START_REF] Teimouri | Theoretical investigation of stochastic clearance of bacteria: First-passage analysis[END_REF][START_REF] Alexander | Stochastic bacterial population dynamics prevent the emergence of antibiotic resistance[END_REF].

In our analytical calculations, we will often make a deterministic approximation for the evolution of the number N W of W individuals, while the evolution of the mutant population will be described in a fully stochastic manner. Indeed, mutants are in small numbers when they appear, while they generally arise in a large population of W organisms. In the deterministic limit, N W satisfies the following ordinary differential equation:

dN W dt = f W (t) 1 - N W K -g W N W . (4.3)
This description is appropriate for very large N W , and Eq. 4.3 can be derived from the complete stochastic model in this limit (see Appendix, Section 4.5.6

and Refs. [START_REF] Gardiner | Handbook of Stochastic Methods for Physics[END_REF][START_REF] Van Kampen | Stochastic Processes in Physics and Chemistry[END_REF]). Fig. 4.1B compares the predictions from Eqs. 4.1 and 4.3 to the results of stochastic simulations (see Appendix, Section 4.5.8), and demonstrates the validity of the deterministic approximation in this regime. Fig. 4.1b also illustrates that in the absence of mutants, the population of W individuals always goes extinct, due to the fact that fitness f W tends to 0 while death rate is nonzero (g W > 0). Moreover, the bigger the Hill coefficient n, the faster the W population goes extinct.

Results

Fixation probability of mutants: on the importance of good timing

In a deteriorating environment, mutants will have different fates depending on when they appear. Therefore, before investigating overall rescue probabilities, we address the fixation probability p fix (t 0 ) of a mutant as a function of the time t 0 when it appears during the environment deterioration. Competition with wild-type organisms is felt by mutants through their division rate f M (t){1 -[N W (t) + N M (t)]/K}. At the early stages when competition matters, i.e. when the logistic term is important, the number of mutants is small with respect to the number of wild-type microorganisms, N M (t) N W (t), and thus the division rate of mutants can be approximated by f M (t)[1 -N W (t)/K]. Furthermore, at these early stages, the number of wild-type microorganisms N W is large enough to be described in a deterministic framework (see Models and Methods, Eq. 4.3 and Fig. 4.1). We retain a full stochastic description for mutants, which are in small numbers just after the mutation arises [START_REF] Uecker | On the fixation process of a beneficial mutation in a variable environment[END_REF][START_REF] Alexander | Pre-existence and emergence of drug resistance in a generalized model of intra-host viral dynamics[END_REF][START_REF] Parzen | Stochastic Processes[END_REF], and we introduce the probability P (i, t|1, t 0 ) of having i mutants at time t knowing that there is 1 mutant at time t 0 . The fixation probability of the mutants can then be obtained from the probability generating function φ(z, t) = ∞ i=0 z i P (i, t|1, t 0 ), which satisfies p fix (t 0 ) = 1 -lim t→∞ P (0, t|1, t 0 ) = 1 -lim t→∞ φ(0, t). Solving the partial differential equation governing the evolution of φ(z, t) (see Appendix, Section 4.5.1) yields [START_REF] Uecker | On the fixation process of a beneficial mutation in a variable environment[END_REF][START_REF] Alexander | Pre-existence and emergence of drug resistance in a generalized model of intra-host viral dynamics[END_REF][START_REF] Parzen | Stochastic Processes[END_REF]

p fix (t 0 ) = 1 1 + g M ∞ t 0 e ρ(t) dt , (4.4)
where

ρ(t) = t t 0 g M -f M (u) 1 - N W (u) K du . (4.5)
Numerical resolutions of Eq. 4.4 are discussed in Section 4.5.7. Fig. 4.2 shows the fixation probability p fix of a mutant versus the time t 0 at which it appears during the deterioration of the environment. A very good agreement is obtained between the results of our stochastic simulations and the analytical prediction of Eq. 4.4. This holds both when t 0 < θ, while mutants are less fit than W organisms, and when t 0 > θ, where the opposite is true. In Fig. 4.5, we provide additional results for the fixation probability of generalist mutants with different fitness values f G , which thus become effectively beneficial sooner or later during the environment deterioration, illustrating that Eq. 4.4 holds in these various cases. 2), corresponding to different sensitivities to the changing environment, are considered. In both panels, markers correspond to averages over 10 4 replicate stochastic simulations ("Sim."). Dashed and solid lines correspond to numerical resolutions of Eq. 4.4 ("Th.") for G and S mutants, respectively. Parameter values: g W = g G = g S = 0.1, K = 10 3 , N 0 W = 10 and θ = 10 3 . Vertical dotted lines: t = θ. Main panels: linear scale; insets: semi-logarithmic scale. Fig. 4.2 shows that p fix strongly increases with t 0 : mutants appearing later in the environmental degradation are much more likely to fix. This reflects the increasing fitness advantage of mutants and the decreasing competition with the W population that decays as the environment deteriorates for W organisms. Fig. 4.2A shows that the increase of p fix is strong around the inflection point θ, and is steeper for larger Hill coefficients n characterizing the fitness decay of the wild-type organisms (see Eq. 4.1). Furthermore, for each value of n, sufficiently before θ, generalist (G) mutants are more likely to fix than specialist (S) mutants with m = n (see Models and Methods, Eq. 4.2), because then f G > f S . Conversely, S mutants are more likely to fix than G mutants sufficiently after θ because f G < f S . Note that in Section 4.5.5 of the Appendix, we provide analytical approximations for the fixation probability with large Hill coefficients n, m → ∞. Finally, Fig. 4.2B shows that for t 0 > θ, p fix increases with the Hill coefficient m characterizing the steepness of the fitness transition for S mutants, and all S mutants are more likely to fix than G mutants, consistently with the fact that G mutants correspond to S mutants with m = 0 (see Eq. 4.2).

For large t 0 , the fixation probability p fix in Eq. 4.2 converges to 1g G /f G (resp. 1 -g S ) for G (resp. S) mutants, which is corroborated by our simulation results (see Figs. [START_REF] Rivoire | The value of information for populations in varying environments[END_REF].2A and 4.5A). This simple limit can be interpreted as follows: mutants appearing just before the extinction of the W population face negligible competition, and thus they survive and fix unless they undergo rapid stochastic extinction [START_REF] Coates | Antibiotic-induced population fluctuations and stochastic clearance of bacteria[END_REF][START_REF] Marrec | Resist or perish: fate of a microbial population subjected to a periodic presence of antimicrobial[END_REF][START_REF] Ovaskainen | Stochastic models of population extinction[END_REF]. Importantly, here, p fix is constructed so that mutant lineages that undergo rapid stochastic extinctions are counted as not fixing in the population.

Rescue probability

So far, we investigated the fate of a given mutant lineage as a function of its appearance time during the environment degradation. Let us now address whether mutants can rescue the population or not. For a mutation probability µ at division, both the occurrence of a new mutation and its subsequent fixation probability depend on the number and division rate of W organisms. We thus consider the probability p af (t) that a mutant appears and fixes between 0 and t, assuming that fixation times are much shorter than other timescales. The rescue probability p r corresponds to the probability that a mutant appears and fixes before the microbial population goes extinct, and is thus given by p r = lim t→∞ p af (t). Using Bayes' rule, the probability that a mutant appears and fixes between t and t + dt, denoted by dp af (t) = p af (t + dt) -p af (t), can be written as:

dp af (t) = (1 -p af (t))dp naf (t) , (4.6)
where dp naf (t) is the probability that a mutant appears and fixes between t and t + dt provided that no mutant has fixed before. The latter can be calculated by considering that the population is fully or mostly wild-type at time t, i.e. N W (t) N M (t): then, dp naf (t) = p fix (t)dN M (t), where dN M (t) = N W (t)f W (t)(1 -N W (t)/K)µdt is the number of mutants that appear between t and t + dt in a fully wild-type population. Thus,

dp af (t) 1 -p af (t) = p fix (t)N W (t)f W (t) 1 - N W (t) K µdt . (4.7)
We again take a deterministic description for N W (t) (see Eq. 4.3), and the fitness f W (t) of W organisms is given by Eq. 4.1. Then, integrating Eq. 4.7 with p af (0) = 0 and taking the limit t → ∞ yields the rescue probability

p r = lim t→∞ p af (t) = 1 -exp (-Σ) , (4.8)
where:

Σ = µ ∞ 0 p fix (t)N W (t)f W (t) 1 - N W (t) K dt . (4.9)
Here, we have assumed that N W (t) N M (t) when the mutant that fixes arises. This is expected to be valid in most cases, except in the strongmutation regime N µ 1 where multiple mutant lineages arise almost simultaneously. Importantly, our calculation is not restricted to the weakmutation regime N µ 1. Note that if Σ 1, Eq. 4.8 reduces to p r ≈ Σ, which would be obtained by neglecting possible earlier fixations, i.e. by making the approximation dp af (t) ≈ dp naf (t): here, we explicitly take into account the fact that several mutant lineages can arise during the decay of the wild-type population. Note also that, since mutant lineages undergoing rapid stochastic extinction are counted as not fixing in p fix (see above), they are correctly counted as not able to rescue the population in p r . Fig. 4.3 shows the rescue probability p r versus the mutation probability µ at each division. It demonstrates a very good agreement between our analytical prediction in Eq. 4.8 and results from our stochastic simulations (see Appendix, Section 4.5.8). We observe a sigmoidal increase of p r as µ increases, with a transition between a small-µ regime where the population almost certainly goes extinct and a large-µ regime where it is almost certainly rescued by adaptive mutants. Fig. 4.3A further shows that this transition is strongly impacted by the rapidity of the environment degradation, which is modeled via the Hill coefficient n (see Eq. 4.1). Specifically, the faster the environment degradation, the bleaker the prospect is for the population, and the larger µ becomes necessary to allow its rescue. This is related to the rapidity of extinction of the W population in the absence of mutations: for small n, the population decay is slower, allowing a larger window of opportunity for mutants to appear and to be selected (see Fig. 4.1). Interestingly, increasing n does not substantially affect the steepness of p r , but rather shifts the transition between small and large p r toward larger µ. Note that our prediction in Eq. 4.8 is valid beyond the weak-mutation regime Kµ 1, as expected. In particular, in the limit n → ∞ of an instantaneous environment degradation, discussed in detail in Section 4.5.5 of the Appendix, the transition from large to small p r occurs for Kµ ≈ 1 (see Fig. 4.3A and Fig. 4.9A). Indeed, preexisting mutations then become necessary to population rescue, as no division occurs after the abrupt environment transition. In Section 4.5.5 of the Appendix, we further show that Eq. 4.8 generalizes the predictions in our previous work [START_REF] Marrec | Resist or perish: fate of a microbial population subjected to a periodic presence of antimicrobial[END_REF] regarding the probability of extinction of a microbial population subjected to abrupt additions of antimicrobial, beyond the weak-mutation regime Kµ 1 (see Fig. 4.9B).

In Fig. 4.3A, we also compare G mutants and S mutants satisfying m = n (see Eq. 4.2) for each n, and we find that S mutants are slightly more successful at rescuing the population than G mutants. This is because S mutants that occur for t > θ have a larger selective advantage than G mutants and thus a larger fixation probability (see Fig. 4.2A). Consistently, Fig. 4.3B further shows that specialists with a larger Hill coefficient m, such that fitness increases more steeply during the environment transition (see Eq. 4.2), are slightly more efficient at rescuing the population. The impact of n on the rescue probability is stronger than that of m, because n controls the rapidity of the decay of the wild-type population, which is crucial because mutants appear upon divisions of W organisms. Here, S mutants satisfy m = n, i.e. they have the same sensitivity to the environment as W organisms (see Eq. 4.2). Vertical dash-dotted line: Kµ = 1. B. Rescue probability p r by different types of mutants versus mutation probability µ upon division. A fixed Hill coefficient n = 10 characterizing the decay of f W (see Eq. 4.1) is chosen, but G mutants and S mutants with different Hill coefficients m (see Eq. 4.2) are considered. In both panels, markers correspond to averages over 10 4 replicate stochastic simulations ("Simulation"). Dashed and solid lines correspond to numerical resolutions of Eq. 4.8 ("Theory") for G and S mutants, respectively. Parameter values: g W = g G = g S = 0.1, K = 10 3 , N 0 W = 10 and θ = 10 3 .

Time of appearance of the mutants that fix

The fixation probability of a mutant strongly depends on the time at which it appears during the environment degradation (see Fig. 4.2). But when do the mutants that fix and rescue the population appear? The probability density function F τ af of the time τ af of appearance of a mutant that fixes can be obtained from p af (see Eq. 4.7 and below) through F τ af = (1/p r )dp af /dt, where normalization is ensured by 1/p r (we focus on cases where rescue occurs). Thus,

F τ af (t) = µ p r p fix (t)N W (t)f W (t) 1 - N W (t) K exp(-Σ(t)) , (4.10)
where

Σ(t) = µ t 0 p fix (u)N W (u)f W (u) 1 - N W (u) K du . (4.11)
Eq. 4.10 allows to express the average time τ af = τ af of appearance of the mutants that fix:

τ af = ∞ 0 tF τaf (t)dt = µ p r ∞ 0 t p fix (t)N W (t)f W (t) 1 - N W (t) K exp(-Σ(t)) dt .
(4.12) Fig. 4.6 shows the average time τ af of appearance of the mutants that fix, and demonstrates a very good agreement between our analytical prediction in Eq. 4.12 and the results of our stochastic simulations in the weak-tomoderate mutation regime Kµ 1. Fig. 4.6A shows that τ af decreases as the mutation probability µ upon division is increased: this is because more mutants appear for larger µ. In addition, τ af is larger than the inflection time θ for Kµ 1, which confirms that the mutants that fix tend to be beneficial ones (see Fig. 4.2), and is consistent with the fact that S mutants, which are more beneficial than G mutants for t > θ, are more efficient at rescuing the population (see Fig. 4.3). Besides, when τ af > θ, S mutants that fix appear earlier than G mutants that fix: this is also due to their larger selective advantage, and consistently, the opposite holds for τ af < θ, when G mutants are fitter than S mutants (see Eq. 4.1). In addition, Fig. 4.6B shows that τ af decreases as the Hill coefficient n which characterizes the steepness of the environment degradation (see Eq. 4.1) is increased. Indeed, for large n, the population gets extinct quickly and rescue needs to occur fast if it occurs at all.

Impact of population size on rescue

So far, we have discussed population rescue at a given carrying capacity K. What is the impact of K on rescue? First, our analytical expression of the fixation probability p fix of mutants in Eq. 4.4 depends on K only via the function ρ introduced in Eq. 4.5. But ρ depends on the number of wild-type microbes N W (t) and on the carrying capacity K only through the ratio N W (t)/K, whose dynamics is independent from K (see Eq. 4.3). Therefore, p fix is expected to be independent from K. Fig. 4.4A confirms that it is the case: the simulation results obtained for different values of K collapse on the same curves. In addition, they are in very good agreement with the predictions from Eq. 4.4.

Let us now turn to the rescue probability p r . Eqs. 4.8 and 4.9 demonstrate that p r depends on population size only via the product N W (t)µ. Therefore, the relevant parameter is Kµ. Fig. 4.4B confirms that p r only depends on K via Kµ: the simulation results obtained for different values of K collapse on the same curves when they are plotted as a function of Kµ, and feature a good agreement with Eq. 4.8. For larger K, smaller mutation probabilities per division suffice to ensure larger rescue probabilities, because more mutants appear in larger populations, but more precisely, what really matters for rescue is the value of Kµ.

In addition, Eqs. 4.11 and 4.12 show that for the mean time τ af of appearance of a mutant that fixes, the relevant parameter is also Kµ. Fig. 4.4C confirms this: the simulation results obtained by varying µ at constant K or by varying K at constant µ collapse when they are plotted as a function of Kµ, in good agreement with Eq. 4.12.

Finally, in Section 4.5.4 of the Appendix, we investigate the mean extinction time of the lineages of mutants that do not fix. Eq. 4.24 shows that it is independent from population size, which is confirmed by Fig. 4.7B. We also find that this extinction time is longest for mutants appearing close to the inflection point θ of the environment transition, which corresponds to the time when the fitness difference between W organisms and mutants is smallest. Intuitively, mutants that are strongly deleterious or beneficial have their fates sealed faster than neutral ones. Furthermore, in the framework of the Moran process (with constant population size and fitnesses), extinction times are longest for neutral mutants [START_REF] Ewens | Mathematical Population Genetics 1: Theoretical Introduction[END_REF][START_REF] Teimouri | Theoretical investigation of stochastic clearance of bacteria: First-passage analysis[END_REF][START_REF] Teimouri | Elucidating the correlations between cancer initiation times and lifetime cancer risks[END_REF]. While the time to extinction is not crucial to our study of rescue by a single mutation, it can become relevant to more complex processes involving several mutations, e.g. to the crossing of fitness valleys or plateaus [START_REF] Daniel | The rate at which asexual populations cross fitness valleys[END_REF][START_REF] Bitbol | Quantifying the role of population subdivision in evolution on rugged fitness landscapes[END_REF].

Overall, the main quantities that characterize population rescue, namely the rescue probability p r and the mean time τ af of appearance of a mutant that fixes, are governed by Kµ. Hence, the impact of population size and mutation probability is mainly felt through this parameter.

Discussion

In this paper, we investigated the evolutionary rescue of a microbial population in a gradually deteriorating environment, characterized by a sigmoidal decay down to zero of the fitness of wild-type organisms, with a tunable steepness. The population is thus destined for extinction in the absence of adaptive mutants. We showed that mutants that appear later during the environment deterioration have a higher probability to fix, but because the wild-type population gradually decays, mutants are less likely to appear at such late stages. We demonstrated that the overall rescue probability of the population increases with a sigmoidal shape as the product Kµ of the carrying capacity K and of the mutation probability µ is increased. In the limit of an instantaneous environment degradation, the increase of rescue probability occurs for Kµ ≈ 1, as preexisting mutations become necessary for rescue. Importantly, much smaller values of Kµ suffice for rescue if the environment degradation, and thus the population decay, are slower, consistently with previous studies on the rate of fitness decay in the regime of stabilizing selection [START_REF] Burger | Evolution and extinction in a changing environment[END_REF][START_REF] Gomulkiewicz | Demographic and genetic constraints on evolution[END_REF]. We also found that specialist mutants are slightly more efficient at rescuing the population than generalist ones. Note however that generalists are better adapted to multiple environment switches or less strong evolutionary constraints [START_REF] Mayer | Transitions in optimal adaptive strategies for populations in fluctuating environments[END_REF][START_REF] Donaldson-Matasci | Phenotypic diversity as an adaptation to environmental uncertainty[END_REF][START_REF] Wang | Evolving generalists in switching rugged landscapes[END_REF][START_REF] Sachdeva | Tuning environmental timescales to evolve and maintain generalists[END_REF]. We further characterized the rescue process by investigating the average time of appearance of the mutants that do rescue the population, which also depends on the parameter Kµ, and the average extinction time of those that do not, which is longest when mutants are almost neutral. In all cases, we provided both analytical expressions and stochastic simulation results, and obtained a very good agreement between them. Our analytical expressions were obtained with assumptions that are more general than the weak-mutation assumption Kµ 1, as we only required the wild-type population to be much larger than the mutant one upon the appearance of the successful mutant lineage. Accordingly, our analytical predictions, notably the one for the rescue probability, remain very good beyond the weak-mutation regime. Our methods can be applied to other situations with continuously variable fitnesses and population sizes. Our predictions could be tested in controlled evolution experiments, e.g. in the context of antimicrobial resistance evolution, especially by varying population size and/or by studying strains with different mutation rates.

Overall, our study quantitatively confirms the key impact of the rapidity of environment degradation on the fate of a population. Very large populations can almost always escape extinction because they have a wide range of preexisting mutants, while smaller ones (or rarely mutating ones, since what matters is Kµ) can be rescued by adaptive mutations only if the environment changes slowly enough. The case of not-too-large populations is practically very important because real populations tend to have complex structures [START_REF] Marle | Compartmentization of the gut viral reservoir in hiv-1 infected patients[END_REF], and competition is local, which decreases their effective size. Accordingly, an exciting extension would be to consider the impact of spatial structure [START_REF] Bitbol | Quantifying the role of population subdivision in evolution on rugged fitness landscapes[END_REF][START_REF] Nahum | A tortoise-hare pattern seen in adapting structured and unstructured populations suggests a rugged fitness landscape in bacteria[END_REF][START_REF] Cooper | Tipping the mutation-selection balance: Limited migration increases the frequency of deleterious mutants[END_REF] on evolutionary rescue [START_REF] Uecker | Evolutionary rescue in structured populations[END_REF][START_REF] Czuppon | The effect of habitat choice on evolutionary rescue in subdivided populations[END_REF] in a gradually deteriorating environment. In cases where one aims to avoid rescue, our results entail that environment changes should be made as fast as possible.

For instance, in order to avoid antimicrobial resistance evolution, gradually increasing doses of antimicrobial should be avoided, consistently with the observation that static antimicrobial gradients can strongly accelerate resistance evolution [START_REF] Zhang | Acceleration of emergence of bacterial antibiotic resistance in connected microenvironments[END_REF][START_REF] Greulich | Mutational pathway determines whether drug gradients accelerate evolution of drug-resistant cells[END_REF][START_REF] Rutger Hermsen | On the rapidity of antibiotic resistance evolution facilitated by a concentration gradient[END_REF][START_REF] Baym | Spatiotemporal microbial evolution on antibiotic landscapes[END_REF]. One could also study the interplay between such spatial heterogeneities and time variability of the environment. Furthermore, here, we have considered rescue by a single mutation. However, more adaptations can be accessible in several mutation steps, and thus, considering rescue in a gradually deteriorating environment in the presence of fitness valleys [START_REF] Daniel | The rate at which asexual populations cross fitness valleys[END_REF] or on more complete fitness landscapes [START_REF] Szendro | Quantitative analyses of empirical fitness landscapes[END_REF] would also be very interesting.

Appendix

Derivation of the fixation probability of mutants

Here, we present the derivation of the fixation probability p fix (i 0 , t 0 ) of i 0 mutants present at time t 0 [START_REF] Uecker | On the fixation process of a beneficial mutation in a variable environment[END_REF][START_REF] Alexander | Pre-existence and emergence of drug resistance in a generalized model of intra-host viral dynamics[END_REF][START_REF] Parzen | Stochastic Processes[END_REF]. We assume that the number of wild-type microorganisms is initially much larger than the number of mutants (N W (t 0 ) i 0 ). As explained in the main text, the selective pressure due to the competition with the wild-type is felt by the mutants through their division rate f M (t)[1 -N (t)/K], and in the initial phase where this competition is important, the total population size N(t) can be approximated by N (t) ≈ N W (t). Thus, competition is felt through the effective mutant fitness

f eff M (t) = f M (t)[1-N W (t)/K].
In addition, we treat the number of mutants stochastically, but the number N W (t) of wild-type organisms deterministically (see Eq. 4.3 and Fig. 4.1).

The master equation that describes the evolution of the probability P (i, t|i 0 , t 0 ) of having i mutants at time t knowing that there are i 0 mutants at time t 0 is given by:

∂P (i, t|i 0 , t 0 ) ∂t =f eff M (t)(i -1)P (i -1, t|i 0 , t 0 ) + g M (i + 1)P (i + 1, t|i 0 , t 0 ) -(f eff M (t) + g M )iP (i, t|i 0 , t 0 ) . (4.13)
Eq. 4.13 allows to establish the partial differential equation satisfied by the probability generating function φ i 0 ,t 0 (z, t) = +∞ i=0 z i P (i, t|i 0 , t 0 ):

∂φ i 0 ,t 0 ∂t = (z -1)(f eff M (t)z -g M ) ∂φ i 0 ,t 0 ∂z . (4.14)
The method of characteristics then yields [START_REF] Kendall | On the generalized "birth-and-death" process[END_REF][START_REF] Parzen | Stochastic Processes[END_REF]:

φ i 0 ,t 0 (z, t) =   1 + e ρ(t) z -1 - t t 0 f eff M (u)e ρ(u) du -1   i 0 , (4.15)
where:

ρ(t) = t t 0 (g M -f eff M (u))du . (4.16)
Note that ρ depends on the number of wild-type microbes N W (t) and on the carrying capacity K only through the ratio N W (t)/K, whose dynamics is system size-independent, i.e. independent from K (see Eq. 4.3). The probability generating function φ i 0 ,t 0 allows to calculate the fixation probability p fix (i 0 , t 0 ) of i 0 mutants present at time t 0 , through p fix (i 0 , t 0 ) = 1 -lim t→∞ P (0, t|i 0 , t 0 ) = 1 -lim t→∞ φ i 0 ,t 0 (0, t). This yields where we used:

p fix (i 0 , t 0 ) = 1 - g M ∞ t 0 e ρ(t) dt 1 + g M ∞ t 0 e ρ(t) dt i 0 , (4.17
t t 0 (g M -f eff M (u))e ρ(u) du = e ρ(t) -1 . (4.18)
Since ρ does not depend on the carrying capacity K, as noted above, this is also true for p fix (see Fig. 4.4A).

In the main text, we focus on the fixation probability of a single mutant that appears at time t 0 , and denote it as p fix (t 0 ) = p fix (1, t 0 ) (see Eq. 4.4, which corresponds to Eq. 4.17 with i 0 = 1).

Additional results for generalist mutants

D f G =0.2 f G =0.9 f G =1 f G =1.1 f G =2 Theory Simulation f G =0.2 f G =0.9 f G =1 f G =1.1 f G =2
f G =0.2 f G =0.9 f G =1 f G =1.1 f G =2 Th.
Sim. In both panels, markers correspond to averages over 10 3 -10 4 replicate stochastic simulations ("Simulation"). Dashed and solid lines correspond to numerical resolutions of Eq. 4.12 ("Theory") for G and S mutants, respectively. Parameter values: g W = g G = g S = 0.1, K = 10 3 , N 0 W = 10 and θ = 10 3 . Horizontal dotted lines: τ af = θ.

A

Results for the time of appearance of the mutants that fix

Extinction time of mutants that do not fix

In the case where the mutant that appears does not fix, how long does its lineage take to go extinct? As for the fixation probability p fix , the time to extinction of a mutant will depend on its time of appearance t 0 . The average time to extinction is the average of the first-passage time τ 0 to the state i = 0 where i denotes the number of mutants. Then, we can compute the probability dp( τ 0 ∈ [t, t + dt] | i 0 , t 0 ) that τ 0 belongs to the interval [t, t + dt], provided that the initial number of mutants is i 0 at time t 0 :

dp( τ 0 ∈ [t, t + dt] | i 0 , t 0 ) = P (0, t + dt|0, ∞; i 0 , t 0 ) -P (0, t|0, ∞; i 0 , t 0 ) , (4.19
) where P (0, t|0, ∞; i 0 , t 0 ) is the probability to have 0 mutant at time t, provided that the initial number of mutants is i 0 at time t 0 and the final number is i ∞ = 0, corresponding to extinction. Using Bayes' theorem and the Markov property yields P (0, t|0, ∞; i 0 , t 0 ) = P (0, t|i 0 , t 0 ) P (0, ∞|0, t; i 0 , t 0 ) P (0, ∞|i 0 , t 0 ) = P (0, t|i 0 , t 0 ) (1 -p fix (0, t))

1 -p fix (i 0 , t 0 ) = P (0, t|i 0 , t 0 ) 1 -p fix (i 0 , t 0 ) , (4.20)
where we have employed p fix (0, t) = 0. Thus,

dp( τ 0 ∈ [t, t + dt] | i 0 , t 0 ) = P (0, t + dt|i 0 , t 0 ) -P (0, t|i 0 , t 0 ) 1 -p fix (i 0 , t 0 ) = 1 1 -p fix (i 0 , t 0 ) dP (0, t|i 0 , t 0 ) dt dt . (4.21)
We can now express the mean mutant extinction time τ 0 = τ 0 using Eq. 4.21 as

τ 0 = ∞ t 0 t dp( τ 0 ∈ [t, t + dt] | i 0 , t 0 ) = 1 1 -p fix (i 0 , t 0 ) ∞ t 0 t dP (0, t|i 0 , t 0 ) dt dt . (4.22)
The previous equation can be rewritten using the probability generating function φ i 0 ,t 0 (z, t) = +∞ i=0 z i P (i, t|i 0 , t 0 ) by noting that P (0, t|i 0 , t 0 ) = φ i 0 ,t 0 (0, t):

τ 0 = 1 1 -p fix (i 0 , t 0 ) ∞ t 0 t ∂φ i 0 ,t 0 ∂t (0, t) dt . (4.23)
Using Eqs. 4.15 and 4.18 and introducing Λ(t) = g M t t 0 e ρ(u) du then yields

τ 0 = i 0 g M 1 -p fix (i 0 , t 0 ) ∞ t 0 te ρ(t) Λ i 0 -1 (t) (1 + Λ(t)) i 0 +1 dt . (4.24)
Fig. 4.7 shows the average lifetime τ 0 = τ 0 -t 0 of the lineage of a single mutant (i 0 = 1) that finally goes extinct, versus the time t 0 when this mutant appears during the environment degradation. We obtain a very good agreement between the results of our stochastic simulations and our analytical prediction in Eq. 4.24. For t 0 < θ, mutants are less fit than wildtype organisms, and S mutants are less fit than G mutants (see Eq. 4.2). Conversely, for t 0 > θ, mutants are fitter than wild-type organisms, and S mutants are fitter than G mutants: hence, S mutants are always more extreme than G mutants. Because of this, intuition based on the fixation times within the Moran process [START_REF] Ewens | Mathematical Population Genetics 1: Theoretical Introduction[END_REF][START_REF] Teimouri | Theoretical investigation of stochastic clearance of bacteria: First-passage analysis[END_REF][START_REF] Teimouri | Elucidating the correlations between cancer initiation times and lifetime cancer risks[END_REF] with constant population size make us expect that S mutants will have their fates sealed faster, and thus will get extinct faster provided that they are destined for extinction. This is indeed what we obtain (see Fig. 4.7). In particular, the largest extinction time is obtained close to t 0 = θ, where G and S mutants are neutral. In addition, for t 0 θ, S mutants have a fitness f S ≈ 0 (see Eq. 4.2). Then, they generally go extinct in one generation, i.e. in τ 0 = 10 time units (in our simulations, the death rate, which sets the division rate when the population is close to its steady-state size K(1 -g W /f W ), is taken equal to 0.1): this is what is obtained in Fig. 4.7. Still for t 0 θ, G mutants are such that f G = 0.5 while f W ≈ 1 (see Eq. 4.1): then, the extinction time of the mutant lineage can be obtained within the framework of the Moran process assuming a constant population size K(1 -g W /f W ): it yields τ 0 ≈ 15 [START_REF] Ewens | Mathematical Population Genetics 1: Theoretical Introduction[END_REF], consistently with Fig. 4.7. Furthermore, Fig. 4.7A shows that for t 0 < θ, the bigger the Hill coefficient n characterizing the steepness of the environment degradation (see Eq. 4.1), the smaller the mean time to extinction, while the opposite holds for t 0 > θ: this is because fitness differences between mutants and wild-type organisms are exacerbated with large n. In particular, as long as t 0 < θ, we have f S ≈ 0 and f W ≈ 1, and therefore the results obtained just before for t 0 θ hold. Finally, Fig. 4.7B shows that τ 0 does not depend on the carrying capacity K. This can be understood from Eq. 4.24, given that p fix is independent from K, as well as ρ, as explained in Section 4.5.1.

Analytical approximations for a sudden environment degradation

Here, we derive analytical approximations for the fixation probability p fix , the probability p r of rescue and the mean time τ af of appearance of a mutant that fixes in the case of a sudden environment degradation. We thus consider that the Hill coefficient n describing the decay of W fitness f W tends to infinity (see Eq. 4.1), as well as m, which describes the increase of S mutant fitness f S (see Eq. 4.2), i.e. n, m → ∞. Then, the fitness transition around t = θ is very abrupt, and we therefore consider that f W = 1 and f S = 0 if t < θ while f W = 0 and f S = 1 if t > θ.

As soon as f W = 0, i.e. for t > θ, W microbes stop dividing. In a deterministic description, their number decreases exponentially according to the function N W (t) = N e W e -g W (t-θ) , where N e W = K(1 -g W ) is the equilibrium size of the fully wild-type population if f W = 1, i.e. for t < θ. For analytical convenience, we make the approximation that N W (t) = N e W if t < θ + τ 1/2 and N W (t) = 0 otherwise, where τ 1/2 is the time such that N W (τ 1/2 ) = K/2 (i.e. τ 1/2 = ln(2N e W /K)/g W ). While the exact choice of θ + τ 1/2 as a threshold is somewhat arbitrary, it is important to choose a threshold that reflects the decay timescale of the W population. Indeed, it allows to effectively take into account the demographic pressure that mutants undergo because of the presence of W organisms during the decline of the W population. Considering a threshold θ instead of θ + τ 1/2 would lead one to underestimate the demographic pressure on mutants and thus to overestimate their fixation probability. Conversely, considering a threshold θ + τ 0 , where τ 0 is the mean time of W population extinction when W microbes no longer divide, would lead one to overestimate the demographic pressure on mutants and thus to underestimate their fixation probability.

Fixation probability

Generalist mutant: Let us first focus on the fixation probability p G fix (t 0 ) of a single generalist (G) mutant that appears at time t 0 . Recall that the fitness of G mutants is constant. In most of our work, we take f G = 0.5, but here, for the sake of generality, we will retain f G in our expressions. Within our approximation, the fate of a mutant will strongly depend on whether t 0 < θ = θ + τ 1/2 or t 0 > θ. We start from Eq. 4.4, which reads

p G fix (t 0 ) = 1 1 + g G ∞ t 0 e ρ G (t) dt . ( 4.25)
Two regimes need to be distinguished:

• If t < θ, then N W (t) = K(1 -g W ); • If t ≥ θ, then N W (t) = 0.
For t 0 < θ, Eq. 4.5 yields

ρ G (t) = -(f G g W -g G ) (t -t 0 ) if t 0 < t < θ , -(f G -g G )(t -t 0 ) + f G (1 -g W )( θ -t 0 ) if t 0 < θ < t .
(4.26) Thus, Eq. 4.25 simplifies as:

p G fix (t 0 ) = (f G -g G )(f G g W -g G ) f G g W (f G -g G ) -e -(g G -f G g W )(t 0 -θ) f G g G (1 -g W ) . ( 4

.27)

For t 0 > θ, N W = 0, and Eq. 4.5 yields

ρ G (t) = -(f G -g G ) (t -t 0 ) . (4.28)
Then, Eq. 4.25 gives

p G fix (t 0 ) = 1 -g G /f G , (4.29)
which corresponds to the probability that the mutant lineage survives rapid stochastic extinction [START_REF] Ovaskainen | Stochastic models of population extinction[END_REF][START_REF] Coates | Antibiotic-induced population fluctuations and stochastic clearance of bacteria[END_REF][START_REF] Marrec | Resist or perish: fate of a microbial population subjected to a periodic presence of antimicrobial[END_REF]. This makes sense, because within our approximation, t 0 > θ formally corresponds to introducing a mutant in the absence of any W individual. Let us summarize Eqs. 4.27 and 4.29:

p G fix (t 0 ) = (f G -g G )(f G g W -g G ) f G g W (f G -g G )-e -(g G -f G g W )(t 0 -θ) f G g G (1-g W ) if t 0 < θ , 1 -g G /f G if t 0 > θ . (4.30)
Specialist mutant: Let us now turn to the fixation probability p S fix (t 0 ) of a single specialist (S) mutant that appears at time t 0 . Again, we start from Eq. 4.4, which reads

p S fix (t 0 ) = 1 1 + g S ∞ t 0 e ρ S (t) dt . (4.31)
Three regimes need to be distinguished:

• If t < θ, then N W (t) = K(1 -g W ) and f S (t) = 0; • If θ < t ≤ θ, then N W (t) = K(1 -g W ) and f S (t) = 1; • If t ≥ θ, then N W (t) = 0 and f S (t) = 1.
If t 0 < θ, Eq. 4.5 yields

ρ S (t) =      g S (t -t 0 ) if t 0 < t < θ , g S (θ -t 0 ) + (g S -g W )(t -θ) if θ < t < θ , g S (θ -t 0 ) + (g S -g W )( θ -θ) + (g S -1)(t -θ) if θ < t .
(4.32) Note that the second term in the second and the third lines of the previous equation both vanish if g S = g W . In this case, Eq. 4.31 simplifies as:

p S fix (t 0 ) = e -g S (θ-t 0 ) (1 -g S ) 1 + g S (1 -g S )( θ -θ) . ( 4

.33)

If θ < t 0 < θ, Eq. 4.5 yields

ρ S (t) = (g S -g W )(t -t 0 ) if t 0 < t < θ , (g S -g W )( θ -t 0 ) + (g S -1)(t -θ) if θ < t . (4.34)
If in addition g S = g W , Eq. 4.31 then gives

p S fix (t 0 ) = 1 -g S 1 + g S (1 -g S )( θ -t 0 ) . ( 4
p S fix (t 0 ) =        e -g S (θ-t 0 ) (1-g S ) 1+g S (1-g S )( θ-θ) if t 0 < θ , 1-g S 1+g S (1-g S )( θ-t 0 ) if θ < t 0 < θ , 1 -g S if θ < t 0 .

Rescue probability

Now, let us focus on the rescue probability p r , which satisfies p r = 1 -e -Σ (see Eq. 4.8), where Σ is given by Eq. 4.9. Since here f W (t) = 0 for t > θ and f W (t) = 1 for t < θ, Eq. 4.9 simplifies into

Σ = µN W 1 - N W K θ 0 p fix (t)dt = µK(1 -g W )g W θ 0 p fix (t)dt , (4.39)
where we have employed

N W = K(1 -g W ).
Thus, we obtain a simplified formula for the rescue probability:

p r = 1 -exp -µK(1 -g W )g W θ 0 p fix (t)dt , (4.40)
which holds both for generalist and for specialist mutants. Specifically, in the case of a generalist mutant, Eq. 4.30 yields

θ 0 p G fix (t)dt = 1 f G g W log g G (1 -g W )e (g G -f G g W ) θ -g W (f G -g G ) g G (1 -g W )e (g G -f G g W ) θ -g W (f G -g G )e (g G -f G g W )θ .
(4.41) And in the case of a specialist mutant, Eq. 4.38 gives

θ 0 p S fix (t)dt = (1 -e -g S θ )(1 -g S ) g S + g 2 S (1 -g S )( θ -θ) . (4.42)
Fig. 4.9A shows that there is a good agreement between our approximated analytical predictions and our numerical simulation results. Moreover, we observe that the transition between small and large values of p r occurs for µK of order 1. Indeed for abrupt environment degradations such that W fitness gets to 0 right at the transition point θ, preexisting mutants are necessary to ensure rescue.

In a previous work [START_REF] Marrec | Resist or perish: fate of a microbial population subjected to a periodic presence of antimicrobial[END_REF], we proposed an expression for the probability of extinction of a microbial population subjected to a periodic presence of antimicrobial in the weak-mutation regime Kµ 1. We then assumed that the antimicrobial was instantaneously added and removed from the environment, which thus corresponds to instantaneous environment changes. For a perfect biostatic antimicrobial that completely stops growth, wildtype fitness goes to 0 in the presence of antimicrobial, corresponding to the case studied here. When in addition the alternation period is long enough for extinction to occur at the first phase with antimicrobial if no resistant mutants preexist, our prediction in Eq. 1 of Ref. [START_REF] Marrec | Resist or perish: fate of a microbial population subjected to a periodic presence of antimicrobial[END_REF] gives a good approximation of our present results, as shown by Fig. 4.9B. Therefore, the present work generalizes this prediction beyond the weak-mutation regime Kµ 1.

Appearance time of a mutant that fixes

Finally, we derive an approximated analytical prediction for the mean time of appearance τ af of a mutant that fixes in the population before it goes extinct. Let us recall that the probability density function of τaf satisfies F τaf (t) = (1/p r )(dp af /dt) (see Eq. 4.10 and above). Thus, for an abrupt environment degradation such that f W (t) = 0 for t > θ, the mean time of appearance τ af is given by:

τ af = θ 0 tF τaf (t)dt = 1 p r θ 0 t dp af dt dt = θ - 1 p r θ 0 p af (t)dt = θ - 1 p r θ 0 (1 -e -Σ(t) )dt , (4.43)
where, using Eq. 4.11 with f W = 1 and N W = K(1 -g W ) for t < θ, we have

Σ(t) = µKg W (1 -g W ) t 0 p fix (u)du . (4.44)
Eq. 4.43 is valid for both generalist and specialist mutants. One just needs to compute p r by using Eq. 4.40 with Eq. 4.41 (resp. Eq. 4.42) for G (resp. S) mutants and p fix by using Eq. 4.30 (resp. Eq. 4.38) for G (resp. S) mutants. Mean time τ af of appearance of a G or S mutant that fixes versus the product Kµ of the carrying capacity K and the mutation probability µ. Here, µ was varied at constant carrying capacity K = 10 3 . Horizontal dotted line: τ af = θ. Vertical dash-dotted line: Kµ = 1. Markers correspond to averages over 10 3 replicate stochastic simulations ("Simulation"). Dashed and solid lines correspond to our analytical predictions ("Theory") for G and S mutants, respectively (see Eq. 4.43). Parameter values: g W = g G = g S = 0.1, N 0 W = 10, m = n = 10 10 , θ = 10 3 and τ 1/2 = 5.9 and θ = 10 3 . Fig. 4.10 shows that there is a very good agreement between our approximated analytical predictions and the results of our numerical simulations in the weak-to-moderate mutation regime Kµ 1 where our analytical derivations were conducted. Recall also that τ af only depends on K and µ via Kµ (see main text).

From the stochastic model to the deterministic limit

In our analytical calculations, we consider the deterministic description for the population of W organisms (see Eq. 4.3). Here, we present a full derivation of the deterministic limit of the stochastic model for large population sizes. This derivation is similar to those of Refs. [START_REF] Traulsen | Coevolutionary dynamics: From finite to infinite populations[END_REF][START_REF] Foster | Stochastic evolutionary game dynamics[END_REF][START_REF] Marrec | Quantifying the impact of a periodic presence of antimicrobial on resistance evolution in a homogeneous microbial population of fixed size[END_REF] that address the case of the Moran model.

In a fully wild-type (W) population, the probability P (j, t|j 0 ) of having j W microorganisms at time t, knowing that j 0 W microorganisms were present at time t = 0, satisfies the master equation

∂P (j, t|j 0 ) ∂t = f W (t) 1 - j -1 K (j -1)P (j -1, t|j 0 ) (4.45) + g W 1 - j + 1 K (j + 1)P (j + 1, t|j 0 ) -f W (t) 1 - j K + g W jP (j, t|j 0 ) . (4.46)
Let us introduce x = j/K and ρ(x, t|x 0 ) = KP (j, t|j 0 ), and perform a Kramer-Moyal expansion [START_REF] Van Kampen | Stochastic Processes in Physics and Chemistry[END_REF][START_REF] Gardiner | Handbook of Stochastic Methods for Physics[END_REF], which focuses on the regime 1/K x. To first order in 1/K, one obtains the following diffusion equation [START_REF] Ewens | Mathematical Population Genetics 1: Theoretical Introduction[END_REF] (also known as Fokker-Planck equation or Kolmogorov forward equation):

∂ρ(x, t|x 0 ) ∂t = - ∂ ∂x {[f W (t)x(1 -x) -g W x] ρ(x, t|x 0 )} + 1 2K ∂ 2 ∂x 2 {[f W (t)x(1 -x) + g W x] ρ(x, t|x 0 )} . (4.47)
Note that the first term on the right hand-side of this equation corresponds to the selection term (known as the drift term in physics), while the second one corresponds to the genetic drift term (known as the diffusion term in physics).

In the limit K → ∞, to zeroth order in 1/K, one can neglect the diffusion term, yielding:

∂ρ(x, t|x 0 ) ∂t = - ∂ ∂x {[f W (t)x(1 -x) -g W x] ρ(x, t|x 0 )} . (4.48)
In this limit, one obtains an equation on the average population size (scaled by K), x(t) = 1 0 xρ(x, t|x 0 )dx:

∂ x ∂t = [f W (t) -g W ] x -f W (t) x 2 . (4.49)
Further assuming that the distribution of x is very peaked around its mean ( x ≈ x) and in particular neglecting the variance (

x 2 ≈ x 2 ≈ x 2 ),
which is acceptable for very large systems with demographic fluctuations, one obtains:

∂x ∂t = [f W (t)(1 -x) -g W ] x . (4.50)
Multiplying this ordinary differential equation by the carrying capacity K yields Eq. 4.3, where j is denoted by N W .

Numerical computation methods

In this work, we derived analytical predictions for the fixation probability p fix , the rescue probability p r and the mean time to extinction τ 0 (see Eqs. 4.4, 4.8 and 4.24, respectively). Since these equations involve improper integrals, it is necessary to appropriately choose the values of the (finite) integral boundaries in order to obtain a good approximation of these improper integrals by numerical integration. First, in order to compute numerically p fix from Eq. 4.4, let us introduce a parameter τ 1 such that:

p fix (t 0 ) = 1 - g M ∞ t 0 e ρ(t) dt 1 + g M ∞ t 0 e ρ(t) dt ≈ 1 - g M t 0 +τ 1 t 0 e ρ(t) dt 1 + g M t 0 +τ 1 t 0 e ρ(t) dt , (4.51)
One should choose τ 1 such that it is much larger than the mean time to extinction of the mutants τ 0 . Otherwise, some mutants destined for extinction will be considered as mutants that fix. Fig. 4.11A illustrates this point: for the parameters employed in this figure, the largest value of τ 0 is max(τ 0 ) ∼ 30, and accordingly, we observe that for τ 1 30, the agreement between the analytical prediction calculated numerically via Eq. 4.51 and the simulated data is very good.

Similarly, in order to compute numerically p r from Eq. 4.8, we introduce a parameter τ 2 such that:

p r = 1 -exp -µ ∞ 0 p fix (t)N W (t)f W (t) 1 - N W (t) K dt ≈ 1 -exp -µ τ 2 0 p fix (t)N W (t)f W (t) 1 - N W (t) K dt , (4.52)
Choosing τ 2 so that it is larger than the mean time of spontaneous extinction of wild-type microbes should ensure that we capture the whole time range over which mutants can appear and fix. As can be seen in Fig. 4.1, for the parameter values chosen in Fig. 4.11B, the mean time of spontaneous extinction is ∼ 1750. Indeed, Fig. 4.11B shows that a good agreement between numerical predictions and simulated data is obtained for τ 2 > 1750.

Similarly, in order to compute numerically τ 0 = τ 0 -t 0 from Eq. 4.24 with i 0 = 1, we introduce a parameter τ 3 such that:

τ 0 = g M 1 -p fix (t 0 ) ∞ t 0 te ρ(t) (1 + Λ(t)) 2 dt ≈ g M 1 -p fix (t 0 ) t 0 +τ 3 t 0 te ρ(t) (1 + Λ(t)) 2 dt . (4.53)
The parameter τ 3 must be chosen so that it is larger than all times for which the probability density function of τ 0 is significant. In practice, we may Assuming that this distribution is exponential (it is close to exponential in simulations), one should choose τ 3 τ 2 0 . Accordingly, Fig. 4.11C demonstrates a very good agreement with simulated data for τ 3 max(τ 0 ) 2 ∼ 900, where max(τ 0 ) is the largest value of τ 0 for the parameters involved in this figure .   In practice, in each figure of this paper, we chose the values of τ 1 , τ 2 and τ 3 so that they were large enough to satisfy the criteria outlined here in the worse case of the figure (i.e. the one requiring the largest value of this parameter).

Numerical simulation methods

In this work, all numerical simulations are performed using a Gillespie algorithm [START_REF] Daniel T Gillespie | Exact stochastic simulation of coupled chemical reactions[END_REF]. Because the sampled time intervals ∆t between successive individual event satisfy ∆t < 1 (see Fig. 4.12), which is smaller than the timescales of all processes considered here, we neglect fitness variations between individual events. In practice, the sampled time intervals between each individual event tend to get larger close to extinction events, since the total number of microbes then substantially decreases, but even then, they remain smaller than 1. Note that, in order to take into account the time variability of fitness at a higher resolution than that of events, one could employ e.g. the approach described in Ref. [START_REF] Thanh | Simulation of biochemical reactions with time-dependent rates by the rejection-based algorithm[END_REF]. In the following, we provide details about the simulations used in each part of our work.

Population decay in a deteriorating environment

In our simplest simulations, presented in Fig. 4.1, only W microorganisms were considered (no mutation, µ = 0). For each replicate simulation, we saved the number of W individuals present at regular time intervals, i.e. at time points 0, δt, 2δt... The elementary events that can occur are:

• W → 2W : Division of a wild-type microbe with rate k + W = f W (t)(1 -N W /K), where the value of f W (t) is taken at the time t of the last event that occurred.

• W → ∅: Death of a wild-type microbe with rate k - W = g W .

The total rate of events is R = (k + W + k - W )N W . Simulation steps are the following:

1. Initialization: The microbial population starts from N W = N 0 W wildtype microorganisms at time t = 0, and the value of f W is set at f W (0).

2. The time increment ∆t is sampled randomly from an exponential distribution with mean 1/R, where R = (k

+ W + k - W )N W .
The next event to occur is chosen randomly, with probabilities k/R proportional to the rate k of each event.

3. The time t is increased to t = t + ∆t and the event chosen at Step 2 is executed, i.e. N W is updated. The value of f W is also updated from f W (t) to f W (t + ∆t).

4. The number of wild-type microbes N W is saved at the desired time points falling between t and t + ∆t.

We go back to

Step 2 and iterate until the total number of microbes reaches zero (N W = 0), corresponding to extinction.

Fixation probability and time to extinction of mutants

In our simulations concerning the fixation probability and the time to extinction of mutants, both wild-type microorganisms (W) and mutants (M) are considered, but no random mutations are allowed, i.e. µ = 0. Indeed, the aim is to determine the fate of i 0 mutants that are introduced at a controlled time t 0 (generally we take i 0 = 1 to model the appearance of a single mutant). The elementary events that can occur are:

• W → 2W : Division of a wild-type microbe with rate k + W = f W (t)(1 - (N W + N M )/K)
, where the value of f W (t) is taken at the time t of the last event that occurred.

• W → ∅: Death of a wild-type microbe with rate k - W = g W .

• M → 2M : Division of a mutant microbe with rate

k + M = f M (t)(1 - (N W + N M )/K)
, where the value of f M (t) is taken at the time t of the last event that occurred. Note that for G mutants, f M is constant, but for S mutants, it varies in time.

• M → ∅: Death of a mutant microbe with rate k - M = g M .

The total rate of events is R = (k

+ W + k - W )N W + (k + M + k - M )N M .
Simulation steps are the following:

1. Initialization: The microbial population starts from N W = N 0 W wildtype microorganisms and N M = 0 mutant at time t = 0, and the values of f W and f M are set at f W (0) and f M (0), respectively.

2. The time increment ∆t is sampled randomly from an exponential distribution with mean 1/R, where R = (k

+ W + k - W )N W + (k + M + k - M )N M .
The next event to occur is chosen randomly, with probabilities k/R proportional to the rate k of each event.

3. If t + ∆t ≥ t 0 for the first time, the time is set to t = t 0 , i 0 wild-types microbes are replaced by i 0 mutants (N W = N W -i 0 and N M = N M + i 0 ) and the event determined at Step 2 is not executed. Otherwise, the time t is increased to t = t + ∆t and the event determined at Step 2 is executed, i.e. N W or N M is updated. The values of f W and f M (in the case of an S mutant) are also updated.

We go back to

Step 2 and iterate until the total number of microbes is zero (N W + N M = 0), corresponding to extinction of the population, or there are only mutants (N W = 0 and N M = 0), corresponding to fixation of the mutant.

Rescue of a population by mutants

Finally, our simulations concerning the rescue of a population by mutants, both wild-type microorganisms (W) and mutants (M) are considered, with a probability µ of mutation from W to M upon division. The elementary events that can occur are:

• W → 2W : Division without mutation of a wild-type microbe with rate

k + W = f W (t)(1 -(N W + N M )/K)(1 -µ)
, where the value of f W (t) is taken at the time t of the last event that occurred.

• W → W + M : Division with mutation of a wild-type microbe with rate

k W M = f W (t)(1 -(N W + N M )/K)µ.
• W → ∅: Death of a wild-type microbe with rate k - W = g W .

• M → 2M : Division of a mutant microbe with rate

k + M = f M (t)(1 - (N W + N M )/K)
, where the value of f M (t) is taken at the time t of the last event that occurred. Note that for G mutants, f M is constant, but for S mutants, it varies in time.

• M → ∅: Death of a mutant microbe with rate k - M = g M .

The total rate of events is R = (k

+ W + k - W + k W M )N W + (k + M + k - M )N M .
Simulation steps are the following:

1. Initialization: The microbial population starts from N W = N 0 W wildtype microorganisms and N M = 0 mutant at time t = 0, and the values of f W and f M are set at f W (0) and f M (0), respectively.

2. The time increment ∆t is sampled randomly from an exponential distribution with mean 1/R, where R = (k

+ W + k - W + k W M )N W + (k + M + k - M )N M .
The next event to occur is chosen randomly, with probabilities k/R proportional to the rate k of each event.

3. The time t is increased to t = t + ∆t and the event determined at Step 2 is executed, i.e. N W and N M are updated. The value of f W and f M (in the case of an S mutant) are also updated.

We go back to

Step 2 and iterate until the total number of microbes is zero (N W + N M = 0), corresponding to extinction of the population, or there are only mutants (N W = 0 and N M = 0), corresponding to fixation of the mutant and rescue of the population.

Chapter 5

Building a universal model for structured microbial populations This chapter presents a work still in progress at the time of writing this thesis.

We develop a graph-structured population model that generalizes the existing models in which each node is considered either as a single individual or as a population of fixed size. In our model, each node is a deme of variable size, and migrations are independent of birth and death events. We calculate analytically the fixation probability of a mutant lineage for different population structures in the rare migration regime, and verify our predictions with numerical simulations. We find that many structures are suppressors of natural selection in our models, including some that are known as natural selection amplifiers in existing models. Despite this striking difference, our model is consistent with the existing models when the ratios of total reproduction rate to total migration rate in each deme are matched between models. [START_REF] Teimouri | Elucidating the correlations between cancer initiation times and lifetime cancer risks[END_REF]

Introduction

The models we have developed in Chapters 2, 3 and 4 are based on homogeneous and well-mixed microbial populations. However, such models give a good description of microbes in a well-agitated liquid suspension in a beaker, but of few natural situations. For instance, during an infection, microbial populations are subdivided between different organs, and between different hosts. Moreover, most microbial populations feature some geographical structure. Even bacteria growing on a Petri dish compete more strongly with their neighbors than with other bacteria.

Population structure can have major consequences on the way microbial populations evolve [START_REF] Korona | Evidence for multiple adaptive peaks from populations of bacteria evolving in a structured habitat[END_REF]. Structured populations, with their local competition, have smaller effective population sizes. This can allow the maintenance of larger genetic diversity, due to the increased importance of stochastic fluctuations. Some studies that investigated the impact of population subdivision on evolutionary dynamics showed that population structure accelerates adaption [START_REF] Cooper | Evolution at 'sutures' and 'centers': Recombination can aid adaptation of spatially structured populations on rugged fitness landscapes[END_REF], while other not [START_REF] Kryazhimskiy | Population subdivision and adaptation in asexual populations of saccharomyces cerevisiae[END_REF]. Thus, the evolution of structured populations requires further theoretical investigation.

Structured populations can be described by individuals situated at the nodes of a graph, with probabilities that the offspring of an individual replaces another individual along each edge of the graph [START_REF] Lieberman | Evolutionary dynamics on graphs[END_REF]. Importantly, these models have shown that specific structures can amplify or suppress natural selection. However, in these models, evolutionary outcomes can drastically depend on the details of the dynamics, e.g. whether each birth event precedes a death event or the opposite [START_REF] Kaveh | The duality of spatial death–birth and birth–death processes and limitations of the isothermal theorem[END_REF][START_REF] Hindersin | Most undirected random graphs are amplifiers of selection for birth-death dynamics, but suppressors of selection for death-birth dynamics[END_REF][START_REF] Pattni | Evolutionary graph theory revisited: when is an evolutionary process equivalent to the moran process[END_REF]. This lack of universality raises issues for applicability to real microbial populations.

In this work, which is still in progress at the time of writing this thesis, we construct a more realistic coarse-grained model where a structured population is composed of demes not limited to one individual between which migrations of individuals are possible [START_REF] Houchmandzadeh | The fixation probability of a beneficial mutation in a geographically structured population[END_REF] and independent from birth and death events. We investigate the fixation probability of a mutation in different structures as a function of the mutant fitness for different migration parameters. We then compare our model with existing models.

Model and methods

Structured population model

We consider microbial demes, whose carrying capacity is denoted by K, where two types of microorganisms can exist: wild-type (W) and mutant (M). Their reproduction rates are denoted by f W and f M , respectively, and their death rates by g W and g M , respectively. The number of individuals can vary over time and extinctions are allowed, but we will focus on the regime where they are negligible. More specifically, we will consider that the microbial population within a deme follows a logistic growth. We will focus on the fate of mutants without considering the possibility that other mutants appear before they fix or disappear. Throughout, our time unit corresponds to a generation of W microbes in the exponential growth phase. We model a structured population as a graph where each node represents a deme. If one node is connected to another node, then any individual from the first node can migrate to the second one. The ability of microbes to migrate from one deme to another deme is defined by their probability of migration per individual. This probability can depend on the origin and destination demes. Although in the main text we focus on migration rates per individual that do not depend on the type of microbes, in the Appendix we present analytical derivations that include the possibility of such a dependence.

We start from structured microbial populations whose demes are at their equilibrium size, i. e. the stationary phase of the logistic growth where the divisions compensate for deaths and vice versa (see Appendix, Section 5.5.3). Although we neglect the possible initial exponential growth phase of the microbial demes, our results are robust to variations in initial conditions because the time scales involved are much larger than that of initial growth.

Method

Throughout this work, we consider the case where fixation in a deme is much faster than migration events (rare migration regime) and thus mutants will first fix in a deme (or disappear) before they can propagate to the rest. Because fixation in a deme is well known, e.g under the Moran model [START_REF] Moran | Random processes in genetics[END_REF], we focus on the second stage of the process. Therefore, we investigate the fixation probability of a mutant lineage assuming that the structured population starts with a fully mutant deme while all others are fully wildtype. In the rare migration regime, this can be used as a starting point to derive analytical predictions for the fixation probability of a single mutant. More specifically, we will investigate the fate of a mutation in the structures shown in Here we represent a state where the mutant has fixed in one deme while all others are fully wild-type.

Our approach combines both analytical and numerical results. We derive analytically the fixation probability of a mutation in a structured microbial population using methods inspired by stochastic processes, either by solving recurrence relations satisfied by fixation probabilities, or by using master equations, more precisely transition rate matrices (see Appendix, Section 5.5.1). We test our analytical predictions and their domain of validity by simulating the evolutionary dynamics of the structured populations under consideration using a Gillespie algorithm (see Appendix, Section 5.5.5).

Results

Well-mixed populations

Before discussing structured populations, we start by a reminder on wellmixed populations. Indeed, they will be used as a reference to evaluate the impact of the structure on the evolution of the populations. The Moran model allows to calculate analytically the fixation probability Φ M,i of i mutants in a well-mixed population of fixed size N , which reads [START_REF] Moran | Random processes in genetics[END_REF] Φ

M,i = 1 -γ i 1 -γ N , (5.1)
where

γ = (f W g M )/(f M g W ).
We adapted the Moran results to our model with birth and death rates (see Appendix, Section 5.5.4 for full derivation).

Although we consider microbial populations of variable size, we focus on the stationary state where population size fluctuates around a stationary value, so the Moran model will give a good approximation (see Appendix, Section 5.5.3). From Eq. 5.1, we can define an amplifier of natural selection, i.e. a structure that decreases the fixation probability of deleterious mutations while increasing the fixation probability of beneficial mutations compared to a well-mixed population. Conversely, a suppressor of natural selection increases the fixation probability of deleterious mutations while decreasing the fixation probability of beneficial mutations compared to a well-mixed population. This is illustrated in Fig. 5.2.

In the existing models of populations on graphs with one individual per node [START_REF] Lieberman | Evolutionary dynamics on graphs[END_REF], some structures are neither amplifiers of natural selection nor suppressors of natural selection, such as the clique, or complete graph, under the birth-death and death-birth dyanmics (see Fig. 5.2B) [START_REF] Lieberman | Evolutionary dynamics on graphs[END_REF]. In the birthdeath dynamics, at each time step, an individual is selected to reproduce with probability proportional to its fitness and one of its neighbors, chosen uniformly at random, is replaced by that offspring [START_REF] Lieberman | Evolutionary dynamics on graphs[END_REF]. In the death-birth dynamics, at each time step, an individual is chosen uniformly at random to be replaced by the offspring of one of its neighbors, which is chosen to reproduce with probability proportional to its fitness [START_REF] Lieberman | Evolutionary dynamics on graphs[END_REF]. Under birth-death

Clique

The clique, or complete graph, is a structure where all demes are connected to all others with migration rates per individual independent from the deme (full symmetry, see Fig. 5.1A). The migration rate per wild-type microbe (respectively mutant) is denoted by m W (respectively m M ). The fixation probability Φ i of i fully mutant demes in a clique of D demes reads

Φ i = 1 -( mγ) i 1 -( mγ) D , (5.2)
where m = m W /m M and γ = (N W φ W )/(N M φ M ) (see Appendix, Section 5.5.1 for full derivation). Note that N W (respectively N M ) is the equi-librium size of a wild-type deme (respectively mutant) and φ W (respectively φ M ) the fixation probability of a wild-type microbe (respectively mutant) in a mutant deme (respectively wild-type). In the case where the migration rates per individual do not depend on the type of microbes (m W = m M and m = 1), the fixation probability Φ i does not depend on migration parameters. If in addition the fitness of both types of microbes are equal (f W = f M ), as well as their death rates (g W = g M ), then the fixation probability Φ i reduces to the well-known fixation probability of the Moran process for the neutral case [START_REF] Moran | Random processes in genetics[END_REF] Φ

i = i D . (5.3)
Thus, in the neutral case, the fixation probability of a mutant deme in a clique of D demes (Φ 1 = 1/D) is equal to the fixation probability of N mutants in a population of D × N microbes (see Eq. 5.1). As reported by Fig. 5.3A, where we focus on the case where the migration rates per individual do not depend on the type of microbes (m W = m M and m = 1), there is a very good agreement between our analytical predictions from Eq. 5.2 and our simulation results. The fixation probability Φ 1 of a mutant deme increases as the mutant fitness f M increases. More specifically, a deleterious mutant (f M < f W ) is very unlikely to fix, while the more beneficial a mutant is, the more likely it is to fix. In addition, we provide analytical predictions for the fixation probability ρ 1 = φ M Φ 1 that a single mutant microbe fixes in the structured population (see Fig. 5.3B). Most importantly, the complete graph, with full symmetry, gives a fixation probability very close to that of a well-mixed population. Note that we use two different ways to calculate the probability of fixation of an individual in a deme. The first one consists in calculating it in the framework of the Moran model (fixed population size) while the second one consists in using simulation results with the logistic growth (population size fluctuating around the stationary value). Indeed, the Moran model deals with fixed-size populations and does not perfectly give the fixation probability of an individual in a population of variable size, although it is at its equilibrium size (see Appendix, Section 5.5.4). . The migration parameters m W and m M are chosen so that the evolutionary dynamics take place within the rare migration regime (see Appendix, Section 5.5.2).

Ring

For the ring, demes are arranged on a cycle in such a way that they are connected to their left-hand and right-hand neighbors (see Fig. 5.1B). In this case, clockwise migration and anti-clockwise migration may have different rates. Thus, a W microbe (respectively M ) migrates clockwise with the migration rate per individual m C W (respectively m C M ) and anti-clockwise with the migration rate per individual m A W (respectively m A M ). One can show that the fixation probability Φ i of a mutation in a ring of D demes satisfies

Φ i = 1 -( mγ) i 1 -( mγ) D , (5.4)
where m = (m

A W + m C W )/(m A M + m C M ) and γ = (N W φ W )/(N M φ M ) (
see Appendix, Section 5.5.1 for full derivation). Note that the form of this equation is the same as that of the fixation probability of i mutant demes in a clique (see Eq. 5.2), but m is different. When the migration rates per individual do not depend on the types of individuals (m A W = m A M and m C W = m C M ), we recover a fixation probability Φ i that does not depend on the migration parameters, equal to that of the clique (see Eq. 5.2). Indeed, Fig. 5.4A shows that the fixation probability Φ 1 of one mutant deme in a ring of D demes is the same for different ratios m C /m A , where B: Fixation probability ρ 1 of a mutation starting with a one mutant microbe versus mutant fitness f M . In both panels, dotted lines represent analytical predictions where the fixation probability φ M of a mutant in a wild-type deme is computed analytically in the framework of the Moran model (fixed population size). Solid lines represent analytical predictions where the fixation probability φ M of a mutant in a wild-type deme is computed using simulation results with the logistic model (population size fluctuating around the stationary value). Vertical dash-dotted lines represent the neutral case where wild-type and mutant fitnesses are equal (f W = f M ), and dashed lines represent the fixation probability in a wellmixed population. Parameter values:

m A = m A W = m A M and m C = m C W = m C M . A 0.8 1 1.2 1
f W = 1, g W = g M = 0.1, K = 20, D = 5 and m A , m C = 5 × 10 -6
, 10 -6 (downward-pointing triangle); 2 × 10 -6 , 10 -6 (upward-pointing triangle); 10 -6 , 10 -6 (diamond); 10 -6 , 2 × 10 -6 (square); 10 -6 , 5 × 10 -6 (circle). The migration parameters m A and m C are chosen so that the evolutionary dynamics take place within the rare migration regime (see Appendix, Section 5.5.2). Moreover, we find as expected that the fixation probability Φ 1 of a mutant deme is equal to that of the clique when the migrations do not depend on the type of microbe (m

A W = m A M = m A and m C W = m C M = m C ), even if they are asymmetric (m C = m A ). The fixation probability ρ 1 = φ M Φ 1
that a single mutant microbe fixes in the structured population is also equal to that of the clique (see Fig. 5.4B). Let us note that there is a very good agreement between our analytical predictions and our simulated data.

Small deme connected to a large deme

Imagine a small deme, whose carrying capacity is denoted by K S , connected to a large deme, whose carrying capacity is denoted by K L , such that K S < K L (see Figs. [START_REF] Melbinger | The impact of environmental fluctuations on evolutionary fitness functions[END_REF].1C and D). Wild-type and mutant microbes can migrate from the large deme to the small deme with the migration rate per individual m S and from the small deme to the large deme with the migration rate per individual m L . In Appendix 5.5.1, we provide more general results for typedependent migration rates per individual. The fixation probability Φ S of a mutation starting from one fully mutant small deme reads

Φ S = 1 1 + mγ S , (5.5)
where m = m S /m L and γS = (

N L W φ S W )/(N S M φ L M ). Note that N L W and N S M
are the equilibrium sizes of the wild-type large deme and of the mutant small deme, respectively, and φ S W and φ L M are the fixation probabilities of a wild-type microbe in the mutant small deme and of a mutant microbe in the wild-type large deme, respectively. The fixation probability Φ L of a mutation starting from one fully mutant large deme satisfies

Φ L = 1 1 + γL / m , (5.6)
where γD = (N U W φ D W )/(N D M φ U M ) (see Appendix, Section 5.5.1 for full derivations of Eqs. 5.5 and 5.6). Note that the notations are similar to those in Eq. 5.5.

Because the appearance of a mutant is random, and because it can appear in one of the two demes, it is interesting to calculate the fixation probability Φ 1 of an arbitrary mutant deme

Φ 1 = qΦ S + (1 -q)Φ L , (5.7)
where q is the probability that the initial mutant deme is the small deme. This probability is chosen proportionally to the population size, i.e q = K S /(K S + K L ), because the mutant is more likely to appear in a large population than in a small one. This corresponds to uniform initial conditions [START_REF] Lieberman | Evolutionary dynamics on graphs[END_REF]. From Eqs. 5.5, 5.6 and 5.7, one can derive the fixation probability of a single mutant in the weak-migration regime. Indeed, a mutant then fixes in the structured population if it appears in one of the two demes, fixes in that deme, and then this mutant deme takes over the structured population. This results in the fixation probability of a single mutant appearing in the small deme, i.e. ρ S = φ S M Φ S , the fixation probability of a single mutant appearing in the large deme, i.e. ρ L = φ L M Φ L , and the fixation probability of a single mutant appearing in an arbitrary deme, i.e. ρ 1 = qφ S M Φ S +(1-q)φ L M Φ L . As reported by Fig. 5.5, there is a very good agreement between our analytical predictions and simulation results.

Figs. 5.3A, B, C and D shed light on a threshold ratio m S /m L for which the fixation probability, whether it is of a single mutant or of a mutant deme, whether in the large deme or in the small deme, is almost equal to that in a well-mixed population, for the same number of mutant microbes. This threshold corresponds to the equality between the migration flow from the small deme to the large deme and the migration flow from the large deme to the small deme, i.e m S K L = m L K S . When m S /m L < K S /K L , the individuals from the small deme migrate more often that those of the large deme. Thus, mutants that appear in the small deme are more likely to spread and fix than in a well-mixed population when m S /m L < K S /K L (see Figs. 5.5A and B). In the extreme case where m S /m L → ∞, a mutant that appears in the small deme will migrate much less frequently than the wild-type microbes from the large deme, and thus it is very unlikely to fix. Conversely, if m S /m L → 0, a mutant that appears in the small deme will migrate much more often than the wild-type microbes from the large deme, but it needs a fitness large enough to be able to compete with the wild-type microbes of the large deme and then fix. Hence a fitness threshold below which no mutant can fix, whatever the ratio m S /m L (see Figs. [START_REF] Melbinger | The impact of environmental fluctuations on evolutionary fitness functions[END_REF]

.5A and B).

Similarly, when m S /m L > K S /K L , the individuals from the large deme migrate more often than those of the small deme. That is why mutants that appear in the large deme are more likely to spread and fix than in a wellmixed population when m S /m L > K S /K L (see Figs. 5.5C and D). In the extreme case where m S /m L → ∞, a mutant that appears in the large deme will migrate much more frequently than the wild-type microbes from the small deme, and thus it is very likely to fix. Conversely, if m S /m L → 0, a mutant that appears in the large deme will migrate much less often than the wild-type microbes from the small deme. However, if the fitness of mutants is large enough, wild-type individuals are not likely to fix in the large deme, while mutants are likely to fix in the small deme. Hence a fitness threshold beyond which all mutants can fix, whatever the ratio m S /m L (see Figs. [START_REF] Melbinger | The impact of environmental fluctuations on evolutionary fitness functions[END_REF]

.5C and D).

As shown in Figs. 5.5E and F, under uniform initial conditions, the two connected populations are suppressors of natural selection for m S /m L > K S /K L . Indeed, because a mutant is more likely to appear in the large deme, it is more likely to fix when migrations from the large deme to the small deme are more frequent than migrations from the small deme to the large deme. The asymptotic case m S /m L → 0 cannot be qualified as an amplifier of natural selection or a suppressor of natural selection, because

m S /m L 0 m S /m L =1/5 m S /m L =1/2 m S /m L =1 m S /m L =2 m S /m L =5 m S /m L Well-mixed 0.6 0.8 1 1.2 1.4 1.6 Mutant fitness f 0 0.1 0.2 0.3 Fixation probability D C E F m S /m L 0 m S /m L =1/5 m S /m L =1/2 m S /m L =1 m S /m L =2 m S /m L =5 m S /m L Well-mixed 1 1 M M M M M Figure 5
.5: Fixation probabilities for a small deme connected to a large deme: A: Fixation probability Φ S of a mutation starting with one fully mutant small deme versus mutant fitness f M . B: Fixation probability ρ S of a mutation starting with one single mutant microbe in the small deme versus mutant fitness f M . C: Fixation probability Φ L of a mutation starting with one fully mutant large deme versus mutant fitness f M . D: Fixation probability ρ D of a mutation starting with one single mutant microbe in the large deme versus mutant fitness f M . E: Fixation probability Φ 1 of a mutation starting with one fully mutant deme chosen uniformly versus mutant fitness f M . Data points are obtained by linear combination of those of panels A and C (see Eq. 5.7). F: Fixation probability ρ 1 of a mutation starting with one single mutant microbe in a deme chosen uniformly versus mutant fitness f M . In A, C and E, data points correspond to averages over 10 3 simulation results. In all the panels, dotted and solid lines represent analytical predictions where the fixation probability φ M is computed analytically in the framework of the Moran model (fixed population size) and using simulation results with the logistic model (population size fluctuating around the stationary value), respectively, vertical dash-dotted lines represent the neutral case where wild-type and mutant fitnesses are equal (f W = f M ), and dashed lines represent the fixation probability in a well-mixed microbial population. Parameter values: f W = 1, g W = g M = 0.1, K S = 20, K L = 80, D = 2, q = 0.2 and m L , m S = 5 × 10 -6 , 10 -6 (purple); 2 × 10 -6 , 10 -6 (blue); 10 -6 , 10 -6 (green); 10 -6 , 2 × 10 -6 (yellow); 10 -6 , 5 × 10 -6 (red). The migration parameters m L and m S are chosen so that the evolutionary dynamics take place within the rare migration regime (see Appendix, Section 5.5.2). the fixation probability is larger than that obtained in the case of a wellmixed population for some deleterious mutant fitnesses while it is smaller for some others. The extreme case m S = 0 and m L = 0 (not shown in 5.5), which implies that a large mutant deme does not fix, while a small mutant deme fixes, gives a fixation probability for an arbitrary deme, with uniform initial conditions, equal to Φ 1 = 0.2 (see Eq. 5.7). Interestingly, these cases (m S /m L → 0 and m S = 0, m L = 0) correspond to a small upstream deme feeding into a large downstream deme, which is a suppressor of natural selection in the existing models [START_REF] Lieberman | Evolutionary dynamics on graphs[END_REF]. Thus, the suppressor property does not hold with the coarse-graining of our model. Data are missing for ratios between the asymptotic case m S /m L → 0 and m S /m L = K L /K S to know if for some migration parameters the two connected populations are amplifiers of natural selection.

Star

The star is a structure where a central node is connected to all the other nodes, called leaves, while the latter are connected only to the central node (see Figs. [START_REF] Melbinger | The impact of environmental fluctuations on evolutionary fitness functions[END_REF].1E and F). A microbe can migrate from a leaf to the central node with the migration rate per individual m I and from the central node to a leaf with the migration rate per individual m O . The fixation probability of a mutation in star of D demes starting from one fully mutant center reads

Φ 10 = 1 + mγ -γ( m + γ) 1 + mγ -γ( m + γ) γ(1+ mγ) m+γ D-1 , (5.8)
where m = m I /m O and γ = (N W φ W )/(N M φ M ). As a reminder, N W and N M are the equilibrium sizes of the wild-type and the mutant demes, respectively, and φ W and φ M are the fixation probabilities of a wild-type microbe in a mutant deme and of a mutant microbe in a wild-type deme, respectively. The fixation probability of a mutation in a star of D demes starting from one fully mutant leaf satisfies

Φ 01 = (1 + mγ) 1 -γ(1+ mγ) m+γ 1 + mγ -γ( m + γ) γ(1+ mγ) m+γ D-1 . (5.9)
Using Eqs. 5.8 and 5.9 (see Appendix, Section 5.5.1 for their full derivations), one can compute the fixation probability that an arbitrary mutant deme fixes in a star, which is given by

Φ 1 = qΦ 10 + (1 -q)Φ 01 , (5.10)
where q is the probability that the initial mutant deme is the center deme.

Because we consider the case where the center and the leaves have the same population size, the mutant is likely to appear uniformly in any deme. Since there is only one center and D -1 leaves, we set q = 1/D, which corresponds to uniform initial conditions [START_REF] Lieberman | Evolutionary dynamics on graphs[END_REF].

As reported by Figs. 5.6A, B, C and D, we observe a threshold ratio m I /m O for which the fixation probability of a mutant is almost equal to that in a well-mixed population. This ratio is obtained when the migration flows from the center to the leaves and from the leaves to the center are equal, i.e. for m I = m O because all the populations have the same size.

A mutant that has appeared and fixed in the center will migrate to leaves more frequently than wild-type individuals will migrate from leaves to the center when m I /m O < 1, and conversely for m I /m O > 1. Thus, a mutant that has appeared and fixed in the center is more likely to fix in the structured population if m I < m O than in a well-mixed population (see Fig. 5.6A). In the asymptotic case where m I /m O tends to 0, the mutant center fixes in the population, whatever the mutant fitness, while when m I /m O tends to infinity, the mutant center never fixes, whatever the mutant fitness. In the first case, the mutation spreads from the center to the leaves because wild-type microbes from the leaves rarely migrate compared to the mutant microbes from the center, while in the second case, the wild-type microbes from the leaves invade the center because the mutant microbes from the center rarely migrate compared to the wild-type microbes from the leaves.

Similarly, a mutant that appeared and fixed in a leaf will migrate to the center more often than wild-type individuals will migrate from the center to the leaves when m I /m O > 1, and vice versa for m I /m O < 1. Thus, a mutant that has appeared and fixed in a leaf is more likely to fix in the structured population if m I > m O than in a well-mixed population (see Fig. 5.6C). In the case where m I /m O → 0, the mutation never fixes because the wild-type microbes from the center migrate much more often. The case m I /m O → ∞ is less trivial since it depends on the mutant fitness. Indeed, although that the mutant microbes from the leaves migrate much more frequently, they need to have a large enough fitness to fix.

Crucially, we find that the star is a suppressor of natural selection under uniform initial conditions (see Fig. 5.6E), whereas in existing models it is an amplifier of natural selection in the Birth-death model [START_REF] Lieberman | Evolutionary dynamics on graphs[END_REF] and a suppressor of natural selection in the Death-birth model [START_REF] Allen | Transient amplifiers of selection and reducers of fixation for death-birth updating on graphs[END_REF].

Line

The line can be seen as a ring where two neighboring demes are disconnected (see Fig. 5.1G and H). In this way, all demes are connected to their lefthand and right-hand neighbors, except for the two demes at the end nodes. For the line, different conventions are possible to define migration rates per individual. Here, we will choose to differentiate between the migration rates per individual of the demes at the extremities and those in the center. We , 10 -6 (purple); 2 × 10 -6 , 10 -6 (blue); 10 -6 , 10 -6 (green); 10 -6 , 2 × 10 -6 (yellow); 10 -6 , 5 × 10 -6 (red). The migration parameters m 0 and m I are chosen so that the evolutionary dynamics take place within the rare migration regime (see Appendix, Section 5.5.2). Dotted and solid lines in the right-hand panels are obtained by multiplying those of the left-hand panels by the fixation probability φ M of a mutant in a wild-type deme computed analytically and using simulation results, respectively.

will focus on the case of a line composed of four demes (D = 4), because the analytical derivation of the fixation probability for an arbitrary number of demes is difficult. The fixation probability Φ I of an end mutant deme reads (see Appendix, Section 5.5.1 for full derivation)

Φ I = m m + γ + γ2 + mγ 3 , (5.11)
where m = m C /m P and γ = (N W φ W )/(N M φ M ), while the fixation probability of a next-to-end mutant deme satisfies (see Appendix, Section 5.5.1 for full derivation)

Φ II = m2 γ + γ(2 + γ) + m(2 + γ2 ) (1 + γ)( m + γ + m(γ -1)γ)(2 + γ + mγ(2 + γ + mγ))
. (5.12)

Using Eqs. 5.11 and 5.12, and because for D = 4 all demes are end or next-to-end demes, one can compute the fixation probability of an arbitrary mutant deme

Φ = qΦ I + (1 -q)Φ II , (5.13)
where q is the probability that the initial mutant deme is an end deme. Since a mutant is likely to appear uniformly in any deme, we will focus on q = 1/2, which corresponds to uniform initial conditions. As reported by Fig. 5.7, there is a threshold ratio m C /m P such that the fixation probability of a mutant that appeared and fixed in a end deme and the fixation probability of a mutant that appeared and fixed in a next end deme are almost equal to this in a well-mixed population. This ratio is obtained when the migration flux from the end demes to the next end demes and from the next end demes to the end demes are equal, i.e when m C = m P because the population sizes are identical. This observation was also made in the case of the star. Thus, the same comments made for the star are valid here.

Crucially, Figs. 5.7E and F show that the line, under uniform initial conditions, is a suppressor of natural selection. Fixation probabilities for the line: A: Fixation probability Φ I of a mutation starting with one fully mutant end deme versus mutant fitness f M . B: Fixation probability ρ I starting with one single mutant microbe in an end deme versus mutant fitness f M . C: Fixation probability Φ II of a mutation starting with a fully mutant next-to-end deme versus mutant fitness f M . D: Fixation probability ρ II starting with one single mutant microbe in a next-to-end deme versus mutant fitness f M . E: Fixation probability Φ 1 of a mutation starting with one fully mutant deme chosen uniformly versus mutant fitness f M . F: Fixation probability ρ 1 starting with one single mutant microbe in a deme chosen uniformly versus mutant fitness f M . In all the panels, dotted and solid lines represent analytical predictions where the fixation probability φ M is computed analytically in the framework of the Moran model (fixed population size) and using simulation results with the logistic model (population size fluctuating around the stationary value), respectively, vertical dash-dotted lines represent the neutral case where wild-type and mutant fitnesses are equal (f W = f M ), and dashed lines represent the fixation probability in a well-mixed population. Parameter values: f W = 1, g W = g M = 0.1, K = 20, D = 4 and q = 0.5. The migration parameters m C and m P are chosen so that the evolutionary dynamics take place within the rare migration regime (see Appendix, Section 5.5.2).

Comparison with Birth-death and Death-birth models

Now that we have developed our structured population model on graphs, where each node is a subpopulation, let us compare it to two existing models. These are the Birth-death model (or voter model) and the Death-birth model (or invasion process model), as described in [START_REF] Houchmandzadeh | The fixation probability of a beneficial mutation in a geographically structured population[END_REF]. Ref. [START_REF] Houchmandzadeh | The fixation probability of a beneficial mutation in a geographically structured population[END_REF] made the important step of generalizing the model of Ref. [START_REF] Lieberman | Evolutionary dynamics on graphs[END_REF] to demes with more than one individual, but with fixed size. Our model additionally removes the requirement that the size is fixed and makes migration independent from birth and death events. Thus, it is important to compare our results to those of Ref. [START_REF] Houchmandzadeh | The fixation probability of a beneficial mutation in a geographically structured population[END_REF]. Note that the model of Ref. [START_REF] Lieberman | Evolutionary dynamics on graphs[END_REF] was analyzed in detail in Irene Lamberti's MSc internship in our group.

In order to rigorously compare these two models with ours, we match the ratios between the total reproduction rate of all individuals in a single deme, denoted by T rep , and the total migration rate per individual from this deme to any other accessible, denoted by T mig . In our model, the total reproduction rate is given by T rep = f W (1 -N W /K)N W for each deme, whatever its type (leaf, center, etc), assuming that all the demes have the same carrying capacity K. Let us note two things. First, although in our model the subpopulation sizes may vary over time, they reach an equilibrium size that we use to calculate the total reproduction rate of a deme (see section 5.5.3). Then, even if this equilibrium size is different for a wild-type community and a mutant deme, especially when the fitness of both types of individuals are very different, we choose as reference the wildtype deme equilibrium size, namely N W . Second, the total migration rate per individual from a deme, let us say the i th deme, to any other is given by

T mig = N W M j=1 m ij ,
where m ij is the migration rate per individual from deme i to deme j. Thus, for the total migration rates per individual from a deme, it will be necessary to distinguish the subpopulations depending on their connections. For example, in the case of a population structured as a star, it will be required to distinguish the center, which is connected to all the leaves, from the leaves, which are only connected to the center, and therefore do not have the same total migration rate per individual.

Let us focus on the case of a population of D demes structured as a star. In this case, with our model, the total migration rate per individual from a leaf is m I and that from the center is m O (D -1). In the Birthdeath model, the total reproduction rate is equal to 1, for both the center and a leaf, while the total migration rates per individual from a leaf and from the center are denoted x and y, respectively [START_REF] Houchmandzadeh | The fixation probability of a beneficial mutation in a geographically structured population[END_REF]. Thus, to match our model with the Birth-death model, we have the following two constraints:

y = m O (D -1)/(f W (1 -N W /K)) and x = m I /(f W (1 -N W /K)).
In the Death-birth model, the total reproduction rates for a leaf and the center are y/(D -1) + 1 -x and 1 -y + (D -1)x, respectively, while the total migration rates per individual from a leaf and from the center are y/(D -1) and (D -1)x, respectively [START_REF] Houchmandzadeh | The fixation probability of a beneficial mutation in a geographically structured population[END_REF]. Thus, to match our model with the Deathbirth model, we have the following two constraints:

xf W (1 -N W /K) = m O (1-y + (D -1)x) and m I (y/(D -1) +1 -x) = yf W (1-N W /K)/(D -1).
As reported by Fig. 5.8, once this matching is done, there is a good agreement between the three models. Indeed, we observe that when the same ratio T rep /T mig is set in the three models, they give an almost equal fixation probability of a mutant deme. More specifically, Figs. B and C show very small relative and absolute differences, respectively, between the probability of fixation in our model and those of the birth-death and death-birth models. Note that the relative error is high when the probability of fixation of a mutant deme is close to zero, which is the case for deleterious mutations. But then the absolute error is small, which confirms that the three models are consistent.

Note that the matching and the weak-migration hypothesis mean very strong self-loops, which in graph-structured populations allow for self-replacements with a large probability. This is not the case studied classically. Indeed, Ref. [START_REF] Lieberman | Evolutionary dynamics on graphs[END_REF] considers no self-loops and Ref. [START_REF] Houchmandzadeh | The fixation probability of a beneficial mutation in a geographically structured population[END_REF] includes them formally but does not treat the case where they are very large. Moreover, x and y can be chosen freely in previous models, and the classic choice x = y = 1, which corresponds to no self-loops, means that newborns always migrate. Most importantly, Birth-death and Death-birth dynamics give very different results [START_REF] Lieberman | Evolutionary dynamics on graphs[END_REF][START_REF] Houchmandzadeh | The fixation probability of a beneficial mutation in a geographically structured population[END_REF][START_REF] Hindersin | Most undirected random graphs are amplifiers of selection for birth-death dynamics, but suppressors of selection for death-birth dynamics[END_REF], but this is without self-loops and without the matching condition.

Discussion

Main conclusions

In this work, we investigated the fixation of mutants in structured microbial populations in the weak-migration regime. We developed a coarse-grained model where a structured microbial population is composed of demes whose population size is not fixed and can fluctuate, and where migrations from one deme to another are allowed and are independent from birth and death events, in contrast with previous work [START_REF] Lieberman | Evolutionary dynamics on graphs[END_REF][START_REF] Houchmandzadeh | The fixation probability of a beneficial mutation in a geographically structured population[END_REF]. We derived analytical predictions for the fixation probability of a mutation in different structures as a function of the mutant fitness for different migration parameters. We showed that the clique and the ring are neither amplifiers of natural selection nor suppressors of natural selection, while the two connected populations, the star and the line are suppressors of natural selection. This stands in contrast with the results of previous models [START_REF] Lieberman | Evolutionary dynamics on graphs[END_REF], where the star is an amplifier of natural selection under Birth-death dynamics. However, we have shown that our model gives similar results to the existing Birth-death and Death-birth models for the same ratios of total reproduction rate by total migration rate in each deme. Thus, our model generalizes these existing models, and allows to choose the parameters involved in these models without ambiguity. The fact that no amplifiers appear to survive our coarse-graining process is particularly interesting.

For each structure studied in this work, we provided both analytical expressions and stochastic simulation results (except for the line). We obtained a very good agreement between them.

Perspectives and work in progress

It would be interesting to study other structures and determine if there are natural selection amplifiers within our model. We are also working on formulating the equivalent of the isothermal theorem for our model in order to identify structures whose the fixation probability of mutation is similar to that of a well-mixed population. We are further currently applying our results to random graphs, with the aim to compare our results to recent results showing that most random graphs are amplifiers of selection for Birth-death dynamics and suppressors of selection for Death-Birth dynamics with one individual per deme and no self-loop [START_REF] Hindersin | Most undirected random graphs are amplifiers of selection for birth-death dynamics, but suppressors of selection for death-birth dynamics[END_REF]. It would also be interesting to assess the impact of population structure on the evolution of antimicrobial resistance studied in the other chapters of this thesis. Finally, this work could give rise to evolutionary experiments to test our predictions.

Appendix

Detailed calculations of the fixation probability

Clique

Let us consider a population structured as a clique that is composed of D demes, including i mutant demes and D -i wild-type demes. As a reminder, the wild-type is denoted by W and the mutants by M . We denote by m W (respectively m M ) the migration rate per individual of a W individual (respectively M ) from one deme to any other. The number of mutant demes increases by 1 if a M individual migrates from one of the i mutant demes to one of the D -i wild-type demes and fixes. The probability that such an event occurs is

T + i = m M N M φ M (D-i)i, where φ M = (1-(f W g M )/(f M g W ))/(1- ((f W g M )/(f M g W )) N W )
is the fixation probability of a mutant in a wild-type deme and

N M = K(1 -g M /f M ) (respectively N W = K(1 -g W /f W ))
is the equilibrium size of a mutant (respectively wild-type) deme. Similarly, the number of mutant demes decreases by 1 if a W individual migrates from one of the D -i wild-type demes to one of the i mutant demes and fixes. The probability that this occurs is

T - i = m W N W φ W (D -i)i, where φ W = (1 -(f M g W )/(f W g M ))/(1 -((f M g W )/(f W g M )) N M )
is the fixation probability of a wild-type microbe in a mutant deme. Then, the fixation probability Φ i of a mutation in a clique of D demes starting with i mutant demes satisfies the recurrence relation

     Φ 0 = 0 Φ i = T + i Φ i+1 + T - i Φ i-1 + (1 -T + i -T - i )Φ i for i = 1, 2, ..., D -1 Φ M = 1 .
(5.14) Solving the system 5.14, one obtains [START_REF] Traulsen | Stochastic Evolutionary Game Dynamics[END_REF]

Φ i = 1 + i-1 k=1 k j=1 Γ j 1 + D-1 k=1 k j=1 Γ j , (5.15)
where

Γ i = T - i /T + i = (m W N W φ W )/(m M N M φ M ).
Since here Γ i = Γ ∀i, i.e Γ i does not depend on the initial number i of mutant demes, the fixation probability Φ i reduces to

Φ i = 1 -mγ i 1 -mγ D , (5.16)
where we introduced m = m W /m M and γ = (N W φ W )/(N M φ M ). In the case where the migration rates per individual do not depend on the type of individuals (m W = m M and m = 1), the fixation probability Φ i does not depend on migration parameters. If in addition the fitness of both types of microbes are equal (f W = f M ), as well as their death rates (g W = g M ), then the fixation probability Φ i reduces to the well-known fixation probability of the Moran process for the neutral case [START_REF] Moran | Random processes in genetics[END_REF]:

Φ i = i D .
(5.17)

Ring

Let us consider a population structured as a ring with D demes, including a cluster of i mutant demes. Note that this cluster cannot break during the evolution process assuming that we start from one mutant. The number i of mutant demes increases by 1 if a M individual from one of the two extremities of the mutant cluster migrates and fixes in the nearby wildtype deme. Similarly, the number i of mutant demes decreases by 1 if a W individual from one of the two wild-type demes surrounding the mutant cluster migrates and fixes in the nearby mutant deme. Thus, the fixation probability Φ i of mutation starting with i mutant demes satisfies Eq. 5.16 with

T + i = (m L M + m R M )N M φ M , T - i = (m L W + m R W )N W φ W , m = (m L W + m R W )/(m L M + m R M ) and γ = (N W φ W )/(N M φ M )
. When the migration rates per individual do not depend on the types of individuals (m L W = m L M and m R W = m R M ), we recover a fixation probability Φ i that does not depend on the migration parameters, equal to that of the clique.

Small deme with large deme

Let us first consider the case where the small deme, whose carrying capacity is denoted by K S , is mutant, while the large deme, whose carrying capacity is denoted by K L , is wild-type. If a M individual migrates from the small deme to the large deme and fixes, then mutation takes over the structured population. The probability of this event reads

T L M = m L M N S M φ L M , where m L
M is the migration rate per individual of a M individual from the small deme to the large deme,

N S M = K S (1 -g M /f M ) (respectively N L W = K L (1 - g W /f W ))
is the equilibrium size of the small mutant (respectively large wildtype) deme and

φ L M = (1-(f W g M )/(f M g W ))/(1-((f W g M )/(f M g W )) N L W
) is the fixation probability of a mutant in the large wild-type deme. Similarly, if a W individual migrates to the small deme and fixes, then wild-type takes over the structured population. The probability of this event reads

T S W = m S W N L W φ S W
, where m S W is the migration rate per individual of a W individual from the large deme to the small deme,

φ S W = (1 -(f M g W )/(f W g M ))/(1 - ((f M g W )/(f W g M )) N S M
) is the fixation probability of a wild-type individual in the small mutant deme. Then, the fixation probability Φ S of a mutation starting from a small mutant deme satisfies Eq 5.16 and yields Φ S = 1/(1 + Γ S ), where Γ S = T S W /T L M . Introducing the notations m = m S /m L and γ = (N W φ W )/(N M φ M ), one recovers Eq. 5.5.

Another way to obtain the fixation probability Φ S consists of computing the probability that a mutant migrates from the small deme to the large deme and fixes before a wild-type individual migrates from the large deme to the small deme and fixes. Let t L M be the random time at which a mutant migrates from the small deme to the large deme and fixes and t S W the random time at which a wild-type migrates from the large deme to the small deme and fixes. Assuming that these random times are exponentially distributed, it follows:

Φ S =Prob( t L M < t S W ) = ∞ 0 du T S W e -uT S W u 0 dsT L M e -sT L M = T L M T L M + T S W = 1 1 + Γ S . (5.18)
Similarly, in the case where the structured population starts from a large mutant deme, while the small deme is wild-type, we get the fixation probability Φ L = 1/(1 + Γ L ), where

γ L = T L W /T S B , T L W = m L W N S W φ L W and T S M = m S M N L M φ S M .
Introducing the notations m = m S /m L and γ = (N W φ W )/(N M φ M ), one recovers Eq. 5.6. ). Let us define Φ 0,i as the fixation probability of mutation knowing that the center is not mutant and i leaves are mutant. Similarly, Φ 1,i is the fixation probability of mutation knowing that the center and i leaves are mutant. The fixation probabilities Φ 0,i and Φ 1,i yield [START_REF] Broom | An analysis of the fixation probability of a mutant on special class of non-directed graphs[END_REF]:

Star

                     Φ 0,0 =0 Φ 1,i =T (1,i)→(0,i) Φ 0,i + T (1,i)→(1,i+1) Φ 1,i+1 + (1 -T (1,i)→(0,i) -T (1,i)→(1,i+1) )Φ 1,i for 1 ≤ i ≤ D -2 Φ 0,i =T (0,i)→(1,i) Φ 1,i + T (0,i)→(0,i-1) Φ 0,i-1 + (1 -T (0,i)→(1,i) -T (0,i)→(0,i-1) )Φ 0,i for 1 ≤ i ≤ D -2 Φ 1,D-1 =1 , (5.19) where T (1,i)→(0,i) = (D -1 -i)m I W N W φ W
is the probability that the center becomes wild-type knowing that the center is initially mutant and that i leaves are mutant,

T (1,i)→(1,i+1) = (D -1 -i)m O M N M φ M
is the probability that the number of mutant leaves increases by 1 knowing that the center is mutant, T (0,i)→(1,i) = (D -1-i)m I M N M φ M is the probability that the center becomes mutant knowing it is initially wild-type and i leaves are mutant and

T (0,i)→(0,i-1) = (D -1 -i)m O W N W φ W
is the probability that the number of mutant leaves decreases by 1 knowing that the center is wild-type. The system 5.19 can be written as:

             Φ 0,0 = 0 Φ 1,i = Φ 1,i-1 + Γ 1 (Φ 1,i-1 -Φ 0,i-1 ) for 1 ≤ i ≤ D -2 Φ 0,i = 1 1 + Γ 0 Φ 1,i + Γ 0 1 + Γ 0 Φ 0,i-1 for 1 ≤ i ≤ D -2 Φ 1,D-1 = 1 , (5.20)
where

Γ 1 = (m I W N W φ W )/(m O M N M φ M ) and Γ 0 = (m O W N W φ W )/(m I M N M φ M
). After solving the system 5.20, one obtains:

                         Φ 0,0 = 0 Φ 1,i = -1 + Γ 1 (-1 + (1 + Γ 0 )( Γ 0 (1+Γ 1 ) 1+Γ 0 ) i ) -1 + Γ 1 (-1 + (1 + Γ 0 )( Γ 0 (1+Γ 1 ) 1+Γ 0 ) D-1 ) for 1 ≤ i ≤ D -2 Φ 0,i = (1 + Γ 1 )(-1 + ( Γ 0 (1+Γ 1 ) 1+Γ 0 ) i ) -1 + Γ 1 (-1 + (1 + Γ 0 )( Γ 0 (1+Γ 1 ) 1+Γ 0 ) D-1 ) for 1 ≤ i ≤ D -2 Φ 1,D-1 = 1 .
                   Φ 0,0 = 0 Φ 1,i = 1 -γi+1 1 -γD for 1 ≤ i ≤ D -2 Φ 0,i = 1 -γi 1 -γD for 1 ≤ i ≤ D -2 Φ 1,D-1 = 1 . (5.22)
The previous formula is similar to that of the fixation probability of the clique (see Eq. 5.16) for m = 1.

Line

Let us consider a structured microbial population where the demes form a line. To simplify, we will focus on the particular case of four demes, i.e D = 4. The method we will use here is based on the master equation that governs the probability that the structured population is in a given state. Specifically, with four demes and two types of individuals, namely wild-type and mutant, the structured population can be in the states shown in Fig. 5.9. Each of these states is denoted by a Roman numeral (O, I,..., VI). Note that the state denoted by O corresponds to the extinction of the mutant, while the state denoted by VI corresponds to the fixation of the mutation. These are the absorbing states. Let P (i, t|i 0 , 0) be the probability that the structured microbial population is in state i at time t, where i = O, I,..., knowing that it was initially in state i 0 . This probability obeys the master equation ∂P (i, t|i 0 , 0) ∂t = j∈{O,I,...,VI} (R) i,j P (j, t|i 0 , 0) , (5.23) where R is the transition rate matrix. After integrating the previous master equation knowing that P (i, 0|i 0 , 0) = δ i,i 0 , with δ the Kronecker delta, which is equal to 1 if the state i = i 0 and 0 otherwise, one obtains P (i, t|i 0 , 0) = (e Rt ) i,i 0 .

(5.24)

In the case of the line with four demes and two types of individuals, namely wild-type and mutant, the transition rate matrix R is given by

R =           0 T P W T P W + T C W 0 0 0 0 -(T P W + T C M ) 0 T P W 0 0 0 0 -(T P W + T C W + 2T P M ) 0 2T C W 0 0 T C M T P M -(T P W + T P M ) 0 T C W 0 0 T P M 0 -2(T C W + T P M ) 0 0 0 0 T P M 2T P M -(T C W + T P M ) 0 0 0 0 0 T P M           , (5.25)
where

T P W = m P W φ W N W , T C W = m C W φ W N W , T P M = m P M φ M N M and T C M = m C M φ M N M .
Let us consider R and R-1 , the reduced transition rate matrix with the rows and columns corresponding to the absorbing states removed and its inverse, respectively. Finally, the fixation probability of a mutation starting from the state I yields

Φ I = T P M ∞ 0 P (V, t|I, 0)dt = -T P M ( R-1 ) V,I , (5.26)
and the fixation probability of a mutation starting from the state II reads

Φ II = T P M ∞ 0 P (V, t|II, 0)dt = -T P M ( R-1 ) V,II .
(5.27)

In the two last expressions, we have taken advantage of the fact that the only way to fix in state VI between t and t + dt is to be in state V and then to transition from V to VI. A numerical resolution of the inverse of the reduced transition rate matrix allows to recover Eqs. 5.11 and 5.12.

Rare migration regime

Throughout this work, we have considered the rare mutation regime. In this regime, migrations are rare enough not to disrupt the competition between two types of individuals that leads to the fixation of one of the two genotypes. In other words, the time between two migration events is much larger than the fixation times. Thus, we choose the migration parameters such that t m t W fix , t M fix , where t m is the time elapsed between two migrations, t W fix the mean fixation time of a W individual in a mutant deme and t M fix the mean fixation time of a M individual in a wild-type deme. The last two mean fixation times are computed using the Moran model. Although this model describes the evolutionary dynamics of fixed-size populations, it is appropriate here because a microbial population that follows a logistic growth reaches an equilibrium size where deaths compensate for births (see Section 5.5.3 for more details). We denote by N W and N M the equilibrium sizes of the wild-type and mutant demes, respectively. Then, the mean fixation time t W fix satisfies:

t W fix = 1 g M (1 -γ N M W )(1 -γ W ) N M -1 i=1 (N M + iγ W -i)(1 -γ i W )(1 -γ N M -i W ) i(N M -i) ,
(5.28) where γ W = (f M g W )/(f W g M ). Similarly, the mean fixation time t M fix satisfies:

t M fix = 1 g W (1 -γ N W M )(1 -γ M ) N W -1 i=1 (N W + iγ M -i)(1 -γ i M )(1 -γ N W -i M ) i(N W -i) ,
(5.29) where γ M = (f W g M )/(f M g W ). The time t m between two migration events depends on the population structure, but also on its composition. Indeed, the greater the number of connections between demes that allow the migration of individuals and the greater the total number of individuals in the structured population, the shorter the time between two migrations. Note that the total number of individuals of the structured population may change over time during the evolutionary process. This variability will be all the more pronounced as the wild-type fitness f W and the mutant fitness f M are different, resulting in different equilibrium sizes N W and N M . To make sure that migration events do not disturb genotype fixations, we take care to consider the time between two migrations as the shortest. To do this, we consider that the structured population is composed of only the fittest individuals in such a way that the structured population is as populated as possible. Let us illustrate what we have just said with an example. Let us consider a population structured as a star with five demes (D = 5), whose carrying capacities are K = 20. This population can be composed of wild-type microbes with fitness f W = 1 and mutants with fitness f M = 1.1. We assume that both types of individuals have the same death rate g W = g M = 0.1. Thus, the equilibrium sizes of wild-type and mutant communities are N W = 18 and N M = 18.2, respectively. As N M > N W , we consider that the structured population is composed only of mutants to calculate the smallest time t m between two migrations, which therefore satisfies t m = 1/(m2(D -1)N M ). The quantity 2(D -1) represents the number of possible migration paths and m the migration rate per individual. Note that for simplicity, we take the same migration rate per individual, regardless of the deme to which it belongs (center or leaf). Using Eqs. 5.28 and 5.29, we compute the mean fixation times: t W fix ≈ t M fix ≈ 163. It follows that t m = t W fix , t M fix if and only if m = 4 × 10 -5 . Thus, in order to study evolutionary dynamics in the rare migration regime, one as to choose the migration rate per individual such that m 4 × 10 -5 . As reported by Fig. 5.10, our analytically predicted transition is good.

f W = 1, f M = 1.1, g W = g M = 0.1, K = 20, D = 5, m O = 2 × m I .

Equilibrium size of a deme following a logistic growth

In our study, we employ the equilibrium population sizes of the wild-type and mutant demes, denoted by N W and N M respectively:

N W = K(1 -g W /f W ) , (5.30)
and

N M = K(1 -g M /f M ) . (5.31)
A population with only one type of microbes that follow a logistic growth reaches an equilibrium population size in which it persists for a long time before it goes extinct [START_REF] Vogels | verhulst's "notice sur la loi que la populations suit dans son accroissement" from correspondence mathematique et physique[END_REF][START_REF] Ovaskainen | Stochastic models of population extinction[END_REF]. In the deterministic regime, the number N of individuals at time t follows the ordinary differential equation:

dN dt = f 1 - N K -g N , (5.32)
where f represents fitness, g death rate and K carrying capacity. For f > g, the long-time limit of Eq. 5.32 is K(1 -g/f ). Hence the formulas Eqs. 5.30 and 5.31.

Fixation probability of a mutant in a deme of constant size

In the main text, we employed the fixation probability φ M of a mutant (M) in a population of wild-type individuals (W):

φ M = 1 -f W g M f M g W 1 -f W g M f M g W N W
.

(5.33)

Here, we briefly justify this formula. Consider a birth-death process in which, at each discrete time step, one individual is chosen with a probability proportional to its fitness to reproduce and another one is chosen with a probability proportional to its death rate to die. Note that the total number of individuals remains constant over time. This model is a variant of the Moran model with selection both on division and on death [START_REF] Moran | Random processes in genetics[END_REF]. Let i be the number of mutants and N -i the number of wild-type individuals. At a given time step, the probability T + i that the number of mutants increases from i to i + 1 satisfies:

T + i = f M i f W (N -i) + f M i g W (N -i) g W (N -i) + g M i , (5.34)
and similarly, the probability T - i that i decreases by 1 is given by:

T - i = f W (N -i) f W (N -i) + f M i g M i g W (N -i) + g M i .
(5.35)

The probability φ M that the M genotype fixes in the population, starting from 1 M microorganism, then satisfies:

φ M = 1 1 + N -1 k=1 k j=1 γ j , (5.36)
where:

γ i = T - i T + i = f W g M f M g W .
(5.37)

We thus obtain the result announced in Eq. 5.33. This reasoning applies also to the fixation probability φ W of a wild-type in a population of mutants:

φ W = 1 -f M g W f W g M 1 -f M g W f W g M N M
.

(5.38) Note that Eqs. 5.33 and 5.38 are based on the assumption that the population size is fixed. However, the population size varies around its equilibrium size. We test the validity of this assumption by simulating evolutionary dynamics of a mutant in a population of W individuals and vice-versa. As reported by Fig. 5.11, there is a small difference between our analytical predictions and simulation results for the fixation probability φ W when the mutant is strongly deleterious. Similarly, there is a small difference between our analytical predictions and simulation results for the fixation probability φ M when the mutant is strongly beneficial.

Detailed simulation methods

In this work, all numerical simulations are performed using a Gillespie algorithm that is exact and does not involve any artificial discretization of time [START_REF] Daniel T Gillespie | A general method for numerically simulating the stochastic time evolution of coupled chemical reactions[END_REF][START_REF] Daniel T Gillespie | Exact stochastic simulation of coupled chemical reactions[END_REF]. We consider a structured population of D communities labeled i = 1, 2, ..., D. Let us denote by N W,i and N M,i the respective numbers of W and M individuals in the deme i. The elementary events that can happen are reproduction, death and migration of an individual of either type:

• W i k + W,i → 2W i : Reproduction of a wild-type microbe in the deme i with rate k + W,i = f W (1 -(N W,i + N M,i )/K). • W i k - W,i
→ ∅: Death of a wild-type microbe in the deme i with rate k - W,i = g W .

of resistance, and its compensation. Our results highlight the importance of interactions between immunity and the spread of antibiotic resistance, and argue in the favor of vaccine-based strategies to combat antibiotic resistance.

Introduction

In previous chapters, we have looked at the evolution of antimicrobial resistance in a microbial population and have shown how antimicrobial treatment can favor the emergence of resistance. Antimicrobial resistance is a major public health issue because resistance that develops within a host can spread to other individuals. More specifically, taking an antibiotic treatment against one pathogenic bacterial strain can favor the emergence of drug resistance in other bacteria, in particular in the gut, and these resistant bacteria can then be transmitted, e.g. via the fecal-oral route. This is an important concern because antibiotic use is widespread: for instance, about a quarter of French people are treated with antibiotics every given year [START_REF] Carlet | Rapport du groupe de travail spécial pour la préservation des antibiotiques[END_REF][START_REF]Projet de loi de financement de la sécurité sociale -annexe 1 : Programmes de qualité et d'efficience -programme de qualité et d'efficience maladie -sous-indicateur numéro 9-2[END_REF]. Besides, antibiotics are often routinely given to farm animals, and the drug resistance in bacteria they harbor may spread to humans [START_REF] Dahms | Mini-review: Epidemiology and zoonotic potential of multiresistant bacteria and clostridium difficile in livestock and food[END_REF][START_REF] Landers | A review of antibiotic use in food animals: Perspective, policy, and potential[END_REF], though the magnitude of this effect is disputed [START_REF] Harrison | Genomic surveillance reveals low prevalence of livestockassociated methicillin-resistant staphylococcus aureus in the east of england[END_REF]. Here, we develop a multiscale model of the interaction between antibiotic use and resistance spread in a host population, focusing on an important aspect of within-host immunity. Immunity could interfere with resistance spread in many ways. If the immune system in the gut just massively killed bacteria, it could destabilize the microbiota. Thus, it has to resort to other strategies. Immunoglobulin A (IgA), an antibody isotype which is the main effector of the adaptive immune response secreted in the gut, neither kills its target bacteria nor prevents them from reproducing. It was recently shown in mice that the main effect of IgA is actually to enchain daughter bacteria upon division [START_REF] Schumann-Moor | High-avidity iga protects the intestine by enchaining growing bacteria[END_REF]. Importantly, clusters of bacteria cannot come close to epithelial cells, which prevents systemic infection and protects the host. Besides, interaction of pathogenic bacteria with epithelial cells can trigger inflammation, which can turn on the bacteria SOS response, increasing horizontal gene transfer between bacteria. Enchained growth thus constitutes a possible mechanism for acquired immunity to dampen horizontal transfer in the gut [START_REF] Médéric | Inflammation boosts bacteriophage transfer between salmonella spp[END_REF]. Furthermore, since IgA-mediated clusters of bacteria are mostly clonal, horizontal transfer would most likely occur between very closely related neighboring bacteria, which makes it inefficient at providing new genes. These effects will unequivocally work towards reducing the emergence of antibiotic resistance within the host. In this article, we investigate another, subtler effect. Bacteria being in clonal clusters decreases the effective genetic diversity within the host, and transmitted bacteria are less diverse too. We demonstrate that this can hinder the spread of antibiotic resistance at the scale of the host population.

New mutations occur upon bacterial replication within a host, but what is crucial for public health is whether these mutant resistant bacteria can spread among the host population. We thus propose a multiscale model, combining within-host dynamics with a stochastic branching process at the between-host scale. Such a description is appropriate at the beginning of epidemic spread, when very few hosts are infected. For instance, a host may be infected with a novel bacterial strain, which can acquire antibiotic resistance by mutation, and which is sufficiently similar to other circulating strains for a portion of the host population to be immune against it. We will consider two types of hosts: "immune" hosts secrete IgA antibodies against this novel strain of bacteria in their gut, thus clustering them upon division, while "naive" hosts do not. What is the probability that, starting from one infected individual, this novel bacterial strain invades the host population? First, focusing on the case where the first host is infected with a mix of sensitive and resistant bacteria, we demonstrate that immunity-driven bacteria clustering then decreases the spread probability of the novel strain. We then show that this effect can be reversed if immune and naive hosts have a different number of contacts with other hosts, and a different probability of treatment, which may happen if immune hosts are silent carriers. We further demonstrate the robustness of our findings to more realistic models of the within-host bacterial population dynamics, including mutations, stochasticity, a fitness cost of resistance, and its compensation. Next, we develop analytical approximations of the magnitude of the immunity-driven decrease of spread probability in the case where only sensitive bacteria are initially present, and where the bacterial strain needs to acquire a resistance mutation to spread. Finally, we discuss the implications of our results, notably on the interplay between vaccination and antibiotics.

Model and methods

Here, we describe the multiscale model we developed to demonstrate the impact of antibody-mediated clustering of bacteria on the spread of resistance. Fig. 6.1 illustrates this effect and the key ingredients of our model.

Within-host dynamics and transmission step

There is often a typical number of bacteria transmitted from one host to the next for successful infection, called the bottleneck size N b . For instance, N b = 10 5 is the typical number of Salmonella that starts food poisoning in humans [START_REF]Risk assessments of salmonella in eggs and broiler chickens[END_REF]. Here, we will assume that infections always start with the same number N b of infecting bacteria.

Within the host, the number of bacteria is typically very large. For instance, in a Salmonella infection, its density can reach 10 10 bacteria per gram of gut content [START_REF] Schumann-Moor | High-avidity iga protects the intestine by enchaining growing bacteria[END_REF]. Then, the impact of stochastic fluctuations is likely to be small. Hence, we first use a deterministic model for withinhost bacterial population dynamics. We subsequently assess the impact of within-host stochasticity.

We consider two types of bacteria, a sensitive type, and a resistant type. We first assume that they have the same growth rate, and neglect de novo This strongly impacts the composition of the set of transmitted bacteria, which is more likely to contain both types of bacteria if the donor host is naive than if it is immune. Antibiotic treatment (yellow) is efficient against sensitive bacteria, but selects for preexisting resistance, which is more likely to exist if the donor host was naive. mutations. Then, the proportion of resistant bacteria within a non-treated host remains constant during the infection. Next, we investigate the effects of mutations, of a fitness cost of resistance (see Appendix, Section 6.5.2), and of the compensation of this cost, for which we use a generalized model with three types of bacteria (see Appendix, Section 6.5.4).

When the host is treated with antibiotics, we assume that if it was initially infected only with sensitive bacteria, the treatment is very efficient and kills all bacteria, before resistance appears via mutations, and before any transmission to other hosts. Conversely, if at least one resistant bacteria was present in the inoculum, then the resistant strain takes over.

In our analytical calculations, we consider that transmitted bacteria are chosen from the donor host using the proportion of resistant bacteria computed from the deterministic model, without correlation between two transmissions from the same host. In particular, we make the approximation that selections of transmitted bacteria are done with replacement. In simulations, we perform selections without replacement, allowing us to check the validity of the approximation.

Impact of clustering on transmission

Within naive hosts, bacteria remain independent from each other, whereas within immune hosts, they are bound together by the secreted IgA. However, these clusters can break [149,[START_REF] Evans | Forces and bond dynamics in cell adhesion[END_REF][START_REF] Krapivsky | Shattering transitions in collisioninduced fragmentation[END_REF][START_REF] Odell | Flow-induced chain fracture of isolated linear macromolecules in solution[END_REF][START_REF] Bansept | Enchained growth and cluster dislocation: A possible mechanism for microbiota homeostasis[END_REF]. Thus, at the end of the infection, clusters will be of a typical size N c . For simplicity, we will assume that cluster size equals bottleneck size, i.e. N c = N b = N , meaning that exactly one cluster is transmitted at each infection event. The case where multiple clusters are transmitted to a host (N c < N b ) may also be realistic, but it would be more complex. We wish to focus on the effect of clustering, and the present case N c = N b = N will provide an upper bound of the effect of clustering.

We assume that the concentration of the bacteria studied remains small in the gut, so that the typical encounter time between bacteria or clusters is large. Then, the existing clusters comprise bacteria from the same lineage, since bacteria get enchained by IgA upon replication [START_REF] Schumann-Moor | High-avidity iga protects the intestine by enchaining growing bacteria[END_REF]. Then, in the absence of mutations, or when their impact is negligible (e.g. when the initial inoculum already contained non-negligible proportions of both sensitive and resistant bacteria), clusters contain bacteria of the same type, either all sensitive or all resistant. We start by assuming that all clusters are clonal, and then we assess the impact of mixed clusters (see Appendix, Section 6.5.3).

We focus on fecal-oral transmissions, and assume that the clusters formed in the gut of a donor immune host are transmitted as clusters. In practice, even if they could break afterwards, bacteria are likely to remain colocalized in the feces.

Between-host dynamics

We assume that the number of transmissions to recipient hosts from one donor host is Poisson distributed [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][START_REF] Orr | Population extinction and the genetics of adaptation[END_REF][START_REF] Schreiber | Cross-scale dynamics and the evolutionary emergence of infectious diseases[END_REF] with mean λ N for naive hosts and λ I for immune ones.

We consider that each host has a probability ω to be immune to the bacteria studied (and thus 1 -ω of being naive). The rationale is that we are interested in the spread of a strain at risk to develop resistance, and, while this strain is new, it is similar enough to other strains present in the population for some cross-immunity to exist. We focus on the beginning of the spread of this strain, and thus we neglect the fact that over time, ω will increase, as infected hosts become immune to this new strain.

Finally, we assume that hosts receive antibiotic treatment with a probability denoted by q N (resp. q I ) for naive (resp. immune) hosts. We initially assume that q N = q I , which is appropriate if antibiotics are given for a reason independent from the bacteria we focus on (e.g. to fight other bacteria, or for growth enhancement in farm animals). We then consider q N = q I .

Analytical methods

Since we focus on the beginning of the spread of a bacterial strain, we use the framework of branching processes [START_REF] Kendall | On the generalized[END_REF][START_REF] Harris | The Theory of Branching Processes[END_REF][START_REF] Lange | Applied Probability[END_REF]. We denote by ℘ i (n 0 , n 1 , ..., n N ) the probability for a host initially infected by i resistant and N -i sensitive bacteria to infect n 0 hosts with 0 resistant and N sensitive bacteria, n 1 hosts with 1 resistant and N -1 sensitive bacteria, and so on. Let us consider the generating functions g i of the branching process, for all i between 0 and N :

g i (z 0 , z 1 , ..., z N ) = n 0 ,n 1 ,...,n N ℘ i (n 0 , n 1 , ..., n N )z n 0 0 z n 1 1 ...z n N N , (6.1)
where each n i is summed from 0 to infinity. As we consider no correlation between transmissions, and as the number of transmissions is Poisson distributed, of mean λ (with λ = λ N for naive hosts and λ I for immune ones), we obtain:

g i (z 0 , z 1 , ..., z N ) = ∞ k=0 λk e - λ k!   N j=0 T i,j z j   k = exp   - λ N j=0 T i,j (1 -z j )   , (6.2)
where T i,j denotes the probability that when a host, initially infected with i resistant bacteria and N -i sensitive ones, infects another host, it transmits to this other host j resistant bacteria and N -j sensitive ones. Note that

N j=0 T i,j = 1.
Either the new bacterial strain will go extinct, or it will spread to an ever increasing number of hosts, acquiring resistance on the way. The extinction probability e i , starting from one host initially infected with i resistant and N -i sensitive bacteria, is the fixed point of the generating function g i [START_REF] Harris | The Theory of Branching Processes[END_REF]. Hence, it satisfies

e i = exp   - λ N j=0 T i,j (1 -e j )   . (6.3)
The spread probability is 1 -e i . We will start from these equations for the extinction probabilities, and write them by summing over the cases where hosts are immune or naive, and treated or not. Simplifications are allowed by our assumption that when a host is treated, it does not transmit anything if it was initially infected with no resistant bacteria, and it transmits only resistant bacteria otherwise. will build on this minimal model to address more realistic cases, including within-host growth stochasticity, mutations and fitness costs of resistance. The generating function g N i for naive non-treated hosts is then given by Eq. 6.2 with λ = λ N , and where the probability T i,j that a transmission from a host initially infected with i resistant bacteria contains j resistant bacteria follows a binomial law of parameters N and i/N :

T i,j = N j i N j N -i N N -j . (6.5)
Besides, the generating function of the process for immune non-treated hosts reads:

g I i (z 0 , . . . , z N ) = exp - λ I i N (1 -z N ) exp - λ I (N -i) N (1 -z 0 ) . (6.6)
Using these expressions for the generating functions together with Eq. 6.4 for 0 ≤ i ≤ N yields a complete system of equations that allows to solve for the extinction probabilities. Naive and immune hosts differ only through bacterial clustering. Each host is treated with probability q = 0.55 and transmits N = 100 bacteria to an average of λ = 2 other hosts (unless it was infected with no resistant bacteria and treated). Solid lines: numerical resolution of Eq. 6.4; symbols: simulation results (over 10 4 realizations). Numerical resolution and simulation are in excellent agreement with each other. Black dotted line: approximation from Eq. 6.14 for ω = 1 and 0 < i N . Main panel: linear scale; inset: semi-logarithmic scale.

A broad range of values for the initial proportion i/N of antibiotic resistance are realistic, from zero or less than a percent to more than half [START_REF] Rhomberg | Summary trends for the meropenem yearly susceptibility test information collection program: a 10-year experience in the united states (1999-2008)[END_REF]. Here, we focus on the case with pre-existing mutations. The case without pre-existing mutations will be addressed in the last part of Results. Fig. 6.2 shows that whenever the first host is infected by a mixed inoculum containing both resistant and sensitive bacteria, i.e. 0 < i < N , the extinction probability e i increases with the proportion ω of immune hosts, assuming that naive and immune hosts only differ through bacterial clustering. Therefore, bacterial clustering hinders the spread of the strain and of resistance. This effect is strongest for small values of i.

Clustering increases extinction probabilities because transmission of resistance is less likely with clustering than without clustering. For a given proportion i/N of resistant bacteria, the probability that a clonal cluster contains no resistant bacteria is 1 -i N , while a random assortment of N bacteria has a smaller probability (1 -i N ) N of containing no resistant bacteria.

To understand the effect of clustering quantitatively, consider the equations giving the extinction probabilities if all hosts are naive (denoted by e N i ) or all hosts are immune (e I i ). If all hosts are naive, Eqs. 6.4 and 6.1 yield:

e N 0 = q N + (1 -q N ) exp -λ N (1 -e N 0 ) , (6.7)
e N i = q N exp -λ N (1 -e N N ) + (1 -q N ) exp   -λ N N j=0 T i,j (1 -e N j )   ∀i ∈ [1, N -1], (6.8)
e N N = exp -λ N (1 -e N N ) , (6.9)
where T i,j is given in Eq. 6.5. Conversely, if all hosts are immune, e I 0 and e I N are solutions of e I 0 = q I + (1 -q I ) exp -λ I (1 -e I 0 ) , (6.10)

e I N = exp -λ I (1 -e I N ) , (6.11)
and e I i can be obtained from e I 0 and e I N via

e I i = q I e I N + (1 -q I )e I N i N (e I 0 -q I ) 1-i N . (6.12)
These equations show that if naive and immune hosts differ only through bacterial clustering, i.e. λ N = λ I = λ and q N = q I = q, then e N N = e I N = e N and e N 0 = e I 0 = e 0 . Hence, clustering is irrelevant if all bacteria are identical. In addition, e 0 > e N if q > 0 and λ > 1 (see Eqs. 6.7 and 6.9): in the presence of treatment, resistance decreases the extinction probability.

Consider now a first host infected with both resistant and sensitive bacteria (0 < i < N ). If this host is treated, its infection becomes fully resistant, leading to an extinction probability e N N or e I N , depending whether the host population is fully naive or fully immune. In a fully naive host population, if the first host is not treated, its probability of not transmitting resistance to a given new host is (1-i N ) N . For N 1 and 0 < i N , (1-i N ) N ≈ exp(-i), which is smaller than 5% for i > 2: then, transmission of resistance is almost certain, and

e N i ≈ e N N . (6.13)
In a fully immune population, if the first host is not treated, and if (1q I )λ I < 1, spread is possible only if it transmits a resistant cluster (probability i/N ) to one of the recipient hosts (which are on average λ I ), and this leads to spread (probability 1 -e I N ), yielding an extinction probability ≈ 1 -(1 -e I N )λ I i/N . This approximation neglects the case where multiple recipient hosts receive resistant bacteria, which is appropriate if λ I i/N 1. Hence, if 0 < i < N and λ I i/N 1 and (1 -q I )λ I < 1,

e I i ≈ q I e I N + (1 -q I ) 1 -(1 -e I N )λ I i N , (6.14)
which is consistent with Eq. 6.12 for i/N → 0 and e I 0 = 1. In Fig. 6.2, for ω = 0, we observe an early plateau as i increases, as predicted by Eq. 6.13, and for ω = 1, our complete results are well approximated by Eq. 6.14 when 0 < i N . Importantly, in the present case where naive and immune hosts differ only through bacterial clustering, i.e. λ N = λ I = λ and q N = q I = q, we have e N N = e I N , and thus Eqs. 6.13 and 6.14 yield 1 -e I i ≈ (q + (1q)λi/N )(1 -e N i ). Hence, immunity reduces the spread probability by a factor up to 1/q.

The reduction of spread can be countered by silent carrier effects

So far, we assumed that immune and naive hosts differ only through IgAmediated bacterial clustering. However, considering pathogenic bacteria, immune hosts may feel less sick than naive ones, because clustering prevents direct interaction with epithelial cells, and thus systemic infection. Immune hosts may still shed bacteria: they are silent carriers. Sick naive hosts may have fewer contacts than immune ones (e.g. if sick hosts stay at home), i.e. λ N < λ I . Note that one might also imagine the opposite effect, e.g. because the infection is cleared faster in immune hosts, but λ N > λ I would reinforce the reduction of resistance spread due to immunity. Hence, we focus on λ N < λ I , which might counter this effect. In addition, if antibiotic treatment is given in response to infection by the bacterial strain considered, silent carrier immune hosts might be treated less often, i.e. q I ≤ q N . Immune hosts then become reservoirs of sensitive bacteria, which can either favor the emergence of resistance by enabling more spread, or hinder it, because a reduced use of antibiotics decreases the competitive advantage of resistant bacteria. Here, we investigate the interplay of clustering with these silent carrier effects. Fig. 6.3A shows the extinction probability e i as a function of the initial number i of resistant bacteria in the first infected host, as in Fig. 6.2, but for λ N < λ I . Other parameters are the same, and we remain in the regime where extinction is not certain with only resistant bacteria, but certain without resistance, i.e. 1 < λ N < λ I , while λ N (1 -q N ) < 1 and λ I (1 -q I ) < 1. Fig. 6.3A shows that when 0 < i N , the extinction probability increases with the proportion ω of immune hosts, as in Fig. 6.2. But strikingly, this effect is reversed for larger values of i. Therefore, the reduction of resistance spread by bacterial clustering can be countered by silent carrier effects. 6.2, except that each naive (resp. immune) host transmits to an average of λ N = 1.5 (resp. λ I = 2) other hosts. Solid lines: numerical resolution of Eq. 6.4; symbols: simulation results (over 10 4 realizations). Black dotted line: approximation from Eq. 6.14 for ω = 1 and 0 < i N . B: Heatmap: the ratio e I 3 /e N 3 of the extinction probabilities in a fully immune versus a fully naive population, starting from i = 3, is shown for λ I ≥ λ N = 1.2 and q I ≤ q N = 0.55. Values (λ N , q N ) for naive hosts are indicated by a dot labeled "N ". Parameters are the same as in Fig. 6.2, except λ I , λ N and q I . Solid curve: e I 3 /e N 3 = 1. Dashed curve: λ I (1 -q I ) = 1. Dotted curve: q I = (1 -e N N )/(1 -e I N ) (Eq. 6.15). Heatmap interpolated from numerical resolutions of Eq. 6.4; logarithmic color scale.

Let us analyze this trade-off by comparing a fully immune population with a fully naive one. If 1 < λ N < λ I , Eqs. 6.9 and 6.11 yield e I N < e N N < 1. If in addition q I ≤ q N , then λ I (1-q I ) > λ N (1-q N ), and either e I 0 = e N 0 = 1 if λ I (1-q I ) < 1, or e I 0 < e N 0 if λ I (1-q I ) > 1 (see Eqs. 6.7 and 6.10). Hence, if all bacteria are resistant, immunity actually favors the spread, because of the associated increased transmission. If all bacteria are sensitive, the same conclusion holds if λ I (1 -q I ) > 1. Let us now consider intermediate initial numbers of resistant bacteria. If 0 < λ I i/N 1 and λ I (1 -q I ) < 1, then e I i satisfies Eq. 6.14, which simplifies into e I i ≈ 1 -q I (1 -e I N ) to zeroth order in λ I i/N . Besides, e N i satisfies Eq. 6.13 for 2 < i N . Employing these approximations, the condition e I i > e N i becomes

q I < 1 -e N N 1 -e I N . (6.15)
If 1 < λ N < λ I , then e I N < e N N < 1, so Eq. 6.15 can hold or not depending on q I , which means that immunity can hinder the spread of resistance or not. Fig. 6.3A is in the regime where immunity increases extinction probabilities for 2 < i N (Eq. 6.15 holds), but decreases them for i = N . Fig. 6.3B shows a heatmap of e I 3 /e N 3 , for λ I and q I satisfying 1 < λ N ≤ λ I and q I ≤ q N . We observe that increasing λ I decreases e I 3 /e N 3 , but that the impact of decreasing q I is subtler, since it can both enable more spread, and decrease the competitive advantage of resistant bacteria. Moreover, as predicted, if λ I (1 -q I ) < 1 and Eq. 6.15 both hold, then e I 3 /e N 3 > 1, and immunity hinders the spread of resistance. Fig. 6.3B also features a region where λ I (1 -q I ) > 1 (thus e I 0 < e N 0 ) but e I 3 /e N 3 > 1. Elsewhere, the reduction of resistance spread by immunity is countered by silent carrier effects, and e I 3 /e N 3 < 1.

Results are robust to including mutations, within-host growth stochasticity, and a cost of resistance

So far, we considered the simple case where the within-host growth simply preserves the proportion of resistant bacteria. We now include more realistic within-host population dynamics. First, what is the impact of mutations on the spread of resistance in the presence of immunity? Typical mutation rates for bacteria are ∼ 10 -10 -4 × 10 -9 per base pair per replication [START_REF] Lynch | Evolution of the mutation rate[END_REF]. There are often several mutations conferring resistance, yielding an effective total mutation probability µ 1 ∼ 10 -10 -10 -6 from sensitive to resistant at each replication [START_REF] Abel Zur Wiesch | Population biological principles of drug-resistance evolution in infectious diseases[END_REF]. The back-mutation probability µ -1 from resistant to sensitive is generally substantially smaller, as the exact same mutation has to be reverted [START_REF] Levin | Compensatory mutations, antibiotic resistance and the population genetics of adaptive evolution in bacteria[END_REF]. Hence, while developing a complete model that includes back-mutations, we will often present cases where they are neglected. The total number of bacterial generations G within a host can vary. For instance, in experimental infection of mice by Salmonella starting at different inoculum sizes, G is typically 10 (inoculum of 10 7 bacteria) to 35 (inoculum of 10 3 bacteria) after 24h [START_REF] Schumann-Moor | High-avidity iga protects the intestine by enchaining growing bacteria[END_REF]. Assuming deterministic exponential within-host growth, we employ differential equations to compute the fraction of resistant bacteria at the end of the incubation time, and we write the corresponding generating functions (see Appendix, Section 6.5.2). Fig. 6.4A compares results obtained with and without mutations. Overall, accounting for mutations from sensitive to resistant slightly decreases the extinction probabilities e i , especially for small values of i, including i = 0, where extinction is no longer certain. Indeed, mutations tend to increase the fraction of resistant bacteria, with a stronger effect if this fraction is initially small. Fig. 6.4A further shows that the impact of mutations is small for a fully immune population. Then, for the small proportions of resistant bacteria such that mutations matter, the probability that a non-treated host transmits resistant bacteria is small anyway because of clustering. Interestingly, Fig. 6.4A shows that the impact of mutations is stronger for an intermediate fraction ω of immune hosts than for a fully naive host population. This is due to cross-transmission events: for small i, if an immune host infects a naive host, it very likely transmits only sensitive bacteria. But if the naive recipient host is not treated, mutations can induce de novo resistance, which is then likely to be transmitted. Hence, the propagation of resistance is less likely to be stopped by immune hosts with mutations than without mutations. So far, we considered deterministic within-host growth. To assess the impact of within-host growth stochasticity on the spread of resistance in the presence of immunity, we performed simulations with stochastic exponential within-host growth but without bacterial death or loss (see Appendix, Section 6.5.5). In the absence of mutations (Fig. 6.7), the only difference with our deterministic model is the stochasticity of growth, while with mutations (Fig. 6.8), an additional difference is that mutations are treated in a stochastic way, which is more realistic since mutations are rare events. We found that stochasticity matters most for naive hosts and small initial numbers i of resistant bacteria, but overall, its impact is small, which validates our use of a deterministic model (Appendix, Section 6.5.3). We further showed that including small loss rates of bacteria does not affect our conclusions (Appendix, Section 6.5.3), and that our assumption of neglecting mixed clusters is valid when the inoculum is mixed (Fig. 6.9).

Mutations conferring resistance often carry a fitness cost. Denoting by f the growth rate of sensitive bacteria without antibiotics, and by f (1δ) that of resistant bacteria, typical values for δ range from 0.005 to 0.3 [START_REF] Levin | Compensatory mutations, antibiotic resistance and the population genetics of adaptive evolution in bacteria[END_REF][START_REF] Andersson | antibiotic resistance and its cost: is it possible to reverse resistance? nat rev microbiol 8: 260-271[END_REF][START_REF] Abel Zur Wiesch | Population biological principles of drug-resistance evolution in infectious diseases[END_REF][START_REF] Sousa | Potential for adaptation overrides cost of resistance[END_REF] (but can be even larger [START_REF] Paulander | Multiple mechanisms to ameliorate the fitness burden of mupirocin resistance in salmonella typhimurium[END_REF]). Here, we assume that this fitness cost only affects within-host growth, and not transmissibility [START_REF] Park | Multiple scales of selection influence the evolutionary emergence of novel pathogens. Philosophical transactions of the Royal Society of London[END_REF][START_REF] Schreiber | Cross-scale dynamics and the evolutionary emergence of infectious diseases[END_REF]. Fig. 6.4B shows that extinction probabilities are increased by a fitness cost, taken equal to 0.1. Indeed, the fraction of resistant bacteria after deterministic within-host growth, starting from a given inoculum, is smaller with a cost than without one. In a fully immune population, the cost has less impact for small values of the initial number i of resistant bacteria, because transmission of resistance is then very unlikely anyway (Eq. 6.14). In contrast, in a fully naive population, the fitness cost has a substantial impact for small i, but very little impact for larger i, because transmission of resistance is then very likely (Eq. 6.13).

The fitness cost of many resistance mutations can be compensated by subsequent mutations [START_REF] Levin | Compensatory mutations, antibiotic resistance and the population genetics of adaptive evolution in bacteria[END_REF][START_REF] Schrag | Adaptation to the fitness costs of antibiotic resistance in ¡i¿escherichia coli¡/i¿[END_REF][START_REF] Maisnier-Patin | Adaptation to the deleterious effects of antimicrobial drug resistance mutations by compensatory evolution[END_REF][START_REF] Paulander | Multiple mechanisms to ameliorate the fitness burden of mupirocin resistance in salmonella typhimurium[END_REF][START_REF] Sousa | Potential for adaptation overrides cost of resistance[END_REF][START_REF] Hughes | Evolutionary consequences of drug resistance: Shared principles across diverse targets and organisms[END_REF][START_REF] Marrec | Quantifying the impact of a periodic presence of antimicrobial on resistance evolution in a homogeneous microbial population of fixed size[END_REF]. Hence, we generalized our model to include compensation (see Appendix, Section 6.5.4). While compensation would determine long-term survival of resistance if the treatment was stopped or became less frequent, our results (Figs. 6.10 and 6.11) show that it does not have a major impact on the initial steps of the propagation studied here.

Overall, our finding that clustering hinders the spread of resistance is robust to including mutations, within-host stochasticity, as well as a fitness cost and its compensation.

Spread probability without pre-existing resistance

We now develop analytical approximations to better characterize the impact of antibody-mediated clustering on the spread of resistance, starting without pre-existing resistant mutants (i = 0). Here, we take into account mutations and the fitness cost of resistance, but not its compensation. We use the deterministic description of the within-host growth, and take λ N = λ I = λ, as well as q N = q I = q.

Let us focus on the case where the bacterial strain would certainly go extinct without mutations, i.e. λ(1 -q) < 1 (otherwise, immunity has little impact on its spread). Then, the spread probability, starting from a host infected with only sensitive bacteria, is proportional to µ 1 , and thus very small. Hence, we assume that at most one event leads to spread. In the absence of mutations, the mean number of infected hosts is 1 + λ(1 -q) + (λ(1 -q)) 2 + ... = 1/(1 -λ(1 -q)), both for naive and immune hosts. We will express the probability that each transmission from an infected host contains resistant bacteria, and that this leads to spread, comparing fully immune and fully naive host populations.

So far, we have considered that antibody-mediated bacterial clusters are either fully sensitive, or fully resistant, which is appropriate when most mutants are descendants of a pre-existing mutant transmitted to the host, as confirmed by Fig. 6.9. However, in a host initially infected with only sensitive bacteria, mixed clusters may matter. A simplified view of the process of cluster growth and breaking is that clusters grow in linear chains and break in two once a certain size is attained, then grow and break again, and so on. As bacteria are enchained upon division, the subclusters formed upon breaking comprise closely related bacteria. Assume that the maximal cluster size is 2 g = N : it is attained in g ≤ G generations, where G is the number of generations within a host. When a mutation occurs, the cluster comprises mixed bacterial types until g generations after (see Fig. 6.6, Appendix, Section 6.5.3). In the limit of a small mutation rate, the final proportion of fully mutant clusters corresponds to the proportion of mutant bacteria at generation G -g, seeding the final clusters. Meanwhile, neglecting selection during cluster growth, which is valid for gδ 1, the final proportion of mixed clusters is equal to the probability that a mutation occurs during the final cluster growth, i.e. 2µ 1 (2 g -1) = 2µ 1 (N -1). Let us now consider in more detail two extreme regimes, depending on the number of generations G within a host.

Small G. Assume that δG 1: selection weakly impacts the proportions of bacterial types, and thus, the final proportion of fully mutant clusters is ≈ µ 1 (G -g). Assume also that (G -g) 2(N -1): starting with a fully sensitive infection, most transmissions of mutant bacteria happen through mixed clusters.

In this regime, if at least one resistant mutant is transmitted, the probability of extinction is similar for an immune and a naive host population (see Appendix, Section 6.5.6). Besides, in a fully naive population, the probability that a host infected with only sensitive bacteria transmits at least one resistant bacteria is ≈ µ 1 GN (the proportion of resistant bacteria multiplied by the bottleneck size). Conversely, in a fully immune population, this probability is ≈ 2µ 1 (N -1) (the proportion of mixed clusters). Thus, the ratio of spread probabilities reads

R = 1 -e N 0 1 -e I 0 ≈ G 2 . ( 6.16)
Large G. Assume that δG > 1: the proportion of resistant bacteria in infections started with a mixed inoculum end up close to the mutationselection balance. Assume also that the number of mixed clusters, 2µ 1 (N -1), is small compared to the number of fully mutant clusters, (1-exp(-(Gg)δ))µ 1 /δ (see Appendix, Section 6.5.6): this condition can be expressed as 2N δ 1. Assume that G g: the proportion of resistant bacteria at G -g is well approximated by its value r 0 at G. Finally, assume that N µ -1 (1 + δ) G 1, i.e. back-mutations can be neglected: hosts infected with only resistant bacteria generally transmit only resistant bacteria. Thus, a host infected with only resistant bacteria leads to an spread probability 1 -e N similar for naive and immune hosts.

In this regime, how can spread occur, starting from a host infected with only sensitive bacteria? In a fully naive host population, spread occurs if the following three events happen. First, a resistant bacterium is transmitted (probability ≈ r 0 N , the final proportion of resistant bacteria multiplied by the bottleneck size). Second, the recipient host is treated (probability q; else, the final proportion of resistant bacteria is close to the mutation-selection balance, leading to negligible spread probability). Third, the resulting fully resistant infection spreads with probability 1 -e N . Hence, the spread probability per host infected with only sensitive bacteria is ≈ r 0 N q(1 -e N ). Besides, in a fully immune host population, spread occurs if a cluster of resistant bacteria is transmitted (probability ≈ r 0 ), and emerges (probability 1 -e N ). Thus, the spread probability per host infected with only sensitive bacteria is ≈ r 0 (1 -e N ). The ratio of spread probabilities then reads

R = 1 -e N 0
1 -e I 0 ≈ qN . (6.17) Fig. 6.5 demonstrates that the simple expressions in Eqs. 6.16 and 6.17 are valid. In conclusion, without pre-existing resistance, and when mutations are necessary for spread, immunity can substantially decrease the spread probability.

Discussion

At the scale of a population of hosts, bacterial adaptation via evolution, for instance the spread of antibiotic resistant mutations, could be affected by This figure shows that the simple expressions in Eqs. 6.16 and 6.17 are robust and capture well the dependence of R on the various parameters.

host immunity. In particular, IgA, an antibody isotype which is the main effector of the adaptive immune response in the gut, could have important impacts in the case of fecal-oral transmission, although it neither kills bacteria nor prevents them from reproducing. It was shown recently [START_REF] Schumann-Moor | High-avidity iga protects the intestine by enchaining growing bacteria[END_REF] that its main effect is to enchain bacteria: bacteria recognized by IgA remain stuck together after replication. This clustering may reduce inflammation and horizontal gene transfer [START_REF] Médéric | Inflammation boosts bacteriophage transfer between salmonella spp[END_REF]. Here, we shed light on another original effect of clustering: the reduced bacterial diversity resulting from this clustering could hinder the spread of adaptive mutations in a population of hosts, even if the total number of bacteria in a host remains the same. In practice, this direct effect of clustering could work in synergy with the reduction of horizontal gene transfer [START_REF] Médéric | Inflammation boosts bacteriophage transfer between salmonella spp[END_REF] to reduce the spread of antibiotic resistance.

To assess how antibody-mediated bacteria clustering impacts the spread of antibiotic resistance, we developed a multi-scale model, with a deterministic description of within-host evolution, and a stochastic description of between-host transmission, assuming a probability q for host treatment, and a fixed bottleneck size N at transmission (taken equal to the bacterial cluster size; this case gives an upper bound to the effect of clustering). We showed that if the first host is infected by a mix of sensitive and resistant bacteria, immunity decreases the spread probability of the bacterial strain by a factor up to 1/q, assuming that infection in naive and immune hosts differs only through bacterial clustering. We demonstrated that this effect can be countered when an immune host is a silent carrier, and is less likely to get treated, and/or has more contacts. Our results proved robust to the introduction of mutations and stochasticity in the within-host dynamics. We also showed that if resistance comes at a cost, extinction probabilities are increased, while compensation of this cost has little impact, except for long incubation periods. However, compensation would matter for the long-term maintenance of resistance, e.g. if treatment was stopped. Finally, we showed that if only sensitive bacteria are initially present, and if the bacterial strain needs to acquire a resistance mutation to spread, immunity decreases the spread probability by a factor approximately G/2 when the number G of within-host generations is small, and approximately qN when G is large.

Immunity hinders the spread of drug resistance because immune hosts mostly transmit bacteria of the same type, due to the antibody-mediated clonal clusters they carry. The disadvantage of a higher variance (here, in the number of resistant bacteria transmitted) is a classic theme in population genetics [START_REF] Gillespie | Natural selection for within-generatiion variance in offspring number ii. discrete haploid models[END_REF][START_REF] Frank | Evolution in a variable environment[END_REF], and also appears in analyses of viral adaptation [START_REF] Loverdo | Influence of viral replication mechanisms on within-host evolutionary dynamics[END_REF]. For a given average number of transmitted resistant bacteria, the proportion of transmissions comprising at least one resistant bacteria is smaller for immune donor hosts than for naive ones. In a sense, transmissions from immune hosts "put all their eggs in one basket", and prevent bacteria from hedging their bets.

Microbial populations infecting a host often grow to very large numbers, so that even with realistic small mutation rates, many mutants may be produced. Single point mutations can suffice to confer resistance [START_REF] Andersson | antibiotic resistance and its cost: is it possible to reverse resistance? nat rev microbiol 8: 260-271[END_REF], implying that resistance-carrying mutants might exist in most infected hosts. Nevertheless, the spread of drug resistance in a host population typically takes years [START_REF] Mcclure | A theoretical examination of the relative importance of evolution management and drug development for managing resistance[END_REF]. One reason is that only a small proportion of the large withinhost microbial population is transmitted to the next host. This bottleneck decreases diversity, and most mutants are not transmitted, because they are rare. Because of this sampling effect, the immunity-mediated clustering of clonal bacteria can hinder the spread of antibiotic resistance, and more generally of any type of adaptive mutations. Note that using a deterministic description of within-host growth, and excluding bacterial death or loss, transmission from naive hosts involving one cluster is effectively equivalent to a bottleneck size of one single bacterium. However, for such small bottlenecks, stochasticity would significantly matter. Reducing the bottleneck size has been shown to generally increase the extinction probability in other contexts, but sometimes has the opposite effect [START_REF] Schreiber | Cross-scale dynamics and the evolutionary emergence of infectious diseases[END_REF][START_REF] Leclair | The impact of population bottlenecks on microbial adaptation[END_REF]. The details of transmission play an important part in this effect. Our multi-scale description integrating realistic aspects of the within-host dynamics, in particular immunity, thus allowed us to gain important insight into the spread of a pathogen in a host population. While our study was motivated by IgAinduced bacterial clustering, our results would extend to other mechanisms yielding clonal clusters. There are other host effectors besides IgA that cluster bacteria together, for instance neutrophil extracellular traps [START_REF] Fournier | The role of neutrophils during intestinal inflammation[END_REF].

Our work highlights the importance of interactions between immunity and the spread of antibiotic resistance. In particular, antibiotic treatment and vaccines inducing IgA production might have non-trivial interplays. In practice, vaccines protect the host, but may or may not reduce shedding of bacteria [START_REF] Taseen S Desin | Salmonella vaccines in poultry: past, present and future[END_REF][START_REF] Sharma | Shedding of salmonella typhimurium in vaccinated and unvaccinated hens during early lay in field conditions: A randomised controlled trial[END_REF]. Reduction of shedding clearly hinders pathogen propagation. However, our results demonstrate that even a vaccine that does not reduce shedding can protect the host population. Indeed, it can increase the efficiency of antibiotic treatment, by hindering the spread of resistance in the host population. Our results thus constitute an additional argument in the favor of vaccine-based strategies to combat antibiotic resistance, which are the focus of renewed interest [START_REF] Jim | UK Review on Antimicrobial Resistance[END_REF][START_REF] Lipsitch | How can vaccines contribute to solving the antimicrobial resistance problem?[END_REF][START_REF] Jansen | The role of vaccines in preventing bacterial antimicrobial resistance[END_REF].

Within-host growth equations and generating function

Below, we present the deterministic differential equations on the numbers of sensitive and resistant bacteria within a non-treated infected host including mutations and a fitness cost of resistance. We assume exponential growth, and we simplify using µ 1 , µ -1 δ 1. We denote by G the total number of replications within a host, corresponding to the incubation time. We also denote by r i the proportion of resistant bacteria in a host at the end of incubation, for a host that was initially infected with i resistant bacteria and N b -i sensitive ones (recall that each host is infected by a total of N b bacteria). Here N b is the bottleneck size, in practice we generally take it equal to the cluster size N c and denote both by N .

Discrete vs. continuous time representation

Let us first consider the case without mutations, with S the number of sensitive bacteria, R the number of resistant bacteria, and δ the fitness cost of resistance. If there are G generations for the sensitive strain, there are G(1 -δ) generations for the resistant strain. Denoting by f the growth rate of sensitive bacteria, the ordinary differential equations governing the growth of the bacterial population read:

dS dt = f S , (6.18)
dR dt = f (1 -δ)R . (6.19)
The solutions of these equations are S(t) = S 0 exp(f t), R(t) = R 0 exp(f (1δ)t). If we start from one bacteria of each type, after a time τ corresponding to G generations of the sensitive bacteria, there are 2 G = exp(f τ ) sensitive bacteria, and 2 G(1-δ) = exp(f (1 -δ)τ ) resistant bacteria. Thus:

G log(2) = f τ . (6.20)
Next, let us consider the case with mutations. When a sensitive bacteria divides, each of the daughter bacteria has a probability µ 1 to be mutant (and thus to have become resistant in our model). When a resistant bacterium divides, each of the daughter bacteria has a probability µ -1 to have mutated (and thus to have become sensitive in our model). Let us denote μ1 and μ-1 the mutation rates for the system of differential equations, such that:

dS dt = f (1 -μ1 )S + μ-1 f (1 -δ)R , (6.21)
dR dt = f (1 -δ)(1 -μ-1 )R + μ1 f S . (6.22)
We then look for the relation between µ i (discrete model) and μi (continuous model). The accumulation of mutants in the early dynamics has to be the same. Let us start from sensitive bacteria only, neglect back mutations, and take the limit of very small δ. Then, when considering a bacteria after G generations, there have been G opportunities for mutation, i.e. the proportion of resistant bacteria is Gµ 1 . In our continuous description, if there were S 0 sensitive bacteria (and no resistant bacteria) at t = 0, and still neglecting back mutations, S(t) = S 0 exp(f (1 -μ1 )t), and, replacing S(t) by this expression in 6.22, and solving for R(t) with R(0) = 0:

R(t) = S 0 μ1 exp(f (1 -μ1 )t) exp(f (μ 1 + μ-1 (-1 + δ) -δ)t) -1 μ1 + μ-1 (-1 + δ) -δ . (6.23)
In the limit of small t,

R(t) ≈ S 0 μ1 f t exp(f (1 -μ1 )t) , (6.24)
and the proportion of resistant bacteria then reads:

r(t) = R(t) R(t) + S(t) ≈ R(t) S(t) = μ1 f t . (6.25)
Thus Gµ 1 = μ1 f τ = μ1 G log(2) (where we used Eq. 6.20), and consequently we have to take μ1 = µ 1 / log(2) for consistency.

Resolution of the continuous-time system

When the host is not treated, the within-host dynamics can be complex. The growth could be limited by some carrying capacity and taken as logistic, there could be a loss term, etc. As we want to calculate the proportions of sensitive and resistant bacteria, the following equations will give similar results as equations with a carrying capacity:

dS dt g = (1 -µ 1 / log(2))S + (1 -δ)µ -1 R/ log(2), (6.26)
dR dt g = (1 -δ)(1 -µ -1 / log(2))R + µ 1 S/ log(2) , (6.27)
with t g the time in numbers of generations. The aim is to obtain the proportion of sensitive and resistant bacteria at the end of the infection within a host, depending on the composition of the inoculum. The total number of replications within a host G can vary. The typical minimal doubling time for bacteria is half an hour [START_REF] Mason | A comparison of the maximal growth rates of various bacteria under optimal conditions[END_REF]. Bacterial carriage can last several days or even more, but when close to carrying capacity, the growth rate decreases. As a portion of the bacteria will be lost in feces, there will be ongoing replication, though at a lower rate. Thus G can take a wide range of values. For instance, in experimental infection of mice by Salmonella starting at different inoculum sizes, the number of replications is typically 10 (inoculum of 10 7 bacteria) to 35 (inoculum of 10 3 bacteria) after 24h [START_REF] Schumann-Moor | High-avidity iga protects the intestine by enchaining growing bacteria[END_REF].

Solving Eqs. 6.26 and 6.27 with the initial conditions S(0) = N -i and R(0) = i, we find for all i between 0 and N the following exact expression for the proportion r i = R R+S of resistant bacteria after G generations, knowing that the infection was seeded with i resistant and N -i sensitive bacteria at time t = 0:

r i = (2 ∆G -1)(2µ 1 N + i(-µ 1 -µ -1 -δ log(2) + µ -1 δ)) + i∆ log(2)(2 ∆G + 1) N ((2 ∆G -1)(µ 1 + µ -1 + δ log(2) -2iδ log(2)/N -µ -1 δ) + log(2)∆(2 ∆G + 1)) , (6.28) with ∆ = δ 2 1 -µ -1 log(2) 2 + 2δ -µ 1 log(2) + µ -1 log(2) -µ 1 µ -1 log 2 (2) - µ 2 -1 log 2 (2) + (µ 1 +µ -1 ) 2 log 2 (2)
.

(6.29) Let us look at particular cases in more detail.

Case with only sensitive bacteria initially: In this case, as 1 δ µ 1 , µ -1 , the final proportion of resistant bacteria can be approximated to:

r 0 ≈ µ 1 1 -2 -δG δ log(2) . ( 6

.30)

Case with mixed inoculum: Let us distinguish two cases:

• If δG 1, when starting with both strains, their relative proportion will have little time to change. If there is one resistant bacteria initially, then let us neglect mutations in both ways, as the mutation rate is small, and then the final proportion of resistant bacteria is:

r 1 ≈ 1 1 + (N b -1)(1 + G log(2)δ) (6.31)
• If δG 1, then if there was at least one resistant and one sensitive bacteria initially, the mutation-selection balance is reached within the infected host. The final proportion of resistant bacteria r M SB is obtained by writing the differential equation on R R+S and looking for its equilibrium. In the limits we are considering, r M SB tends to µ 1 /(δ log(2)).

Case starting from resistant bacteria only: In this case, the final proportion of resistant bacteria will be: 2) , (6.32) with ∆ defined in Eq. 6.29. For G not too large, since 1 δ µ 1 , µ -1 , then ∆ ≈ δ. Consequently:

r N = 1 - 2(2 ∆G -1)µ -1 (1 -δ) (2 ∆G -1)(µ 1 + µ -1 -δ log(2) -δµ -1 ) + (1 + 2 ∆G )∆ log(
r N ≈ 1 - (2 δG -1)µ -1 (1 -δ) 2 δG µ -1 (1 -δ) + δ log(2)
. (6.33)

Expression of the generating functions using within-host growth results

In all the expressions below, we consider a host which is not treated.

Naive hosts. In naive hosts initially infected with i mutant bacteria, when there is transmission, the probability to transmit j resistant bacteria and N -j sensitive ones reads:

T i,j = N j r j i (1 -r i ) N -j . (6.34)
Then, for all i between 0 and N :

g N i (e 0 , e 1 , ..., e N ) = exp   -λ N   N j=0 N j r j i (1 -r i ) N -j (1 -e j )     . (6.35)
Immune hosts. In immune hosts, let us address the question of whether the clusters comprise bacteria of a single type, or are mixed. As mentioned in the main text and detailed in the Appendix, Section 6.5.3, a simplified view of the process of cluster growth and breaking is that clusters break in two once a certain size is attained, then grow and break again, and so on. As bacteria are enchained upon division, the subclusters formed upon breaking comprise closely related bacteria. Assume that the maximal cluster size is 2 g = N : it is attained in g ≤ G generations, where G is the number of generations within a host.

Mixed inoculum. As explained in section 6.5.3, the clusters are made of daughter cells enchained together. Thus, in the absence of mutations, clusters will comprise bacteria of one type only. As mutation rates are very small, when the initial inoculum is mixed, the proportion of mixed clusters is very small compared to the proportion of clusters comprising bacteria of one type only. Therefore, we neglect mixed clusters when the initial inoculum is mixed. Thus for all i between 1 and N -1,

g I i (e 0 , e 1 , ..., e N ) = exp (-λ I ((1 -r i )(1 -e 0 ) + r i (1 -e N ))) . (6.36)
Inoculum of only one bacterial type. To be fully mutant at generation G, the clusters need to be seeded by a bacteria which was mutant at generation G -g. This happens with probability r 0 when the inoculum is fully sensitive and 1 -r N when the inoculum is fully resistant (with r i denoting the proportion of resistant bacteria at generation G -g while r i is the one at generation G).

For mixed clusters (see Section 6.5.3), we assume δg 1, so that differences in growth time between the different types of clusters can be neglected. A cluster at generation G was founded by one bacteria at generation G -g. A mutation occurs at its first replication with probability 2µ, resulting in a cluster of size 2 g containing 2 g-1 mutants. The probability for mutation will be 2 2 µ at the next replication, and so on. Thus, the probability for a cluster to include one mutant is 2 g µ = N µ, that to include 2 mutants is 2 g-1 µ = N µ/2, that to include 4 mutants is 2 g-2 µ = N µ/2 2 , ... , and finally, that to include 2 g-1 mutants is 2µ. This yields:

g I 0 (e 0 , e 1 , ..., e N ) = exp -λ I (1 -2µ 1 (N -1) -r 0 )(1 -e 0 ) × exp   -λ I   g-1 j=0 N µ 1 1 -e 2 j 2 j + r 0 (1 -e N )     , (6.37)
g I N (e 0 , e 1 , ..., e N ) = exp -λ I (r N -2µ -1 (N -1))(1 -e N ) × exp   -λ I   g-1 j=0 N µ -1 1 -e N -2 j 2 j + (1 -r N )(1 -e 0 )     .
(6.38)

Dynamics of clusters including mixed clusters, and probability to transmit at least one mutant

A simple view of cluster growth

As mentioned in the main text, a simplified view of the process of cluster growth and breaking is that clusters break in two once a certain size is attained, then grow and break again, and so on. As daughter bacteria are physically close in the clusters formed through IgA-mediated enchained growth, the subclusters formed after a larger cluster breaks will comprise closely related bacteria. Let us assume that a host infection lasts for G generations total, and that the maximal cluster size is 2 g = N c (see schematic in Fig. 6.6): this size is attained in g generations (2 g = N c ), with g ≤ G. We here assume that N c , the cluster size, is equal to N b , the bottleneck size, and we denote them both as N . When a mutation occurs, the cluster comprises mixed bacterial types until g generations after (see Fig. 6.6). In the limit of a small mutation rate, the final proportion of fully mutant clusters corresponds to the proportion of mutant bacteria at generation G -g, seeding the final clusters. Represented here is the case of simple linear clusters. For more complex clusters, it will remain true that closely related bacteria are located close to one another, since daughter bacteria remain bound together after replication.

Probability to transmit at least one mutant

Here, we consider a host, initially infected with only one type of bacteria, with a mutation rate µ, and no fitness cost for the mutation. We look at the probability to transmit at least one mutant, and ask how our simple model could differ from a more realistic one. Note that here, we do not consider hosts infected with a mixed inoculum, because in this case, as loss of bacteria is rare at the beginning of the infection, and as the population of bacteria grows to large numbers in the infected host, the number of both sensitive and resistant bacteria is then expected to be large, so that mutations and fluctuations are not expected to play a big role.

In our model, we effectively assume that the proportion of resistant bacteria at the end of the infection can be considered equal to its mean expected value (the average being over several realizations of the within-host dynamics), which is given by the deterministic ordinary differential equations. However, fluctuations could be important. For instance, if the infection starts from a small number of bacteria of the same type, a mutant appearing during the first replication will give rise to an important share of mutants in the population at the end of the infection. As explained in section 6.5.2, we also usually assume that in immune individuals, except if the infection starts with only sensitive bacteria, clusters comprise only one type of bacteria, either all sensitive or all resistant. In this section, we explore how realistic these assumptions are.

Let us consider two extreme cases of population dynamics, starting with only sensitive bacteria:

• Exponential growth: starting from size N , bacteria divide G times, leading to a final population size N 2 G . At each replication, each daughter bacteria has a probability µ of mutating. This is the case considered in the main text and above.

• Constant population size: let us assume that very quickly, the population grows to size N pop (we neglect mutations in this phase, and consider than we start with N pop sensitive bacteria, and then at each of the G steps, the bacteria all replicate (with a probability of mutation µ for each daughter bacteria), and then half of the bacteria are removed, so the population size remains constant.

In both cases, on average, taking bacteria at the end of the infection, they went through G replications from the start of the infection, so they have a probability µG of being mutant. When transmitting N bacteria (and assuming that N is very small compared to the final population size, and that N µG 1), the probability to transmit one mutant is ≈ N µG from a naive host. From an immune host, we assume that mutants are transmitted only in fully mutant clusters, with probability µG. Here we will study the validity of these assumptions.

Henceforth, we will consider the case of a very small mutation rate µ so that at most one mutation occurs during the infection of a host.

Exponential growth. Recall that in this regime, starting from size N , the bacteria divide G times, leading to a final population size N 2 G . At each replication, each daughter bacteria has a probability µ of mutating.

Naive host. Consider the lineage of one bacteria: it involves G steps of replication. At step j, this bacteria has 2 j descendants, and there is a probability µ2 j that one mutation occurs at this step, in which case 2 G-j bacteria will carry the mutation in the final population. This will correspond to a proportion ρ j = 2 G-j /(2 G N ) = 1/(N 2 j ) in the final population.

Assuming that 2 G 1, we can neglect the difference between taking a sample with or without replacement, so the probability for a transmission from a naive host to contain at least one mutant will be 1 -(1 -ρ j ) N if the mutation occurs at step j (probability 1 -ρ j for one bacteria to be of the initial type, probability (1 -ρ j ) N that all bacteria chosen are of the initial type). So, multiplying by the initial N bacteria, and summing over the G replication steps, the probability that a transmission from a naive host includes at least one mutant is:

m N 1 = G j=1 N µ2 j 1 -1 - 1 N 2 j N . ( 6
.39)

In the limit of j large, (1 -1 N 2 j ) N ≈ 1 -1/2 j , so Eq. 6.39 yields m N 1,exp ≈ N µG. Hence, the result from our simple model employing ordinary differential equations is recovered. We know that this result is an upper bound of the real value: an early mutation will lead to a higher proportion of mutants in an individual, and thus the probability that several mutants are transmitted at the same time will be higher. But, because when we average over all possible transmissions, the mean number of mutants does not change, a higher probability of transmitting several mutants at a time leads to a lower probability of transmitting at least one mutant.

In the limit of N large enough for 1 -exp(N log(1 -1/(N 2 j ))) ≥ 1exp(-1/2 j ) to hold (note that this does not require N to be extremely large as N 2 j 1 is sufficient), Eq. 6.39 yields:

m N 1 ≥ G j=1 N µ2 j 1 -exp(-1/2 j ) ≥ G j=1 N µ2 j 1/2 j -1/(2 2j+1 ) = G j=1 N µ 1 -1/(2 j+1 ) = N µ   G - 1 2 2 G j=1 1 2 j-1   = N µ G - 1 2 1 - 1 2 G . (6.40)
Thus, we have shown that:

N µG ≥ m N 1,exp ≥ N µ(G -1/2) . (6.41)
Immune host. In the immune case, we assume that one cluster is transmitted. Let us estimate the probability that the cluster transmitted is fully mutant (m I N ) and the probability that the cluster transmitted is mixed (m I mixed ). If a mutation occurs at a step j (probability N µ2 j ) between the first step and the (G -g) th step, then there will be 2 G-g-j mutant bacteria at the (G -g) th step, yielding 2 G-g-j fully mutant clusters at the final G th step. They will then be in proportion 1/(N 2 j ) among the N 2 G-g clusters. Thus:

m I N = G-g j=1 N µ2 j 1 N 2 j = µ(G -g) . (6.42)
If a mutation occurs at step j between the (G -g + 1)-th step and the G-th step, then it will give one mixed cluster. Thus:

m I mixed,exp = G j=G-g+1 N µ2 j 1 N 2 G-g = g j=1 µ2 j = µ2(2 g -1) = 2µ(N -1) . (6.43)
Conclusion. Interestingly, when the host is naive, the result is very close to the mean-field case. Indeed, we showed that the probability to transmit at least one mutant is bounded between 2N µ(G -1/2) and 2N µG (the mean field result) (see Eq. 6.41). The total probability for a transmission from an immune host to include at least one mutant is m

I tot = m I N +m I mixed = µ(G -g + 2(2 g -1)) = µ(G -log 2 (N ) + 2(N - 1
)) (see Eqs. 6.42 and 6.43). If N G, then it gives m I tot,exp ≈ 2N µ, which is G/2 times smaller than for the naive case. However in this case most transmissions will be of mixed clusters rather than fully mutant clusters. If N G, then m I tot,exp ≈ µG, which is N times smaller than for a naive host, and will be mostly of fully mutant clusters.

Constant population size. Recall that in this regime, we assume that very quickly, the population grows to size N pop (we neglect the mutations at the beginning, so that we consider that we start with N pop bacteria of the initial type), and then at each of the G steps, the bacteria all replicate (with a probability of mutation µ for each daughter bacteria), then half of the bacteria are removed, so the population remains constant.

Naive host. When a mutation appears, its average proportion at the end will remain at 1/N pop (recall that the mutation is assumed to be neutral).

In each realization, in the very long time, the mutation will be either lost of fixed. But the typical time for fixation will be of the order of N pop [START_REF] Ewens | Mathematical Population Genetics 1: Theoretical Introduction[END_REF]. So for a large N pop , the mutations will stay a long time at a 0 or a small frequency. Thus, we will neglect the probability for a naive host to transmit more than one mutant. The probability to transmit a mutant will then be N µG, as in the mean field case.

Immune host. In the case of an immune host, as in our model only one cluster is transmitted, we do not need to consider correlations between clusters. A cluster at generation G was founded by one bacteria at generation G-g (this bacteria may have been in a cluster at this point, but what matters is that at time G, all the bacteria in the cluster considered descend from this bacteria). Then, this cluster is fully mutant with probability µ(G -g), as G -g is the number of replications between a bacteria in the inoculum and this founding bacteria. Besides, there is a probability 2µ that a mutation occurred when this founding bacteria duplicated, 2 2 µ at next round... and 2 g µ at the last round, and thus a probability µ(2 + 2 2 + ... + 2 g ) = µ2(2 g -1) that a cluster is mixed. These are actually the same results as for the exponential case.

Conclusion.

To conclude, in the constant population size case, a transmission from a naive host will contain one mutant with probability N µG, as in the mean field case. A transmission from an immune host will involve a fully mutant cluster with probability µ(G -g), and a mixed cluster with probability 2(N -1)), exactly the same as for exponential growth.

Conclusion.

In all cases, for naive donor hosts, we assume that the N transmitted bacteria are of types taken randomly and independently. In particular, when the initial bacteria are all of one type, if the average final proportion of mutants is ρ (proportional to the mutation rate µ, and thus very small), then the probability of transmitting one mutant bacteria among N will be N 1 ρ(1-ρ) N -1 ≈ N ρ, with very little chance of transmitting more than one mutant bacteria.

For immune donor hosts, if the infection starts with a mixed inoculum, we assume that all bacteria in a cluster transmitted to another host are of the same type. Conversely, if the infection starts with an inoculum of bacteria that are all of the same type, then other bacterial types are produced only by mutations. With G the number of generations within the host and N the bottleneck size and cluster size, if G N , then most clusters will be of one bacterial type only, and the probability to transmit a fully mutant cluster will simply be the proportion of mutant bacteria, and a negligible amount of mixed clusters will be transmitted. If G N , there are many more mixed clusters than clusters made of mutant bacteria only, and the proportion of mixed clusters is of the order of 2N µ.

Stochastic simulations

Given our analytical arguments in section 6.5.3 (and in particular in section 6.5.3 which deals with the exponential growth assumed in our model), we expect the probability that a naive host initially infected by bacteria of a single type transmits at least one mutant to be very little modified by the fact that some mutations happen earlier than others due to the stochasticity of within-host growth. There could still be correlations between transmissions from the same host (if a mutation happened early within this host, then it transmits more mutants to all its contacts).

To address this question, we performed simulations with stochastic exponential within-host growth with no bacterial death (see Appendix, Section 6.5.5). In this model without death, genotypes cannot fix inside a host (in contrast with models at fixed population size [START_REF] Ewens | Mathematical Population Genetics 1: Theoretical Introduction[END_REF][START_REF] Marrec | Quantifying the impact of a periodic presence of antimicrobial on resistance evolution in a homogeneous microbial population of fixed size[END_REF]). Nevertheless, stochastic exponential growth induces variability in the composition of bacterial populations growing from a given mixed inoculum, especially if it is small [START_REF] Wienand | Non-selective evolution of growing populations[END_REF]. Fig. 6.7 compares results obtained with stochastic and deterministic within-host growth, without mutations. results with deterministic mutation-free within-host growth (identical to Fig. 6.2). As in Fig. 6.2, N = 100, λ = 2, q = 0.55, and resistance carries no cost. Solid lines: numerical resolution of Eq. 6.4; symbols: simulation results (over 10 4 realizations).

Overall, the impact of stochasticity is small, which validates our use of a deterministic model. Besides, the impact of stochasticity is strongest for naive hosts and small initial numbers i of resistant bacteria. Again, nontreated immune hosts then transmit resistance very rarely anyway because of clustering. Conversely, for non-treated naive hosts with small i, exact population composition matters because it substantially affects the probability of transmitting resistance. Stochasticity can increase or decrease the resistant fraction, but decreasing it has more impact than increasing it, because beyond some small fraction, transmission of resistance is almost certain (see Eq. 6.13). Hence, stochasticity yields a slight increase of extinction probabilities in this case, as seen on Fig. 6.7.

Since mutations are rare events, it is also important to treat them in a stochastic way. As shown in Fig. 6.8, the previous conclusions hold in this case, both with and without a fitness cost of resistance. In particular, the overall impact of stochasticity is small. ). As in Fig. 6.2, we take a bottleneck size N = 100, and each individual transmits bacteria to an average of λ N = λ I = λ = 2 new hosts and is treated with probability q N = q I = q = 0.55, irrespective of whether it is naive or immune. Here, we take mutation probabilities µ 1 = 5 × 10 -5 and µ -1 = 0, and incubation time corresponding to 10 generations of bacteria within the host. Solid lines correspond to numerical resolution of Eq. 6.4, while symbols show results from numerical simulations of the branching process, computed over 10 4 realizations. Main panel: linear scale; inset: semi-logarithmic scale.

We have also generally assumed that immune hosts transmit clusters comprising a single type of bacteria, except in our discussion of spread without any pre-existing resistance. As discussed above, immune hosts may also transmit mixed clusters. Fig. 6.9 shows that the influence of these mixed clusters is indeed often very small, especially for small cluster sizes (see Fig. 6.9B). and is treated with probability q N = q I = q = 0.55, irrespective of whether it is naive or immune. Here, we take mutation probabilities µ 1 = 5 × 10 -5 and µ -1 = 0, and a total incubation time corresponding to G = 10 generations of bacteria within the host. Symbols show results from numerical simulations of the branching process, computed over 10 4 realizations. Main panel: linear scale; inset: semi-logarithmic scale.

Impact of clustering on bacterial loss within a host

Throughout, we have considered no bacterial loss within a host, except in the section where we consider a population of constant size (section 6.5.3). Actually, some bacteria may be killed (for instance by bacteriophages, in which case bacteria in clusters, because they are very close in space, are very likely to be attacked together), or be lost in the feces (which would happen by clusters and not independently if bacteria are attached together). Let us look at the impact of including a small loss rate in the case where the proportion of resistant bacteria is initially small (i N resistant bacteria in the inoculum), and let us reason along the same lines as when deriving Eq. 6.14 of the main text.

For a naive host, as we consider a small loss rate, it will be unlikely for the resistant bacteria to be lost before they replicate, and the more they are, the less likely it is that they will all be lost. Consequently, we expect very little influence of loss in a fully naive host population.

In a fully immune population, let us start with a host infected with i resistant bacteria. If this host is treated (probability q I ), the infection becomes fully resistant, and leads to spread with probability 1 -e I N . If this host is not treated, there is some probability that the resistant bacteria are lost. Because of clustering, this probability is higher than in the naive case; let us denote this probability p i,loss . Then, if (1 -q I )λ I < 1, spread is possible only if resistant bacteria are not lost (probability 1 -p i,loss ), and when they are transmitted, they may lead to spread. This last term of spread is 1 -exp(-λ I (1 -e each )), with e each the probability of extinction following each transmission. Here, we do not consider mutations, so there are no mixed clusters, and if a cluster of sensitive bacteria is transmitted, extinction is certain, because we assume (1 -q I )λ I < 1. If a cluster of resistant bacteria is transmitted, then it still leads to extinction with probability e I N . The probability that the cluster transmitted is resistant is equal to the proportion of resistant bacteria, which is on average i/N (unaffected by losses). Because in a proportion p i,loss of the cases, there is no resistant bacteria, then the proportion of resistant bacteria in the case that they are not lost will be i/(N (1 -p i,loss )). Then overall:

1-e I i ≈ q I (1-e I N )+(1-q I )(1-p i,loss )(1-exp(-λ I (1-e I N )i/(N (1-p i,loss )))) . (6.44) We are in the regime i N , thus, assuming that 1 -p i,loss is not too small, λ I (1 -e I N )i/(N (1 -p i,loss )) 1, and consequently,

1 -e I i ≈ q I (1 -e I N ) + (1 -q I )(1 -p i,loss )(λ I (1 -e I N )i/(N (1 -p i,loss )))) ≈ q I (1 -e I N ) + (1 -q I )λ I (1 -e I N )i/N . (6.45)

We thus recover Eq. 6.14 of the main text. Therefore, provided that p i,loss is not too large (i.e. 1 -p i,loss λ(1 -e I N )i/N ), including loss does not change our conclusions.

Model with three bacterial types, including compensation

Here, we extend our model to include the possibility of compensation of the fitness cost of resistance. This description involves three types of bacteria, sensitive ones (S) with division rate f without antimicrobial, resistant ones (R) with division rate f (1 -δ), and resistant-compensated ones (C) with division rate f .

Within-host growth

Let us first write the within-host growth equations. For simplicity, we assume that there are no back-mutations. As in section 6.5.2, we present here the deterministic description of the within-host growth using ordinary differential equations, and assuming exponential growth. This yields the following system of linear differential equations:

     Ṡ = f (1 -μ1 )S Ṙ = f (1 -δ)(1 -μ2 )R + f μ1 S Ċ = f C + f (1 -δ) μ2 R , (6.46)
where S, R and C are the numbers of sensitive (S), resistant (R) and resistant-compensated (C) microorganisms, respectively, and f denotes the division rate of S bacteria in the absence of antibiotic, while dots denote time derivatives. Recall that R bacteria experience a fitness cost δ, but C bacteria do not experience any cost. Also note that the mutation rates μi = µ i / log(2) for i = 1, 2 are corrected to give agreement with the discrete model (see Section 6.5.2). Note that the population fractions s = S/(S +R+C), r = R/(S +R+C) and c = C/(S + R + C) satisfy the following equations: (6.47) where f = f s + f (1 -δ) r + f c denotes the average fitness. Such equations are often taken as a starting point to describe large populations, and are known as replicator-mutator equations [START_REF] Foster | Stochastic evolutionary game dynamics[END_REF].

     ṡ = f (1 -μ1 )s -f s ṙ = f (1 -δ)(1 -μ2 )r + f μ1 s -f r s + r + c = 1 ,
Being linear, the system in Eq. 6.46 is straightforward to solve analytically:

  S R C   =    0 0 1 0 1 μ1 δ-μ 1 +(1-δ)μ 2 1 -(1-δ) μ2 δ+(1-δ)μ 2 -(1-δ) μ2 δ-μ 1 +(1-δ)μ 2      α 1 e f t α 2 e f (1-δ)(1-μ 2 )t
α 3 e f (1-μ 1 )t   , (6.48)

APPENDIX

Let us now present a derivation of the explicit form of the generating function in each of the four cases involved in this equation. Taken together, they will thus yield the complete form of the generating function, needed to compute the extinction probabilities.

Immune and treated hosts.

Case i = 0, j = 0. In this case, we start with only sensitive bacteria, which are killed by the treatment. Thus, no bacteria can be transmitted. It follows that ℘ I,t 00 ({n kl }) = (k,l)∈S δ n kl ,0 and that g I,t 00 ({z kl }) = 1.

Case i = 0, j > 0. Since we assume that there are no back-mutations, the host will only harbor C bacteria and will transmit a cluster of N C bacteria to each recipient host. Hence, ℘ I,t 0j ({n kl }) = Case i > 0, j ≥ 0. In this case, we have two types of bacteria (R and C). Even if initially j = 0, C bacteria may appear by mutation, and their number may be nonzero after the incubation time τ . Because there are no back-mutations, S bacteria cannot reappear after being killed by the antimicrobial. Since we neglect mixed clusters, recipient hosts can be contaminated only by clonal clusters of N R bacteria or N C bacteria. The probability that n N 0 clusters of R bacteria only are transmitted, given that n clusters are transmitted, reads p(n N 0 |n) = n n N 0 (r i+j i,j ) n N 0 (1 -r i+j i,j ) n-n N 0 . (6.52)

where r i+j i,j (resp. c i+j i,j = 1-r i+j i,j ) represents the fraction of R bacteria (resp. C bacteria) at the end of the incubation period, starting from an initial total number of bacteria i + j, an initial number of R bacteria i and an initial number j of C bacteria. Using the law of total probability, we then obtain the probability that n N 0 clusters of R bacteria only are transmitted:

p(n N 0 ) = +∞ n=n N 0 p(n N 0 |n)p(n) = (λ I r i+j i,j ) n N 0 n N 0 ! exp -λ I r i+j i,j , (6.53)
where we have used p(n) = λ n I e -λ I /n! since transmission is assumed to be Poissonian. Similarly, we obtain the probability that n 0N clusters of C bacteria only are transmitted: p(n 0N ) = (λ I (1 -r i+j i,j )) n 0N n 0N ! exp -λ I (1 -r i+j i,j ) . (6.54)

We can then write ℘ I,t ij ({n kl }) = p(n N 0 )p(n 0N )

(k,l)∈S\{(0,N ),(N,0)} δ n kl ,0 , and thus g I,t ij ({z kl }) = exp -λ I r i+j i,j (1 -z N 0 ) exp -λ I (1 -r i+j i,j )(1 -z 0N ) . (6.55)

Naive and treated hosts.

Case i = 0, j = 0. This case is identical to that of immune and treated hosts (see above) and g N ,t 00 ({z kl }) = 1.

Case i = 0, j > 0. This case is identical to that of immune and treated hosts (see above), except that the host transmits to an average of λ N new hosts (instead of λ I ). Hence g N ,t 0j ({z kl }) = exp (-λ N (1 -z 0N )).

Case i > 0, j ≥ 0. As explained for immune and treated hosts, in this case, we have two types of bacteria (R and C). Even if initially j = 0, C bacteria may appear by mutation, and their number may be nonzero after the incubation time τ . Because there are no back-mutations, S bacteria cannot reappear after being killed by the antimicrobial.

Let us denote by n the total number of new hosts that will be infected by the host considered. In principle, we should draw n samples of N bacteria without replacement out of the N 2 bacteria assumed to be present at the end of the incubation time. The composition of each sample will potentially impact the others. However, this effect will be negligible if N n, in which case we can consider for simplicity that each of the n samples is drawn with replacement from the set of N 2 bacteria. Within this approximation, the probability that there are k R bacteria in a packet of N bacteria follows a binomial law:

B i,j (k) = N i (r i+j i,j ) k (1 -r i+j i,j ) N -k . (6.56)
where we have used c i+j i,j = 1 -r i+j i,j . The probability that n k N -k clusters including k R bacteria and N -k C bacteria are transmitted, given that n clusters are transmitted reads:

p(n k N -k |n) = n n k N -k (B i,j (k)) n k N -k (1 -B i,j (k)) n-n k N -k . (6.57)
Using the law of total probability (see Eq. Naive and non-treated hosts. Here, transmission involves random assortments of N bacteria that may potentially contain all three different types of bacteria. The probability of having k R bacteria and l C bacteria in an assortment reads Combining the above results for the generating function in the various cases studied, we can explicitly rewrite Eq. 6.51. This allows us to compute the extinction probabilities of epidemics e ij , which are the fixed points of the generating function g ij ({z kl }), where the first host is initially infected by i R bacteria, j C bacteria and N -i -j S bacteria.

T i,j (k, l) = N ! k! l! (N -k -l)! (r N i,j ) k (c N i,j ) l (1 -r N i,j -c N i,j ) N -k-l . ( 6

Results with three bacterial types

Because multiple mutations can compensate for the initial cost of resistance [START_REF] Levin | Compensatory mutations, antibiotic resistance and the population genetics of adaptive evolution in bacteria[END_REF][START_REF] Paulander | Multiple mechanisms to ameliorate the fitness burden of mupirocin resistance in salmonella typhimurium[END_REF][START_REF] Hughes | Evolutionary consequences of drug resistance: Shared principles across diverse targets and organisms[END_REF], the probability µ 2 of compensatory mutations often satisfies µ 2 µ 1 [START_REF] Levin | Compensatory mutations, antibiotic resistance and the population genetics of adaptive evolution in bacteria[END_REF][START_REF] Poon | The coupon collector and the suppressor mutation estimating the number of compensatory mutations by maximum likelihood[END_REF]. In Fig. 6.10, compensation has a negligible impact. Indeed, the proportion of compensated bacteria then remains small. However, for longer incubation times, compensation decreases extinction probabilities, which become intermediate between those with a cost and those without a cost (see Fig. 6.11). Overall, compensation does not have a major impact on the initial steps of the propagation studied here. Light shades: results with δ = 0.1 but no compensation (same as darkshaded results in Fig. 6.4B). Within-host evolution is deterministic, µ 1 = 7 × 10 -5 and µ -1 = 0, and incubation time is G = 10 generations. As in Fig. 6.2, N = 100, λ = 2 and q = 0.55. Solid lines: numerical resolution of Eq. 6.4; symbols: simulation results (over 10 4 realizations). In both panels, within-host evolution is deterministic, mutation probabilities are µ 1 = 7 × 10 -5 and µ -1 = 0, and incubation time corresponds to 50 generations of bacteria within the host (instead of 10 generations in Figs. 6.4 and 6.10). In addition, as in Fig. 6.2, we take a bottleneck size N = 100, and each individual transmits bacteria to an average of λ N = λ I = λ = 2 new hosts and is treated with probability q N = q I = q = 0.55, irrespective of whether it is naive or immune. Solid lines correspond to numerical resolution of Eq. 6.4 (not shown with compensation), while symbols show results from numerical simulations of the branching process, computed over 10 4 realizations. Main panel: linear scale; inset: semi-logarithmic scale.

Detailed simulation methods

Our code is freely available at https://doi.org/10.5281/zenodo.2592323.

Our simulations were coded in Matlab. Here, we present in detail our simulation scheme, which is outlined in the Methods section of the main text. We perform stochastic simulations of the branching process modeling the propagation of the bacterial strain considered. The within-host growth can be treated either deterministically or stochastically, and in the latter case, it can either allow mixed clusters or not (see below). We consider "generations" of hosts, the first one corresponding to the first infected host, the second one to the hosts directly infected by this first host, etc. Throughout this section, as in our simulations, we assume that there are no back-mutations.

Initialization (first host)

We start with a first generation where there is a single host infected by an inoculum containing i R bacteria, j C bacteria and N -i -j S bacteria.

Loop over successive generations of hosts

For each host in the generation considered, we first randomly choose whether it is immune or naive, according to the probability ω of being immune.

Naive hosts. For each naive host in the generation considered, we randomly choose whether it is treated or not, according to the probability q N of being treated.

• If the naive host is treated:

-Treatment: All sensitive (S) bacteria are eliminated from the inoculum.

-If the inoculum contained at least one resistant (R) or compensated (C) bacterium:

1. Within-host growth: In the absence of compensation, since all S bacteria were eliminated and since we consider no backmutation, only R bacteria will exist within the host. If compensation is accounted for, the fractions of R and C bacteria at the end of the incubation period are computed using either a deterministic or a stochastic approach (see below). Then, we compute the numbers of R and C bacteria by randomly sampling them in a binomial distribution with parameters N 2 (number of bacteria after the within-host growth) and r (fraction of R bacteria after the within-host growth).

Transmission to the next generation of hosts:

The number of hosts infected by the present host is computed by a random draw from a Poisson distribution with average λ N . Each new infected host receives a set of N microorganisms, randomly drawn without replacement from the N 2 bacteria infecting the transmitting host at the end of the incubation time.

-If the inoculum only contained S bacteria, no transmission occurs, since the treatment eliminated all bacteria.

• If the naive host is not treated:

1. Within-host growth: The proportions of S and R bacteria (and C if compensation is accounted for) at the end of the incubation period are computed using either a deterministic or a stochastic approach (see below). Then, in the absence of compensation, we compute the numbers of S and R bacteria by randomly sampling them in a binomial distribution with parameters N 2 and s. If compensation is accounted for, we instead use a trinomial distribution with parameters N 2 , s and r.

2. Transmission to the next generation of hosts is performed as in the naive-treated case presented above.

Immune hosts. For each immune host in the generation considered, we randomly choose whether it is treated or not, according to the probability q I of being treated.

• If the immune host is treated:

-Treatment: All sensitive (S) bacteria are eliminated from the inoculum.

-If the inoculum contained at least one R mutant or one C bacterium:

1. Within-host growth: Again, in the absence of compensation, only R bacteria will exist. With compensation, the fractions of R and C bacteria at the end of the incubation period are computed as in the naive-treated case. If only clonal clusters are considered, N clonal clusters of N bacteria are constructed by randomly drawing the number of R and C bacteria seeding clusters in a binomial distribution with parameters N and r. If mixed clusters are considered, they are explicitly constructed at the end of the within-host growth (see below).

Transmission to the next generation of hosts:

The number of hosts infected by the present host is computed by a random draw from a Poisson distribution with average λ I . Each newly infected host receives one random cluster among the N clusters formed at the end of the within-host growth.

-If the inoculum only contained S bacteria, no transmission occurs as the treatment eliminated all bacteria.

• If the immune host is not treated:

1. Within-host growth: The proportions of S and R bacteria (and C if compensation is accounted for) at the end of the incubation period are computed as in the naive-non treated case. If only clonal clusters are considered, in the absence of compensation, we compute the numbers of S and R bacteria seeding clusters by randomly sampling them in a binomial distribution with parameters N and s. If only clonal clusters are considered, but compensation is accounted for, we instead use a trinomial distribution with parameters N , s and r. If mixed clusters are considered, they are explicitly constructed at the end of the within-host growth (see below).

2. Transmission to the next generation of hosts is performed as in the immune-treated case.

End of the simulation

The simulation is stopped when one of the following conditions is met:

• Extinction, i.e. no more infected hosts at a given generation.

• The number of infected hosts at the current generation of hosts is larger than a threshold (100 in practice).

• The number of generations of infected hosts is larger than a threshold (100 in practice).

We approximate the last two cases as meaning that no extinction will occur.

We have checked that increasing the threshold values above 100 does not significantly affect our results, which confirms that this approximation is valid.

Within-host growth Deterministic model. If the within-host growth is treated deterministically, in the absence of mutations and fitness cost, the proportion of resistant bacteria just remains the same upon growth.

With mutations and/or fitness cost, we compute the fractions of sensitive and resistant bacteria (and compensated ones, if compensation is accounted for) at a time τ = G log(2) (see Eq. 6.20 with f = 1) equivalent to the total number of generations G of the incubation period, using the solution of our ODE model (see Section 6.5.2, especially Eqs. 6.21 and 6.22 for the case without compensation and section 6.5.4, especially Eq. 6.46 for the case with compensation). Note that even though the within-host growth is treated deterministically, the sampling of transmitted bacteria and the branching process are stochastic.

Stochastic model. If the within-host growth is treated stochastically, we implement an exact Gillespie simulation scheme [START_REF] Daniel T Gillespie | A general method for numerically simulating the stochastic time evolution of coupled chemical reactions[END_REF][START_REF] Marrec | Quantifying the impact of a periodic presence of antimicrobial on resistance evolution in a homogeneous microbial population of fixed size[END_REF] for a fixed number N div = N (2 G -1) of single bacterial divisions, corresponding to the number of divisions that take place during the G generations of the incubation period. In our Gillespie algorithm, each bacterium can divide randomly with a rate equal to its fitness, and each daughter cell can then mutate randomly with a given probability (µ 1 for S → R and µ 2 for R → C if compensation is accounted for, assuming no back-mutations). This yields a complete agent-based model of a stochastic exponential growth.

Finally, in some simulations (see Fig. 6.9), we explicitly took into account the possibility that mixed clusters form within immune hosts. For this, we employed our usual stochastic within-host growth scheme for the first G -g generations of incubation, and we then switched to an explicit model of cluster formation for the last g generations, where the cluster size (assumed to be equal to the bottleneck size) satisfies N = 2 g . The last g generations of incubation correspond to the formation of the transmitted clusters. We then formed clusters from each single bacterium present after G -g generations of incubation. For these last g generations, we assumed that bacteria have a fixed division time (and not a fixed division rate). As usual, at each division, daughter cells can mutate randomly with a given probability. We implemented this explicit construction of clusters only in the case where resistance has no cost (δ = 0), which is simpler because divisions within the fixed division time model are then synchronous.

Analytical approximations for the spread probability without pre-existing resistance

Proportion of resistant bacteria

When starting with only sensitive bacteria, at the first round of replication, an average proportion µ 1 of resistant bacteria is produced. At the second round, neglecting back-mutations, and in the limit µ 1 1, so that the proportion of mutant bacteria remains negligible, the proportion of mutant bacteria will be µ 1 (1 -δ) (the resistant bacteria produced at the first round, which reproduce more slowly than the sensitive ones), plus µ 1 (the resistant bacteria newly produced). A similar reasoning can be applied for subsequent rounds of replication. Thus, after G generations, the average proportion of resistant bacteria is

µ 1 (1 -δ) G-1 + (1 -δ) G-2 + ... + (1 -δ) + 1 = µ 1 δ (1-(1-δ) G
) . (6.71)

Note that Eq. 6.71 was obtained within a discrete description. Our continuous time model similarly yields (1 -exp(-Gδ))µ 1 /δ. In particular, if Gδ 1, this yields a mutant proportion of µ 1 G, while if Gδ 1, this yields the mutation-selection balance proportion µ 1 /δ.

Approximation for a small number of generations

Regime considered

As mentioned in the main text section titled "Analytical approximations for the spread probability without pre-existing resistance", here, we take into account mutations and the fitness cost of resistance, but not its compensation. We use the deterministic description of the within-host growth, and take λ N = λ I = λ, as well as q N = q I = q. In addition, the present case of a small number G of generations corresponds to δG 1 and (G -g) 2(N -1). Below, we explicitly demonstrate that if at least one resistant mutant is transmitted, the probability of extinction is similar for an immune and a naive host population. This is necessary to calculate the impact of clustering on spread probabilities in this regime (Eq. 6. [START_REF] Coates | Antibiotic-induced population fluctuations and stochastic clearance of bacteria[END_REF]).

e N N vs. e I N Let us first compare the extinction probabilities starting from a host infected with only resistant bacteria in a fully naive host population e N N and in a fully immune one e I N . In the limit of a small number of generations G, a host initially infected with only resistant bacteria will have a very small proportion of sensitive bacteria at the transmission time even in the absence of treatment. Thus e N N ≈ e I N ≈ e N .

e N 1 vs. e I 1

Next, let us compare the extinction probabilities starting from a host initially infected with one resistant bacteria and N -1 sensitive ones, in a fully naive and in a fully immune population, i.e. e N 1 and e I 1 . Because δG 1, the proportion of resistant bacteria at transmission is close to 1/N . Let us assume that N

1. e N 1 Let us first consider a fully naive population. For a non-treated host, the probability that no resistant bacteria is present among N bacteria transmitted is (1 -1/N ) N = exp(N log(1 -1/N )) ≈ exp(-1). The probability that one resistant bacteria among N is transmitted is N (1/N )(1 -1/N ) N -1 = exp((N -1) log(1 -1/N )) ≈ exp(-1) exp(1/N ) ≈ exp(-1). The probability to transmit 2 resistant bacteria among N is N (N -1)/2(1/N ) 2 (1 -1/N ) N -2 = (1 -1/N )/2 exp((N -2) log(1 -1/N )) ≈ exp(-1) exp(2/N )(1 -1/N )/2 ≈ exp(-1)/2. Thus the probability that more than 2 resistant bacteria are transmitted is smaller than 10%: most cases in which more than 1 resistant bacteria are transmitted are cases in which few, and mainly 2 resistant bacteria are transmitted. Since the outcome is not very different whether 1 or 2 resistant bacteria are transmitted, let us assume that e N

1 ≈ e N 2 and let us neglect transmission of more resistant bacteria. Under these assumptions, when a host is initially infected with 1 resistant bacteria and N -1 sensitive ones, then with probability q, this host is treated, leading to a fully resistant infection, and with probability 1 -q, it is not treated, in which case for each of the transmissions (whose number is Poisson distributed with average λ), it has a probability close to exp(-1) to transmit only sensitive bacteria, which leads to extinction with a probability close to 1 (more precisely, 1 minus a small spread probability arising from mutations of the order of µ 1 , see Section 6.5.6), and a probability close to (1-exp(-1)) to transmit at least one resistant bacteria, which leads to extinction with a probability close to e N 1 . This results in:

e N 1 ≈ qe N + (1 -q) exp(-λ(1 -exp(-1))(1 -e N 1 )) (6.72)

e I 1
Let us now turn to a fully immune population, and assume that clusters comprise a single type of bacteria since here the inoculum is mixed. When an immune host is initially infected with 1 resistant bacteria and N -1 sensitive bacteria, then with probability q, this host is treated, leading to a fully resistant infection, and with probability 1-q, it is not treated, in which case for each of the transmissions (whose number is Poisson distributed with average λ), it has a probability 1 -1/N to transmit only sensitive bacteria, which leads to an extinction probability close to 1 (more precisely, 1 minus a small spread probability arising from mutations of the order of µ 1 , see Section 6.5.6), and a probability 1/N to transmit resistant bacteria only, leading to extinction with probability e N . This results in: Since we assumed N 1, exp(-λ(1 -e N )/N ) will be of the order of 1, so Eqs. 6.72 and 6.73 entail e N 1 < e I 1 . Note that numerically, they remain of the same order of magnitude. For instance, in the limit of large N , the ratio of extinction probabilities e I 1 /e N 1 is at most 2 for λ = 2. For instance in Fig. 6.2, this ratio is close to 2.

Chapter 3: In a microbial population of variable size, we found a threshold period above which the first phase with antimicrobial fully determines the fate of the population. Faster alternations strongly select for resistance, and are inefficient to eradicate the microbial population, unless the death rate induced by the treatment is large enough. For longer alternation periods, we calculated the probability that the microbial population gets eradicated. This happens either if resistant mutants preexist, or if they appear after antimicrobial is added to the environment. The latter case is fully prevented by perfect biostatic antimicrobials that completely prevent sensitive microorganisms from dividing. By contrast, we showed that the parameter regime where treatment is efficient is larger for biocidal drugs than for biostatic drugs. This sheds light on the respective merits of different antimicrobial modes of action.

Chapter 4: In a microbial population evolving in a gradually deteriorating environment, we showed that mutants appearing later have higher fixation probabilities. We demonstrated that the rescue probability of the population increases if the product of the carrying capacity and of the mutation probability increases, and if the environment degradation is slower. We found that specialist mutants rescue the population better than generalists. We expressed the average appearance time of the mutants that rescue the population. Our methods can be applied to other situations with continuously variable fitnesses and population sizes, and hold beyond the weak-mutation regime.

Chapter 5: We developed a graph-structured population model, where each node is a deme, that generalizes the existing models. We calculated analytically the fixation probability of a mutant lineage for different population structures in the rare migration regime, and verified our predictions with numerical simulations. We found that many structures are suppressors of natural selection in our model, including some that are known as natural selection amplifiers in existing models. Despite this striking difference, our model is consistent with the existing models when the ratios of total reproduction rate to total migration rate in each deme are matched between models.

Chapter 6: In a population of hosts, we demonstrated that immunitydriven bacterial clustering can hinder the spread of resistance. We further showed that the reduction of spread by clustering can be countered when immune hosts are silent carriers, and are less likely to get treated, and/or have more contacts. Our results highlight the importance of interactions between immunity and the spread of antibiotic resistance, and argue in the favor of vaccine-based strategies to combat antibiotic resistance.

Some perspectives

This work opens many possible theoretical extensions. In particular, it will be very interesting to include other effects that allow microbes to survive antimicrobial treatments without acquiring resistance mutations. Antibiotic tolerance, which tends to precede resistance under intermittent antibiotic exposure [START_REF] Levin-Reisman | Antibiotic tolerance facilitates the evolution of resistance[END_REF], enables bacterial populations to survive antibiotic treatments, even at concentrations much larger than the minimum inhibition concentration (MIC) [START_REF] Etthel | Antibiotics: Combatting tolerance to stop resistance[END_REF]. Another interesting effect is persistence, which denotes the ability of a subpopulation of a clonal bacterial population to survive high concentrations of antibiotic treatment [START_REF] Windels | Bacterial persistence promotes the evolution of antibiotic resistance by increasing survival and mutation rates[END_REF]. Distinguishing resistance, tolerance and persistence in theoretical models would be possible by using a recently introduced quantitative indicator, in addition to the MIC, that is the minimum duration to kill (MDK) [START_REF] Brauner | Distinguishing between resistance, tolerance and persistence to antibiotic treatment[END_REF]. Another exciting extension would be to consider the possibility of concentrations above the mutant prevention concentration, such that resistant microbes are also affected by the drug [START_REF] Levin-Reisman | Antibiotic tolerance facilitates the evolution of resistance[END_REF][START_REF] Bauer | Exploiting ecology in drug pulse sequences in favour of population reduction[END_REF]. It would be interesting to explicitly model horizontal gene transfer of resistance mutations and also to compare the impact of periodic alternations to that of random switches of the environment [START_REF] Mustonen | Molecular evolution under fitness fluctuations[END_REF][START_REF] Rivoire | The value of information for populations in varying environments[END_REF][START_REF] Melbinger | The impact of environmental fluctuations on evolutionary fitness functions[END_REF][START_REF] Desponds | Fluctuating fitness shapes the clone size distribution of immune repertoires[END_REF][START_REF] Peter | Intrinsic noise in systems with switching environments[END_REF][START_REF] Wienand | Evolution of a fluctuating population in a randomly switching environment[END_REF][START_REF] Meyer | Noise-induced stabilization and fixation in fluctuating environment[END_REF][START_REF] Danino | Stability of twospecies communities: Drift, environmental stochasticity, storage effect and selection[END_REF]. Other effects such as single-cell physiological properties [START_REF] Lin | Complex interplay of physiology and selection in the emergence of antibiotic resistance[END_REF], phenotypic delay [START_REF] Carballo-Pacheco | Phenotypic delay: mechanistic models and their implications for the evolution of resistance to antibiotics[END_REF] or density dependence of drug efficacy [START_REF] Hallinen | Delayed antibiotic exposure induces population collapse in enterococcal communities with drug-resistant subpopulations[END_REF] can further enrich the response of microbial populations to variable concentrations of antimicrobials.

Publications related to this thesis

Figure 2 :

 2 Figure2: Evolution de la résistance aux antimicrobiens dans une population microbienne de taille fixe. Temps total d'évolution de la résistance aux antimicrobiens dans une population microbienne de taille fixe soumise à des alternances périodiques d'absence et de présence d'antimicrobiens. Les données de simulation représentées sur les figures sont interpolées de manière linéaire. A : Alternances symétriques : Temps total d'évolution de la résistance aux antimicrobiens en fonction de la période et de la taille de la population microbienne. Ligne horizontale supérieure : limite du régime déterministe. Ligne horizontale inférieure : limite du régime neutre. Courbe quasi verticale : période égale à deux fois le temps moyen de disparition d'un linéage mutant résistant. Ligne diagonale : période égale à la taille de population. Notons qu'aucune donnée n'est présentée pour les demi-périodes inférieures à l'inverse de la taille de population en raison du caractère discret de notre modèle, qui ne peut traiter que des échelles de temps supérieures ou égales à la durée d'une génération. B : Alternances asymétriques : Temps total d'évolution de la résistance aux antimicrobiens en fonction des durées des phases d'absence et de présence d'antimicrobien. Ligne verticale : durée de la phase sans antimicrobien égale au temps moyen de disparition d'un linéage mutant résistant. Ligne horizontale : durée de la phase avec antimicrobien égale au temps moyen de fixation d'un linéage mutant résistant. Ligne diagonale : durée de la phase sans antimicrobien égale à la durée de la phase avec antimiccrobien.

Figure 3 :

 3 Figure 3: Probabilité d'extinction d'une population microbienne. Probabilité d'extinction en fonction de la période d'alternance et de la variable adimensionnée R, laquelle augmente avec la concentration antimicrobienne et est nulle à la concentration minimale d'inhibition, avec un antimicrobien biostatique (A) ou biocide (B). Les données sont issues de simulations, où chaque point est moyenné sur la base de résultats de simulation, et interpolées linéairement. Ligne blanche en tiret : valeur du ratio R telle que le temps moyen d'apparition d'un linéage mutant qui se fixe est égal au temps moyen d'extinction des microbes sensibles avec antimicrobien. Ligne blanche continue : demi-période égale au temps moyen d'extinction des microbes sensibles avec antimicrobien. Ligne pointillée dans B : variable R telle que l'échelle de temps caractéristique associée à la décroissance des microbes sensibles avec antimicrobien soit égale à celle associée à la croissance des microbes sensibles sans antimicrobien.

Figure 4 :

 4 Figure 4: La transition d'extinction dépend de la taille de la population microbienne et du mode d'action de l'antimicrobien. Probabilité d'extinction en fonction de la variable adimensionnée R, laquelle augmente avec la concentration antimicrobienne et est nulle à la concentration minimale d'inhibition, avec un antimicrobien biostatique ou biocide, pour différentes tailles de population, soit dans le régime des petites périodes (A et B) soit dans le régime des grandes périodes (C). Marqueurs : résultats de simulations. Lignes verticales en pointillés : seuils d'extinction théoriques, c'est-à-dire des valeurs de R telles que la demi-période est égale au temps moyen d'extinction des microbes sensibles avec antimicrobien (A et B) ou telle que le temps moyen d'apparition d'un linéage mutant qui se fixe est égal au temps moyen d'extinction des microbes sensibles avec antimicrobien (C). Lignes pleines (C) : Estimations analytiques de la probabilité d'extinction.

  capacité porteuse et de la probabilité de mutation

Figure 5 :

 5 Figure5: Impact de la taille de la population sur le sauvetage. A : Probabilité de fixation des mutants généralistes (notés G) et spécialisés (notés S) en fonction de leur temps d'apparition dans un environnement en cours de détérioration, pour différentes capacités porteuses (notées K). Les pointillés verticaux marquent le milieu de la transition environnementale. Panneau principal : échelle linéaire ; encadré : échelle semi-logarithmique. B : Probabilité de sauvetage de différents types de mutants, généralistes (notés G) ou spécialisés (notés S), par rapport au produit de la capacité porteuse et de la probabilité de mutation lors de la division, pour différentes capacités porteuses (notées K). La ligne verticale en pointillé marque les paramètres pour lesquels le produit est égal à 1. Les marqueurs correspondent à des moyennes sur des résultats de simulations stochastiques . Les lignes pointillées et pleines correspondent à nos prévisions analytiques pour les mutants généralistes et spécialisés, respectivement.

Figure 6 :

 6 Figure 6: Comparaison entre le modèle Naissance-mort, le modèle Mort-naissance et notre modèle. A : Probabilité de fixation d'une mutation à partir d'un centre entièrement mutant en fonction de la fitness mutante pour une population structurée en étoile. B : Erreur relative entre les résultats obtenus avec notre modèle et les résultats obtenus avec le modèle Naissance-mort et le modèle Mort-naissance en fonction de la fitness mutante. L'erreur relative est la différence en valeur absolue entre la probabilité de fixation obtenue avec notre modèle et celles obtenues avec le modèle Naissance-Mort et le modèle Mort-Naissance divisée par la probabilité de fixation obtenue avec notre modèle. C : Erreur absolue entre les résultats obtenus avec notre modèle et ceux obtenus avec le modèle Naissance-Mort et le modèle Mort-Naissance en fonction de la fitness mutante. L'erreur absolue est la différence en valeur absolue entre la probabilité de fixation obtenue avec notre modèle et celles obtenues avec le modèle Naissance-mort et le modèle Mort-naissance. Les points de données correspondent à des moyennes sur des résultats de simulations.

A

  Diminution Ratios immunisé/naïf des probabilités d'extinction Augmentation de l'extinction dûe à l'immunité B C Nombre moyen de transmissions par hôte immunisé Probabilité de traitement des hôtes immunisés

Figure 7 :

 7 Figure7: Impact de l'immunité sur la propagation des bactéries résistantes aux antibiotiques. A et B : Probabilités d'extinction en fonction du nombre initial de bactéries résistantes dans le premier hôte infecté, pour différentes fractions d'individus immunisés dans la population hôte (notées ω). Les hôtes naïfs et immunisés ne diffèrent que par l'agrégation des bactéries. Dans A, chaque hôte, immunisé ou naïf, est traité avec la même probabilité et transmet des bactéries à un même nombre moyen d'hôtes (à moins qu'il n'ait été infecté par aucune bactérie résistante et traité). Dans B, chaque hôte, immunisé ou naïf, est traité avec la même probabilité et les hôtes immunisés transmettent des bactéries à un nombre moyen d'hôtes plus grand que les hôtes naïfs. Les lignes pleines correspondent à la résolution numérique de nos prédictions analytiques, tandis que les symboles correspondent aux résultats des simulations. Panneau principal : échelle linéaire ; encadré : échelle semi-logarithmique. C : Le rapport des probabilités d'extinction dans une population totalement immunisée par rapport à une population totalement naïve, pour un nombre initial de bactéries résistantes dans le premier hôte égal à 3, est indiqué pour un nombre moyen de transmissions par hôte immunisé supérieur ou égal au nombre moyen de transmissions par hôte naïf et pour une probabilité de traitement des hôtes immunisés inférieure ou égale à la probabilité de traitement des hôtes naïfs. Les valeurs correspondant aux hôtes naïfs sont indiquées par un point intitulé "N ". La courbe solide désigne les valeurs pour lesquelles le ratio est égal à un. Carte de chaleur interpolée à partir des résolutions numériques de nos prédictions analytiques ; échelle de couleur logarithmique.

Figure 1 . 4 :

 14 Figure 1.4: Evolutionary forces: Sketches illustrating the four evolutionary forces in the Moran model[START_REF] Moran | Random processes in genetics[END_REF]. At each time step, an individual is chosen at random for reproduction and another one is chosen for elimination. Hence, the total number of individuals in the population stays constant. A: Natural selection. sensitive microbes are selected in an antimicrobial-free environment, while resistant mutants are selected in an environment with antimicrobial. Indeed, sensitive microbes are fitter than resistant microbes in the absence of antimicrobial, while they cannot divide in the presence of antimicrobial. B: Mutation. A microbe from a fully sensitive population mutates when it divides into a resistant microbe. The population becomes genetically diverse and now has two genotypes. C: Genetic drift. Assuming that sensitive and resistant microbes have the same fitness, the microbial population goes from ∼33% mutant individuals to zero mutant individuals. D: Gene flow. A resistant microbe from a fully resistant population is selected for reproduction, migrates to a fully sensitive population and replaces a sensitive microbe chosen to die. Then genetic diversity increases.

Figure 2 . 1 :

 21 Figure 2.1: Model. A: Adaptive landscapes in the presence and in the absence of antimicrobial. Genotypes are indicated by the number of mutations from the sensitive microorganism, and by initials: S: sensitive; R: resistant; C: resistant-compensated. B and C: Periodic presence of antimicrobial, and impact on the fitness of S (sensitive) microorganisms: (B) Symmetric alternations; (C) Asymmetric alternations.

Figure 2 . 2 :

 22 Figure 2.2: Alternation-driven evolution of antimicrobial resistance. A-C: Sketches illustrating the three different regimes for the half-period T /2 of the alternations of antimicrobial absence (white) and presence (gray). The fraction of resistant (R) microorganisms in the population is plotted versus time (blue curves). R mutants can only appear without antimicrobial. (A) T /2 τ d R , where τ d R is the average extinction time of the lineage of an R mutant without antimicrobial. The first R lineage that appears is expected to live until the next addition of antimicrobial and is then rescued. B: τ d R T /2 1/(N µ 1 ), where 1/(N µ 1 ) is the average time between the appearance of two independent R mutants without antimicrobial. C: T /2 1/(N µ 1 ). In (B) and (C), not all R lineages live until the next addition of antimicrobial, and in (C) multiple R lineages arise within a half-period. D: Example of a simulation run. The fractions of S, R and C microorganisms are plotted versus time. Inset: end of the process, with full resistance evolution. As in (A-C), antimicrobial is present during the gray-shaded time intervals (shown only in the inset given their duration). Parameters: µ 1 = 10 -5 , µ 2 = 10 -3 , δ = 0.1, N = 10 2 and T = 50 (belonging to regime B).

Fig. 2 .

 2 4A in the various regimes (solid lines), and are in excellent agreement with the simulation data. The plateau of t f C at large T 1 corresponds to spontaneous valley crossing, and the analytical prediction (see Appendix, Section 2.5.4) is plotted in black in Fig. 2.4A. Duration T of the phase without antimicrobial Duration T of the phase with antimicrobial Total time of full resistance evolution Total time of full resistance evolution

Figure 2 . 4 :

 24 Figure 2.4: Asymmetric alternations. Fixation time t f C of C individuals in a population subjected to asymmetric alternations of absence and presence of antimicrobial (respective durations: T 1 and T 2 ). Data points correspond to the average of simulation results (over 10 to 10 3 replicates), and error bars (sometimes smaller than markers) represent 95% confidence intervals. In both panels, solid lines correspond to our analytical predictions in each regime. In particular, black lines are analytical predictions for fitness valley crossing times in the absence of alternations (see Appendix, Section 2.5.4). Parameter values: µ 1 = 10 -5 , µ 2 = 10 -3 , δ = 0.1 and N = 10 3 . A: t f C as function of T 1 for different T 2 . Dashed line: T 1 = τ d R . B: t f C as function of T 2 for different T 1 . Dashed line: T 2 = τ f R .

Figure 2 . 5 :

 25 Figure 2.5: Heatmaps. Fixation time t f C of C individuals in a population of size N subjected to periodic alternations of absence and presence of antimicrobial. Simulation data plotted in Figs. 2.3A and 2.4A are linearly interpolated. Parameter values: µ 1 = 10 -5 , µ 2 = 10 -3 , δ = 0.1. A: Symmetric alternations: t f C as function of the period T and the population size N . Top horizontal line: deterministic regime limit N = 1/µ 1 . Bottom horizontal line: neutral regime limit N = 1/δ. Quasi-vertical curve: T = 2τ d R . Diagonal line: T = N . Note that no data is shown for T /2 < 1/N because of the discreteness of our model, which can only deal with timescales larger or equal to the duration of one Moran step, i.e. 1/N generation. B: Asymmetric alternations: t f C as function of the durations T 1 and T 2 of the phases of absence and presence of antimicrobial. Vertical line: T 1 = τ d R . Horizontal line: T 2 = τ f R . Diagonal line: T 1 = T 2 . Here N = 10 3 , so the first resistant mutant appears after an average time T /(N µ 1 T 1 ) = 10 2 T /T 1 .

Figure 2 . 6 :

 26 Figure 2.6: Sketch of the Moran process. One step of the Moran process is represented in a population with 8 individuals of 2 different types (different colors).

Figure 2 . 7 :

 27 Figure 2.7: Large populations: stochastic model vs. deterministic model. The total time t f C of full resistance evolution is plotted versus the period T of alternations of absence and presence of antimicrobial, in the case of symmetric alternations. Results from simulations of the stochastic model (see Fig. 2.3A), numerical resolution of the deterministic model, and an analytical approximation of the deterministic solution (Eqs. 2.63-2.64), are represented for N = 10 5 (A) and N = 10 6 (B). Parameter values: µ 1 = 10 -5 , µ 2 = 10 -3 , and δ = 0.1.

  2.8).

Figure 2 . 8 :

 28 Figure 2.8: Particular regimes. The number of R individuals in the population is plotted versus time under alternations of phases without (white) and with antimicrobial (gray). Data extracted from simulation runs. A: T 2 τ f R and T 1 τ d R : the R lineage drifts for multiple periods. Parameters: N = 10 3 , T 1 = 10 -1 , T 2 = 10 -2 . B: T 2 τ f R and T 1 τ d R : the R lineage goes extinct. Parameters: N = 10 2 , T 1 = 10 2 , T 2 = 1. In both (A) and (B), µ 1 = 10 -5 , µ 2 = 10 -3 and δ = 0.1.

Figure 2 . 9 :

 29 Figure 2.9: Robustness of the binary antimicrobial action model. A: Smooth and periodic fitness versus time relationship considered: Θ denotes the rise time. B: Total time t f C of full resistance evolution versus the period T for smooth alternations with different values of Θ, and for the binary model. Data points correspond to the average of simulation results (over 10 to 10 3 replicates), and error bars (often smaller than markers) represent 95% confidence intervals. Parameter values: µ 1 = 10 -5 , µ 2 = 10 -3 , δ = 0.1, and N = 100.

Contents 3 . 1

 31 Introduction . . . . . . . . . . . . . . . . . . . . . 63 3.2 Model and methods . . . . . . . . . . . . . . . . . 64 3.3 Results . . . . . . . . . . . . . . . . . . . . . . . . . 65 3.4 Discussion . . . . . . . . . . . . . . . . . . . . . . . 78 3.5 Appendix . . . . . . . . . . . . . . . . . . . . . . . 82

Figure 3 . 1 :

 31 Figure 3.1: Periodic presence of a perfect biostatic antimicrobial.A: Microbial fitness versus genotype with and without antimicrobial. Genotypes are the following: S: sensitive; R: resistant; C: resistant-compensated. δ represents the fitness cost of resistance. B: Periodic presence of antimicrobial (gray: presence, white: absence), and impact on the fitness of S microorganisms. C: Probability p 0 that the microbial population goes extinct before resistance gets established versus alternation period T , for various carrying capacities K. Markers: simulation results, with probabilities estimated over 10 2 -10 3 realizations. Horizontal solid lines: analytical predictions from Eq. 3.1. Dashed lines: T /2 = τ S . D and E: Numbers of S, R and C microorganisms versus time in example simulation runs for K = 1000, with T = 20 and T = 1000 respectively. In D, resistance takes over, while in E, extinction occurs shortly after antimicrobial is first added. Phases without (resp. with) antimicrobial are shaded in white (resp. gray). Parameter values: f S = 1 without antimicrobial, f S = 0 with antimicrobial, f R = 0.9, f C = 1, g S = g R = g C = 0.1, µ 1 = 10 -5 and µ 2 = 10 -3 . All simulations start with 10 S microorganisms.

  Figure 3.1: Periodic presence of a perfect biostatic antimicrobial.A: Microbial fitness versus genotype with and without antimicrobial. Genotypes are the following: S: sensitive; R: resistant; C: resistant-compensated. δ represents the fitness cost of resistance. B: Periodic presence of antimicrobial (gray: presence, white: absence), and impact on the fitness of S microorganisms. C: Probability p 0 that the microbial population goes extinct before resistance gets established versus alternation period T , for various carrying capacities K. Markers: simulation results, with probabilities estimated over 10 2 -10 3 realizations. Horizontal solid lines: analytical predictions from Eq. 3.1. Dashed lines: T /2 = τ S . D and E: Numbers of S, R and C microorganisms versus time in example simulation runs for K = 1000, with T = 20 and T = 1000 respectively. In D, resistance takes over, while in E, extinction occurs shortly after antimicrobial is first added. Phases without (resp. with) antimicrobial are shaded in white (resp. gray). Parameter values: f S = 1 without antimicrobial, f S = 0 with antimicrobial, f R = 0.9, f C = 1, g S = g R = g C = 0.1, µ 1 = 10 -5 and µ 2 = 10 -3 . All simulations start with 10 S microorganisms.

Figure 3 . 2 :

 32 Figure 3.2: Periodic presence of a biocidal antimicrobial above the MIC. A: Probability p 0 that the microbial population goes extinct before resistance gets established versus alternation period T , for various carrying capacities K. Markers: simulation results, with probabilities estimated over 10 2 -10 3 realizations. Horizontal solid lines: analytical predictions from Eq. 3.4. Dashed lines: T /2 = τ S . B and C: Numbers of sensitive (S), resistant (R) and compensated (C) microorganisms versus time in example simulation runs for K = 1000, with T = 8 and T = 1000 respectively.In B, resistance takes over, while in C, extinction occurs shortly after antimicrobial is first added. Phases without (resp. with) antimicrobial are shaded in white (resp. gray). Parameter values in A, B and C: f S = 1, f R = 0.9, f C = 1, g S = 0.1 without antimicrobial, g S = 1.1 with antimicrobial, g R = g C = 0.1, µ 1 = 10 -5 and µ 2 = 10 -3 . All simulations start with 10 S microorganisms. D, E and F: same as A, B and C, but with g S = 2. All other parameters are the same.

  Figure 3.2: Periodic presence of a biocidal antimicrobial above the MIC. A: Probability p 0 that the microbial population goes extinct before resistance gets established versus alternation period T , for various carrying capacities K. Markers: simulation results, with probabilities estimated over 10 2 -10 3 realizations. Horizontal solid lines: analytical predictions from Eq. 3.4. Dashed lines: T /2 = τ S . B and C: Numbers of sensitive (S), resistant (R) and compensated (C) microorganisms versus time in example simulation runs for K = 1000, with T = 8 and T = 1000 respectively.In B, resistance takes over, while in C, extinction occurs shortly after antimicrobial is first added. Phases without (resp. with) antimicrobial are shaded in white (resp. gray). Parameter values in A, B and C: f S = 1, f R = 0.9, f C = 1, g S = 0.1 without antimicrobial, g S = 1.1 with antimicrobial, g R = g C = 0.1, µ 1 = 10 -5 and µ 2 = 10 -3 . All simulations start with 10 S microorganisms. D, E and F: same as A, B and C, but with g S = 2. All other parameters are the same.

Figure 3 . 3 :

 33 Figure 3.3: Resistance emergence in the presence of a biocidal antimicrobial above the MIC. A: Numbers of sensitive (S), resistant (R) and compensated (C) microorganisms versus time in an example simulation run for K = 10 4 , with T = 1000. Here resistance takes over. Phases without (resp. with) antimicrobial are shaded in white (resp. gray). B: Zoom showing the emergence of resistance in this realization: an R mutant appears after antimicrobial is added (gray). At this time, the S population is decreasing due to the antimicrobial-induced high death rate, but the surviving S microorganisms are still able to divide. Parameter values and initial conditions are the same as in Fig. 3.2A, B and C.

Figure 3 . 4 :

 34 Figure 3.4: Dependence of the extinction probability p 0 on population size and antimicrobial mode of action. The extinction probability p 0 is plotted versus carrying capacity K for the perfect biostatic drug (corresponding to Fig. 3.1), two different concentrations of biocidal drugs yielding two different death rates g S (corresponding to Fig. 3.2) and a drug with both biostatic and biocidal effects. Markers correspond to simulation results, computed over 10 3 realizations. Solid lines correspond to our analytical predictions from Eqs. 3.1 and 3.4, respectively, which hold for K 1/µ 1 . Parameter values and initial conditions are the same as in Figs. 3.1 and 3.2, respectively, and the period of alternations is T = 10 3 , which is in the large-period regime.

Figure 3 . 5 :

 35 Figure 3.5: Heatmaps of the extinction probability. Extinction probability p 0 versus alternation period T and R = (g S -f S )/g S with biostatic (A) or biocidal (B) antimicrobial. Heatmap: simulation data, each point computed over 10 3 realizations of simulation results, and linearly interpolated. Dashed white line: value of R such that t a R = τ S (see main text). Solid white line: T /2 = τ S . Parameter values: K = 10 3 , µ 1 = 10 -5 , µ 2 = 10 -3 , f S = 1, f R = 0.9, f C = 1, g S = g R = g C = 0.1, and (A) g S = 0.1 and variable f S or (B) f S = 1 and variable g S . Dotted line in B: R = (f S -g S )/(2f S -g S ). All simulations start with 10 S microorganisms.

  Figure 3.5: Heatmaps of the extinction probability. Extinction probability p 0 versus alternation period T and R = (g S -f S )/g S with biostatic (A) or biocidal (B) antimicrobial. Heatmap: simulation data, each point computed over 10 3 realizations of simulation results, and linearly interpolated. Dashed white line: value of R such that t a R = τ S (see main text). Solid white line: T /2 = τ S . Parameter values: K = 10 3 , µ 1 = 10 -5 , µ 2 = 10 -3 , f S = 1, f R = 0.9, f C = 1, g S = g R = g C = 0.1, and (A) g S = 0.1 and variable f S or (B) f S = 1 and variable g S . Dotted line in B: R = (f S -g S )/(2f S -g S ). All simulations start with 10 S microorganisms.

Figure 3 . 6 :

 36 Figure 3.6: Dependence of the extinction transition on population size and antimicrobial mode of action. Extinction probability p 0 versus the ratio R = (g S -f S )/g S with biostatic or biocidal antimicrobial, for different carrying capacities K, either in the small-period regime, with T = 10 2.5 (A and B) or in the large-period regime, with T = 10 5 (C). Markers: simulation results, calculated over 10 3 realizations. Vertical dashed lines: predicted extinction thresholds, i.e. values of R such that T /2 = τ S (A and B) or t a R = τ S (C). Solid lines (C): Analytical estimates of p 0 from Eq. 3.1 (biostatic) or Eq. 3.4 (biocidal). For K = 10 2 and 10 3 , the analytical predictions in the biostatic and biocidal case are confounded, while for K = 10 4 we used two shades of green to show the slight difference (light: biostatic, dark: biocidal). Parameter values: µ 1 = 10 -5 , µ 2 = 10 -3 , f S = 1, f R = 0.9, f C = 1, g S = g R = g C = 0.1, and g S = 0.1 (biostatic) or f S = 1 (biocidal). All simulations start with 10 S microorganisms.

Figure 3 . 7 :

 37 Figure 3.7: Average spontaneous extinction time of the microbial population. A: Mean first-passage time τ S (10) to the absorbing state j = 0, i.e. average extinction time, starting from j 0 = 10 microorganisms, as a function of the fitness f for different carrying capacities K, with g = 0.1. B: Average extinction time τ S (10) as a function of the carrying capacity K for different fitnesses f , with g = 0.1. C: Average extinction time τ S (10) as a function of the death rate g for different carrying capacities K, with f = 1. D: Average extinction time τ S (10) as a function of the carrying capacity K for different death rates g, with f = 1.

Figure 3 . 8 :

 38 Figure 3.8: Deterministic evolution of the population size and rise time. A: Population size N as function of time t for different carrying capacities K. B: rise time t r (0.99) as function of the initial number of individuals N 0 for different carrying capacities K. Results are obtained from Eqs. 3.19 and 3.21. Parameter values: f = 1 and g = 0.1.

Figure 3 . 9 :

 39 Figure3.9: Rapid initial extinction. A: Probability P 0 (t r ) that extinction occurs before the rise time t r (0.99) (see Eq. 3.21), when starting from a single microorganism, j 0 = 1, as function of the death rate g with f = 1 for different carrying capacities K. Results come from a numerical computation of Eq. 3.22. Solid black line: g/f . B: Probability of rapid initial extinction P 0 (100) as a function of the initial number of microorganisms j 0 , for different carrying capacities K. Data points correspond to numerical computations of Eq. 3.22. Parameter values: f S = 1 and g S = 0.1. Time t = 100 was chosen to evaluate P 0 because it is larger than typical rise times for the parameter values considered (see Fig.3.8), but not too long, and thus captures rapid initial extinctions but not long-term ones (see Fig. 3.7).

Figure 3 . 10 :Figure 3 . 11 :

 310311 Figure 3.10: Periodic presence of a biostatic antimicrobial that fully stops growth, including long periods. A: Probability p 0 that the microbial population goes extinct before resistance gets established versus alternation period T , for various carrying capacities K. Markers: simulation results, with probabilities estimated over 10 2 -10 3 realizations. Horizontal solid colored lines: analytical predictions from Eq. 3.1. Horizontal solid black line: average spontaneous valley crossing time τ V = (f S -f R )/(µ 1 µ 2 g S ) (see main text). B: Average time t ext to extinction versus alternation period T for various carrying capacities K. Data shown if extinction occurred in at least 10 realizations. C: Average time t f ix to fixation of the C microorganisms versus alternation period T for various carrying capacities K. Data shown if resistance took over in at least 10 realizations. Horizontal solid lines: analytical predictions for very small T , using the self-averaged fitness fS (see main text). In panels B and C, markers are averages over 10 2 -10 3 simulation realizations, error bars (often smaller than markers) represent 95% confidence intervals, and the oblique black line corresponds to T /2. In all panels, colored dashed lines correspond to T /2 = τ S , while black dashed lines correspond to T /2 = τ V . Parameter values: f S = 1 without antimicrobial, f S = 0 with antimicrobial, f R = 0.9, f C = 1, g S = g R = g C = 0.1, µ 1 = 10 -5 and µ 2 = 10 -3 . All simulations start with 10 S microorganisms.

Figure 3 .

 3 Figure 3.12: Finite size effect on the extinction transition. Value of the ratio R = (g S -f S )/g S such that t a R = τ S , plotted versus the carrying capacity K. This value of R marks the transition between large and small extinction probability p 0 when T /2 > τ S (see main text and Fig.3.5). Red markers: numerical solutions of the equation t a R = τ S . Black dashed line: expected transition in the large population limit (R = 0, i.e. f S = g S ).Parameter values: µ 1 = 10 -5 , f S = 1, f R = 0.9, g S = g R = 0.1. Here, results are shown in the biostatic case, and f S was varied, keeping g S = 0.1, but the biocidal case yields the exact same results (see main text).

Figure 3 . 13 :

 313 Figure 3.13: Dependence of the average extinction time on population size and antimicrobial mode of action. Average extinction time t ext versus the ratio R = (g S -f S )/g S with biostatic or biocidal antimicrobial, for different carrying capacities K, either in the small-period regime, with T = 10 2.5 (A and B) or in the large-period regime, with T = 10 5 (C). Markers: simulation results, calculated over the realizations ending in extinction of the population, if their number is at least 10, among 10 3 realizations total per marker. Error bars: 95% confidence intervals. Vertical dashed lines: predicted extinction thresholds, i.e. values of R such that T /2 = τ S (A and B) or t a R = τ S (C). Horizontal dashed lines: t ext = T /2. Parameter values (same as in Fig.3.6):µ 1 = 10 -5 , µ 2 = 10 -3 , f S = 1, f R = 0.9, f C = 1, g S = g R = g C = 0.1, and g S = 0.1 (biostatic) or f S = 1 (biocidal). All simulations start with 10 S microorganisms.

Figure 3 . 14 :

 314 Figure 3.14: Perfect biostatic antimicrobial: test of analytical predictions for each term involved in p 0 (Eq. 3.1). A: Probability p R that at least one R mutant is present when antimicrobial is added, plotted versus carrying capacity K. Markers: simulation results, with probabilities estimated over 10 4 realizations. Red solid line: analytical prediction,p R = t app R /τ d R = N µ 1 g S τ d R (see main text). B: Probability p cR that exactly i R microorganisms are present when antimicrobial is added, provided that at least one R mutant is present, plotted versus the number i of R mutants, for various carrying capacities K. Markers: simulation results, estimated over 10 4 realizations. Solid lines: analytical prediction in Eq. 3.28. Analytical prediction lines for K = 10 4 and K = 10 5 are confounded; note that the prediction holds in the weak mutation regime Kµ 1 1, and thus fails for K = 10 5 here. C: Probability p e R of rapid extinction of the R lineage, plotted versus the number i of R mutants present when adding antimicrobial, for various different carrying capacities K. Markers: simulation results, with probabilities estimated over 10 4 realizations. Black solid line: analytical prediction from Eq. 3.2 (see main text). Parameter values: f S = 1 without antimicrobial, f S = 0 with antimicrobial, f R = 0.9, g S = g R = 0.1 and µ 1 = 10 -5 (A-B) or µ 1 = 0 (C).

Figure 3 . 15 :

 315 Figure 3.15: Biocidal antimicrobial: test of analytical predictions for intermediate quantities involved in the calculation of p 0 (see Eq. 3.4). A: Average time τ S to extinction of a population of S microorganisms in the presence of antimicrobial, plotted versus the carrying capacity K. Markers: simulation results, with probabilities estimated over 10 4 realizations. Red solid line: analytical prediction from Eq. 3.15, with j 0 = K(1 -g S /f S ). B: Number N div of individual division events that occur between the addition of antimicrobial and the extinction of the population of S microorganisms, plotted versus carrying capacity K. Red markers: simulation results, with probabilities estimated over 10 4 realizations. Red solid line: analytical prediction from Eq. 3.5. C and D: Probability density function ℘ a R (t) of the time t of appearance of an R mutant, under the assumption that exactly one R mutant appears between the addition of antimicrobial and the extinction of the population of S microorganisms, for K = 10 3 (C) and K = 10 4 (D). Histograms: simulation results, with 10 3 realizations. Black solid lines: analytical prediction from Eq. 3.9. Parameter values: f S = 1, g S = 0.1 without antimicrobial, g S = 1.1 with antimicrobial, and in panels C and D, f R = 0.9, g R = 0.1 and µ 1 = 10 -5 .

Figure 3 . 16 :

 316 Figure 3.16: Biocidal antimicrobial: test of analytical predictions for each term involved in p 0 (see Eq. 3.4). Note that p R and p c R are the same as in Fig. 3.14A-B. A: Probability p eR of rapid extinction of the R lineage, plotted versus the number i of R mutants present when adding antimicrobial, for various different carrying capacities K. Markers: simulation results, with probabilities estimated over 10 4 realizations. Black solid line: analytical prediction from Eq. 3.43. B: Probability p a R that resistance appears in the presence of antimicrobial, plotted versus the carrying capacity K. Red markers: simulation results, with probabilities estimated over 10 4 realizations. Red solid line: analytical prediction, p a R = N div µ 1 with N div in Eq. 3.5. C: Probability that i distinct lineages of R mutants appear in the presence of antimicrobial, provided that at least one appears, plotted versus the carrying capacity K. Markers: simulation results, with probabilities estimated over 10 3 realizations. Parameter values: f S = 1, f R = 0.9, g S = 0.1 without antimicrobial, g S = 1.1 with antimicrobial, g R = 0.1 and µ 1 = 0 (panel A) or µ 1 = 10 -5 (panels B and C).

Contents 4 . 1

 41 Introduction . . . . . . . . . . . . . . . . . . . . . 104 4.2 Model and methods . . . . . . . . . . . . . . . . . 105 4.3 Results . . . . . . . . . . . . . . . . . . . . . . . . . 108 4.4 Discussion . . . . . . . . . . . . . . . . . . . . . . . 114 4.5 Appendix . . . . . . . . . . . . . . . . . . . . . . . 118

Figure 4 . 1 :

 41 Figure 4.1: Fitnesses and wild-type population in a deteriorating environment. A: Fitnesses f W , f G and f S of the wild-type organisms (W), generalist (G) and specialist (S) mutants versus time t (see Eqs. 4.1 and 4.2). Several values of the Hill coefficient n are shown for W. B: Number N W of W microbes versus time t for different values of n (same colors as in A). Data points correspond to averages over 10 3 replicate stochastic simulations, and error bars (smaller than markers) represent 95% confidence intervals. Black solid curves correspond to numerical resolutions of Eq. 4.3. Parameter values: g W = g S = g G = 0.1, K = 10 3 , N 0 W = 10, and θ = 10 3 . Vertical dotted line in both panels: t = θ.

Figure 4 . 2 :

 42 Figure 4.2: Fixation probability of mutants. A. Fixation probability p fix of G and S mutants versus their time of appearance t 0 in the deteriorating environment, for different Hill coefficients n characterizing the steepness of the environment deterioration (see Eq. 4.1).Here, S mutants satisfy m = n, i.e. they have the same sensitivity to the environment as W organisms (see Eq. 4.2). Horizontal dashed line: p fix = 1 -g G /f G . Horizontal solid line: p fix = 1-g S . B. Fixation probability p fix of different types of mutants versus their time of appearance t 0 in the deteriorating environment, for a fixed Hill coefficient n = 10 characterizing the decay of f W (see Eq. 4.1). G mutants and S mutants with different Hill coefficients m (see Eq. 4.2), corresponding to different sensitivities to the changing environment, are considered. In both panels, markers correspond to averages over 10 4 replicate stochastic simulations ("Sim."). Dashed and solid lines correspond to numerical resolutions of Eq. 4.4 ("Th.") for G and S mutants, respectively. Parameter values: g W = g G = g S = 0.1, K = 10 3 , N 0 W = 10 and θ = 10 3 . Vertical dotted lines: t = θ. Main panels: linear scale; insets: semi-logarithmic scale.

AFigure 4 . 3 :

 43 Figure 4.3: Rescue probability. A. Rescue probability p r of a W population in a deteriorating environment by G or S mutants, versus mutation probability µ upon division. Different Hill coefficients n characterizing the steepness of the environment deterioration (see Eq. 4.1) are considered.Here, S mutants satisfy m = n, i.e. they have the same sensitivity to the environment as W organisms (see Eq. 4.2). Vertical dash-dotted line: Kµ = 1. B. Rescue probability p r by different types of mutants versus mutation probability µ upon division. A fixed Hill coefficient n = 10 characterizing the decay of f W (see Eq. 4.1) is chosen, but G mutants and S mutants with different Hill coefficients m (see Eq. 4.2) are considered. In both panels, markers correspond to averages over 10 4 replicate stochastic simulations ("Simulation"). Dashed and solid lines correspond to numerical resolutions of Eq. 4.8 ("Theory") for G and S mutants, respectively. Parameter values: g W = g G = g S = 0.1, K = 10 3 , N 0 W = 10 and θ = 10 3 .

Figure 4 . 4 :

 44 Figure 4.4: Impact of population size on rescue. A. Fixation probability p fix of G and S mutants versus their time of appearance t 0 in the deteriorating environment, for different carrying capacities K. Vertical dotted line: t = θ. Main panel: linear scale; inset: semi-logarithmic scale. B.Rescue probability p r of different types of mutants versus the product Kµ of the carrying capacity K and the mutation probability µ upon division, for different carrying capacities K. G mutants and S mutants are considered. Vertical dash-dotted line: Kµ = 1. C. Mean time τ af of appearance of a G or S mutant that fixes versus Kµ. Simulation results are shown both for a fixed mutation probability upon division µ = 10 -5 and a variable carrying capacity K, and for a fixed K = 10 3 and a variable µ. Horizontal dotted line: τ af = θ. Vertical dash-dotted line: Kµ = 1. In all panels, the Hill coefficient characterizing the steepness of the environment deterioration (see Eq. 4.1) is n = 5. Furthermore, S mutants satisfy m = n, i.e. they have the same sensitivity to the environment as W organisms (see Eq. 4.2). Markers correspond to averages over 10 3 -10 4 replicate stochastic simulations ("Sim."). Dashed and solid lines correspond to our analytical predictions ("Theory") for G and S mutants, respectively. Parameter values: g W = g G = g S = 0.1, N 0 W = 10 and θ = 10 3 .

  )

Figure 4 . 5 :

 45 Figure 4.5: Additional results for generalist mutants. A. Fixation probability p fix as a function of the time of appearance of the mutants t 0 for different fitnesses f G of G mutants (in the rest of the paper, f G = 0.5). Vertical dotted line: t 0 = θ. Horizontal dotted lines: p fix = 1 -g G /f G . B. Rescue probability p r as a function of the mutation probability µ upon division for different fitnesses f G . C. Mean appearance time τ af of a mutant that fixes as a function of the fitness f G for the mutation probability upon division µ = 10 -5 . Vertical dotted line: τ af = θ. D. Mean time to extinction τ 0 as a function of the time of appearance of the mutants t 0 for different fitnesses f G . Vertical dotted line: t 0 = θ. In all panels, markers correspond to the average over 10 3 -10 4 replicate stochastic simulations, error bars (in panels C and D, often smaller than markers) are 95% confidence intervals and dashed curves correspond to our analytical predictions. Parameter values: g W = g G = 0.1, K = 10 3 , N 0 W = 10, n = 5 and θ = 10 3 .

Figure 4 . 6 :

 46 Figure 4.6: Time of appearance of the mutants that fix. A. Average time τ af of appearance of a G or S mutant that fixes versus mutation probability µ upon division. The Hill coefficient characterizing the steepness of the environment deterioration (see Eq. 4.1) is n = 5. Vertical dotted line: Kµ = 1. B. Average time τ af of appearance of a G or S mutant that fixes versus Hill coefficient n. The mutation probability upon division is µ = 10 -5 .In both panels, markers correspond to averages over 10 3 -10 4 replicate stochastic simulations ("Simulation"). Dashed and solid lines correspond to numerical resolutions of Eq. 4.12 ("Theory") for G and S mutants, respectively. Parameter values: g W = g G = g S = 0.1, K = 10 3 , N 0 W = 10 and θ = 10 3 . Horizontal dotted lines: τ af = θ.

Figure 4 . 7 :

 47 Figure 4.7: Mean time to extinction. A. Mean time to extinction τ 0of G and S mutants versus their time of appearance t 0 in the deteriorating environment, for K = 10 3 and for different Hill coefficients n characterizing the steepness of the environment deterioration (see Eq. 4.1). B. Mean time to extinction τ 0 of G and S mutants versus their time of appearance t 0 in the deteriorating environment, for different carrying capacities K and a fixed Hill coefficient n = 5 characterizing the decay of f W (see Eq. 4.1). In both panels, markers correspond to averages over 10 3 -10 4 replicate stochastic simulations. Solid (resp. dashed) curves correspond to numerical resolutions of Eq. 4.24 for S (resp. G) mutants. Here, S mutants satisfy m = n, i.e. they have the same sensitivity to the environment as W organisms (see Eq. 4.2). Parameter values: g W = g G = g S = 0.1, N 0 W = 10 and θ = 10 3 . Vertical dotted lines: t 0 = θ.

Figure 4 . 8 :

 48 Figure 4.8: Fixation probability for a sudden environment degradation. Fixation probability p fix of S or G mutants versus their time of appearance t 0 in the deteriorating environment, for Hill coefficients n, m → ∞ (see Eqs. 4.1 and 4.2) corresponding to an instantaneous, stepwise, environment change. Markers correspond to averages over 10 4 replicate stochastic simulations. Light dashed (resp. solid) curves correspond to our analytical predictions in Eq. 4.4 for G (resp. S) mutants. Dark dashed (resp. solid) curves correspond to our approximations in Eq. 4.30 (resp. Eq. 4.38) for G (resp. S) mutants in the different regimes discussed. Vertical dotted line: t 0 = θ. Vertical dash-dotted line: t 0 = θ = θ + τ 1/2 . Parameter values: g W = g G = g S = 0.1, K = 10 3 , N 0 W = 10, n = m = 10 10 , θ = 10 3 and τ 1/2 = 5.9. Main panel: linear scale; inset: semi-logarithmic scale.

Fig. 4 .

 4 Fig. 4.8 shows that Eqs. 4.30 and 4.38 provide good approximations in the appropriate regimes.

Figure 4 . 9 :

 49 Figure 4.9: Rescue probability for a sudden environment degradation. A. Rescue probability p r versus the product Kµ of the carrying capacity K and the mutation probability µ upon division, for different carrying capacities K. Markers correspond to averages over 10 4 replicate stochastic simulations. Light dashed (resp. solid) curves correspond to our analytical predictions in Eq. 4.8 for G (resp. S) mutants. Dark dashed (resp. solid) curves correspond to our approximations, corresponding to Eq. 4.40 with Eq. 4.41 (resp. Eq. 4.42) for G (resp. S) mutants, with τ 1/2 = 5.9. B. Rescue probability p r versus Kµ. The present results for G mutants are compared to those of our previous work[START_REF] Marrec | Resist or perish: fate of a microbial population subjected to a periodic presence of antimicrobial[END_REF] for K = 10 3 . Markers correspond to averages over 10 3 -10 4 replicate stochastic simulations. Dashed orange curve: analytical prediction in Eq. 4.8 for G mutants. Solid green curve: analytical prediction p r = 1 -p 0 with p 0 in Eq. 1 of Ref.[START_REF] Marrec | Resist or perish: fate of a microbial population subjected to a periodic presence of antimicrobial[END_REF], valid for Kµ 1. Vertical dash-dotted lines in both panels: Kµ = 1. Parameter values: g W = g G = g S = 0.1, N 0 W = 10, n = m = 10 10 , θ = 10 3 .

Figure 4 . 10 :

 410 Figure 4.10: Mean time of appearance for a sudden environment degradation. Mean time τ af of appearance of a G or S mutant that fixes versus the product Kµ of the carrying capacity K and the mutation probability µ. Here, µ was varied at constant carrying capacity K = 10 3 . Horizontal dotted line: τ af = θ. Vertical dash-dotted line: Kµ = 1. Markers correspond to averages over 10 3 replicate stochastic simulations ("Simulation"). Dashed and solid lines correspond to our analytical predictions ("Theory") for G and S mutants, respectively (see Eq. 4.43). Parameter values: g W = g G = g S = 0.1, N 0 W = 10, m = n = 10 10 , θ = 10 3 and τ 1/2 = 5.9 and θ = 10 3 .

Figure 4 . 11 :

 411 Figure 4.11: Robustness of parameters and numerical resolutions. A. Fixation probability p fix of G mutants versus their time of appearance t 0 in the deteriorating environment. Solid curves correspond to numerical computations of Eq. 4.51 with different values of τ 1 . B. Rescue probability p r of a W population in a deteriorating environment by G mutants, versus mutation probability µ upon division. Solid curves correspond to numerical computations of Eq. 4.52 with different values of τ 2 . C. Mean time to extinction τ 0 of G mutants versus their time of appearance t 0 in the deteriorating environment. Solid curves correspond to numerical resolutions of Eq. 4.53 with different values of τ 3 . In all panels, gray markers correspond to averages over 10 3 replicate stochastic simulations, and error bars in panel C (often smaller than markers) to 95% confidence intervals. Parameter values: f G = 1 (recall that generally we take f G = 0.5), g W = g G = g S = 0.1, K = 10 3 , N 0 W = 10, n = 5 and θ = 10 3 .

Figure 4 . 12 :

 412 Figure 4.12: Time interval between two events. Probability that the sampled time interval ∆t between two events in the Gillespie simulation is smaller than the threshold time interval T plotted versus T for different Hill coefficients n (see Eqs. 4.1). Markers correspond to the average over 10 2 replicate stochastic simulations of a purely W population (µ = 0). Parameter values: g W = 0.1, K = 10 3 , N 0 W = 10 and θ = 10 3 .

Contents 5 . 1 140 5. 2

 511402 Introduction . . . . . . . . . . . . . . . . . . . . . Model and methods . . . . . . . . . . . . . . . . . 140 5.3 Results . . . . . . . . . . . . . . . . . . . . . . . . . 143 5.4 Discussion . . . . . . . . . . . . . . . . . . . . . . . 158 5.5 Appendix . . . . . . . . . . . . . . . . . . . . . . . 160

FigFigure 5 . 1 :

 51 Figure 5.1: Different types of structures: A: Clique, or complete graph. B: Ring. C: Small mutant deme with large wild-type deme. D: Small wildtype deme with large mutant deme. E: Star with a mutant leaf. F: Star with a mutant center. G: Line with an end mutant deme. H: Line with a next-to-end mutant deme. Mutants (M) are in blue, wild-type (W) in orange. Blue arrows (respectively orange) indicate the possible migrations of mutant microbes (respectively wild-type). Here we represent a state where the mutant has fixed in one deme while all others are fully wild-type.

Figure 5 . 2 :

 52 Figure5.2: Well-mixed populations, amplifiers and suppressors in the model of Ref.[START_REF] Lieberman | Evolutionary dynamics on graphs[END_REF]: A: Fixation probability Φ M,1 of one mutant in a well-mixed population of size N versus mutant fitness f M . Black curve corresponds to Eq. 5.1. For the same parameters as those used to plot the black curve, structures whose fixation probability is in the blue zone are suppressors of natural selection, while those whose fixation probability is in the pink zone are amplifiers of natural selection. Parameter values: N = 4, f W = 1 and g W = g M = 0.1. B: The complete graph, where each node is a single individual, is equivalent to the Moran process, i.e its fixation probability of a mutation is equal to this within the Moran model. This is true for both dynamics, namely birth-death and death-birth. C: Stars, where each node is a single individual, are amplifiers of natural selection under birth-death dynamics. D: Graphs made of an upstream population and a downstream one are suppressors of natural selection under birth-death dynamics.

Figure 5 . 3 :

 53 Figure 5.3: Fixation probabilities for the clique: A: Fixation probability Φ 1 of a mutation starting with one fully mutant deme versus mutant fitness f M . B: Fixation probability ρ 1 of a mutation starting with one single mutant microbe versus mutant fitness f M . In both panels, data points correspond to averages over 10 3 simulation results. Dotted lines represent analytical predictions where the fixation probability φ M of a mutant in a wild-type deme is computed analytically in the framework of the Moran model (fixed population size). Solid lines represent analytical predictions where the fixation probability φ M of a mutant in a wild-type deme is computed using simulation results with the logistic model (population size fluctuating around the stationary value). Vertical dash-dotted lines represent the neutral case where wild-type and mutant fitnesses are equal (f W = f M ), and dashed lines represent the fixation probability in a well-mixed population. Parameter values: f W = 1, g W = g M = 0.1, K = 20, D = 5 and m W = m M = 10 -6 . The migration parameters m W and m M are chosen so that the evolutionary dynamics take place within the rare migration regime (see Appendix, Section 5.5.2).

Figure 5 . 4 :

 54 Figure 5.4: Fixation probabilities for the ring: A: Fixation probability Φ 1 of a mutation starting with one fully mutant deme versus mutant fitness f M . Data points correspond to averages over 10 3 simulation results. B: Fixation probability ρ 1 of a mutation starting with a one mutant microbe versus mutant fitness f M . In both panels, dotted lines represent analytical predictions where the fixation probability φ M of a mutant in a wild-type deme is computed analytically in the framework of the Moran model (fixed population size). Solid lines represent analytical predictions where the fixation probability φ M of a mutant in a wild-type deme is computed using simulation results with the logistic model (population size fluctuating around the stationary value). Vertical dash-dotted lines represent the neutral case where wild-type and mutant fitnesses are equal (f W = f M ), and dashed lines represent the fixation probability in a wellmixed population. Parameter values: f W = 1, g W = g M = 0.1, K = 20, D = 5 and m A , m C = 5 × 10 -6 , 10 -6 (downward-pointing triangle); 2 × 10 -6 , 10 -6 (upward-pointing triangle); 10 -6 , 10 -6 (diamond); 10 -6 , 2 × 10 -6 (square); 10 -6 , 5 × 10 -6 (circle). The migration parameters m A and m C are chosen so that the evolutionary dynamics take place within the rare migration regime (see Appendix, Section 5.5.2).

Figure 5 . 6 :

 56 Figure 5.6: Fixation probabilities for the star: A: Fixation probability Φ 10 of a mutation starting with one fully mutant center versus mutant fitness f M . B: Fixation probability ρ 10 starting with one single mutant microbe in the center versus mutant fitness f M . C: Fixation probability Φ 01 of a mutation starting with one fully mutant leaf versus mutant fitness f M . D:Fixation probability ρ 01 starting with one single mutant microbe in a leaf versus mutant fitness f M . E: Fixation probability Φ 1 of a mutation starting with one fully mutant deme chosen uniformly versus fitness mutant f M . Data points are obtained by linear combination of those of panels A and C (see Eq. 5.10). F: Fixation probability ρ 1 starting with one single mutant microbe in a deme chosen uniformly versus mutant fitness f M . In the panels A, C and E, data points correspond to averages over 10 3 simulation results. In all the panels, dotted and solid lines represent analytical predictions where the fixation probability φ M is computed analytically in the framework of the Moran model (fixed population size) and using simulation results with the logistic model (population size fluctuating around the stationary value), respectively, vertical dash-dotted lines represent the neutral case where wild-type and mutant fitnesses are equal (f W = f M ), and dashed lines represent the fixation probability in a well-mixed microbial population. Parameter values: f W = 1, g W = g M = 0.1, K = 20, D = 5 and m O , m I = 5 × 10 -6 , 10 -6 (purple); 2 × 10 -6 , 10 -6 (blue); 10 -6 , 10 -6 (green); 10 -6 , 2 × 10 -6 (yellow); 10 -6 , 5 × 10 -6 (red). The migration parameters m 0 and m I are chosen so that the evolutionary dynamics take place within the rare migration regime (see Appendix, Section 5.5.2). Dotted and solid lines in the right-hand panels are obtained by multiplying those of the left-hand panels by the fixation probability φ M of a mutant in a wild-type deme computed analytically and using simulation results, respectively.

Figure 5 . 7 :

 57 Figure 5.7: Fixation probabilities for the line: A: Fixation probability Φ I of a mutation starting with one fully mutant end deme versus mutant fitness f M . B: Fixation probability ρ I starting with one single mutant microbe in an end deme versus mutant fitness f M . C: Fixation probability Φ II of a mutation starting with a fully mutant next-to-end deme versus mutant fitness f M . D: Fixation probability ρ II starting with one single mutant microbe in a next-to-end deme versus mutant fitness f M . E: Fixation probability Φ 1 of a mutation starting with one fully mutant deme chosen uniformly versus mutant fitness f M . F: Fixation probability ρ 1 starting with one single mutant microbe in a deme chosen uniformly versus mutant fitness f M . In all the panels, dotted and solid lines represent analytical predictions where the fixation probability φ M is computed analytically in the framework of the Moran model (fixed population size) and using simulation results with the logistic model (population size fluctuating around the stationary value), respectively, vertical dash-dotted lines represent the neutral case where wild-type and mutant fitnesses are equal (f W = f M ), and dashed lines represent the fixation probability in a well-mixed population. Parameter values: f W = 1, g W = g M = 0.1, K = 20, D = 4 and q = 0.5. The migration parameters m C and m P are chosen so that the evolutionary dynamics take place within the rare migration regime (see Appendix, Section 5.5.2).

Figure 5 . 8 :

 58 Figure 5.8: Comparison between Birth-death, Death-birth and our model: A: Fixation probability Φ 10 of a mutation starting from one fully mutant center as a function of the mutant fitness f M for a population structured as a star. B: Relative error between results obtained with our model and results obtained with the Birth-death model and the Death-birth model as a function of the mutant fitness f M . The relative error is the difference in absolute value between the fixation probability obtained with our model and that obtained with the Birth-death model and the Death-birth model divided by the fixation probability obtained in our model. C: Absolute error between results obtained with our model and results obtained with the Birth-death model and the Death-birth model as a function of the mutant fitness f M . The absolute error is the difference in absolute value between the fixation probability obtained with our model and that obtained with the Birth-death model and the Death-birth model. Data points correspond to averages over 10 3 -10 4 simulation results. Parameter values: f W = 1, g W = g M = 0.1, K = 20, D = 5, m I = 5 × 10 -6 , m O = 10 -6 and N = 18. For Birth-death, x = 10 -5 and y = 2 × 10 -4 . For Death-birth, x = 5 × 10 -5 and y = 4 × 10 -5 .

  Let us consider a population structured as a star with D demes. A W individual (respectively M ) of a leaf migrates to the center with a migration rate per individual m I W (respectively m I M ) while a W individual (respectively M ) of the center migrates to a leaf with a migration rate per individual m O W (respectively m O M

(5. 21 )

 21 Let us assume that the migration rates per individual do not depend on the genotype (m I W = m I M = m I and m O W = m O M = m O ) and let us introduce the notations m = m I /m O and γ = (N W φ W )/(N M φ M ). Then one recovers Eqs. 5.8 and 5.9. If in addition the migration rates per individual are symmetric (m I = m O and m = 1), the fixation probability reduces to:

Figure 5 . 9 :

 59 Figure 5.9: Different states for the line: All the possible states for the line with four demes (M = 4). Wild-type individuals are in orange, while mutant individuals are in blue. Orange and blue arrows indicate possible migrations of wild-type and mutant individuals, respectively. Black arrow show possible transitions from a state to another.

Figure 5 . 10 :

 510 Figure 5.10: Rare migration regime for a star: Fixation probability Φ 01 starting from a fully mutant leaf in a star as a function of the migration rate per individual m I from a leaf to the center. Data points correspond to simulation results averaged over 10 4 realizations. Vertical solid line: m I = 4 × 10 -5 . Horizontal dotted and solid lines represent analytical predictions where the fixation probability φ M is computed analytically in the framework of the Moran model (fixed population size) and using simulation results with the logistic model (population size fluctuating around the stationary value), respectively. Parameter values: f W = 1, f M = 1.1, g W = g M = 0.1, K = 20, D = 5, m O = 2 × m I .

Figure 5 . 11 :

 511 Figure 5.11: Fixation probabilities: Fixation probability φ W of a W individual in a population of N M = K(1 -g M /f M ) mutants and fixation probability φ M of a mutant in a population of N W = K(1-g W /f W ) W individuals. Data points correspond to averages over 10 6 realizations. Solid lines correspond to analytical predictions (see Eqs. 5.33 and 5.38). Parameter values: f W = 1, g W = g M = 0.1 and K = 20.

Figure 6 . 1 :

 61 Figure 6.1: Sketch illustrating the impact of bacteria clustering on the spread of resistance. Consider hosts infected by sensitive (blue) and resistant (red) bacteria. Within immune hosts, bacteria form IgA-mediated clonal clusters.This strongly impacts the composition of the set of transmitted bacteria, which is more likely to contain both types of bacteria if the donor host is naive than if it is immune. Antibiotic treatment (yellow) is efficient against sensitive bacteria, but selects for preexisting resistance, which is more likely to exist if the donor host was naive.

Figure 6 . 2 :

 62 Figure 6.2: Bacterial clustering hinders the spread of a resistant strain in the presence of preexisting resistance. Extinction probabilities e i are shown versus initial number i of resistant bacteria in the first infected host, for different fractions ω of immune individuals in the host population. Naive and immune hosts differ only through bacterial clustering. Each host is treated with probability q = 0.55 and transmits N = 100 bacteria to an average of λ = 2 other hosts (unless it was infected with no resistant bacteria and treated). Solid lines: numerical resolution of Eq. 6.4; symbols: simulation results (over 10 4 realizations). Numerical resolution and simulation are in excellent agreement with each other. Black dotted line: approximation from Eq. 6.14 for ω = 1 and 0 < i N . Main panel: linear scale; inset: semi-logarithmic scale.

Figure 6 . 3 :

 63 Figure 6.3: Silent carrier effects can counter the clustering-driven reduction of spread. A: Extinction probabilities e i versus initial number i of resistant bacteria in the first infected host, for different fractions ω of immune individuals in the host population. Parameters are the same as in Fig.6.2, except that each naive (resp. immune) host transmits to an average of λ N = 1.5 (resp. λ I = 2) other hosts. Solid lines: numerical resolution of Eq. 6.4; symbols: simulation results (over 10 4 realizations). Black dotted line: approximation from Eq. 6.14 for ω = 1 and 0 < i N . B: Heatmap: the ratio e I 3 /e N 3 of the extinction probabilities in a fully immune versus a fully naive population, starting from i = 3, is shown for λ I ≥ λ N = 1.2 and q I ≤ q N = 0.55. Values (λ N , q N ) for naive hosts are indicated by a dot labeled "N ". Parameters are the same as in Fig.6.2, except λ I , λ N and q I . Solid curve: e I 3 /e N 3 = 1. Dashed curve: λ I (1 -q I ) = 1. Dotted curve: q I = (1 -e N N )/(1 -e I N ) (Eq. 6.15). Heatmap interpolated from numerical resolutions of Eq. 6.4; logarithmic color scale.

Figure 6 . 4 :

 64 Figure 6.4: Impact of mutations and of a fitness cost of resistance. Extinction probabilities e i versus initial number i of resistant bacteria in the first infected host, for different fractions ω of immune individuals in the host population. A: Results with mutations are shown in dark shades. Results without mutation (identical to Fig. 6.2) are shown in light shades for comparison. B: Results with a fitness cost δ = 0.1 of resistance are shown in dark shades. Results without fitness cost (same as dark-shaded results in panel A) are shown in light shades for comparison.In both panels, withinhost evolution is deterministic, µ 1 = 7 × 10 -5 and µ -1 = 0, and incubation time is G = 10 generations. As in Fig.6.2, N = 100, λ = 2 and q = 0.55. Solid lines: numerical resolution of Eq. 6.4; symbols: simulation results (over 10 4 realizations).

Figure 6 . 6 :

 66 Figure 6.6: Schematic showing the outcome of mutations in clusters.Represented here is the case of simple linear clusters. For more complex clusters, it will remain true that closely related bacteria are located close to one another, since daughter bacteria remain bound together after replication.

Figure 6 . 7 :

 67 Figure 6.7: Stochastic within-host growth without mutations or a fitness cost of resistance.Extinction probabilities e i versus initial number i of resistant bacteria in the first infected host, for different fractions ω of immune individuals in the host population. Dark shades: results from simulations with stochastic mutation-free within-host growth. Light shades: results with deterministic mutation-free within-host growth (identical to Fig.6.2). As in Fig.6.2, N = 100, λ = 2, q = 0.55, and resistance carries no cost. Solid lines: numerical resolution of Eq. 6.4; symbols: simulation results (over 10 4 realizations).

Figure 6 . 8 :

 68 Figure 6.8: Stochastic within-host growth with mutations and a fitness cost of resistance. The extinction probability e i is shown as a function of the initial number i of resistant bacteria in the first infected individual, for different values of the fraction ω of immune individuals in the host population. A: Case with mutations but no fitness cost. B: Case with mutations and a fitness cost δ = 0.1. In both panels, results from simulations with stochastic exponential within-host growth are shown in dark shades, and results with deterministic exponential within-host growth are shown in light shades for comparison (similarly to Fig. 6.7). As in Fig.6.2, we take a bottleneck size N = 100, and each individual transmits bacteria to an average of λ N = λ I = λ = 2 new hosts and is treated with probability q N = q I = q = 0.55, irrespective of whether it is naive or immune. Here, we take mutation probabilities µ 1 = 5 × 10 -5 and µ -1 = 0, and incubation time corresponding to 10 generations of bacteria within the host. Solid lines correspond to numerical resolution of Eq. 6.4, while symbols show results from numerical simulations of the branching process, computed over 10 4 realizations. Main panel: linear scale; inset: semi-logarithmic scale.

Figure 6 . 9 :

 69 Figure 6.9: Impact of mixed clusters. The extinction probability e i is shown as a function of the initial number i of resistant bacteria in the first infected individual, for different values of the fraction ω of immune individuals in the host population. A: Cluster size N = 64. B: Cluster size N = 8. In both panels, results from simulations with stochastic exponential within-host growth including an explicit construction of clusters that allows for mixed clusters are shown in dark shades, and results with stochastic exponential within-host growth but with only clonal clusters (as in previous figures) are shown in light shades for comparison. As in Fig.6.2, each individual transmits bacteria to an average of λ N = λ I = λ = 2 new hosts and is treated with probability q N = q I = q = 0.55, irrespective of whether it is naive or immune. Here, we take mutation probabilities µ 1 = 5 × 10 -5 and µ -1 = 0, and a total incubation time corresponding to G = 10 generations of bacteria within the host. Symbols show results from numerical simulations of the branching process, computed over 10 4 realizations. Main panel: linear scale; inset: semi-logarithmic scale.

  λ n 0N I n 0N ! e -λ I (k,l)∈S\{(0,N )} δ n kl ,0 and g I,t 0j ({z kl }) = exp (-λ I (1 -z 0N )).

n

  6.53), we then obtain the probability that n k N -k clusters including k R bacteria and N -k C bacteria are transmitted:p(n k N -k ) = (λ N B i,j (k)) n k N -k n k N -k ! exp (-λ N B i,j (k)) . (6.58) Since ℘ ij ({n kl }) = N k=0p(n k N -k ), we obtain:g N ,t ij ({(z kl )}) = -k (λ N B i,j (k)) n k N -k n k N -k ! exp (-λ N B i,j (k)) z n k N -k k N -k   = exp -λ N N k=0 B i,j (k)(1 -z k N -k ) .(6.60)Immune and non-treated hosts. Here, transmission involves clusters of N identical bacteria of type S, R or C. Let us express the probability that n N 0 clusters of R bacteria, n 0N clusters of C bacteria and n 00 = n-n N 0 -n 0N of S bacteria are transmitted, given that n clusters are transmitted:p(n N 0 , n 0N |n) = n! n N 0 !n 0N !(n -n N 0 -n 0N )! (r N i,j ) n N 0 (c N i,j ) n 0N × (1 -r N i,j -c N i,j ) n-n N 0 -n 0N ,(6.61)which is a trinomial distribution. Then it follows:p(n N 0 |n) = n-n N 0 n 0N =0 p(n N 0 , n 0N |n) = n! (n -n N 0 )!n N 0 ! (r N i,j ) n N 0 (1 -r N i,j ) n-n N 0 .(6.62)Using the law of total probability (see Eq. 6.53) yieldsp(n N 0 ) = λ 0N exp -λ I c N i,j ,(6.64)p(n 00 ) = 1 n 00 ! λ I (1 -r N i,j -c N i,j ) n 00 exp -λ I (1 -r N i,j -c N i,j ) . (6.65) Since ℘ I,nt ij ({n kl }) = p(n 00 )p(n N 0 )p(n 0N )(k,l)∈S\{(0,0),(N,0),(0,N )} δ n kl ,0 , we finally obtain g I,nt ij ({z kl }) = exp -λ I (1 -r N i,j -c N i,j )(1 -z 00 ) × exp -λ I r N i,j (1 -z N 0 ) × exp -λ I c N i,j (1 -z 0N ) . (6.66)

. 67 )

 67 Then we can express the probability of transmitting n kl packets with k R bacteria and l C bacteria, given that n packets are transmitted:p(n kl |n) = n n kl (T i,j (k, l)) n kl (1 -T i,j (k, l)) n-n kl . (6.68)Using the law of total probability (see Eq. 6.53) yieldsp(n kl ) = (λ N T i,j (k, l)) n kl n kl ! exp (-λ N T i,j (k, l)) .(6.69)Since ℘ N ,nt ij ({n kl }) = (k,l)∈S p(n kl ), we finally obtain g N ,nt ij ({z kl }) = exp   -λ N (k,l)∈S T i,j (k, l)(1 -z kl )

Figure 6 . 10 :

 610 Figure 6.10: Impact of compensation. Extinction probabilities e i versus initial number i of resistant bacteria in the first infected host, for different fractions ω of immune individuals in the host population. Dark shades: results with a fitness cost δ = 0.1 and compensation with µ 2 = 7 × 10 -3 .Light shades: results with δ = 0.1 but no compensation (same as darkshaded results in Fig.6.4B). Within-host evolution is deterministic, µ 1 = 7 × 10 -5 and µ -1 = 0, and incubation time is G = 10 generations. As in Fig.6.2, N = 100, λ = 2 and q = 0.55. Solid lines: numerical resolution of Eq. 6.4; symbols: simulation results (over 10 4 realizations).

Figure 6 . 11 :

 611 Figure 6.11: Impact of a fitness cost of resistance and of compensation for long incubation times. The extinction probability e i is shown as a function of the initial number i of resistant bacteria in the first infected individual, for different values of the fraction ω of immune individuals in the host population. A: Results with a fitness cost δ = 0.1 of resistance are shown in dark shades. Results without fitness cost (identical to the darkshaded results in Fig. 6.4A) are shown in light shades for comparison. B:Results with a fitness cost δ = 0.1 of resistance and with a possible compensatory mutation with mutation probabilities µ 2 = 7 × 10 -3 and µ -2 = 0 are shown in dark shades. Results with the same fitness cost but without compensation (identical to the dark-shaded results in panel A) are shown in light shades for comparison. In both panels, within-host evolution is deterministic, mutation probabilities are µ 1 = 7 × 10 -5 and µ -1 = 0, and incubation time corresponds to 50 generations of bacteria within the host (instead of 10 generations in Figs. 6.4 and 6.10). In addition, as in Fig.6.2, we take a bottleneck size N = 100, and each individual transmits bacteria to an average of λ N = λ I = λ = 2 new hosts and is treated with probability q N = q I = q = 0.55, irrespective of whether it is naive or immune. Solid lines correspond to numerical resolution of Eq. 6.4 (not shown with compensation), while symbols show results from numerical simulations of the branching process, computed over 10 4 realizations. Main panel: linear scale; inset: semi-logarithmic scale.

e I 1 ≈. 73 )

 173 qe N + (1 -q) exp(-λ(1 -e N )/N ) . (6Conclusion on e N 1 vs. e I 1

•

  Marrec L, Bitbol AF. Quantifying the impact of a periodic presence of antimicrobial on resistance evolution in a homogeneous microbial population of fixed size. J Theor Biol. 2018;457:190-198. • Bansept F * , Marrec L * , Bitbol AF, Loverdo C. Antibody-mediated cross linking of gut bacteria hinders the spread of antibiotic resistance. Evolution. 2019;73(6):1077-1088. • Marrec L, Bitbol AF. Resist or perish: fate of a microbial population subjected to a periodic presence of antimicrobial. PLoS Comput Biol. 2020;16(4):1-19. • Marrec L, Bitbol AF. Adapt or perish: Evolutionary rescue in a gradually deteriorating environment. bioRxiv doi: 10.1101/2020.05.05.079616. 2020. * : Equal contribution.

  225

  Implications for clinical and experimental situations . 2.5 Appendix . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.5.1 Table of notations . . . . . . . . . . . . . . . . . . . . 2.5.2 Fixation probabilities and fixation times in the Moran process . . . . . . . . . . . . . . . . . . . . . . . . . . 2.5.3 Large populations: deterministic limit . . . . . . . . . 2.5.4 Comparison to spontaneous fitness valley crossing . . 2.5.5 Detailed analysis of asymmetric alternations . . . . . . 2.5.6 Robustness of the binary antimicrobial action model . 3 Evolution of antimicrobial resistance in a microbial population of variable size 3.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.2 Model and methods . . . . . . . . . . . . . . . . . . . . . . . 3.3 Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.3.1 Conditions for a periodic presence of perfect biostatic antimicrobial to eradicate the microbial population . . 3.3.2 Biocidal antimicrobials and imperfect biostatic ones allow an extra mechanism of rescue by resistance . . . 3.3.3 Sub-MIC drug concentrations and stochastic extinctions 3.4 Discussion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Appendix . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3.2 Rescue probability . . . . . . . . . . . . . . . . . . . . 4.3.3 Time of appearance of the mutants that fix . . . . . . 4.3.4 Impact of population size on rescue . . . . . . . . . . . 4.4 Discussion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.5 Appendix . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.5.1 Derivation of the fixation probability of mutants . . . 4.5.2 Additional results for generalist mutants . . . . . . . . 4.5.3 Results for the time of appearance of the mutants that fix . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.5.4 Extinction time of mutants that do not fix . . . . . . . 4.5.5 Analytical approximations for a sudden environment

	Chapter 1
	Introduction
	Alan Parrish: In the jungle
	you must wait...until the dice
	read five or eight.

1 Introduction 1.1 Once upon a time there were microbes and antimicrobials . . 1.2 Historical overview of antimicrobial resistance . . . . . . . . . 1.3 Rugged fitness landscape . . . . . . . . . . . . . . . . . . . . . 1.4 Population genetics . . . . . . . . . . . . . . . . . . . . . . . . 1.5 State of the art . . . . . . . . . . . . . . . . . . . . . . . . . . 1.6 Outline of this thesis . . . . . . . . . . . . . . . . . . . . . . . 2 Evolution of antimicrobial resistance in a microbial population of fixed size 2.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.2 Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.3 Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.3.1 A periodic presence of antimicrobial can drive resistance evolution . . . . . . . . . . . . . . . . . . . . . . 2.3.2 Asymmetric alternations . . . . . . . . . . . . . . . . . 2.4 Discussion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.4.1 Main conclusions . . . . . . . . . . . . . . . . . . . . . 2.4.2 Context . . . . . . . . . . . . . . . . . . . . . . . . . . 2.4.3 3.4.1 Main results . . . . . . . . . . . . . . . . . . . . . . . . 3.4.2 Practical relevance . . . . . . . . . . . . . . . . . . . . 3.5 3.5.1 Population with a single type of microorganisms . . . 3.5.2 Supplementary results on extinction probabilities and extinction and fixation times . . . . . . . . . . . . . . 3.5.3 Rescue by resistance . . . . . . . . . . . . . . . . . . . 3.5.4 Fixation probability of a mutant in a population of constant size . . . . . . . . . . . . . . . . . . . . . . . 3.5.5 Detailed simulation methods . . . . . . . . . . . . . . 4 Evolutionary rescue in a gradually deteriorating environment 4.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.2 Model and methods . . . . . . . . . . . . . . . . . . . . . . . 4.2.1 Population model . . . . . . . . . . . . . . . . . . . . . 4.2.2 Fitnesses in a deteriorating environment . . . . . . . . 4.2.3 Methods . . . . . . . . . . . . . . . . . . . . . . . . . . 4.3 Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.3.1 Fixation probability of mutants: on the importance of good timing . . . . . . . . . . . . . . . . . . . . . . . . 4degradation . . . . . . . . . . . . . . . . . . . . . . . . -Jumanji Contents 1.1 Once upon a time there were microbes and antimicrobials . . . . . . . . . . . . . . . . . . . . . . 6 1.2 Historical overview of antimicrobial resistance . 7 1.3 Rugged fitness landscape . . . . . . . . . . . . . . 9 1.4 Population genetics . . . . . . . . . . . . . . . . . 10 1.5 State of the art . . . . . . . . . . . . . . . . . . . . 14 1.6 Outline of this thesis . . . . . . . . . . . . . . . . 16

  6 × 10 5 generations. This transition to the valley-crossing plateau is indeed observed for the curves with large enough T 2 . (Recall that if T 2

	extinction events occur when T 1	τ f R , R , see Fig. 2.8B.) The black horizon-τ d
	tal lines in Figs. 2.4A and 2.4B correspond to our analytical prediction in
	Eq. 2.68, giving τ

  .2A and D, respectively, and the two different cases are exemplified in Figs. 3.2B and E. Both of these regimes can arise, depending on the concentration of biocidal antimicrobial. Figs. 3.2A-C corresponds to concentrations just above the MIC, while Figs. 3.2D-F correspond to larger concentrations of bactericidal drugs, which can induce death rates equal to several times the birth rate

  in the presence of antimicrobial. Nevertheless, stochastic extinctions can remain relatively fast, especially in the weakly-sub-MIC regime where f S is close to g S , and if K is not very large. The key point is whether resistance appears before the extinction time τ S . The average time of appearance of an R mutant that fixes in a population of N individuals in the presence of sub-MIC antimicrobial is t a

R = 1/(N µ 1 g S p SR ), where

  Ratio R of the spread probabilities in a fully naive population relative to a fully immune population, without preexisting resistance. A: R versus the number of within-host generations G. B: R versus the cluster and bottleneck size N . Markers joined with lines (both panels): exact values of R obtained by numerical resolution of the full system of equations yielding extinction probabilities (see Appendix, Section 6.5.2). Results with base parameters are plotted in black, and variants showing the impact of changing each single parameter are plotted in colors.

	of spread probabilities	10 12 14 16	A		of spread probabilities	16 32 64	B
		8				8		Base	Variants
	Naive-to-immune ratio	2 4 6	10 Number of generations G within a host 20 30 40 Variants Base	50	Naive-to-immune ratio	2 4 1	2	4 Cluster size and bottleneck size N 8 16 32 64	128
	Figure 6.5:

Dashed lines: analytical approximation Eq. 6.17 of R for large G. Black dotted line (panel A): analytical approximation Eq. 6.16 of R for small G.

Remerciements CHAPTER 6. PUBLICATIONS Bibliography

→ 2M i : Reproduction of a mutant microbe in the deme i with rate k + M,i = f M (1 -(N W,i + N M,i )/K).

→ ∅: Death of a wild-type microbe in the deme i with rate k - M,i = g M .

• W i → ∅ and W j → 2W j : Migration of a wild-type microbe from the deme i to the deme j with rate k m W,i,j = m W,i,j .

• M i → ∅ and M j → 2M j : Migration of a mutant microbe from the deme i to the deme j with rate k m M,i,j = m M,i,j .

The total rate of events is given by

. Simulation steps as follows:

1. Initialization: All of the D demes start from either N W = K(1g W /f W ) wild-type microbes or N M = K(1-g M /f M ) mutant microbes, at time t = 0.

2. Monte Carlo step: The time t is increased by the interval time ∆t such that t = t + ∆t, where the time increment ∆t is sampled from an exponential distribution with mean 1/k tot . The next event to occur is chosen proportionally to its probability k/k tot , where k is its rate, and is executed.

Go back to

Step 2 unless only one type of individuals, either W or M , remains.

Chapter 6

Spread of antimicrobial resistance in a host population Contents In this chapter, we develop here a multiscale model of the interaction between antibiotic use and resistance spread in a host population, focusing on an important aspect of within-host immunity. Antibodies secreted in the gut enchain bacteria upon division, yielding clonal clusters of bacteria. We demonstrate that immunity-driven bacteria clustering can hinder the spread of a novel resistant bacterial strain in a host population. We quantify this effect both in the case where resistance pre-exists and in the case where acquiring a new resistance mutation is necessary for the bacteria to spread. We further show that the reduction of spread by clustering can be countered when immune hosts are silent carriers, and are less likely to get treated, and/or have more contacts. We demonstrate the robustness of our findings to including stochastic within-host bacterial growth, a fitness cost CHAPTER 6. SPREAD Hence, the general equations giving the extinction probabilities read, for all i between 0 and N :

i (e 0 , e 1 , ..., e N ) }naive non-treated host + ω(1 -q I )g I i (e 0 , e 1 , ..., e N ) }immune non-treated host

}naive treated host

where δ i0 is 1 if i = 0, and 0 otherwise. Recall that ω represents the fraction of immune hosts, while q N (resp. q I ) is the fraction of treated hosts among the naive (resp. immune) ones. The generating functions g I i and g N i , in the immune non-treated and naive non-treated cases, respectively, will be expressed in each case studied.

Numerical methods

We solve numerically the system of equations Eq. 6.4 giving the values of the extinction probabilities e i .

We also perform direct numerical simulations of branching processes, both as a test of our analytical descriptions, and because it allows for explicit integration of within-host stochasticity. In our simulations, at each generation of infected hosts, we randomly choose whether each host is immune or not, and treated or not. Next, we simulate within-host growth, either in a deterministic or in a stochastic way. Finally, we perform stochastic transmission of bacteria to the next generation of hosts, with or without clusters, depending whether the transmitting host is immune or not. The process is then iterated. A detailed description of the simulations is provided in the Appendix, Section 6.5.5. Our code is freely available at https://doi.org/10.5281/zenodo.2592323.

Results

Clustering hinders spread in the presence of pre-existing resistance

What is the impact of IgA-mediated clustering on the probability that a bacterial strain spreads in the host population? To address this question, we first consider the simplest case, with a deterministic within-host growth of the bacterial population, and without mutations or fitness costs of resistance.

Then, the proportion of resistant bacteria within a non-treated host remains constant during the infection, equal to i/N if this host was initially infected with i resistant bacteria and N -i sensitive ones. This simplification will allow us to gain insight in the impact of clustering on spread. Next, we Probability for each of the two daughter bacteria of a sensitive bacterium to become resistant because of a mutation during replication µ -1

Probability for each of the two daughter bacteria of a resistant bacterium to become sensitive because of a mutation during replication µ 2

In the model with three bacterial types, probability for each of the two daughter bacteria of a resistant bacterium to become resistantcompensated because of a mutation during replication r i Proportion at transmission of resistant bacteria within a host that was initially infected with i resistant and N -i sensitive Immune vs. Naive hosts ω Proportion of immune individuals in the host population q N Proportion of naive individuals in the host population who are antibiotictreated q I Proportion of immune individuals in the host population who are antibiotic-treated λ N

Mean number of contacts a naive host transmits the infection to λ I Mean number of contacts an immune host transmits the infection to

Systems of equations e i

Probability of extinction for an infection that was seeded in patient zero by i resistant bacteria and N -i sensitive bacteria T i,j

Probability that when a host, initially infected with i resistant and N -i sensitive bacteria, infects another host, it transmits j resistant bacteria and N -j sensitive ones.

where α 1 , α 2 and α 3 can be expressed from the initial conditions S(0), R(0) and C(0). The fractions s, r and c can then be obtained from this solution, e.g. through s = S/(S + R + C).

Generating function

Here, we present a full derivation of the generating function of the branching process in the case including three types of bacteria. For simplicity, we assume that there are no back-mutations and that all IgA-mediated clusters of bacteria are clonal. Let ℘ ij ({n kl }) be the probability that the first infected host, which is initially infected with i R bacteria, j C bacteria and N -i -j S bacteria, transmits: -0 R bacteria, 0 C bacteria and N S bacteria to n 00 hosts -... -k R bacteria, l C bacteria and N -k -l S bacteria to n kl hosts -... Note that 0 ≤ k, l ≤ N and 0 ≤ k + l ≤ N , where N is the bottleneck size. Thus, (N + 1)(N + 2)/2 ordered pairs (k, l) are possible, and we will denote by S the set containing all of them. As in Eq. 6.4, we distinguish four different cases, immune (I) and naive (N ), treated (t) or non-treated (nt), so that:

Immune and treated

N aive and treated + ω (1 -q I ) ℘ I,nt ij ({n kl })

Immune and untreated

N aive and untreated , (

where ω is the proportion of immune hosts in the population, and q I and q N are the probabilities of treatment for immune and naive hosts, respectively. The generating function of the branching process

can thus be expressed as

Immune and treated

N aive and treated

Immune and untreated As explained in the main text, in a fully naive population, starting from a host infected with only sensitive bacteria, the probability for this host to transmit at least one resistant bacteria is ≈ µ 1 GN (the proportion of resistant bacteria multiplied by the bottleneck size). Then the associated spread probability is 1 -e N 1 . In contrast, in a fully immune population, starting from a host infected with only sensitive bacteria, the probability to transmit at least one resistant bacteria is approximately 2µ 1 (N -1), the proportion of mixed clusters. Half of these mixed clusters bear only one resistant bacteria. A quarter of them comprise 2 resistant bacteria, and so on, so we can approximate that the corresponding spread probability by 1 -e I 1 . Combining our results yields:

This quantifies the impact of clustering on the spread of resistance in the case of a short incubation time. Note that in this regime, G is not very large, but it can still be much larger than 2, in which case Eq. 6.74 shows that the impact of clustering can be large.

Conclusion

Fat Moe: What have you been doing all this time? David "Noodles" Aaronson: Going to bed early.

-Once upon a time in America

In this thesis, we investigated the impact of environmental variability and population structure on the evolution and spread of antimicrobial resistance. Specifically, we developed stochastic minimal and generic models, which capture key biological ingredients of antimicrobial resistance, using methods inspired by out-of-equilibrium statistical physics. Our approaches are both analytical and numerical, and can be reused for other theoretical genetic population problems.

Chapter 1:

We defined what a microbe and an antimicrobial are. We explained our motivations through a historical overview of the issues raised by antimicrobial resistance. After briefly reviewing some relevant biological details of antimicrobial resistance, we explained why environmental variability and population structure likely impact the evolution and spread of antimicrobial resistance. A brief state of the art on the impact of environmental variability and structure on the evolution of microbial populations led us to the questions we want to answer, and the goals we want to achieve.

Chapter 2: In a microbial population of fixed size, we showed that fast alternations of phases with and without antimicrobial strongly accelerate the evolution of resistance, especially for large populations, reaching a plateau for sufficiently small periods. For a different duration of the phases with and without antimicrobial, we shed light on a minimum for the time taken by the population to fully evolve resistance. The corresponding dramatic acceleration of the evolution of antimicrobial resistance likely occurs in realistic situations, and may have an important impact both in clinical and experimental situations.