{'fraction_non_alphanumeric': 0.026098026734563972, 'fraction_numerical': 0.010161862326088933, 'mean_word_length': 5.30034374104841, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 10, 'lorem ipsum': 0, 'www.': 11, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Tracking virus outbreaks in the twenty-first century

Emerging viruses have the potential to impose substantial mortality, morbidity and economic burdens on human populations. Tracking the spread of infectious diseases to assist in their control has traditionally relied on the analysis of case data gathered as the outbreak proceeds. Here, we describe how many of the key questions in infectious disease epidemiology, from the initial detection and characterization of outbreak viruses, to transmission chain tracking and outbreak mapping, can now be much more accurately addressed using recent advances in virus sequencing and phylogenetics. We highlight the utility of this approach with the hypothetical outbreak of an unknown pathogen, ‘Disease X’, suggested by the World Health Organization to be a potential cause of a future major epidemic. We also outline the requirements and challenges, including the need for flexible platforms that generate sequence data in real-time, and for these data to be shared as widely and openly as possible.

merging infectious diseases present one of the greatest public health challenges of the twenty-first century. Among these are zoonotic viruses that originate from reservoir species, often mammals, and jump to humans to cause disease syndromes of varying form and severity. An emerging virus, depending on its ability to transmit among humans, can lead to individual or a few sporadic cases, resulting in a localized outbreak that requires public health intervention or, in the worst scenarios, can develop into a large epidemic or global pandemic. Such emergence events over the past two decades are numerous and varied. They include viruses not previously encountered, such as the SARS and MERS coronaviruses [1][2][3] , and familiar foes that have reappeared to cause outbreaks, such as swine-and avian-origin influenza 4,5 , and Ebola 6 and Zika 7 viruses. Although many outbreaks end naturally or are controlled quickly, questions remain over how best to scientifically respond to these events.
The broad-scale factors responsible for viral emergence have been well documented and include human population growth, increased frequency and reach of travel, changing patterns of land use, changing diets, wars and social upheaval and climate change 8,9 . These factors increase interactions between humans and reservoir hosts, facilitating exposure to zoonotic viruses and spillover infections in people, and allow emerging viruses to spread more easily through human populations. The interactions between virus genetics, ecology and the host factors that determine virus emergence are so complex that it is impossible to predict what virus will cause the next epidemic, making it essential that our response is scientifically informed, robust and efficient 10 .
The emergence of virus outbreaks generates a set of common questions, whose answers are central to disease mitigation and control (Table 1), and which at times can only be answered by sequencing of viral genomes. These include what is the virus, is it novel, or does it represent the re-emergence of a known pathogen; what is its mode of transmission; where does the emerging virus come from (in particular, what is its reservoir host and/or geographic source); what ecological factors underpin its emergence; how many introductions into humans have there been; what is the timing of these introduction events, and was there a period of undetected transmission before the first reported case; during flare-ups and future outbreaks, how are they connected to previous events; and what is the nature of virus evolution and is there evidence for local adaptation? In the past, many of these of questions were addressed using case (incidence) data, which led to estimates of key epidemic parameters such as the basic reproductive number (R 0 , the expected number of secondary cases produced by each case at the start of the outbreak) that were used to inform epidemic control policy. Although still of fundamental importance, case data alone cannot inform public health management with the level of precision necessary for all targeted interventions. Recent advances in virus genome sequencing and phylogenetic analyses, however, mean that we are now in a position to answer such questions with molecular precision, and open new areas of investigations not previously possible based on epidemiological data alone (Table 1).
Virus genomics have been used to investigate infectious disease outbreaks for several decades. This is possible because viruses, particularly those with RNA genomes, generate genetic variation on the same timescale of virus transmission, through a combination of high rates of mutation and replication 11,12 . Consequently, it is possible to infer epidemiological and emergence dynamics from virus genomes sampled and sequenced over short epidemic timescales. We term the science of using genomics and associated analyses 'genomic epidemiology' .
Initially, genomic approaches relied on indirect methods (for example, restriction fragment length polymorphisms 13 ) to infer Tracking virus outbreaks in the twenty-first century Nathan D. Grubaugh 1,2 , Jason T. Ladner 3 *, Philippe Lemey 4 , Oliver G. Pybus 5 , Andrew Rambaut 6,7 *, Edward C. Holmes 8 * and Kristian G. Andersen 1,9 Emerging viruses have the potential to impose substantial mortality, morbidity and economic burdens on human populations. Tracking the spread of infectious diseases to assist in their control has traditionally relied on the analysis of case data gathered as the outbreak proceeds. Here, we describe how many of the key questions in infectious disease epidemiology, from the initial detection and characterization of outbreak viruses, to transmission chain tracking and outbreak mapping, can now be much more accurately addressed using recent advances in virus sequencing and phylogenetics. We highlight the utility of this approach with the hypothetical outbreak of an unknown pathogen, 'Disease X', suggested by the World Health Organization to be a potential cause of a future major epidemic. We also outline the requirements and challenges, including the need for flexible platforms that generate sequence data in real-time, and for these data to be shared as widely and openly as possible.
genotypes and differentiate between virus strains. As direct sequencing technologies advanced, there was a transition toward the use of nucleotide sequences from fragments of virus genomes for this purpose [14][15][16][17][18][19][20][21] . Now, thanks to advances in high-throughput sequencing and decreasing costs 22 , most virus genomics studies utilize data sets containing tens to thousands of (near) complete virus genomes.
In this Review Article, we will show how our ability to track and understand infectious disease outbreaks have been revolutionized by the addition of virus genomics data. We will highlight the varied uses of virus genomics during the different stages of viral outbreaks, from initial virus detection to understanding the factors contributing towards global spread (Box 1). We will show how genomic epidemiology can be used to track the spread of emerging viruses, where the challenges lie, and establish an agenda for future work. Although we focus on human disease, the genome-based methodologies that we describe can be equally applied to animal and plant infections. Similarly, the increasing ability to rapidly sequence complete genomes of bacterial species means that these technologies offer much to the study of emerging bacterial disease, including those associated with antimicrobial resistance.

Outbreak detection
Most infectious disease outbreaks start with clinicians noticing unusual patterns. Patients may present with patterns of symptoms that are similar to those of more common diseases, but which, after repeated observation and diagnostic testing, may deviate in scale, seasonality or severity. At this very beginning of an outbreak, the most critical task is therefore to identify a causal pathogen. Historically, virus identification has been performed using molecular tools, such as polymerase chain reaction (PCR) and enzymelinked immunosorbent assay (ELISA), that directly recognize pathogen-derived material (Box 2), or conventional non-molecular techniques, such as microscopy. The advent of untargeted metagenomic sequencing directly from clinical samples, however, means that we are now on the cusp of being able to detect human viruses in a single step, without a priori knowledge of putative causal pathogens (Box 2). The major advantage of sequencing-based approaches is the ability to detect novel viruses-such as the initial appearances of SARS 2 , MERS 3 or Lujo virus 23 -or unexpected ones, as exemplified by Ebola virus during the 2013-2016 epidemic in West Africa 24 .
Once an outbreak has been detected and a causal virus identified, several basic questions can immediately be answered about the virus itself, including: (1) whether it is novel or previously known to infect humans; and (2) if we have the diagnostics, vaccines and therapeutics available to fight it. Importantly, the generation of virus genomics data at this stage will provide deeper insights into these questions by uncovering molecular details not possible with conventional tools. Phylogenetics will also provide an additional level of detail, revealing virus origins, evolutionary characteristics and connections to previous outbreaks in the same region, or to transmissions in other regions 6 . Given high enough relatedness to other members of a virus family with well-defined reservoir hosts (for example, old-world arenaviruses 25 ), the sequence identification of novel virus species can also be informative about potential reservoirs.

First snapshot of an outbreak
Immediately after a viral outbreak has been identified there exists a 'fog-of-war' . The extent of the outbreak, the timing and nature of its source, and the contribution of human-to-human transmission will be extremely limited, yet these data are critical to designing effective responses. Genomic epidemiology, if applied quickly and comprehensively, holds the potential to answering these questions 24 .
To provide an initial snapshot of an outbreak, it is important to understand the diversity of circulating viruses from as many cases as possible. Virus genetic diversity, measured as the average number of nucleotide differences among viruses in the population, will increase as an outbreak progresses due to the accumulation of genetic changes in virus genomes at each round of viral replication 6 . If this rate of mutational accumulation is relatively constant-that is, it conforms to a 'molecular clock' of evolutionary change 26 -then the rate at which it occurs (referred to as the 'evolutionary rate') allows us to estimate when the sequenced viruses last shared a common ancestor. Critically, this provides a lower bound on when an outbreak began, and how long the virus had been circulating prior to discovery 5,27,28 . If the virus genomes have been sampled over only Examples of commonly used software packages for genomic epidemiology investigations are available at: http://www.virological.org/c/software.

Box 1 | Outbreak of Disease X: a hypothetical scenario
In addition to the Ebola, SARS and Zika viruses, the WHO watchlist of viruses that may lead to public health emergencies 98 acknowledged for the first time that the next serious epidemic may be caused by a currently unknown virus-Disease X. Its inclusion emphasizes the need for flexible and deployable platforms to understand and combat disease outbreaks of many varieties. Most likely, Disease X may be a known microorganism believed to cause no or mild human disease, as was the case for Zika virus before its epidemic in the Americas. Disease X could emerge anywhere in the world and, given the mobility of human populations, it could spread to distant and highly populated regions within days or weeks. To illustrate how genomic epidemiology can successfully reveal important aspects of disease emergence and inform epidemic control efforts, we present a hypothetical scenario in which Disease X successfully jumped into humans, established sustained transmission and caused severe disease. In Miami, Florida (United States), a 22-year-old man sought medical assistance after an influenza-like illness suddenly progressed to a dangerously high fever and laboured breathing. He reported golfing activity at nearby resorts, harbouring clusters of wildlife, including birds. He was admitted into the emergency room and within 3 days died of pneumonia. During this time, 5 other young adults presented with similar symptoms to Miamiarea hospitals. Standard molecular diagnostics for commonly suspected pathogens were negative, but immunoglobulin M antibodies collected from each patient were slightly cross-reactive to MERS and SARS coronaviruses. Since the virus could not be conclusively identified with conventional assays, metagenomic sequencing was used to identify Disease X as a novel human virus, most closely related to other coronaviruses in ducks (see figure, panel a). Importantly, due to the relatedness of the novel virus to a family of viruses with well-defined host-ranges, these data led to a hypothesis about its potential origin and reservoir (overwintering migratory birds in the nearby Everglades wetlands) and allowed for the development of virus-specific diagnostics and targeted sequencing approaches.
Within 3 weeks, there were 40 new laboratory-confirmed Disease X cases, including 8 from healthcare workers who contacted the original 6 cases, and 5 total deaths (an 11% apparent case fatality rate). Targeted sequencing from 15 patients and related viruses, including from ducks across Southern Florida, revealed that the human Disease X viruses clustered together on a phylogenetic tree and shared a common ancestor with virus genomes from ducks near Palm Beach, suggesting there was a single zoonotic spillover event and subsequent human-tohuman transmission (panel b). A molecular clock phylogenetic analysis further indicated that the common ancestor of the human viruses existed several months ago, suggesting that the first patient identified was not the first case of the outbreak, and highlighting the possibility of many more unreported or asymptomatic cases.
As the outbreak progressed, there was a critical need to understand transmission to help control further spread. Traditional epidemiology, including contact tracing, provided Real-time genomic investigation of Disease X. a, Metagenomic sequencing revealed that Disease X, which could not be identified using standard clinical assays, was a novel virus. b, Targeted sequencing from additional human cases and from related viruses uncovered the likely animal reservoir, the time period that it was introduced into the human population (represented by * in the lower panel), and that subsequent transmission was humanto-human. c, More intensive virus genome sequencing was used to construct detailed transmission chains and identify potential control measures. d, Layering additional climatic (pictured in the lower panel; https://www.climate.gov/maps-data), transportation, geographic, economic and demographic information into a large phylogenetic data set revealed the risk factors that facilitated local and global spread. Images and icons courtesy of S. Knemeyer.

a b c d
Spread Transmission chain Snapshot Detection * a limited time-scale, so that only a few mutations have accumulated in the virus population, then evolutionary rates will need to be based on those from prior outbreaks or extrapolations from related viruses 29 . Later in an epidemic, when viruses have been sequenced over a sufficient period of time to capture mutational accumulation, evolutionary rates can be readily estimated directly from virus genomes sampled during the outbreak [30][31][32] . Evolutionary rate estimates, however, can be sensitive to model specification over short periods of time 33 and depend on the timescale of measurement 34 . Such issues, as well as the unwarranted implications about changes in transmissibility and virulence that may accompany seemingly inflated evolutionary rates, have been discussed in detail in the context of the 2013-2016 Ebola epidemic in West Africa 6 .
A common approach to phylogenetic analysis of the genetic diversity of a virus population is to infer a tree from sampled virus genomes with branches measured in units of time (that is, a rooted, time-calibrated tree). This can provide estimates of the date of the last common ancestor at the root of the tree, as well as each individual branching event. As an approximation, these branching events correspond to virus transmission from one case to the next, an insight that offers further key information about the unfolding outbreak 35 . In addition, models of how the process of virus transmission relates to the shape of phylogenetic trees ( Fig. 1) enable important epidemiological inferences. In particular, coalescent models relate the rate at which virus lineages of a phylogenetic tree merge, as common ancestors, to the size of the epidemic. This uses the simple premise that, for a sample of virus genomes, the larger the outbreak is, the further back in time the common ancestor will be found (Fig. 1a-c).
Early in an outbreak, one of the primary concerns is to understand the rate at which the virus may be spreading through the human population. As noted in the introduction, this can be assessed by estimating R 0 , which is critical for epidemiological projections and for planning public health responses. While R 0 can be calculated through epidemiological analyses of case counts, accurate estimates of such data may not be available early in an outbreak, since they require a time-series of cases. As demonstrated during the early spread of the novel influenza A/H1N1 virus in 2009, phylogenetic inference of epidemic growth based on virus genomics can provide estimates of R 0 comparable to that inferred from case data 36 . These calculations can be performed using coalescent models that directly estimate R 0 , based on classic susceptible-infectedrecovered (SIR) models 37,38 . A similar group of models analyse patterns of lineage birth-death, linking the shape of trees to the rate at which virus lineages split and go extinct, and have recently gained popularity 39,40 . Both approaches were applied during the 2013-2016 epidemic in West Africa to calculate R 0 to assess Ebola virus transmission dynamics, and illuminated the impact of 'superspreader' events 41,42 . All of these methods, however, are beholden to the inherent uncertainty of genome sequence data, especially at the start of an epidemic where such sequences exhibit limited variability and sampling may be biased. Hence, phylogenetic estimates of R 0 , although probably indicative of broad characteristics such as epidemic growth, may not be precise enough to make critical decisions in the absence of corroborating (epidemiological) information.
The initial snapshot of virus genome sequences can also provide critical insights into the role of a zoonotic transmission during an outbreak (Fig. 1d). Genomic analyses, for example, revealed that Lassa fever virus, which is endemic in West Africa 43 , primarily spreads via repeated transmission from local rodent reservoirs, as opposed to sustained human-to-human transmission 44 . This is in contrast to Ebola virus during the 2013-2016 epidemic in West Africa, where genomic epidemiology showed that the outbreak was the result of a single zoonotic spillover, followed by sustained human-to-human transmission 45 .
Given availability of virus genomes from potential zoonotic reservoirs, another aim of early virus sequencing from an outbreak is to uncover the identity and geographic location of the reservoir host. The influenza A/H1N1 pandemic that started in 2009 was quickly recognized as being a likely species jump from pigs, as all of the virus genomic segments closely matched those previously seen in swine 4,5 . Like the 2013-2016 Ebola epidemic in West Africa, the influenza A/H1N1 pandemic probably started as a single introduction into humans that occurred a few months before it was detected 5 . The initial suspicion, and later confirmation, that the spillover occurred in Mexico, was complicated by a lack of widespread zoonotic genomic surveillance in this region. Retrospective sequencing of samples from Mexican pigs, however, showed that there were close relatives of the human virus circulating in this country at the time of the epidemic, confirming its origin 46 .

Transmission chain tracking
Beyond the initial characterization of an outbreak, virus genome sequencing offers enormous potential for determining transmission chains to understand networks of 'who-infected-whom' . The tracking of transmission chains has long been a standard part of public health responses to outbreaks, providing critical information that can be used to interrupt virus spread and reduce the magnitude of an outbreak. This work has traditionally been performed using interview-based contact tracing, which is labour intensive and limited by the availability and openness of patients for interviews. This approach is particularly challenging during large outbreaks characterized by large numbers of co-occurring transmission chains.
Virus genomic-based approaches can provide much more in-depth information compared to traditional non-sequencing based approaches, as the branching patterns of phylogenetic trees approximately correspond to transmission from one case to the next 35 (Fig. 1). Virus genome sequences, for example, were used to important insights into the risk factors for transmission. Virus genome sequencing was used to infer transmission chains that linked each infected patient (panel c). These analyses revealed that: (1) transmission occurred primarily between individuals that had been in close proximity; and (2) a few individuals infected most of the known cases. In response, an action plan of patient isolation/ containment and widespread use of facemasks was implemented to reduce close contact and aerosol transmission.
The Disease X outbreak peaked within a year, resulting in ~2,000 cases in Florida and several imported cases throughout the world. Most of the imported cases did not result in secondary local infections, with the exception of two healthcare workers in New York City and a large outbreak of more than 100 cases near Havana, Cuba. Factors leading to local and global spread were investigated by layering transportation, geographic, climatic, economic, and demographic information into a large phylogenetic data set of Disease X viruses (panel d). Analyses indicated that virus dispersal from Miami was more likely to occur to large cities that were either: (1) in close driving proximity; or (2) connected by direct flights with high travel volumes. Once in a new city, the success of virus transmission was correlated with low economic status and high population density. This raised concerns about Disease X outbreaks emerging in low-income and densely populated countries within the Caribbean and Central America. The WHO used this information to implement comprehensive surveillance and response efforts in at-risk nations.

Box 1 | Outbreak of Disease X: a hypothetical scenario (continued)
reconstruct the spread of foot-and-mouth disease virus in the United Kingdom, including the identification of superspreader events [47][48][49] . Genomic data also played a critical role in understanding flare-ups during the West African Ebola outbreak [50][51][52] , where phylogenetic analyses showed that most of the flare-ups were linked to persistently infected Ebola survivors (Fig. 2a), thereby demonstrating sexual transmission of the virus 50,52 . None of these insights would have been possible without virus genomic data.
The utility of virus genomic data for the inference of transmission chains is dependent on several factors, including: (1) the evolutionary rate of the virus; (2) the length of time between the infections of interest; and (3) the proportion of sampled cases; which together determine the resolution of the genetic signal (Fig. 2b). Although RNA viruses exhibit remarkably high evolutionary rates 53 , their small genome sizes and short epidemiological generation times often result in, on average, less than one substitution per transmission event [54][55][56] (Fig. 2b). Hence, virus genomics alone often cannot be expected to perfectly reconstruct transmission chains at the level of individual infections. Combined with epidemiological data, however, virus genomics provides a powerful tool for restricting the number of possible transmission scenarios and for supporting novel modes of transmission 47,57,58 . In addition, most phylogeneticsbased transmission chain analyses have been performed using virus consensus sequences (that is, a single genome per sample/patient that represents the average of the virus population), which may limit resolution. However, as virus infections exhibit diverse intra-host populations (containing intra-host single nucleotide variants (iSNVs) 44 ), newer methods incorporating viral iSNVs may greatly increase the resolution of transmission chain analyses so long as multiple variants are transmitted between hosts 59 .

Outbreak mapping
As described in the previous sections, genomic epidemiology can be used to detect an outbreak, show its origin and elucidate transmission patterns. Evolutionary inferences from virus genomes, unlike non-sequencing based methods, can also be used to dissect the spatial structure and dynamics of spread, as well as to assess how an epidemic may unfold through time and space.
Uncovering the spatial patterns of virus spread during outbreaks is a key objective that has been transformed by genomic epidemiology. Reconstructing a detailed spatial history of virus spread from the origin of an outbreak is generally a task for phylogeographic methods 60 , which provide location estimates for every ancestral node in a virus phylogeny using simple stochastic (or 'random walk') models. Phylogeographic analyses, for example, were used to show how Ebola virus spread across West Africa during the 2013-2016 epidemic 61 (Fig. 3). Importantly, virus genome sampling with strong spatiotemporal coverage allowed for the dissection of the entire epidemic into a metapopulation of short-and long-lived transmission chains 61 . Similar analyses were also used to show that multiple introductions were responsible for sustaining the 2016 Zika outbreak in Florida 62 . It is important, however, to appreciate

Box 2 | Molecular technologies for detecting and tracking outbreaks
Traditional methods. The methods traditionally used to diagnose infectious disease agents in patients are developed to detect either antigens (for example, ELISAs and lateral flow assays), or nucleic acids (for example, PCR) derived from the pathogen. These assays are typically designed to recognize either single (for example, Ebola virus) or closely related (for example, Filoviridae) pathogens. Versions of such assays may also be combined in a multiplexed fashion to detect a small number of different pathogens (for example, haemorrhagic fever viruses). While most laboratories are capable of running these assays, they are often not available for uncommon or novel pathogens, and running multiple rounds of testing can take weeks. They also require a priori knowledge of putative pathogens and cannot typically be used to detect outbreaks that are caused by novel, highly divergent, understudied or rare pathogens.
Deployable solutions. Over the last several years, robust and deployable solutions have been developed for pathogen detection that do not require the maintenance of a cold chain, which can be difficult or impossible under many outbreak conditions. Simple-to-use, point-of-care rapid diagnostic tests have the potential to transform early outbreak detection. For example, the ReEBOV antigen rapid test for Ebola virus infection developed during the recent epidemic could be deployed throughout sub-Saharan Africa to help detect new outbreaks 99,100 . Simple nucleic acid assays, such as loop-mediated isothermal amplification (LAMP) developed for Zika virus 101 , H5N1 avian influenza virus 102 and SARS coronavirus 103 , have eliminated the need for thermal cycling and most power requirements. New and creative advances in microfluidics 104 , nanowire arrays 105 and field-effect biosensors 106,107 are also helping to reduce the barriers to efficient and rapid diagnostics, while increasing sensitivity and specificity of detection. Of particular interest for deployment in resourcelimited settings are paper-based engineered gene circuits, such as sensors designed for strain-specific Ebola virus detection 108 . They are stable for long-term storage at room temperature and are activated by rehydration, and thus can be used in remote environments. Very recently, highly sensitive and deployable CRISPR-based diagnostics have also been developed that utilize CRISPR-Cas13/12a to detect pathogen-derived nucleic acids [109][110][111][112] . Similar to the traditional methods described above, all of these tools require a priori knowledge of probable causal pathogens and the availability of antibodies, genome sequences or other pathogen characteristics.
Sequencing-based methods. Untargeted metagenomic sequencing provides a potential one-step solution for outbreak pathogen detection of both known and novel pathogens, and may be able to replace the need for multiple individual pathogen assays 24 . The main advantage of metagenomic sequencing is that it does not require a priori knowledge of the pathogen, but comes at the expense of specialized equipment, increased costs and bioinformatic complexity. Although high backgrounds of host nucleic acid and/or low pathogen titres in clinical samples can make pathogen detection difficult, host gene depletion 113 and pathogen enrichment 114,115 methods can help alleviate these issues. After the first outbreak pathogen genome sequence has been obtained, targeted approaches using next-generation sequencing can also be developed. This was the case for both of the recent Zika and Ebola epidemics 116,117 , where cheaper and faster amplicon-based approaches were rapidly developed and deployed to track both of the epidemics. The most common platforms used for these purposes are those developed by Illumina (for example, MiSeq and HiSeq), because they have high accuracy and throughput, but they also have high costs and relatively short read lengths (up to 300 base pairs). Cheaper portable devices, such as the miniaturized Oxford Nanopore MinION, can help to produce data in close to real time directly in-country and under austere conditions 93,117 . This is a significant advancement because, along with open data sharing, rapid diagnostics and sequencing, such devices help promote a comprehensive and collaborative response network. the uncertainty of phylogeographic estimates, and to bear in mind that such analyses may only be capable of elucidating partial pictures of outbreak spread. In addition, sampling biases may severely affect these analyses, although the coalescent and birth-death models mentioned above have been extended to account for aspects of virus population structure [63][64][65] , making the analyses more robust to sampling heterogeneity 66 .
Phylogeographic inference methods can also be used to provide insights into the factors driving virus spread 67 (Fig. 3). Such analyses are enabled by the integration of virus genomics with diverse meta-data sets and are critically dependent on the timeliness of data generation and open sharing. These approaches were initially introduced to confirm the key role of human air transportation in the global circulation of influenza viruses 67 , but they have also been useful in untangling complex virus transmission dynamics on smaller scales 61 . To illustrate these methods, in Fig. 3 we show an application of generalized linear modelling to explain Ebola virus migration rates between locations as a function of several potential predictors, to infer virus spread during West African Ebola outbreak (Fig. 3). In this case, geographic distances and population sizes at the location of origin and destination combine into a gravity model of spread, with virus transmission largely occurring within large population centres and geographic spread being more frequent over shorter distances 61 . These phylodynamic studies illustrate the growing importance of data integration for virus genomic analyses 55 , which critically depend on accurate metadata (for example, sampling date and sampling location), as well as other data sources that can capture host mobility and geographic, demographic and epidemiological context.

inter-epidemic evolution and spread
Once outbreaks have been brought under control or (temporarily) resolved, phylogenetic analyses can provide insights into evolutionary patterns during inter-epidemic periods by comparing virus genome sequences sampled across different outbreaks. The most fundamental question is whether the virus in question has been able to persist in human populations between outbreaks, so that each new outbreak has arisen from an endemically circulating lineage (for example, dengue virus), or whether they represent independent zoonotic spillover events from an animal reservoir (for example, Ebola virus). With sufficient sampling of viruses from human and reservoir species, this question can be answered using standard phylogenetic analysis. For example, although both dengue virus and yellow fever virus have transmission cycles that involve mosquitoes and humans (urban transmission) or nonhuman primates (sylvatic transmission), phylogenetic analyses have shown that dengue virus is now an entirely endemic urban virus that does not rely on its sylvatic vectors and hosts to seed new epi demics 68 . Most human outbreaks of yellow fever, in contrast, have been shown by virus genomics approaches to represent independent The first three scenarios show a single introduction from a non-human reservoir followed by human-to-human spread. a, A small outbreak from a recent zoonosis with a commensurately short tree, suggesting recent emergence. R 0 is greater than 1, indicating the potential to cause a large outbreak. b, A medium-sized outbreak with a deeper tree and internal nodes dispersed. With R 0 close to 1, this suggests that emergence into humans was not recent and its transmission potential is just sufficient to persist. The root of the tree is not the index case meaning the zoonosis could be older. c, A large outbreak with R 0 greater than 1, and thus exhibiting exponential growth in case numbers. Distinctively for a growing epidemic, internal nodes tend to be towards the root of the tree, suggesting that only a small fraction of the total cases were sampled. d, A scenario of repeated zoonotic jumps with limited human to human transmission. The internal parts of the tree represent the diversity of the virus in the non-human reservoir and the human-to-human transmission cases are closely related. Icons courtesy of S. Knemeyer. emergences of the virus from sylvatic sources, rather than spread via an urban cycle 69,70 .
Inter-epidemic analyses can also be used to elucidate the nature of virus evolution and spread in reservoir species, which are probably characterized by different evolutionary forces than those seen during human outbreaks 71,72 . For example, although human outbreaks of Ebola have happened relatively frequently since the 1970s, each outbreak starts as an independent spillover of the virus from an animal (probably bat 73 ) reservoir. Hence, the inter-epidemic evolution of Ebola virus occurs in a species other than humans, such that patterns of genetic divergence among the viruses associated with human epidemics can provide insight into viral replication and transmission within reservoir hosts. For example, there have been suggestions that Ebola virus has spread across Africa in a wave-like manner in its reservoir species 74 ; however, phylogenetic analyses incorporating virus genomic data from recent outbreaks are incompatible with this scenario 6 . Additionally, while Ebola virus normally evolves according to a relatively constant molecular clock 6,45,75-77 , the phylogenetic branch leading to the viruses sequenced from the small Ebola outbreak that occurred in the Democratic Republic of the Congo in 2014, concurrent with the 2013-2016 epidemic in West Africa, was characterized by a far lower evolutionary rate 78 . Although the reasons for this reduction in evolutionary tempo are unclear, it is possible that it reflects Ebola virus evolution in a different (unknown) reservoir species that experiences a lower rate of viral replication. Alternatively, this rate disparity may result from the existence of different viral replication states within the same reservoir host, similar to that described during human epidemics, with faster rates observed during continuous human-tohuman transmission and slower rates during persistent infections of Ebola survivors 79 .

Requirements and challenges in genomic epidemiology
Virus genomic methods for outbreak investigation and control are powerful additions to more traditional epidemiological approaches but are critically dependent on well planned and coordinated efforts. The foremost need for genomic epidemiology is timely access to clinical samples and data, which should be built on productive and equitable collaborations with local communities, public health agencies, outbreak responders, local clinics and researchers 80 . For each clinical sample to be used for virus genomic sequencing, it is essential to obtain a minimal set of metadata related to the infection, including: (1) the date of sample collection and/or onset of symptoms; and (2) the location of sampling. Additional information can greatly increase the utility of genomic epidemiology, including the availability of: (3) travel and contact history; (4) suspected source of infection; and (5) clinical outcome and symptoms. Other factors, including patient history, age, sex and economic status can also help to reveal risk factors underlying infection and transmission. Within ethical constraints, it is important that communication lines remain open so that researchers undertaking data analysis can return actionable results to the public health community.
Other large-scale data resources are essential for investigating the spatio-temporal history and spread of an outbreak. These include the temporal and spatial distribution of cases, ecological conditions, vector abundance, environmental factors and travel patterns. Integration of these other data sources with virus geno mic data may reveal new properties of an outbreak, potentially leading to actionable measures 55,61,67 . Non-genomic data often comes from established networks of collaborations, or from the public domain, highlighting the value of open data and data sharing to outbreak investigations.
An important benefit of genomic epidemiology is that it can directly compare and jointly analyse virus genome sequences obtained during an epidemic, even if those sequences were generated by different laboratories. Consequently, there is an urgent need to make genomic and epidemiological data and analysis tools publically available during ongoing epidemics 81 . This movement is supported by the World Health Organization (WHO), which has called for data pertaining to public health emergencies to be disseminated openly and immediately following generation, and not withheld until the acceptance or publication of a corresponding scientific paper 82 . More recently, the WHO has outlined the current and future benefits of virus genome data sharing during outbreaks 83 . Combined with an acceleration of making manuscripts available via preprint servers such as arXiv and bioRxiv, especially during outbreaks 84 , there has been a shift towards scientists storing their data and source code on depositories such as GitHub (https://www. github.com), Synapse (https://www.synapse.org) and Data Dryad (https://www.datadryad.org), in close to real-time for others to use. Furthermore, extensive online communities and forums such as Twitter (https://www.twitter.com), Virological (http://virological. org), FluTrackers (https://www.flutrackers.com), ProMED (https:// www.promedmail.org), Nextstrain (https://www.nextstrain.org), HealthMap (https://www.healthmap.org) and Microreact (https:// www.microreact.org) allow rapid dissemination of unpublished results and analyses. In our experience, not only does the process of open science promote new collaborations and lead to more accurate scientific insights into outbreak research, but it helps in getting relevant information rapidly into the hands of decision makers. Despite these advances, however, the speed, nature and extent of virus genome data sharing is inconsistent, sometimes resulting in confusion over what is, or should be, best practice 81,85 .

Future perspective
Genomic epidemiology promises much to the study and control of infectious disease outbreaks, particularly if viral genomes can be acquired and analysed in real-time. The accumulated set of these data-together with the rapid development of sophisticated software packages (http://virological.org/c/software)-will provide a valuable resolve for the mitigation and control of future outbreaks. Ultimately, with sufficient genome sequences from individual viral genera and/or families, it may be possible to categorize viruses by their phylogenetic patterns and utilize this information in epidemic preparedness. For example, as well as considering obvious biological features of viruses such as their genome structure and mode of transmission, it may be possible to group viruses according to a series of evolutionary variables such as rate of evolutionary change, extent of antigenic evolution, frequency of recombination, pattern of geographic spread and population dynamics. This information may then help forecast the evolutionary behaviour of any virus, should it re-emerge in human populations, and assist in the selection of future vaccine strains [86][87][88] . This information will also help counter the alarmist claims that emerging viruses will evolve novel phenotypes, such as airborne transmission in the case of Ebola virus 89 , that often accompany any major disease outbreak. It is clear, however, that a more fundamental understanding of the genetic and ecological barriers of virus spillover into human populations is needed to better identify risk factors for disease emergence. Longterm capacity building, partnerships with local communities, and commitments to long-term investments on these fronts will go a long way towards better enabling the global community to effectively and rapidly deal with future emerging outbreaks 80 . Geographic distances between all pairs of locations, in this case administrative areas in Guinea, Sierra Leone and Liberia, as well as population sizes at the origin and destination of these pairs are combined into a transition rate matrix through a generalized linear model. This matrix parameterizes the phylogenetic process of spread that is being estimated. Each predictor is associated with a coefficient, β , which denotes the strength of contribution with some predictors (for example, population size) positively associated with the intensity of migration whereas others (for example, geographic distance) are negatively associated. A coefficient of 0 implies that the predictor is excluded from the model (represented in the figure by the transparent matrix with β = 0).