Differences Between Phylogenetic Trees
A family of functions for determining and plotting the differences between two trees.
phylo.diff
plots two trees side by side, highlighting edges unique
to each tree in red.
distinct.edges
finds the edges present in the first argument not in
the second.
edge.from.split
locates the edge id from a given split.
get.bipartition
gets the bipartition of tips formed by a single edge.
partition.leaves
returns the set of all bipartitions from all edges.
phylo.diff(x, y, ...) distinct.edges(x, y) edge.from.split(x, split) get.bipartition(x, e) partition.leaves(x)
x |
The first (or only) tree. |
y |
The second tree, for the functions that accept two trees. |
split |
A list of bipartitions, probably from |
e |
An edge for a particular tree, given as an id. |
... |
Additional arguments to pass to the |
phylo.diff
uses the ape tree plotting function. The other functions
are mostly meant as support functions.
phylo.diff
returns invisible.
distinct.edges
returns a numeric vector of edge ids for the first
tree.
edge.from.split
returns an edge id for a particular tree
corresponding to a given bipartition and NA if none such edge exists.
get.bipartition
returns a character vector of the tips below that
edge in the given tree.
partition.leaves
returns a list of partitions (themselves character
vectors) of the given tree.
John Chakerian
Chakerian, J. and Holmes, S. P. Computational Tools for Evaluating Phylogenetic and Heirarchical Clustering Trees. arXiv:1006.1015v1.
data(woodmouse) otree <- root(fastme.ols(dist.dna(woodmouse)), "No305", resolve.root=TRUE) breps <- 10 trees <- boot.phylo(otree, woodmouse, B=breps, function(x) root(fastme.ols(dist.dna(x)), "No305", resolve.root=TRUE), trees = TRUE) combined.trees <- c(list(otree), trees$trees) binning <- bin.multiPhylo(combined.trees) phylo.diff(combined.trees[[match(1, binning)]], combined.trees[[match(2, binning)]])
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.