## Figures

## Abstract

Recent work has attempted to use whole-genome sequence data from pathogens to reconstruct the transmission trees linking infectors and infectees in outbreaks. However, transmission trees from one outbreak do not generalize to future outbreaks. Reconstruction of transmission trees is most useful to public health if it leads to generalizable scientific insights about disease transmission. In a survival analysis framework, estimation of transmission parameters is based on sums or averages over the possible transmission trees. A phylogeny can increase the precision of these estimates by providing partial information about who infected whom. The leaves of the phylogeny represent sampled pathogens, which have known hosts. The interior nodes represent common ancestors of sampled pathogens, which have unknown hosts. Starting from assumptions about disease biology and epidemiologic study design, we prove that there is a one-to-one correspondence between the possible assignments of interior node hosts and the transmission trees simultaneously consistent with the phylogeny and the epidemiologic data on person, place, and time. We develop algorithms to enumerate these transmission trees and show these can be used to calculate likelihoods that incorporate both epidemiologic data and a phylogeny. A simulation study confirms that this leads to more efficient estimates of hazard ratios for infectiousness and baseline hazards of infectious contact, and we use these methods to analyze data from a foot-and-mouth disease virus outbreak in the United Kingdom in 2001. These results demonstrate the importance of data on individuals who escape infection, which is often overlooked. The combination of survival analysis and algorithms linking phylogenies to transmission trees is a rigorous but flexible statistical foundation for molecular infectious disease epidemiology.

## Author Summary

Recent work has attempted to use whole-genome sequence data from pathogens to reconstruct the transmission trees linking infectors and infectees in outbreaks. However, transmission trees from one outbreak do not generalize to future outbreaks. Reconstruction of transmission trees is most useful to public health if it leads to generalizable scientific insights about disease transmission. Accurate estimates of transmission parameters can help identify risk factors for transmission and aid the design and evaluation of public health interventions for emerging infections. Using statistical methods for time-to-event data (survival analysis), estimation of transmission parameters is based on sums or averages over the possible transmission trees. By providing partial information about who infected whom, a pathogen phylogeny can reduce the set of possible transmission trees and increase the precision of transmission parameter estimates. We derive algorithms that enumerate the transmission trees consistent with a pathogen phylogeny and epidemiologic data, show how to calculate likelihoods for transmission data with a phylogeny, and apply these methods to a foot and mouth disease outbreak in the United Kingdom in 2001. These methods will allow pathogen genetic sequences to be incorporated into the analysis of outbreak investigations, vaccine trials, and other studies of infectious disease transmission.

**Citation: **Kenah E, Britton T, Halloran ME, Longini IM Jr (2016) Molecular Infectious Disease Epidemiology: Survival Analysis and Algorithms Linking Phylogenies to Transmission Trees. PLoS Comput Biol 12(4):
e1004869.
https://doi.org/10.1371/journal.pcbi.1004869

**Editor: **Sergei L. Kosakovsky Pond,
Temple University, UNITED STATES

**Received: **July 15, 2015; **Accepted: **March 15, 2016; **Published: ** April 12, 2016

**Copyright: ** © 2016 Kenah et al. This is an open access article distributed under the terms of the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original author and source are credited.

**Data Availability: **The FMDV data are available as Data S3-S4 in Morelli et al. (2012) PLoS Computational Biology 8(11): e1002768 [DOI: 10.1371/journal.pcbi.1002768]. All other relevant data are within the paper and its Supporting Information files.

**Funding: **EK was supported by National Institute of Allergy and Infectious Diseases (www.niaid.nih.gov) grant R00 AI095302. EK, MEH, and IML were supported by National Institute of General Medical Sciences (www.nigms.nih.gov) grant U54 GM111274 and NIAID grant R01 AI116770. The content is solely the responsibility of the authors and does not represent the official views of NIAID, NIGMS, or the National Institutes of Health. The funders had no role in the study design, data collection and analysis, decision to publish, or preparation of the manuscript.

**Competing interests: ** The authors have declared that no competing interests exist.

## Introduction

Genetic sequences from pathogen samples are an increasingly important source of information in infectious disease epidemiology. The structure of a pathogen phylogeny can reflect immunological strain selection, epidemic dynamics, and patterns of spatial spread [1–3]. Phylogenies linking pathogen genetic sequences sampled at known times and places have been used to investigate the origins and spread of HIV-1 [4, 5] and the global circulation of seasonal influenza [6–9]. Using coalescent models, phylogenies can be used to reconstruct the history of effective viral population sizes [10] or estimate basic reproductive numbers (*R*_{0}) [11]. These methods can reveal details of the large-scale spread of infection that would be difficult or impossible to detect otherwise. For example, Biek *et al*. [12] showed that the invasion of the eastern United States by a raccoon-specific rabies virus occurred in seven distinct clades (each representing a different direction of spread from the epizootic origin in West Virginia) and three waves of expansion (1987–1993, 1986–1990, and 1990–1992).

When epidemic models are integrated with population genetics, several complications arise in the interpretation of the effective number of infections and the scaling of time [13–15]. Recently, methods have been developed that use phylogenetic trees to make inferences about the prevalence of infection over time while accounting for epidemic dynamics [13, 16], and some of these can incorporate time series data on the number of cases [17, 18]. These phylodynamic methods generally assume a sparse sample of pathogen genetic sequences from a large infected population. In this paper, we consider the use of densely-sampled pathogen genetic sequences to make inferences about person-to-person transmission.

### Reconstructing transmission trees with genetic sequences

The earliest use of phylogenetics in infectious disease epidemiology was to confirm or rule out a suspected source of the human immunodeficiency virus (HIV). Phylogenetic analyses were used to confirm that five HIV patients were infected at a dental practice in Florida between 1987 and 1989 [19] and to rule out infection of a Baltimore patient in 1985 by an HIV-positive surgeon [20]. A more ambitious use of phylogenetics is to reconstruct a transmission tree, which is a directed graph with an edge from node *i* to node *j* if person *i* infected person *j*. An analysis by Leitner *et al*. [21, 22] of an HIV-1 transmission cluster in Sweden from the early 1980s compared reconstructed phylogenies based on HIV genetic sequences to a true phylogeny based on the known transmission tree, times of transmission, and times of sequence sampling. The reconstructed phylogenies accurately reflected the topology of the true phylogeny, and the accuracy increased when sequences from different regions of the HIV genome were combined.

The increasing availability of whole-genome sequence data has renewed interest in combining pathogen genetic sequence data with epidemiologic data to reconstruct transmission trees. One approach to this problem is to reconstruct the transmission tree using genetic distances. Spada *et al*. [23] reconstructed the transmission tree linking five children infected with hepatitis C virus (HCV) by finding the spanning tree linking the HCV genetic sequences that minimized the sum of the genetic distances across its edges, excluding edges inconsistent with the epidemiologic data. The *SeqTrack* algorithm of Jombart *et al*. [24] generalizes this approach. It constructs a transmission tree by finding the spanning tree linking the sampled sequences that minimizes (or maximizes) a set of edge weights. Snitkin *et al*. [25] used this algorithm to investigate a 2011 outbreak of carbapenem-resistant *Klebsiella pneumoniae* in the NIH Clinical Center, penalizing edges with large genetic distances, between patients who did not overlap in the same ward, or that required a long silent colonization. Wertheim *et al*. [26] constructed a network among HIV patients in San Diego by linking individuals whose sequences were <1% distant. This was used to estimate community-level effects of HIV prevention and treatment.

A second approach to transmission tree reconstruction is to weight possible infector-infectee links using a pseudolikelihood based on genetic and epidemiologic data. Ypma *et al*. [27] analyzed a 2003 influenza A(H7N7) outbreak among poultry farms in the Netherlands by combining data on the times of infection and culling at each farm, the distances between the farms, and RNA consensus sequences. The weight of each possible transmission link was the product of components based on temporal, geographic, and genetic data. The weight of a complete transmission tree was the product of the edge weights. The R package outbreaker implements an extension of this approach that allows multiple introductions of infection and unobserved cases [28]. Like the spanning tree methods above, these methods model pathogen evolution as a process that occurs at the moment of transmission. Morelli *et al*. [29] proposed a variation of these methods that allows within-host pathogen evolution by incorporating the times of infection and observation into the likelihood component for the genetic sequence data.

A third approach is to reconstruct the transmission tree by combining a phylogeny with epidemiologic data, which was first done by Cottam *et al*. [30, 31] in an investigation of a 2001 foot-and-mouth disease virus (FMDV) outbreak among farms in the United Kingdom (UK). The phylogeny and the transmission tree were linked by considering possible locations of the most recent common ancestors (MRCAs) of viruses sampled from the farms. The probability *p*_{ij} that farm *i* infected farm *j* was calculated using epidemiologic data on the oldest detected FMDV lesion and the dates of sampling and culling on each farm. The weight of each possible transmission network was proportional to the product of the *p*_{ij} for all edges *i* → *j*. Similar methods were used to track farm-to-farm spread of a 2007 FMDV outbreak [32]. Gardy *et al*. [33] combined social network analysis with a phylogeny based on whole-genome sequences to construct a transmission tree for a tuberculosis outbreak in British Columbia. Didelot *et al*. used the time of the most recent common ancestor (TMRCA) to identify possible person-to-person transmission events in studies of *Clostridium difficile* transmission in the UK [34] and *Helicobacter pylori* transmission in South Africa [35]. In a study of *Mycobacterium tuberculosis* transmission in the Netherlands, Bryant *et al*. [36] ruled out transmission between individuals whose samples did not share a parent in the phylogeny.

Recent research has identified problems with using genetic sequence data to reconstruct transmission trees. Simulations by Worby *et al*. [37, 38] found that pairwise genetic distances cannot reliably identify sources of infection. Methods based on phylogenies often underestimate the complexity of the relationship between the phylogenetic and transmission trees. Branching events in a phylogeny do not necessarily correspond to transmissions, and the topology of the phylogenetic tree need not be the same as the topology of the transmission tree [39–41]. These differences are especially important for diseases with significant within-host pathogen diversity and long latent or infectious periods [41, 42].

Ypma *et al*. [40] and Didelot *et al*. [42] have developed Bayesian methods that enforce consistency between phylogenetic and transmission trees in Markov chain Monte Carlo (MCMC) iterations. More recently, Lau *et al*. [43] have outlined a Bayesian integration of epidemiologic and genetic sequence data that uses likelihoods based on survival analysis, but their approach does not use pathogen phylogenies directly, assuming that a single dominant lineage within each host can be transmitted. Here, we build a systematic understanding of the relationship between pathogen phylogenies and transmission trees under much weaker assumptions about within-host evolution, allowing the incorporation of genetic sequence data into frequentist and Bayesian survival analysis of infectious disease transmission data.

### Transmission trees and public health

Reconstruction of transmission trees is most useful to public health if it leads to generalizable scientific insights about disease transmission. The transmission tree from one outbreak does not generalize to future outbreaks, but a phylogeny provides partial information about who-infected-whom. Survival analysis provides a rigorous but flexible statistical framework for infectious disease transmission data that explicitly links parameter estimation to the set of possible transmission trees [44–46]. In this framework, estimates of transmission parameters such as covariate effects on infectiousness and susceptibility and evolution of infectiousness over time in infectious individuals are based on sums or averages over all possible transmission trees. Since a phylogeny linking pathogen samples from infected individuals constrains the set of possible transmission trees, pathogen genetic sequence data can be combined with epidemiologic data to obtain more efficient estimates of transmission parameters.

## Methods

### General stochastic S(E)IR model

At any time, each individual *i* ∈ {1, …, *n*} is in one of four states: susceptible (S), exposed (E), infectious (I), or removed (R). Person *i* moves from S to E at his or her *infection time* *t*_{i}, with *t*_{i} = ∞ if *i* is never infected. After infection, *i* has a *latent period* of length *ε*_{i} during which he or she is infected but not infectious. At time *t*_{i} + *ε*_{i}, *i* moves from E to I, beginning an *infectious period* of length *ι*_{i}. At time *t*_{i} + *ε*_{i} + *ι*_{i}, *i* moves from I to R, where he or she can no longer infect others or be infected. The latent period *ε*_{i} is a nonnegative random variable, the infectious period *ι*_{i} is a strictly positive random variable, and both have finite mean and variance. If person *i* is infected, the time elapsed since the onset of infectiousness at time *t*_{i} + *ε*_{i} is the *infectious age* of *i*.

After becoming infectious at time *t*_{i} + *ε*_{i}, person *i* makes infectious contact with *j* ≠ *i* at time . We define infectious contact to be sufficient to cause infection in a susceptible person, so *t*_{j} ≤ *t*_{ij}. The *infectious contact interval* is a strictly positive random variable with if infectious contact never occurs. Since infectious contact must occur while *i* is infectious or never, or .

For each ordered pair *ij*, let *C*_{ij} = 1 if infectious contact from *i* to *j* is possible and *C*_{ij} = 0 otherwise. For example, the *C*_{ij} could be the entries in the adjacency matrix for a contact network. However, we do not require that *C*_{ij} = *C*_{ji}. We assume the infectious contact interval is generated in the following way: A *contact interval* *τ*_{ij} is drawn from a distribution with hazard function *h*_{ij}(*τ*). If *τ*_{ij} ≤ *ι*_{i} and *C*_{ij} = 1, then . Otherwise, .

#### Epidemiologic data.

Our epidemiologic data contain the times of all S → E (infection), E → I (infectiousness onset), and I → R (removal) transitions in the population between time 0 and time *T*. For all ordered pairs *ij* in which *i* is infected, we observe *C*_{ij}.

An *exogenous* infection occurs when an individual is infected from a source outside the observed population. An *endogenous* infection occurs when an individual is infected from within the observed population. For each endogenous infection *j*, let *v*_{j} denote the index of his or her infector. Let *v*_{j} = 0 if *j* is an exogenous infection and *v*_{j} = ∞ if *j* is not infected. Let denote the set of possible *v*_{j} < ∞, which we call the *infectious set* of *j*. If *j* is not infected, let (the empty set).

The *transmission tree* is the directed network with an edge from *v*_{j} to *j* for each infected *j*. It is a directed tree rooted at node 0, and it can be represented by a vector **v** = (*v*_{1}, …, *v*_{n}). Let denote the set of all possible **v** consistent with the observed data. A can be generated by choosing a for each infected *j*, but we do not assume that all possible transmission trees have the same probability.

### Survival analysis of transmission data

Survival analysis of infectious disease transmission data can be viewed as a generalization of discrete-time chain binomial models [47] to continuous time, and it includes parametric methods [44], nonparametric methods [45], and semiparametric relative-risk regression models [46]. For simplicity, we use parametric methods and assume that exogenous infections are known. Let the hazard of infectious contact from *i* to *j* at time *τ* after the onset of infectiousness in *i* be
(1)
where **β**_{0} is an unknown coefficient vector, **X**_{ij}(*τ*) is a covariate vector, and *h*_{0}(*τ*) is a baseline hazard function. The vector **X**_{ij}(*τ*) can include individual-level covariates affecting the infectiousness of *i* or the susceptibility of *j* as well as pairwise covariates (e.g., membership in the same household). The coefficient vector **β**_{0} captures covariate effects on the hazard of transmission, and the baseline hazard function *h*_{0}(*τ*) captures the evolution of infectiousness over time in infectious individuals.

We assume that *τ*_{ij} can be observed only if *j* is infected by *i* at time *t*_{i} + *ε*_{i} + *τ*_{ij}. The contact interval *τ*_{ij} will be unobserved if *i* recovers from infectiousness before making infectious contact with *j*, if *j* is infected by a someone other than *i*, or if observation of *j* has stopped. Let *I*_{i}(*τ*) = **1**_{τ ∈ (0, ιi]} be a left-continuous process indicating whether *i* remains infectious at infectious age *τ*. Let *S*_{ij}(*τ*) = **1**_{ti+εi+τ ≤ tj} be a left-continuous process indicating whether *j* remains susceptible when *i* reaches infectious age *τ*. Assume that the population is under observation until a stopping time *T* and let *O*_{ij}(*τ*) = **1**_{ti+εi+τ ≤ T} be a left-continuous process indicating whether *j* is under observation when *i* reaches infectious age *τ*. Then
(2)
is a left-continuous process indicating whether infectious contact from *i* to *j* can be observed at infectious age *τ* of *i*. The assumptions above ensure that censoring of *τ*_{ij} is independent for all *ij*, and they can be relaxed if independent censoring is preserved.

Let * θ* be a parameter vector for a family of hazard functions

*h*(

*τ*,

*) such that*

**θ***h*

_{0}(

*τ*) =

*h*(

*τ*,

**θ**_{0}) for an unknown

**θ**_{0}. To allow maximum likelihood estimation, we assume that

*h*(

*τ*,

*) has continuous second derivatives with respect to*

**θ***. Let (3)*

**θ**Let denote the set of all infectious individuals to whom *j* was exposed while susceptible, which we call the *exposure set* of *j*. When we observe who-infected-whom (i.e., **v** is known), the likelihood is
(4)

The hazard terms depend on **v**, but the survival terms do not [44].

When we do not observe who-infected-whom, the likelihood is a sum over all possible transmission trees: [44]. Each can be generated by choosing a for each endogenous infection *j*. Given the epidemiologic data, each *v*_{j} can be chosen independently [48]. This leads to the sum-product factorization
(5)

The probability of a particular transmission tree **v** is
(6)
and *L*_{v}(* β*,

*) = Pr(*

**θ****v**|

*,*

**β***)*

**θ***L*(

*,*

**β***). In this framework, estimation of (*

**θ***,*

**β***), and the probabilities of possible transmission trees is simultaneous. An interesting special case is when*

**θ***h*

_{ij}(

*τ*,

*,*

**β***) =*

**θ***λ*for all

*ij*. Then Pr(

**v**|

*,*

**β***) does not depend on*

**θ***λ*, so the transmission tree is an ancillary statistic [44].

#### Likelihood calculation with a phylogeny.

Let Φ denote a pathogen phylogeny, **v** denote a transmission tree, and *Epi* denote the epidemiologic data. Let the function Pr(⋅) denote probabilities or probability densities as necessary, and let denote the set of transmission trees consistent with both Φ and *Epi*. Then the likelihood for * β* is
(7)

The factor Pr(**v**, *Epi*|* β*,

*) is the likelihood in Eq (4). The factor Pr(Φ|*

**θ****v**,

*Epi*) depends on within-host pathogen evolution and could incorporate genetic distances and branching times, allowing the joint estimation of between-host transmission parameters and within-host evolutionary parameters. For example, within-host coalescent models were used by Ypma

*et al*. [40] and Didelot

*et al*. [42]. The probability of a given transmission tree

**v**is (8)

As before, estimation of (* β*,

*) and the probabilities of different transmission trees is simultaneous. By providing partial information about who-infected-whom, a phylogeny can increase the precision of transmission parameter estimates.*

**θ**### Phylogenies and transmission trees

The relationship between phylogenies and transmission trees we develop here is similar to the approach taken by Cottam *et al*. [31] who linked phylogenetic and transmission trees via the locations of common ancestors. It is logically equivalent to the approaches of Ypma *et al*. [40] who joined the within-host phylogenies of infectors and infectees into a single phylogeny, Didelot *et al*. [42] who colored lineages in the phylogeny with a unique color for each individual, and Hall and Rambaut [49] who represented transmission trees as partitions of phylogenies. We begin with these assumptions:

- Each individual is infected at most once.
- Each infection is initiated by a single pathogen. Following infection, within-host pathogen evolution occurs and the evolved pathogens are transmitted to others.
- The order in which infections (or onsets of infectiousness) occurred is known.
- We have at least one pathogen sequence from each infected individual, and these sequences are linked in a rooted phylogeny. The root of this phylogeny has a parent node
*r*_{0}. - Each node in the phylogeny represents a pathogen that had a host, which is also the “host” of the node. A parent-child relationship between nodes with different hosts represents a direct transmission of infection from the host of the parent to the host of the child. The node
*r*_{0}has a host outside the observed population.

The first two assumptions concern the biology of disease. The last three assumptions concern the resolution of the epidemiologic data, which can be controlled through study design. Initially, we use only the topology of the pathogen phylogeny to infer the set of possible transmission trees. Later, we consider how branching times at interior nodes further restrict the set of possible transmission trees.

#### Transmission trees and interior node hosts.

The leaves (tips) of the phylogenetic tree represent sampled pathogens. Each interior node represents a most recent common ancestor (MRCA) of two or more sampled pathogens. Let host(*x*) be the host of the pathogen represented by node *x* in the phylogeny. If *x* is a leaf, then host(*x*) is known. If *x* had a host outside the observed population, let host(*x*) = 0. In particular, host(*r*_{0}) = 0. The hosts of all other interior nodes are unknown.

**Lemma 1**. *The nodes hosted by an infected individual form a subtree of the phylogenetic tree.*

*Proof*. See S1 Appendix.

**Theorem 1**. *A phylogeny with known interior node hosts implies a unique transmission tree.*

*Proof*. See S1 Appendix.

Lemma 1 applies to nodes hosted by infected individuals in the observed population, not to the set of nodes hosted by 0 (i.e., hosts outside the observed population). In the rest of this section, we assume that the set of nodes hosted by 0 is a tree rooted at *r*_{0}. In practice, this restricts the study design. For example, this assumption would be violated if we observed only individuals *A* and *C* in a household where *A* was the index case and there was a chain of transmission *A* → *B* → *C*. The results of this section can be generalized to phylogenies where the set of nodes hosted by 0 is a union of subtrees as long as each subtree has a known root node. In this case, the phylogeny can split into disjoint pieces by erasing the incoming edge to each root of a subtree hosted by 0. Each of these pieces can be treated as a separate phylogeny in which the nodes hosted by 0 form a subtree.

An assignment of interior node hosts consistent with Lemma 1 will produce at most one transmission tree. A *possible assignment of interior node hosts* is an assignment consistent with Lemma 1 that produces a transmission tree consistent with the epidemiologic data. A *possible transmission tree* is a transmission tree consistent with the epidemiologic data that can be produced by at least one assignment of interior node hosts consistent with Lemma 1. We now show that each possible transmission tree is produced by exactly one possible assignment of interior node hosts.

Let *C*_{x} denote the set of nodes in the phylogenetic clade rooted at node *x*, and let *L*_{x} be the set of hosts of leaf nodes in *C*_{x}. If *x* is an interior node, host(*x*) may not be in *L*_{x}. Let first(*x*) denote the individual in *L*_{x} who is infected earliest or has the earliest onset of infectiousness, at least one of which is well-defined by Assumption 3. If the individual infected earliest and the individual with the earliest onset of infectiousness are different, either of them can be used as first(*x*). If *x* is a leaf, *C*_{x} = {*x*}, *L*(*x*) = {host(*x*)}, and first(*x*) = host(*x*).

**Lemma 2**. *For any node* *x*, *host*(*x*) = *first*(*x*) *or host*(*x*) *infected first*(*x*).

*Proof*. See S1 Appendix.

**Theorem 2**. *A transmission tree corresponds to at most one possible assignment of interior node hosts in a phylogeny.*

*Proof*. See S1 Appendix.

Theorems 1 and 2 imply a one-to-one correspondence between the possible transmission trees and the possible assignments of interior node hosts in a phylogeny. Fig 1 illustrates this relationship in a very simple case. An similar result was proven independently by Hall and Rambaut [49] using partitions of phylogenies.

A, B, and C were infected in alphabetical order such that their infectious sets are , , and . We have a single pathogen sequence from each person. The top shows the two possible transmission trees within the household: either A infected B and B infected C (left) or A infected B and C (right). The bottom shows the three rooted, bifurcating phylogenies linking pathogen sequences from A, B, and C. In each phylogeny, the possible hosts are written underneath each interior node and arrows indicate how each assignment of interior node hosts determines a transmission tree via Assumption 5.

#### Sets of possible interior node hosts.

Theorems 1 and 2 reduce the problem of finding the transmission trees consistent with a given phylogeny to that of finding the possible assignments of interior node hosts. Let *H*_{x} denote the set of hosts *h* of node *x* such that at least one possible transmission tree can be generated when host(*x*) = *h*. There are two sets of constraints on *H*_{x}. The ancestors of *x* constrain the possible hosts because of Lemma 1. The descendants of *x* constrain the possible hosts because host(*x*) must be a common ancestor of all members of *L*_{x} in the transmission tree.

We deal first with the descendant constraints. A *transmission tree within clade C _{x}* is a transmission tree rooted at host(

*x*) that consists of host(

*x*) and all members of

*L*

_{x}. Let

*D*

_{x}denote the set of all hosts

*h*such that at least one possible transmission tree within

*C*

_{x}can be generated when host(

*x*) =

*h*. If

*x*is a leaf,

*D*

_{x}= {host(

*x*)} where host(

*x*) is the source of the pathogen sample whose genetic sequence is represented by

*x*. If

*x*is an interior node,

*D*

_{x}can be calculated using the following results:

**Lemma 3**. *If* *x* *is an interior node, host*(*x*) = *first*(*x*) *or host*(*x*) = *host(parent*(*x*)).

*Proof*. See S1 Appendix.

**Lemma 4**. *If* *x* *is an interior node with child* *y* *in the phylogeny, then*
(9)

*Proof*. See S1 Appendix.

**Theorem 3**. *For any interior node* *x* *in the phylogeny*,
(10)
*where children(x) denotes the children of x*.

*Proof*. See S1 Appendix.

Now we consider the ancestral constraints on *H*_{x}. By assumption, host(*r*_{0}) = 0. Let *A*_{r0} = {0}. For all other nodes in the phylogeny, let
(11)

**Theorem 4**. *H*_{x} = *A*_{x} ∩ *D*_{x}.

*Proof*. See S1 Appendix.

Since *D*_{x} is known for each leaf *x*, Theorem 3 shows that *D*_{x} can be found for each interior node *x* in a postorder (i.e., childen before parents) traversal of the phylogeny. Since *A*_{r0} = {0}, Theorem 4 shows that we can calculate *H*_{x} for each interior node *x* in a preorder (parents before children) traversal of the phylogeny once all *D*_{x} are known. Combining these results, we get Algorithm 1 for calculating all *H*_{x} in two traversals of the phylogeny. We say that a phylogeny Φ is *topologically consistent* with the epidemiologic data if *H*_{x} is nonempty for each interior node *x* of Φ.

**Algorithm 1: Finding host sets**.

**Input**: Rooted phylogeny Φ and epidemiologic data

**Output**: *H*_{x} for each node *x* of Φ

**for** *node x in postorder traversal of* Φ **do**

**if** *x is a leaf* **then** *D*_{x} = {host(*x*)};

**else** , where is defined in Eq (9);

**end**

**for** *node x in preorder traversal of* Φ **do**

**if** *x* = *r*_{0} **then** *H*_{x} = {0};

**else** *H*_{x} = *D*_{x} ∩ *A*_{x}, where *A*_{x} = *H*_{parent(x)}∪{first(*x*)};

**end**

Having found the *H*_{x} at each interior node *x*, it is possible to generate all possible transmission trees consistent with the phylogeny and the epidemiologic data.

**Theorem 5**. *Given a pathogen phylogeny* Φ *that is topologically consistent with the epidemiologic data, a transmission tree* **v** *is possible if and only if it can be generated using Algorithm 2.*

*Proof*. See S1 Appendix.

**Algorithm 2: Generating transmission trees**.

**Input**: Rooted phylogeny Φ with nonempty *H*_{x} for each node *x*

**Output**: Transmission tree **v** consistent with Φ and the epidemiologic data

**for** *node x in preorder traversal of* Φ **do**

**if** *x* = *r*_{0} **then** set host(*x*) = 0;

**else**

*w* = parent(*x*);

choose host(*x*) ∈ *H*_{x} ∩ {host(*w*), first(*x*)};

**if** *host*(*x*) ≠ *host*(*w*) **then**

add edge host(*w*)→host(*x*) to **v**, adding node host(*x*) if necessary

**end**

**end**

**end**

Theorem 5 gives a useful indication of the value of a phylogeny. A bifurcating phylogeny with *n* leaves has *n* − 1 interior nodes. For each interior node *x*, we have at most 2 possible hosts given the host of parent(*x*). Thus, there are at most 2^{n − 1} possible transmission trees consistent with a pathogen phylogeny of *n* infections. Without a phylogeny, the worst-case scenario is *n*! possible transmission trees. Using partitions, Hall and Rambaut [49] independently proved that a phylogeny reduces the number of possible transmission trees when *n* > 2.

The combination of Algorithms 1 and 2 is similar to a Sankoff parsimony [50] where the states represent infected individuals and the cost of going from state *i* to state *j* is 1 if and ∞ otherwise. If there is a single exogenous infection, any transmission tree consistent with the phylogeny and the epidemiologic data will have cost *n* − 1, and all other transmission trees will have infinite cost. Compared to the more general context of a Sankoff parsimony, our algorithms gain efficiency by not having to consider all possible states at each internal node or calculate costs. They also have the advantage of being based on explicit assumptions about the biology of infection and study design.

#### Host sets under a molecular clock.

Under a strict or relaxed molecular clock model, each interior node of the phylogenetic tree can be assigned a branching time based on its genetic distance to one or more sequences with known sampling times. These branching times produce new opportunities for inconsistency between the phylogenetic tree and the epidemic data, increasing the possible value of the phylogeny for transmission parameter estimation. Let *t*_{x} denote time assigned to node *x* in the phylogeny. For each leaf, *t*_{x} is the time at which the corresponding pathogen was sampled. If *x* is an interior node, *t*_{x} is a branching time.

If host(*x*) is known, the branching time *t*_{x} is subject to two constraints. Because branching must occur after the infection of host(*x*) and before the end of his or her infectious period,
(12)
where a square bracket indicates an endpoint included in the interval and a parenthesis indicates an endpoint excluded from the interval. We have *t*_{x} > *t*_{host(x)} because a branching time in host(*x*) cannot occur until after he or she is infected. We have *t*_{x} ≤ *t*_{host(x)} + *ε*_{host(x)} + *ι*_{host(x)} because a descendant of virus *x* was transmitted to at least one other host. The second constraint is that if *x* is a parent of *y* and host(*x*)≠host(*y*), then *t*_{x} < *t*_{host}(*y*) because a descendant of virus *x* infected host(*y*). These constraints are sufficient to find a valid set of branching times given a possible assignment of interior node hosts.

**Theorem 6**. *If a transmission tree is generated using Algorithm 2, then Algorithm 3 assigns a valid branching time to each internal node of the phylogeny. Any assignment of branching times consistent with the epidemiologic data can be generated this way.*

*Proof*. See S1 Appendix.

**Algorithm 3**: Assigning branching times.

**Input**: Rooted phylogeny Φ with known host(*x*) for each node *x*

**Output**: Branching time *t*_{x} for each node *x*

**for** *node x in postorder traversal of* Φ **do**

**if** *x is a leaf* **then** set *t*_{x} to be the time pathogen *x* was sampled;

**else**

*t*_{max} = min_{y ∈ children(x)} *t*_{y};

choose *t*_{x} ∈ (*t*_{host(x)}, *t*_{max});

**end**

**end**

Now suppose we have a phylogenetic tree with known branching times but unknown interior node hosts. Let
(13)
be the set of individuals who are infected but not yet removed at time *t*, and let *H*_{x}(*t*) be the set of possible hosts of node *x* when *t*_{x} = *t*. To find *H*_{x}(*t*_{x}), it is not sufficient to calculate *H*_{x} using Algorithm 1 and then let *H*_{x}(*t*_{x}) = *H*_{x} ∩ *H*(*t*_{x}). To see why, suppose *x* and *y* are nodes in the phylogeny such that *h* ∈ *H*_{x} ∩ *H*_{y} and *h* ∈ *H*(*t*_{x}) ∩ *H*(*t*_{y}). Let *w* be the MCRA of *x* and *y*. There is no guarantee that *h* ∈ *H*_{w}(*t*_{w}). If not, *h* can be in at most one of *H*_{x}(*t*_{x}) and *H*_{y}(*t*_{y}) by Lemma 1.

Algorithm 1 can be modified to find *H*_{x}(*t*_{x}) with the following changes: In the postorder traversal, we replace *D*_{x} with
(14)

In the preorder traversal, we define
(15)
for all *x* ≠ *r*_{0}. Then *H*_{x}(*t*_{x}) = *A*_{x} ∩ *D*_{x}(*t*_{x}). With these changes, the proofs of Theorems 3 and 4 in S1 Appendix work as before under the additional constraint that host(*x*) ∈ *H*(*t*_{x}) for all nodes *x* in the phylogeny.

### Simulations

To study the impact of a phylogeny on the efficiency of transmission parameter estimates, we conducted a series of 1,000 simulations. In each simulation, there were 100 independent households of size 6. Each household had an index case with an infection time chosen from an exponential distribution with mean one. Each individual *i* had a binary covariate *X*_{i} that could affect infectiousness and susceptibility. Given a parameter vector * β* = (

*β*

_{inf},

*β*

_{sus}), the hazard of infectious contact from

*i*to

*j*at infectious age

*τ*of

*i*is (16)

In each simulation, *β*_{inf} and *β*_{sus} were independently chosen from a uniform distribution on (−1, 1). In all simulations, the baseline hazard was *λ*_{0} = 1 and the infectious periods were independent exponential random variables with mean one.

In each simulation, we analyzed data from the first 200 infections in three ways: using only epidemiologic data via the likelihood in Eq (5), using epidemiologic data with who-infected-whom via the likelihood in Eq (4), and using epidemiologic data with a phylogeny via the likelihood in Eq (7). In the phylogenetic analysis, we assumed a single pathogen sample from each infected individual. The within-host phylogeny for each individual who infected *m* > 0 individuals was chosen uniformly at random from all rooted, bifurcating phylogenies with *m* + 1 tips. Within-individual phylogenies were chosen independently and combined into a single phylogeny as in Ypma *et al*. [40]. Thus, the conditional probability Pr(Φ|**v**, *Epi*) for a phylogeny Φ given a transmission tree **v** in which each individual *j* infected *m*_{j} ≥ 0 other individuals was proportional to
(17)

The set of transmission trees consistent with the phylogeny was determined using Algorithms 1 and 2. We calculated the mean error, mean squared error, 95% confidence interval coverage probability, and relative efficiency of *β*_{inf}, *β*_{sus}, and ln *λ*_{0} estimates in all three analyses.

The simulations were conducted in Python 2.7 (www.python.org) and analysis was conducted in R 3.2 (cran.r-project.org) via RPy2 2.7 (rpy.sourceforge.net). The Python code is in S1 Text. Parameters, point estimates, and 95% confidence limits are in S1 Data. R code for the simulation data analysis is in S1 Text.

#### Data on individuals who escape infection.

The likelihoods in Eqs (4) and (5) require data on individuals who were at risk of infection but not infected. Except for Lau *et al*. [43], these data are not used in any of the studies cited in the Introduction. To study the value of data on individuals who escape infection in the households of infected individuals, we repeated all analyses excluding data on the uninfected. The parameters, point estimates, and 95% confidence limits are in S2 Data.

#### Time variation in infectiousness.

When contact intervals are exponential and there is no variation in infectiousness, the transmission tree is an ancillary statistic for the hazard *λ* of infectious contact [44]. To explore the effect of time variation in infectiousness on the value of a phylogeny, we repeated the simulations using a Weibull contact interval distribution with shape parameter *γ* = 0.5. To keep the same mean contact interval, we set the rate parameter *λ*_{0} = 2. The hazard of infectious contact from *i* to *j* at infectious age *τ* or *i* is
(18)

With *γ* = 0.5, this decreases monotonically during the infectious period. These simulations used the same combinations of (*β*_{inf}, *β*_{sus}) that were used in the simulations with exponential contact intervals. The parameters, point estimates, and 95% confidence limits are in S3 Data.

### Data analysis

To illustrate an application of these algorithms and likelihoods, we use them to analyze farm-to-farm transmission trees of foot and mouth disease virus (FMDV) in a cluster of 12 epidemiologically linked farms in Durham, UK in 2001. The genetic and epidemiologic data are publicly available as Data S3 and Data S4 in Morelli *et al*. [29]. These data were previously analyzed by Cottam *et al*. [31, 32], Morelli *et al*. [29], Ypma *et al*. [40], and Lau *et al*. [43].

FMDV is a picornavirus that causes a highly contagious disease in cattle, pigs, sheep, and goats [51]. Upon infection, there is an incubation period of approximately 1–12 days in sheep, 2–14 days in cattle, and two or more days in pigs. The incubation period is followed by an acute febrile illness with painful blisters on the feet, the mouth, and the mammary glands. It is transmitted through secretions from infected animals, fomites, virus carried on skin or clothing, and aerosolized virus. Outbreaks of foot-and-mouth disease are difficult to control and can devastate livestock. During the FMDV outbreak, teams from the UK Department for Environment, Food, and Rural Affairs (DEFRA) visited each infected farm [30, 31]. They recorded the number and types of susceptible and infected animals, examined infected animals to determine the age of the oldest lesions, and collected epithelial samples. Finally, they recorded the date of the cull.

We assume that infectiousness begins on the day that the first lesions appeared and ends with the cull, and we assumed a latent period (between infection and the onset of infectiousness) of 2–16 days. Fig 2 shows the relative locations of the farms, and Fig 3 shows the timeline of the latent and infectious periods. Analysis was conducted in R 3.2 (cran.r-project.org), and the code is available in S3 Text.

These were infected in the 2001 FMDV outbreak in the UK.

The gray bars represent the range of days on which each farm might have been infected.

#### Estimating the hazard of infectious contact.

Without a phylogeny, we estimated the hazard of transmission from an infected farm to a susceptible farm using the likelihood in Eq (5). We assumed a log-logistic contact interval distribution with rate parameter *λ* and shape parameter *γ*, which has the hazard function
(19)
and the survival function *S*(*τ*, *λ*, *γ*) = (1 + (*λτ*)^{γ})^{−1} where *τ* is the infectious age. This is the simplest parametric model in survival analysis that allows a non-monotonic hazard function. When *γ* ≤ 1, the hazard decreases monotonically. When *γ* > 1, the hazard is unimodal. To enforce the restriction that *λ* > 0 and *γ* > 0, maximum likelihood estimation was done using parameters ln *λ* and ln *γ*.

If farm *j* is infected on day *t*, let denote its infectious set and denote its exposure set. For each , the times *t*_{i} + *ε*_{i} of onset of infectiousness and of onset of symptoms are known. Without a phylogeny, the overall likelihood contribution for each infected farm *j* except *K* (the index farm) is the sum of the likelihood in Eq (5) over all possible infection times:
(20)

Note that the sum of the hazards is zero for each *t* where there is no possible infector. Via a sum-product factorization, the product of Eq (20) over all *j* ≠ *L* is the sum of the likelihoods of all possible combinations of infection times at the farms.

With a phylogeny, we estimated the hazard of transmission from an infected farm to a susceptible farm using the likelihood in Eq (7), which is a weighted sum of the likelihood contributions of each transmission tree. Let denote the set of endogenously infected farms. For each transmission tree **v**, the likelihood is
(21)
where *v*_{j} denotes the infector of farm *j*. We assumed that the within-host phylogeny for each farm that infected *m* > 0 other farms was chosen uniformly at random from all rooted, bifurcating phylogenies with *m* + 1 tips, so each transmission tree gets a weight proportional to Eq (17).

#### Data on farms that escaped infection.

As usual, the epidemiologic data set contains only infected farms. To illustrate how our results depend on farms that escaped infection, we repeat the analyses with and without a phylogeny using 6, 12, and 24 uninfected farms. Because observation of the outbreak ended after the end of infectiousness in all infected farms, the likelihood contribution from each uninfected farm is where is the set of infected farms and *ι*_{i} is the infectious period for farm *i*.

## Results

### Simulations

Table 1 shows the mean error, mean squared error, 95% confidence interval coverage probability, and relative efficiency of *β*_{inf}, *β*_{sus}, and ln *λ*_{0} estimators in the simulations. In all cases, the point estimates were nearly unbiased (indicated by the mean error squared being much smaller than the mean squared error) and the 95% confidence interval coverage probabilities were near 0.95. Fig 4 shows that estimates of *β*_{inf} using a phylogeny were more efficient than estimates using epidemiologic data only and less efficient than estimates using who-infected-whom. By mean squared error, the phylogenetic estimates had a relative efficiency of 1.39 compared to estimates using only epidemiologic data and 0.80 compared to estimates using who-infected-whom. Because knowledge of who-infected-whom does not add to our knowledge of who was infected, all three analyses were equally efficient for *β*_{sus} (similar results were obtained for estimates with and without who-infected-whom in Ref [46]). Fig 5 shows that estimates of ln *λ*_{0} using a phylogeny were more efficient than those using epidemiologic data only and less efficient than those using who-infected whom. By mean squared error, the phylogenetic estimates had a relative efficiency of 1.17 compared to estimates using only epidemiologic data and 0.90 compared to estimates using who-infected-whom.

The dashed and dotted lines are smoothed means.

The dashed and dotted lines are smoothed means.

Table 2 shows the mean error, mean squared error, 95% confidence interval coverage probability, and relative efficiency of *β*_{inf}, *β*_{sus}, and ln *λ*_{0} estimators that excluded data on uninfected household members. The mean squared errors were much higher than the corresponding estimators in Table 1, so their relative efficiency was very low. In all cases, the efficiency loss from excluding data on individuals who escape infection was much larger than the efficiency gain from incorporating a phylogeny or from knowing exactly who infected whom. For estimators of *β*_{inf} and *β*_{sus}, the square of the mean error was much smaller than the mean squared error, indicating little bias. Estimates of ln *λ*_{0} were biased upward, resulting in extremely low relative efficiencies and coverage probabilities. In [44], similar results were seen for estimates of the basic reproduction number (*R*_{0}) when approximate likelihoods for mass-action models, which do not require data on uninfected individuals, were used to analyze data from network-based epidemics.

Table 3 shows results the mean error, mean squared error, 95% confidence interval coverage probability, and relative efficiency of *β*_{inf}, *β*_{sus}, ln *λ*_{0}, and ln *γ* estimators from models with Weibull contact interval distributions with rate parameter *λ*_{0} = 2 and shape parameter *γ* = .5. All estimators are unbiased with 95% confidence interval coverage probabilities near 0.95. The relative efficiencies are similar to those in Table 1, showing that the gains in efficiency for estimates of infectiousness hazard ratios and baseline hazards occur under weak assumptions about the baseline hazard.

### Data analysis

With no phylogeny, there are 19,440 possible transmission trees linking the 12 farms in the Durham cluster. A phylogeny was constructed in SeaView [52] using consensus RNA sequences from 15 farms, including three farms not epidemiologically linked to the cluster [29]. We used a generalized time reversible (GTR) nucleotide substitution model with four rate classes on 8,196 sites. Fig 6 shows the rooted phylogeny for the 12 farms in the cluster with branch tips scaled to reflect the time of infectiousness onset at each farm (interior branch lengths do not indicate branching times). The order of infectiousness onsets is known, so first(*x*) is the host with the earliest onset of infectiousness in clade *C*_{x}. Fig 7 shows the postorder host set *D*_{x} for each node *x* in the phylogeny, and Fig 8 shows the host sets. The host is uniquely determined by the phylogeny for all interior nodes except three. Fig 9 shows the six possible interior node host assignments and the corresponding transmission trees.

Rooted phylogeny for RNA sequences from the 12 farms in the Durham cluster with tips at the onset of infectiousness. Each interior node *x* has first(*x*) written next to it.

The postorder host set *D*_{x} is written next to each interior node *x*. These are calculated in a postorder traversal using the leaf hosts and the infectious sets.

The host set *H*_{x} is written next to each interior node *x*. These are calculated in a preorder traversal using the root host and the postorder host sets.

Dashed lines on the right indicate transmissions fixed by the phylogeny to the left. Dotted lines indicate that the infector of an individual depends on a choice of hosts in the phylogeny. At the top, *K* infects *C*, *C* infects *P*, and either *K* or *L* infects *E*. At the bottom, *O* infects *C*, either *O* or *C* infects *P*, and either *K* or *L* infects *E*. There are six possible transmission trees—two on top and four on the bottom.

#### Hazard of infectious contact.

Table 4 shows the rate and shape parameter estimates with and without a phylogeny for 0, 6, 12, and 24 uninfected farms. The estimates with a phylogeny have lower rate and shape parameters, suggesting a slightly more rapid increase in infectiousness with a lower peak. The estimates using a phylogeny have narrower confidence intervals. The predicted hazard functions are shown in Fig 10, and they are very sensitive to the number of farms that escaped infection. A similar sensitivity was observed by Lau *et al*. [43], who estimated 300 uninfected farms based on the crude density of farms in Durham County.

These are log-logistic hazard functions based on the rate and shape parameters estimates in Table 4.

To understand the effect of the phylogenies on the precision of the hazard function estimates, we constructed approximate pointwise 95% confidence bands for the hazard functions estimated with no uninfected farms. We took 4000 samples from each likelihood using a grid with spacing 0.02 on the interval [−3.6, −1.3] for ln *λ* and [−0.5, 1.8] for ln *γ*. These intervals include the 99% confidence limits for both estimates plus a boundary of width 0.2. For each sample, we calculated the hazard function at 500 time points between 0 and 15. At each time point, we took the .025 and .975 quantiles of the calculated hazards to get an approximate 95% confidence interval. Fig 11 shows that the confidence bands for the estimates with phylogenies are narrower. Similar results were obtained when parameters were sampled from their approximate multivariate normal distributions, which can be done using S3 Text.

These assume no farms escaped infection. The bands for the estimates using a phylogeny are narrower.

## Discussion

Here we took a single phylogeny, derived the set of possible transmission trees, and estimated transmission parameters using likelihoods that are sums over the possible transmission trees. By restricting the set of possible transmission trees, incorporating a phylogeny into the analysis produced more efficient estimates of infectiousness hazard ratios and the baseline hazard of infectious contact. The efficiency gain was largest for infectiousness hazard ratio estimates. The combination of survival analysis and algorithms linking phylogenies to transmission trees can be incorporated into analyses based on many different statistical and phylogenetic methods. More precise estimates of transmission parameters, not the transmission trees themselves, will inform public health responses to emerging infections.

We assumed complete observation of infection times, latent periods, and infectious periods, so our methods need to be extended to account for missing data and phylogenetic uncertainty. Bayesian MCMC with data augmentation is a well-established method of handling missing data in infectious disease epidemiology [53]. Combining this with a Bayesian MCMC for phylogeny reconstruction would allow our likelihoods to be integrated over both missing data and phylogenetic uncertainty [54]. Standard phylogenetic reconstruction assumes a well-mixed population, which may not be a good approximation for pathogen populations partitioned among hosts, but Bayesian methods can reconcile the reconstruction of phylogenies with possible transmission trees [49]. Extending these methods to nonparametric or semiparametric models of disease transmission will require iterative approaches to the assignment of probabilities to possible transmission trees [45, 46].

Our methods can be extended to diseases with complex within-host and between-host dynamics by adapting the likelihood in Eq (7) or the algorithms linking phylogenies to transmission trees. For example, Assumption 2 requires a strict transmission bottleneck. If multiple pathogen lineages can be transmitted when a new host is infected at time *t*, sequences sampled from the infectee could have an MRCA with a branching time before *t*. The nodes hosted by the infectee would no longer form a subtree of the phylogeny. This is similar to deep coalescence (lineage sorting), which causes gene trees and species trees to have different topologies. Deep coalescence would be most likely to occur in a disease with a wide transmission bottleneck, substantial within-host diversity, and little within-host evolution [55]. Algorithm 1 could be adapted by allowing the infector of an to be the host of an interior node of the phylogeny whose child is hosted by *j*. The likelihood in Eq (7) would have to include the likelihood contributions of these additional host assignments, including the within-host pathogen dynamics allowing two parallel strains to pass through *i* to *j*.

### Simulations

The simulations suggest that a phylogeny can recover much of the information that would be obtained by observing who-infected-whom. Incorporating a phylogeny generated more precise estimates of *β*_{inf} and ln *λ*_{0}. This increase in efficiency remained when infectiousness varied over the course of the infectious period, as in the Weibull models. The simulations used only phylogenetic topologies and assumed that all within-host topologies were equally likely, limiting the ability of the phylogeny to constrain the set of possible transmission trees. Using branching times and more realistic models of within-host pathogen evolution would allow greater information about who-infected-whom to be extracted from a phylogeny.

The simulations that excluded data on household members who escape infection showed that this information is critical to estimating *β*_{inf}, *β*_{sus}, and ln *λ*_{0} accurately. These individuals do not appear anywhere on the pathogen phylogeny, so this point has escaped the attention of many researchers working on incorporating phylogenetics into the analysis of infectious disease transmission data. Any analysis that excludes this data should have an explicit justification based on a complete-data model—for example, the initial spread of a mass-action epidemic can be analyzed without data on escapees [44]. In general, epidemiologic studies of emerging infections should be designed to capture information on individuals who were exposed to infection but not infected, which might justify greater emphasis on detailed studies of households, schools, or other settings with rapid transmission and a clearly defined population at risk.

### Data analysis

The data analysis showed that the increased precision found in the simulations can be obtained in practice. The incorporation of phylogenies allowed more precise estimates of the hazard of FMDV transmission from infected to susceptible farms. For simplicity, our analysis assumed that the times of infectiousness onset were accurately estimated. A data-augmented MCMC [53] could be used to account for uncertainty in the onset of infectiousness, showing the importance of extending our methods to account for missing data.

A more important limitation of this analysis was the lack of data on uninfected farms. The hazard function estimates were highly sensitive to the number of uninfected farms in the area where the cluster occurred. These data often go uncollected in outbreaks because their importance is unrecognized. This insight has important implications for the theory and practice of molecular infectious disease epidemiology.

## Supporting Information

### S1 Appendix. Proofs of the lemmas and theorems.

https://doi.org/10.1371/journal.pcbi.1004869.s001

(PDF)

### S1 Data. Parameters, point estimates, and 95% confidence limits from the simulations.

Used in S2 Text.

https://doi.org/10.1371/journal.pcbi.1004869.s002

(CSV)

### S2 Data. Parameters, point estimates, and 95% confidence limits from the simulations using data on infecteds only.

Used in S2 Text.

https://doi.org/10.1371/journal.pcbi.1004869.s003

(CSV)

### S3 Data. Parameters, point estimates, and 95% confidence limits from the simulations with Weibull contact intervals.

Used in S3 Text.

https://doi.org/10.1371/journal.pcbi.1004869.s004

(CSV)

### S2 Text. R code for the simulation data analysis.

Including Tables 1–3 and Figs 4–5.

https://doi.org/10.1371/journal.pcbi.1004869.s006

(R)

### S3 Text. R code for the FMDV data analysis.

Including Table 4 and Figs 2–3 and 6–11.

https://doi.org/10.1371/journal.pcbi.1004869.s007

(R)

### S4 Text. Newick file for rescaled Durham cluster phylogeny.

Used in S3 Text.

https://doi.org/10.1371/journal.pcbi.1004869.s008

(TREE)

## Acknowledgments

The authors thank participants in the RAPIDD-EPI Workshop on Survival Analysis and Phylogenetics in Infectious Disease Epidemiology at the University of Florida in January, 2013 for useful comments on this research. TB is grateful to the University of Florida for hosting him on a sabbatical.

## Author Contributions

Conceived and designed the experiments: EK TB MEH IML. Performed the experiments: EK. Analyzed the data: EK. Wrote the paper: EK TB MEH IML.

## References

- 1. Grenfell BT, Pybus OG, Gog JR, Wood JLN, Daly JM, Mumford JA, et al. Unifying the epidemiological and evolutionary dynamics of pathogens. Science. 2004;327:327–332.
- 2. Wilson DJ, Falush D, McVean G. Germs, genomes and genealogies. Trends in Ecology and Evolution. 2005;20:39–45. pmid:16701339
- 3. Lemey P, Rambaut A, Drummond AJ, Suchard MA. Bayesian phylogeography finds its roots. PLoS Computational Biology. 2009;5:e1000520. pmid:19779555
- 4. Rambaut A, Robertson DL, Pybus OG, Peeters M, Holmes EC. Phylogeny and the origin of HIV-1. Nature. 2001;410:1047–1048. pmid:11323659
- 5. Gilbert MTP, Rambaut A, Wlasiuk G, Spira TJ, Pitchenik AE, Worobey M. The emergence of HIV/AIDS in the Americas and beyond. PNAS. 2007;104:18566–18570. pmid:17978186
- 6. Nelson MI, Simonesen L, Viboud C, Miller MA, Holmes EC. Phylogenetic analysis reveals the global migration of seasonal influenza A viruses. PLoS Pathogens. 2007;3:e131.
- 7. Rambaut A, Pybus OG, Nelson MI, Viboud C, Taubenberger JK, Holmes EC. The genomic and epidemiological dynamics of human influenza A virus. Nature. 2008;453:615–619. pmid:18418375
- 8. Russell CA, Jones TC, Barr IG, Cox NJ, Garten RA, Gregory V, et al. The global circulation of seasonal influenza A (H3N2) viruses. Science. 2008;320:340–346. pmid:18420927
- 9. Bedford T, Riley S, Barr IG, Broor S, Chadha M, Cox NJ, et al. Global circulation patterns of seasonal influenza viruses vary with antigenic drift. Nature. 2015. pmid:26053121
- 10. Pybus OG, Rambaut A, Harvey PH. An integrated framework for the inference of viral population history from reconstructed genealogies. Genetics. 2000;155:1429–1437. pmid:10880500
- 11. Pybus O, Charleston MA, Gupta S, Rambaut A, Holmes EC, Harvey PH. The epidemic behavior of the hepatitis C virus. Science. 2001;292:2323–2325. pmid:11423661
- 12. Biek R, Henderson JC, Waller LA, Rupprecht CE, Real LA. A high-resolution genetic signature of demographic and spatial expansion in epizootic rabies virus. PNAS. 2007;104:7993–7998. pmid:17470818
- 13. Volz EM, Kosakovsky Pond SL, Ward MJ, Leigh Brown AJ, Frost SDW. Phylodynamics of infectious disease epidemics. Genetics. 2009;183:1421–1430. pmid:19797047
- 14. Frost SDW, Volz EM. Viral phylodynamics and the search for an ‘effective number of infections’. Philosophical Transactions of the Royal Society B. 2010;365:1879–1890.
- 15. Koelle K, Rasmussen DA. Rates of coalescence for common epidemiological models at equilibrium. Journal of the Royal Society Interface. 2011;9:997–1007.
- 16. Stadler T, Kühnert D, Bonhoeffer S, Drummond AJ. Birth-death skyline plot reveals temporal changes of epidemic spread in HIV and hepatitis C virus (HCV). Proceedings of the National Academy of Science. 2013;110:228–233.
- 17. Rasmussen DA, Ratmann O, Koelle K. Inference for nonlinear epidemiological models using genealogies and time series. PLoS Computational Biology. 2011;7:e1002136. pmid:21901082
- 18. Rasmussen DA, Volz EM, Koelle K. Phylodynamic inference for structured epidemiological models. PLoS Computational Biology. 2014;10:e1003570. pmid:24743590
- 19. Ou CY, Ciesielski CA, Myers G, Bandea CI, Luo CC, Korber BTM, et al. Molecular epidemiology of HIV transmission in a dental practice. Science. 1991;256:1165–1171.
- 20. Holmes EC, Zhang LQ, Simmonds P, Rogers AS, Leigh Brown AJ. Molecular investigation of Human Immunodeficiency Virus (HIV) infection in a patient of an HIV-infected surgeon. Journal of Infectious Diseases. 1993;167:1411–1414. pmid:8501332
- 21. Leitner T, Escanilla D, Franzén C, Uhlén M, Albert J. Accurate reconstruction of a known HIV-1 transmission history by phylogenetic tree analysis. PNAS. 1996;93:10864–10869. pmid:8855273
- 22. Leitner T, Albert J. The molecular clock of HIV unveiled through analysis of a known transmission history. PNAS. 1999;96:10752–10757. pmid:10485898
- 23. Spada E, Sagliocca L, Sourdis J, Garbuglia AR, Poggi V, De Fusco C, et al. Use of the minimum spanning tree model for molecular epidemiological investigation of a nosocomial outbreak of hepatitis C virus infection. Journal of Clinical Microbiology. 2004;42:4230–4236. pmid:15365016
- 24. Jombart T, Eggo RM, Dodd PJ, Balloux F. Reconstructing disease outbreaks from genetic data: a graph approach. Heredity. 2011;106:383–390. pmid:20551981
- 25.
Snitkin ES, Zelazny AM, Thomas PJ, Stock F, Program NCS, Henderson DK, et al. Tracking a hospital outbreak of carbapenem-resistant
*Klebsiella pneumoniae*with whole-genome sequencing. Science Translational Medicine. 2012;4:148ra116. pmid:22914622 - 26. Wertheim JO, Kosakovsky Pond SL, Little SJ, De Gruttola V. Using HIV transmission networks to investigate community effects in HIV prevention trials. PLoS ONE. 2011;6:e27775. pmid:22114692
- 27. Ypma RJF, Bataille AMA, Stegeman A, Koch G, Wallinga J, van Ballegooijen WM. Unravelling transmission trees of infectious diseases by combining genetic and epidemiological data. Proceedings of the Royal Society B. 2012;279:444–450. pmid:21733899
- 28. Jombart T, Cori A, Didelot X, Cauchemez S, Fraser C, Ferguson N. Bayesian reconstruction of disease outbreaks by combining epidemiologic and genomic data. PLoS Computational Biology. 2014;10:e1003457. pmid:24465202
- 29. Morelli MJ, Thébaud G, Chadœuf J, King DP, Haydon DT, Soubeyrand S. A Bayesian inference framework to reconstruct transmission trees using epidemiological and genetic data. PLoS Computational Biology. 2012;8:e1002768. pmid:23166481
- 30. Cottam EM, Haydon DT, Paton DJ, Gloster J, Wilesmith JW, Ferris NP, et al. Molecular epidemiology of the foot-and-mouth disease virus outbreak in the United Kingdom in 2001. Journal of Virology. 2006;80:11274–11282. pmid:16971422
- 31. Cottam EM, Thébaud G, Wadsworth J, Gloster J, Mansley L, Paton DJ, et al. Integrating genetic and epidemiological data to determine transmission pathways of foot-and-mouth disease virus. Proceedings of the Royal Society B. 2008;275:887–895. pmid:18230598
- 32. Cottam EM, Wadsworth J, Shaw AE, Rowlands RJ, Goatley L, Maan S, et al. Transmission pathways of foot-and-mouth disease virus in the United Kingdom in 2007. PLoS Pathogens. 2008;4:e1000050. pmid:18421380
- 33. Gardy JL, Johnston JC, Ho Sui SJ, Cook VJ, Shah L, Brodkin E, et al. Whole-genome sequencing and social-network analysis of a tuberculosis outbreak. New England Journal of Medicine. 2011;364:730–739. pmid:21345102
- 34.
Didelot X, Eyre DW, Cule M, Ip CLC, Ansari MA, Griffiths D, et al. Microevolutionary analysis of
*Clostridium difficile*genomes to investigate transmission. Genome Biology. 2012;13:R118. pmid:23259504 - 35.
Didelot X, Nell S, Yang I, Woltemate S, van der Merwe S, Suerbaum S. Genomic evolution and transmission of
*Helicobacter pylori*in two South African families. PNAS. 2013;110:13880–13885. pmid:23898187 - 36.
Bryant JM, Schürch AC, van Deutekom H, Harris SF, de Beer JL, de Jager V, et al. Inferring patient to patient transmission of
*Mycobacterium tuberculosis*from whole genome sequencing data. BMC Infectious Diseases. 2013;13:110. pmid:23446317 - 37. Worby CJ, Lipsitch M, Hanage WP. Within-host bacterial diversity hinders accurate reconstruction of transmission networks from genomic distance data. PLoS Computational Biology. 2014;10:e1003549. pmid:24675511
- 38. Worby CJ, Chang HH, Hanage WP, Lipsitch M. The distribution of pairwise genetic distances: A tool for investigating disease transmission. Genetics. 2014;198:1395–1404. pmid:25313129
- 39. Pybus OG, Rambaut A. Evolutionary analysis of the dynamics of viral infectious disease. Nature Reviews Genetics. 2009;10:540–550. pmid:19564871
- 40. Ypma RJF, van Ballegooijen WM, Wallinga J. Relating phylogenetic trees to transmission trees of infectious disease outbreaks. Genetics. 2013;195:1055–1062. pmid:24037268
- 41. Romero-Severson E, Skar H, Bulla I, Albert J, Leitner T. Timing and order of transmission events is not directly reflected in a pathogen phylogeny. Molecular Biology and Evolution. 2014;31:2472–2482. pmid:24874208
- 42. Didelot X, Gardy J, Colijn C. Bayesian inference of infectious disease transmission from whole-genome sequence data. Molecular Biology and Evolution. 2014;31:1869–1879. pmid:24714079
- 43. Lau MSY, Marion G, Streftaris G, Gibson G. A systematic Bayesian integration of epidemiological and genetic data. PLoS Computational Biology. 2015;11:e1004633. pmid:26599399
- 44.
Kenah E. Contact intervals, survival analysis of epidemic data, and estimation of
*R*_{0}. Biostatistics. 2011;12:548–566. pmid:21071607 - 45. Kenah E. Nonparametric survival analysis of epidemic data. Journal of the Royal Statistical Society, Series B. 2013;75:277–303.
- 46. Kenah E. Semiparametric relative-risk regression for infectious disease transmission data. Journal of the American Statistical Association. 2015;110:313–325. pmid:26146425
- 47. Rampey AH Jr, Longini IM Jr, Haber M, Monto AS. A discrete-time model for the statistical analysis of infectious disease incidence data. Biometrics. 1992;48:117–128. pmid:1316178
- 48. Kenah E, Lipsitch M, Robins JM. Generation interval contraction and epidemic data analysis. Mathematical Biosciences. 2008;213:71–79. pmid:18394654
- 49. Hall M, Rambaut A. Epidemic reconstruction in a phylogenetics framework: transmission trees as partitions of the node set. PLoS Computational Biology. 2015;11:e1004613. pmid:26717515
- 50. Sankoff D. Minimal mutation trees of sequences. SIAM Journal of Applied Mathematics. 1975;28:35–42.
- 51.
Spickler AR. Foot and Mouth Disease. Iowa State University Center for Food Security & Public Health; April, 2014.
- 52. Gouy M, Guindon S, Gascuel O. Seaview version 4: A multiplatform graphical user interface for sequence alignment and phylogenetic tree building. Molecular Biology and Evolution. 2010;27:221–224. pmid:19854763
- 53. O’Neill PD, Roberts GO. Bayesian inference for partially observed stochastic epidemics. Journal of the Royal Statistical Society, Series A. 1999;162:121–129.
- 54.
Yang Z. Computational Molecular Evolution. Oxford Series in Ecology and Evolution. Oxford: Oxford University Press; 2006.
- 55. Maddison WP. Gene trees in species trees. Systematic Biology. 1997;46:523–536.