| Bioinformatics Toolbox™ | ![]() |
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 =
1Bioinformatics Toolbox functions: phytree (object constructor), phytreeread
Bioinformatics Toolbox methods of phytree object: getbyname, select, subtree
![]() | getbyname (phytree) | getdescendants (biograph) | ![]() |
| © 1984-2008- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |