distory (version 1.4.4)

phylo.diff: Differences Between Phylogenetic Trees

Description

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.

Usage

phylo.diff(x, y, …)

distinct.edges(x, y)

edge.from.split(x, split)

get.bipartition(x, e)

partition.leaves(x)

Arguments

x

The first (or only) tree.

y

The second tree, for the functions that accept two trees.

split

A list of bipartitions, probably from partition.leaves.

e

An edge for a particular tree, given as an id.

Additional arguments to pass to the plot.phylo function.

Value

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.

Details

phylo.diff uses the ape tree plotting function. The other functions are mostly meant as support functions.

References

Chakerian, J. and Holmes, S. P. Computational Tools for Evaluating Phylogenetic and Heirarchical Clustering Trees. arXiv:1006.1015v1.

See Also

dist.multiPhylo

Examples

Run this code
# NOT RUN {
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)]])
# }

Run the code above in your browser using DataLab