This function is called by getLabGenealogy
to turn an edge list and corresponding lengths and root node number into a tree of class phylo
makePhyloTree(Edges, Lengths, Root)
An object of class phylo
. When called by getLabGenealogy
this represents the genealogical transmission tree from infectors to infectees.
a two-column matrix representing the edges of a tree. (It corresponds to the $edge entry of a phylo
object, although the rows may not be in an expected order.) In each row the first entry is an internal node and the second entry is one of its immediate descendants.
a numeric vector of the same length as the columns of Edges
. Each entry corresponds to the length of that edge.
the number of the internal node which is to be the root (usually the number of tips + 1)
Caroline Colijn c.colijn@imperial.ac.uk
Michelle Kendall michelle.louise.kendall@gmail.com