| Contents | Index |
Pointers = getcanonical(Tree)
[Pointers, Distances, Names]
= getcanonical(Tree)
| Tree | phytree object created by phytree function (object constructor). |
Pointers = getcanonical(Tree) returns the pointers for the canonical form of a phylogenetic tree (Tree). In a canonical tree the leaves are ordered alphabetically and the branches are ordered first by their width and then alphabetically by their first element. A canonical tree is isomorphic to all the trees with the same skeleton independently of the order of their leaves and branches.
[Pointers, Distances, Names] = getcanonical(Tree) returns, in addition to the pointers described above, the reordered distances (Distances) and node names (Names).
Create two phylogenetic trees with the same skeleton but slightly different distances.
b = [1 2; 3 4; 5 6; 7 8;9 10]; tr_1 = phytree(b,[.1 .2 .3 .3 .4 ]'); tr_2 = phytree(b,[.2 .1 .2 .3 .4 ]');
Plot the trees.
plot(tr_1) plot(tr_2)
Check whether the trees have an isomorphic construction.
isequal(getcanonical(tr_1),getcanonical(tr_2))
ans =
1getbyname | phytree | phytreeread | select | subtree

See how to analyze, visualize, and model biological data and systems using MathWorks products.
Get free kit| © 1984-2012- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |