makePhyloTree: Make phylogenetic tree (internal)

View source: R/makePhyloTree.R

makePhyloTreeR Documentation

Make phylogenetic tree (internal)

Description

This function is called by getLabGenealogy to turn an edge list and corresponding lengths and root node number into a tree of class phylo

Usage

makePhyloTree(Edges, Lengths, Root)

Arguments

Edges

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.

Lengths

a numeric vector of the same length as the columns of Edges. Each entry corresponds to the length of that edge.

Root

the number of the internal node which is to be the root (usually the number of tips + 1)

Value

An object of class phylo. When called by getLabGenealogy this represents the genealogical transmission tree from infectors to infectees.

Author(s)

Caroline Colijn c.colijn@imperial.ac.uk

Michelle Kendall michelle.louise.kendall@gmail.com


phyloTop documentation built on Feb. 16, 2023, 5:55 p.m.