Maximum agreement subtree
mast
computes the maximum agreement subtree (MAST).
mast(x, y, tree = TRUE, rooted = TRUE)
x |
a tree, i.e. an object of class |
y |
a tree, i.e. an object of class |
tree |
a logical, if TRUE returns a tree other wise the tip labels of the the maximum agreement subtree. |
rooted |
logical if TRUE treats trees as rooted otherwise unrooted. |
The code is derived from the code example in Valiente (2009). The version for the unrooted trees is much slower.
mast
returns a vector of the tip labels in the MAST.
Klaus Schliep klaus.schliep@gmail.com based on code of Gabriel Valiente
G. Valiente (2009). Combinatorial Pattern Matching Algorithms in Computational Biology using Perl and R. Taylor & Francis/CRC Press
tree1 <- rtree(100) tree2 <- rSPR(tree1, 5) tips <- mast(tree1, tree2)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.