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
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.
1 2 3 4 5 6 7 8 9
The first (or only) tree.
The second tree, for the functions that accept two trees.
A list of bipartitions, probably from
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
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 <email@example.com>
Chakerian, J. and Holmes, S. P. Computational Tools for Evaluating Phylogenetic and Heirarchical Clustering Trees. arXiv:1006.1015v1.
1 2 3 4 5 6 7 8 9 10 11 12
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)]])
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.