Evolution of the human pathogenic lifestyle in fungi

Fungal pathogens cause more than a billion human infections every year, resulting in more than 1.6 million deaths annually. Understanding the natural history and evolutionary ecology of fungi is helping us understand how disease-relevant traits have repeatedly evolved. Different types and mechanisms of genetic variation have contributed to the evolution of fungal pathogenicity and specific genetic differences distinguish pathogens from non-pathogens. Insights into the traits, genetic elements, and genetic and ecological mechanisms that contribute to the evolution of fungal pathogenicity are crucial for developing strategies to both predict emergence of fungal pathogens and develop drugs to combat them. Understanding the mechanisms and evolution of pathogenicity in fungi will bring us a step closer to reducing the annual toll of 1.6 million deaths from fungal disease.

W ith approximately 150,000 species described but perhaps as many as a few million more species awaiting discovery 1,2 , the kingdom of fungi is the lesser-known of the 'big' three eukaryotic kingdoms after animals and plants. Yet fungi are every bit as vital to our lives and the planet as animals and plants. Although fungi are intricately intertwined with human society, they remain largely unappreciated and understudied 3,4 . Unlike bacterial and viral pathogens, fungi have received less attention in the context of human disease 5,6 . However, recent data suggest that the global annual burden of fungal disease is enormous; superficial (for example, skin, hair, nail and eye) infections are estimated to affect a billion people, mucosal (for example, oral and vaginal) infections affect approximately 135 million, allergic infections affect about 23.3 million, and chronic severe and acute invasive infections affect several additional millions of people and have extremely high mortality rates 7 . The mortality rates in certain groups of severely immunocompromised patients with invasive aspergillosis can be as high as 50% 8 . Fungal diseases are responsible for more than 1.6 million deaths annually, a rate on par with that of tuberculosis and more than three times higher than that of malaria 7 . These are staggering numbers, especially considering how little is known about the biology of fungal pathogens and the lack of recognition of the effects of fungal infections on human health 3,6 .
One reason for the lack of attention to fungal pathogens lies in their opportunistic nature. In contrast to bacteria and viruses, fungi only emerged as important human pathogens in the past few decades, primarily owing to changes in the landscape of human disease 9 (Fig. 1); these changes include the dramatic increase in the number of immunocompromised patients (owing to mutations that impair host immune function, cancer chemotherapy or the effect of drugs that prevent transplant organ rejection) and the advent of new diseases that seriously compromise immune-system function (for example, AIDS). Unfortunately, but not surprisingly, fungal pathogens cause secondary infections in individuals with severe COVID-19 (Box 1). This opportunistic behaviour also means that many of the traits and genetic elements that make fungal pathogens virulent are not unique or specific disease determinants but have probably evolved for survival in conditions independent of human infection. Therefore, understanding fungal virulence requires understanding of the natural history, ecology and adaptations of fungi that facilitate their success in their natural environments.
This review discusses the where, why and how of the evolution of human fungal pathogenicity. First, the repeated evolution of fungal pathogenicity and where it took place on the fungal tree of life is presented. Next, the opportunistic nature of human fungal pathogens is discussed, including how their ecological traits can help explain why some fungal species infect hundreds of thousands of patients annually, while closely related fungal species are relatively harmless. Finally, this review tackles the question of how fungal pathogenicity evolved by discussing the types of genetic variation that give rise to variation in virulence. Fungal pathogenicity is the outcome of complex interactions between pathogens, human hosts and their environments (Box 2). However, this review does not cover the role of the human immune system [10][11][12] or the role of antifungal drug resistance in the evolution of fungal pathogenicity 13,14 , both of which are important topics and merit discussion in separate reviews.

Fungal pathogenic traits have evolved repeatedly
The kingdom Fungi is extraordinarily diverse and contains more than two hundred orders and a dozen phyla 15,16 , with new ones being described continuously 17 . However, the vast majority of infections and deaths caused by fungi result from a few hundred fungal species that belong to a few lineages (Table 1). These human fungal pathogens have evolved repeatedly from non-pathogens across major lineages of the fungal tree of life (Fig. 2). Plotting the genera harbouring the major human pathogens on the fungal tree of life reveals that human pathogenicity has evolved in more than a dozen different lineages. Interestingly, pathogenicity has also evolved repeatedly within some of these lineages, suggesting that they may harbour traits that pre-adapt them to human pathogenicity. For instance, pathogenicity has evolved multiple times independently in Aspergillus fungi 18 . As such, the closest relatives of the two major pathogens causing aspergillosis-that is, Aspergillus fumigatus ( Fig. 3) and Aspergillus flavus-are non-pathogenic [19][20][21] . Human pathogenicity has also evolved independently within Onygenales, the order that contains dermatophytes and dimorphic fungi 22 , as well as within Mucorales, which harbours the causative agents (Mucor, Rhizopus and their relatives) of the devastating disease mucormycosis 23 . Similarly, pathogenicity has evolved independently at least five times within budding yeasts 24,25 , including in the causative agents of candidiasis Candida (Nakaseomyces) glabrata and Candida albicans and in the emerging pathogen Candida auris (Fig. 2).
In some instances, several species within a lineage are human pathogens. These closely related pathogenic fungi often exhibit substantial differences in their pathogenicity. Although C. albicans and its closest known relative Candida dubliniensis are both human pathogens, C. albicans is much more virulent than C. dubliniensis 26 . Similarly, the closely related pathogenic species in the genus Cryptococcus, which cause the potentially lethal fungal disease cryptococcosis, display substantial variation in their virulence and pathogenicity (Box 2)-Cryptococcus neoformans primarily infects immunocompromised individuals, whereas Cryptococcus gattii infections primarily affect immunocompetent individuals 27,28 . The dozen pathogenic species in the Aspergillus section Fumigati also display considerable variation in their virulence and antifungal drug-resistance profiles 29 .
Differences in the pathogenicity of closely related species can be observed in large lineages of major pathogenic species such as  Discovery of Candida auris, which is now known to have caused infections in more than 30 countries from six continents, including nosocomial outbreaks, and its clinical isolates exhibit resistance to all known antifungal drugs 157,158 Outbreak of fatal infections by the fungus Saprochaete clavata, an organism not previously known to be a human pathogen, in multiple health care facilities in France 136 Outbreak of fungal meningitis primarily caused by Exserohilum rostratum, a very rare human pathogen, among patients that received contaminated steroid injections 137 First report of talaromycosis in Southeast Asia from a patient with Hodgkin's disease 97 First report of emergomycosis in a patient with AIDS in Italy 113 Dust from landslides caused by the Northridge earthquake and its aftershocks leads to an outbreak of coccidioidomycosis in the town of Simi Valley, California 131 in Malassezia-a genus of basidiomycete yeasts that contains several species adapted to living on the human skin 30 -as well as in the dermatophytes and dimorphic fungi in the order Onygenales. Onygenales harbours several different genera of so-called thermally dimorphic fungi, such as Blastomyces, Coccidioides, Histoplasma and Paracoccidioides, which grow in mycelial form in typical environmental temperatures (for example, 25 °C) but switch to yeast growth at human body temperature. These dimorphic fungi differ widely in their pathogenicity and disease profiles 31 . Another clade within Onygenales harbours multiple genera of dermatophyte fungi (such as Trichophyton, Epidermophyton and Microsporum) that can cause skin infections and exhibit a wide variation in pathogenicity 32 . Variation or heterogeneity in pathogenicity-associated genes and traits is not restricted between species and lineages but is also observed among strains within populations of fungal pathogens. This strain heterogeneity is both evolutionarily interesting (for example, for revealing the genetic or epigenetic mechanisms that contribute to the evolution of pathogenicity) and clinically relevant (for example, different strains often exhibit different virulence and antifungal drug-resistance profiles). Strains of C. albicans 33,34 , A. fumigatus [35][36][37] and other Aspergillus pathogens 38 exhibit extensive genomic and phenotypic heterogeneity in their virulence and drug-resistance profiles. Similarly, genetic diversity within the major pathogen C. neoformans is associated with patient clinical outcome 39 . Not much is known about the extent of this strain heterogeneity and how it may be influenced by differences in the sampling of strains between species or how species boundaries are defined. However, studies in Aspergillus have shown that the amount of variation in virulence observed within a major pathogen is lower than that observed between the pathogen and its non-pathogenic closest relatives 20,36,37 .
As mentioned earlier, a relatively small number of fungal species are considered major pathogens (Fig. 2). However, it is worth noting that the spectrum of fungi capable of causing disease is probably much larger and nearly every fungus can be an opportunistic or accidental pathogen in a human host whose immune system is severely weakened (see also Box 2). Support for this hypothesis comes from clinical case reports of invasive infections by diverse well-known species of fungi that are thought to be harmless to humans. These include the baker's yeast Saccharomyces cerevisiae 40 , the splitgill mushroom Schizophyllum commune 41 , the grey shag Coprinopsis cinerea 42 and the basidiomycete pigmented yeasts in the genus Rhodotorula 43 .
Human pathogenic fungi have originated independently multiple times across the fungal kingdom as well as within certain lineages, which highlights the remarkable versatility of these organisms and their ability to colonize new ecological niches, like those provided by human hosts. It should be noted that most of the human pathogenic fungi, such as pathogenic species in the genera Aspergillus, Candida, Cryptococcus, Histoplasma and Coccidioides, also infect many other animals, including other vertebrates and mammals 44 . These animal infections, much like human infections, are caused via direct acquisition of fungal spores from the environment, but zoonotic outbreaks with direct transmission from animals to humans (for example, cat to human transmission of Sporothrix brasiliensis 45 ) are also known 44 . Thus, much like human pathogenicity (Fig. 2), animal pathogenicity has also evolved multiple times independently across the fungal tree of life. Of course, the ability to cause disease in humans and the ability to cause disease in other warm-blooded animals are tightly linked as both rely on certain infection-relevant traits, such as thermotolerance (see the next section). Are these infection-relevant traits shared by human pathogens across the fungal tree of life? Answering this major question requires understanding the life cycle of a typical fungal infection and its opportunistic nature, which is discussed in the next section.

Ecological traits that aid opportunistic pathogenicity
Human pathogenic fungi differ greatly with respect to their degree of adaptation to their pathogenic lifestyles. At the one end of the spectrum one finds obligate pathogens such as Microsporidia, a phylum of unicellular fungi that are intracellular parasites of a wide

Box 1 | coViD-19 and fungal secondary infections
Viral respiratory infections can predispose patients to secondary opportunistic infections or co-infections by fungi and bacteria 143 . For example, it is well established that patients with severe influenza infections can sometimes acquire secondary Aspergillus infections 144 . Secondary fungal infections have also been recently associated with COVID-19, the ongoing global pandemic caused by the severe acute respiratory syndrome coronavirus 2 (SARS-CoV-2) 145 . A considerable percentage of patients with COVID-19 harbour secondary Aspergillus infections 146,147 and it is now widely recognized that COVID-19-associated pulmonary aspergillosis is an important complication in the context of COVID-19 infection 148 , especially in patients with severe lung damage, structural lung defects or who received broad-spectrum antibiotics or corticosteroids 149 . More recently, an increase in secondary infections with Mucor fungi has been noted in patients with COVID-19, which also seems to be the result of opportunism, namely severe COVID-19 infections in patients with poorly controlled diabetes mellitus 150 . The genomic and phenotypic characteristics of fungal isolates from patients with COVID-19-associated pulmonary aspergillosis do not seem to differ from those typically isolated from patients with aspergillosis 151 , although only a few isolates have so far been examined.

Box 2 | Pathogenicity and virulence
The two terms are often used interchangeably but have somewhat different meanings. Pathogenicity refers to the ability of an organism to cause disease, whereas virulence refers to the degree to which an organism is pathogenic. However, both terms actually reflect the outcomes of complex interactions between microbes, their hosts and their environments, so they are not absolute but relative 152 . The virulence of a specific fungal strain is often measured as the minimum dose of fungal spores required to kill 50% of individuals from a given host model of fungal disease (for example, mouse, fish or invertebrate). Furthermore, the virulence of a particular strain is typically compared with the virulence of a reference strain so that different strains can be readily classified as more or less virulent. Similarly, a fungal strain may be pathogenic-that is, capable of causing disease-in one host genetic background or model of fungal disease but not in another 153 .
This relativism in the definitions of these two terms has led some to develop alternative approaches that aim to quantify the capacity for causing disease. For example, Casadevall recently developed the 'pathogenic potential' measure, which takes into account the fraction of individuals that develop the disease, inoculum dose, host mortality as well as variables such as communicability and time to disease 152 . Other efforts have instead aimed to use existing approaches, such as the survival curves drawn for assessing the virulence of different strains in a given model of fungal disease in new ways. Cramer and Kowalski recently argued that survival-curve data can be used to identify and distinguish between 'disease initiation' and 'disease progression' virulence factors, which will enable the study of not just disease establishment but also disease progression 154 . range of animal hosts 46 . Passage through a host is a required part of the microsporidian life cycle and these pathogens have probably co-evolved with their hosts and possess adaptations for within-host survival. In the middle of the spectrum one finds organisms that have a commensal relationship with their hosts. For instance, the extracellular Pneumocystis yeasts cannot survive outside of a mammalian host (that is, they are host-obligate), turning pathogenic in hosts with weakened immune systems 47 . Budding yeasts that cause candidiasis are also commensal 48 , although they are not host-obligate and recent studies have shown that these species are also present in the natural environment 25,49 . It is probable that these commensals-turned-pathogens have also co-evolved, at least to some extent, with humans (in the case of budding yeasts) and mammals (in the case of Pneumocystis). However, the majority of the approximately 200 fungal pathogens that infect humans 9 lie at the other end of the spectrum; they are typically not dependent on their hosts for survival and growth, and their pathogenicity is accidental or opportunistic 50,51 . In nature, fungi are the primary decomposers of organic matter, growing on a variety of substrates and interacting with a wide range of organisms. Because most fungal pathogens are opportunistic, we can gain insight into their ability to infect humans by considering their natural environments. Soil, for example, is a common ecological niche where many opportunistic pathogenic fungi can be found. A single gram of soil harbours billions of microbial organisms from thousands of species belonging to dozens of taxonomic groups 52 . Survival in such a highly competitive environment requires many adaptations related to defence, feeding and growth, and it has been argued that pathogenicity-associated traits are precisely those that also facilitate fungal survival in nature 53,54 . A recent evolutionary ecological examination of more than 1,200 fungal species revealed a significant association between the ability to survive in multiple  Table 1) are shown in red and non-pathogenic taxa are shown in black. Fungal tree of life based on a phylogenomic analysis of 1,644 species and 290 genes from ref. 16 . Only species whose genomes have been sequenced are included. The tree with species names included is shown in Supplementary Fig. 1. Figure adapted with permission from ref. 16 , Elsevier. different types of extreme conditions (thermotolerance, osmotolerance and so on) and opportunistic pathogenicity 55 . For example, ascomycete fungi tend to be more widely distributed and thermotolerant than basidiomycete fungi 56,57 , which may be partly explain why there are more lineages of opportunistic human pathogens in ascomycetes than in basidiomycetes ( Fig. 2 and Table 1).
These observations suggest that understanding why fungi are such successful opportunistic pathogens will require detailed understanding of the natural fungal lifestyle and the ways in which the human host environment parallels their natural environment. One way to begin addressing this question is by examining the traits that distinguish pathogens from their non-pathogenic relatives. Differences in fungal pathogenicity may stem from variation in a wide variety of ecological traits, such as distribution and abundance 56,58 , ability to grow at human body temperature 57 , ability to adapt to varying levels of oxygen 59 , preference for sexual versus asexual reproduction 60 and their response to natural predators 61 .
If certain ecological traits are infection-relevant, it follows that we should expect human pathogens and their most closely related non-pathogenic relatives to exhibit significant differences in these traits. Although most research so far has focused on just the pathogens, comparisons between pathogenic species and their non-pathogenic relatives provide support for this prediction. For example, the major pathogen A. fumigatus grows better at human body temperature and is much more tolerant to oxidative stress or stress associated with nutrient and oxygen availability than its very close non-pathogenic relative Aspergillus fischeri 20 . Differences in the ability to grow at human body temperature are also observed between organisms in the pathogenic Cryptococcus species complex, which includes the major pathogens C. neoformans and C. gattii, as well as their closely related non-pathogenic relatives, such as Cryptococcus amylolentus 62,63 .
Closely related pathogens also exhibit differences in ecological traits associated with human pathogenicity. The pathogens C. neoformans and C. gattii differ substantially in their ecology (C. neoformans is more often associated with bird infections, whereas C. gattii with mammal infections), thermotolerance and melanin production 27 . For human skin commensals, such as Malassezia yeasts and dermatophytes, different species are typically associated with different body sites 30,64 . Even in cases where little is known about the natural history of a lineage that harbours pathogenic species, the available evidence is suggestive of key differences in ecology. For example, the three most common causative agents of sporotrichosis-S. brasiliensis, S. schenckii and S. globosashow substantial differences in their geographical distribution and transmission routes 65 . S. globosa, which is most prevalent in Asia, is commonly isolated from plant material and wounds caused by such material are the main route of S. globosa human infection on this continent; infections by S. schenckii, which is most common in South Africa and Australia, also typically stem from an environmental transmission route 45 . In contrast, the main route for human infections by S. brasiliensis, which is most prevalent in Brazil, is via infected domestic animals such as cats and dogs 45 .   Examination of some of these ecological traits has been key to our understanding of fungal pathogenicity and how it may have evolved. Many opportunistic fungal pathogens are saprophytic organisms that live in the soil where they are predated on by diverse organisms, such as amoebae, whose functions in the natural environment can be perceived to parallel those of phagocytes in the human host environment 66 . This hypothesis, which was first raised and tested in 2001 with C. neoformans, yielded two striking results: first, the fungal interactions with amoebae were similar to interactions of the fungus with macrophages and second, several traits, such as melanization, that contribute to fungal resistance against mammalian immune cells also provide protection from amoeba predation 66 . These discoveries have spearheaded a body of work examining how the coevolution of fungi with their natural predators may have accidentally favoured or selected for the evolution of human pathogenicity and ability to withstand host defence strategies 61,67 not just in Cryptococcus 68,69 but also in other soil fungi, such as Aspergillus 61 and Paracoccidioides 70 . A recent examination of the interactions between Paracoccidioides opportunistic fungal pathogens and their natural amoeba predators showed that repeated exposure of Paracoccidioides to predatory amoebae increased the ability of these fungi to survive mammalian macrophages and to infect mice 70 . Interestingly, studies on Cryptococcus have shown that prolonged growth in the presence of predatory amoebae selected for mutations that promote pseudohyphal (rather than yeast) growth, which increase resistance to macrophages but reduce virulence 68,69 . Data are lacking on whether this variation is observed in the natural environment but raise the hypothesis that interactions of fungi with other organisms may generate substantial phenotypic diversity that is relevant for the capacity of individual strains to infect humans.
One prediction that follows from the repeated evolution of human pathogenic fungi is that several of their infection-relevant ecological traits may also have evolved repeatedly (convergent evolution). For example, thermotolerance is widely regarded as a key trait for fungal pathogens of humans and other warm-blooded animals, and harbours this signature of convergent evolution 57 . Another trait that has repeatedly evolved in human pathogenic fungi is osmotolerance 55 . One particularly noteworthy example of convergent evolution is the developmental ability of certain human pathogenic fungi to switch between filamentous (or mycelial)  hybridization (e). In a,b, the yellow and blue colours represent the two sets of homologous chromosomes. In d,e, the letters represent different taxa. In d, the green arrow illustrates the introgression of a genomic region from taxon B into the genome of taxon C. In e, the red branch leading to taxon D is meant to illustrate the origin of a new hybrid. f-i, Other types of variation typically affect a single locus; these include copy number variation (f), horizontal gene transfer (g), single nucleotide polymorphisms (h), cis-regulatory-element variation (i) and gene duplication and loss (j). f, Copy number variation could involve linear or circular DNA. In j, the red and blue lines denote the differential fates of a pair of duplicate genes. In i, the coloured boxes correspond to different cis-regulatory elements and the arrows to the gene transcription start sites. Most identified examples of genetic variation concerning the evolution of human fungal pathogens focus on or concern variation in the protein-coding regions of the genome (a-h,j). However, variation of cis-regulatory elements, which can alter gene activity, can also have a major impact in the evolution of fungal pathogens (i). We currently lack understanding of the relative frequency with which these mechanisms operate in different fungal pathogens. It is also probable that these mechanisms differ in their prevalence in fungal genomes. Figure adapted with permission from: a, and yeast growth, which has evolved multiple times independently across multiple fungal phyla 71 and is observed in diverse pathogens, including C. albicans and C. neoformans. Some of the most notable examples of organisms that exhibit this morphogenetic switch are the thermally dimorphic fungi that have independently evolved in the orders Onygenales (for example, Histoplasma¸ Blastomyces, Coccidioides and Paracoccidioides) and Ophiostomatales (which includes Sporothrix); the trait also evolved independently in Talaromyces marneffei (order Eurotiales) 72 . In these thermally dimorphic fungi, the switch from filamentous to yeast growth during infection confers protection against host defence responses 72 . Interestingly, whereas thermal dimorphism is widespread in the orders Onygenales and Ophiostomatales, only a single species from the order Eurotiales (T. marneffei) is known to be dimorphic 71 .
Once associated with human hosts, fungal survival and reproductive strategies may quickly diverge from strategies favoured when they are in their natural environments. Comparisons of clinical and environmental strains of S. cerevisiae have revealed that clinical strains show higher levels of heterozygosity, a reduced ability for sexual reproduction and an increased propensity for pseudohyphal development than environmental strains 60,73 .
Finally, it is worth noting the potential limitation of this evolutionary approach, namely the assumption that diverse fungal pathogens share infection-relevant ecological traits. Although the examples discussed above suggest that this is indeed the case for traits such as thermotolerance and osmotolerance, the question remains whether there are other convergent traits shared by opportunistic human fungal pathogens. A non-mutually exclusive alterative is that understanding of fungal pathogenicity will require a detailed dissection of the interactions of each pathogen with the human host because each pathogen has its own unique suite of infection-relevant ecological traits. One notable example of this alternative hypothesis is secondary metabolites, which are small, bioactive molecules biosynthesized by certain fungi that play key roles to their ecology. Secondary metabolites produced by fungal pathogens such as A. fumigatus have been shown to influence host biology and pathogenicity 74 . However, the ability of several other pathogens to biosynthesize secondary metabolites is either limited (for example, C. albicans and C. neoformans) or is reduced relative to their non-pathogenic relatives (for example, dimorphic fungi 75 ).
Bridging evolutionary analyses with targeted genetic studies can elucidate the genetic basis of several infection-relevant ecological traits in fungal pathogens and help refine our concept of how fungal pathogenicity evolves. The next section describes how genetic variation associated with these traits has contributed to the evolutionary origin and maintenance of fungal pathogenicity.

Fungal genomics and human pathogenicity
Fungal pathogenicity is the outcome of complex interactions between the pathogens, human hosts (immune-system status of the host) and their environment (for example, spore availability; Box 2). Although host genetics, host immune-system status and environment certainly contribute to the manifestation of fungal disease, differences in genetic elements associated with infection-relevant ecological traits are also major contributors. Genetic variants that have contributed to the evolution of fungal pathogenicity can be broken down into two broad categories or types: larger-scale genomic changes that affect the entire genome or large parts of itsuch as hybridization 76 , introgression 77 , transposon mobilization 78 , loss of heterozygosity 79 and variation in ploidy 79 -and smaller-scale changes that typically affect a single genomic region-such as copy number variation 80 , gene duplication 81 , gene loss 75 , horizontal gene transfer 82 , indels and single nucleotide polymorphisms 33 (Fig. 4). It is also important to emphasize the remarkable plasticity of fungal genomes with respect to the range of mechanisms and processes that can give rise to this genetic variation, including the diversity of their reproductive strategies 83 .
Comparisons of the genomes of pathogenic fungi and their non-pathogenic relatives have identified numerous large-and small-scale genomic differences associated with the origins of pathogenicity, implicating many genes with diverse functions 84 . One notable difference between thermally dimorphic fungal pathogens and their non-pathogenic relatives is that pathogens have lost secondary metabolic genes and genes associated with the degradation of plant material 75 . Similarly, a recent comparative genomic examination of the host-obligate Pneumocystis species revealed extensive between-species variation in the msg superfamily, whose members are involved in pathogen-host interactions 81 . An examination of horizontal gene transfer in Malassezia identified more than two dozen genes that were probably acquired from bacteria, including a flavohaemoglobin-encoding gene, which was shown to be involved in nitric oxide resistance and interaction with the human host 82 . Comparisons between pathogenic and closely related non-pathogenic Aspergillus species have revealed extensive differences in the presence of biosynthetic gene clusters involved in secondary metabolite biosynthesis 85 ; several of these bioactive small molecules are known to be important to Aspergillus ecology and to modulate human host biology 74 .
Although many of the known variants are from the protein-coding parts of the genome, differences in the regulation of genes that are conserved in both pathogens and non-pathogens can also contribute to differences in pathogenicity. As mentioned earlier, C. albicans and C. dubliniensis differ in their virulence but are very closely related and do not contain many differences in gene content 86 . However, a systematic examination of differences in gene expression of orthologous genes between the two species revealed that all 15 genes involved in glycolysis were more highly expressed in C. albicans than in C. dubliniensis 26 . Strikingly, genetic engineering of a C. dubliniensis strain that expressed all 15 glycolysis genes at higher-than-native levels led to an increase in virulence 26 . Thus, much like the case for other traits 87,88 , changes in pathogenicity and infection-relevant traits may stem from genetic changes in both the protein-coding and regulatory parts of the genome.
Genetic variants associated with pathogenicity are also found in examinations of within-species variation, an observation in line with the heterogeneity in infection-relevant traits seen between strains of individual fungal pathogenic species. Strains of the major pathogen A. fumigatus show variation in the structure of their biofilms, which influences the ability of strains to grow in low-oxygen environments, such as that encountered inside human lungs. Interestingly, this variation stems from variation in the presence of the hrmA gene across A. fumigatus strains 35 . Similarly, examination of genomic variation in strains of the major pathogen C. albicans identified numerous genetic changes, including single nucleotide polymorphisms, that contributed to strain variation in virulence and other infection-relevant traits 33 . Comparison of clinical and environmental S. cerevisiae strains revealed higher levels of heterozygosity in the clinical strains and identified significant associations between specific genetic variants and pathogenicity-associated phenotypes, such as increased copper resistance 60,73 .
Looking into the past and reconstructing how pathogenicity evolved using comparative genomics is one approach towards understanding the observed differences between pathogens and non-pathogens. An independent approach is to ask how pathogenicity could evolve, which can be achieved through experimental evolution approaches 89 . Such experiments typically select (over many generations) those individuals in a fungal population that show increased survival or growth in a particular environment (such as the oral cavity 90 ) or that exhibit a particular infection-relevant trait (such as thermotolerance 91 and reduction 92 or increase of virulence 93 ). Repeated passage of environmentally derived isolates of C. neoformans through mice results in significant increases in virulence 93 . This is, at least partly, due to the higher expression of the FRE3 gene, which encodes for an iron reductase. In the commensal C. albicans, experimental evolution for loss of virulence via repeated passaging through a mammalian host identified key genes and traits associated with the transition from commensalism to mutualism 92 . In addition, repeated passage of the same species through the oral cavity 90 and gastrointestinal tract 94 of mice led to the identification of a chromosome 6 trisomy that was shown to result in a commensal-like phenotype (in the oral cavity experiment 95 ) and a chromosome 7 trisomy that increased fitness in the gastrointestinal tract 94 .
Finally, it is worth noting that some of the examples mentioned concern genetic mechanisms that contributed to the origin of human (and/or animal) pathogenicity in the first place (for example, gene content variation stemming from differential gene duplication and loss between pathogens and their non-pathogenic close relatives). Other examples concern genetic mechanisms that shaped adaptation during evolution inside the human host or in response to interventions, such as treatment with antifungal drugs (for example, variation in ploidy, heterozygosity and gene copy number). We currently lack an understanding of the relative frequency with which these mechanisms operate in different fungal pathogens and their relative importance for the origin of pathogens versus the maintenance of the human pathogenic lifestyle.

outlook
In the last two decades, adoption of an ecological and evolutionary perspective, coupled with the huge advances in genomics, has revolutionized medical mycology 83,84 , greatly illuminating the broad contours of the where, why and how of the evolution of fungal pathogenicity. But several major gaps remain, including our understanding of the genetic and ecological factors that contribute to the emergence of new human fungal pathogens. In a planet with a rapidly changing climate that has witnessed the emergence of several new pathogens (Box 3), forecasting the emergence of new pathogens is becoming more urgent than ever 9,51 . Understanding how pathogens evolve as well as figuring out the genetic determinants that contribute to the origin and maintenance of fungal pathogenicity could aid in the identification of potential vulnerabilities that could be targeted for new therapeutics 13,14 . Three grand challenges that, if tackled, promise to greatly advance our understanding of the origins of fungal pathogens of humans, potentially facilitating the development of models that predict the emergence of new ones and of therapeutics that better combat fungal infections are discussed below.
The challenge of understanding fungal biodiversity and ecology. This is arguably the biggest knowledge gap, especially considering the opportunistic nature of most major fungal pathogens and the frequent emergence of new ones. We still lack a fundamental understanding of the diversity of fungal species 1,2,96 . Even for the small fraction of species that are known to science, including most fungal pathogens, we do not typically know their natural distribution and ecological niches or how pathogenic and non-pathogenic fungi interact with other organisms in nature. Although some of that knowledge is available for certain pathogens (for example, the natural reservoirs of T. marneffei in wild rodents are well-defined, linking the ecology of the organism with disease epidemiology 97 ), it is lacking for many others, hindering efforts to understand their biology and epidemiology. For instance, we do not know the environmental reservoirs, if any, of Pneumocystis species 98 , the zoonotic reservoirs for many microsporidian human pathogens 46 or the ecology of the emerging Sporothrix human pathogens 65 .
The challenge of systematically characterizing pathogens and non-pathogens. In most lineages harbouring pathogens and their non-pathogenic relatives, we lack data on the phenotypic profiles of the non-pathogens and their growth characteristics in infection-relevant conditions; for many non-pathogenic relatives of major pathogens (such as C. glabrata 99 and A. fumigatus 18 ), there is a paucity of data on their ability to grow at 37 °C and their tolerance to various infection-relevant stresses. This lack of systematic data collection with respect to fungal biodiversity and ecology as well as characterization of pathogens and non-pathogens makes it difficult to begin to understand and make predictions of where new human pathogens are more likely to emerge from. From lineages that are thermotolerant or extremotolerant? From lineages that harbour fungal pathogens of other mammals? From lineages that live in extremely competitive environments or are widely distributed geographically? Temperature growth assays have shown that species in the pathogenic C. neoformans or C. gattii clade have the capacity to grow at human body temperature, whereas their closely related non-pathogenic relatives do not, suggesting that the ability to grow at human body temperature evolved in the ancestor of the pathogen clade. Thus, evolution of thermotolerance is tightly coupled to the evolution of pathogenicity in Cryptococcus, but whether this pattern is observed in other clades containing fungal pathogens remains unknown. Although several hypotheses have been proposed and associations have been drawn, systematic testing of these hypotheses is lacking, largely because of the historical unavailability of large synthetic datasets that contain the high-quality data necessary to address these questions. Large-scale datasets of genomic 100 , evolutionary 16,101,102 , taxonomic 103 and ecological 104 diversity of fungi are going to be invaluable in this synthesis.

Box 3 | climate change and the evolution of new fungal pathogens of humans
Fungal populations can readily respond to selection for growth at higher temperatures in experimental evolution studies 91 . Given that most fungi typically grow at lower temperatures and the relatively high temperature of the human body is likely to act as a preventive barrier for their growth, it has been hypothesized that increasing global temperatures will inadvertently select for thermotolerant fungi that are more likely to cause opportunistic human disease 155 . Evidence for this global warming emergence hypothesis has been increasing 156 .
Arguably one of the most fascinating (and frightening) examples concerns the emergence of the novel pathogen C. auris. First discovered in 2009, this new pathogen is now known to have caused infections in more than 30 countries from six continents, including nosocomial outbreaks, and its clinical isolates exhibit resistance to all known antifungal drugs 157,158 . Remarkably, infections on different continents occurred almost simultaneously and originated from different lineages of the C. auris phylogeny 159 . It therefore seems that there was not one emergence of C. auris but multiple simultaneous ones.
But how did C. auris emerge and where did it come from? The short answer is that we do not definitely know because little is known about the ecology and geographical distribution of the organism but the current working hypothesis is that this might be the first fungal disease that has originated due to global warming 160 . Recent support for this hypothesis came from the isolation of C. auris from the coastal wetlands of the tropical Andaman Islands, India 161 , suggesting that the organism has an environmental reservoir and strains infecting patients could have been environmentally acquired.
The challenge of understanding the relationship between genotype and phenotype for pathogenicity-and virulence-related genes and traits. The amount of genomic and phenotypic variation or heterogeneity in pathogenicity across human fungal pathogens remains largely unknown. Research in S. cerevisiae, where clinical strains show a reduced ability for sexual reproduction and an increased propensity for pseudohyphal development, raises the hypothesis that fungal survival and reproductive strategies favoured inside human hosts will be distinct from those in their natural environments 60,73 , but we still lack understanding of the degree and speed with which fungi can alter these key traits to adapt to the human host environment. We also lack understanding of how much of the observed phenotypic variation has a genetic basis, and the heritability of most infection-relevant traits in most pathogens remains unknown. This makes it challenging to infer what cellular pathways should be targeted for the development of fungal vaccines and antifungal drugs. For example, a recent study showed that genetically identical asexual spores of different fungal species, including those of the pathogens A. fumigatus and T. marneffei, exhibit substantial phenotypic diversity 105 . However, diverse approaches are now available to study the proportion of phenotypic variation that stems from genetic variation, including genome-wide association studies 106,107 , reverse ecology 84 as well as a range of phylogenetic methods 108 . These analyses can link the genotypic and phenotypic variation observed not only within but also between fungal species.

conclusion
Now that fungal genomes can be sequenced in the hundreds and thousands, and tools that enable the genetic and molecular dissection of infection-relevant traits have been developed, the limiting factor in tackling pathogenic fungi is a better understanding of fungal ecology and natural history. Which lineages and ecological lifestyles will human fungal pathogens emerge from? What are the key genetic and ecological differences that distinguish pathogenic fungi from their non-pathogenic relatives? Answering these vital questions will require the synthesis of genomic, evolutionary and ecological features of fungal lineages.