| Bioinformatics Toolbox™ | ![]() |
T2 = prune(T1, Nodes)
T2 = prune(T1, Nodes, 'Mode','Exclusive')
| T1 | Phylogenetic object created with the phytree constructor function. |
| Nodes | Nodes to remove from tree. |
Mode | Property to control the method of pruning. Enter either 'Inclusive' or 'Exclusive'. The default value is 'Inclusive'. |
T2 = prune(T1, Nodes)removes the nodes listed in the vector Nodes from the tree T1. prune removes any branch or leaf node listed in Nodes and all their descendants from the tree T1, and returns the modified tree T2. The parent nodes are connected to the 'brothers' as required. Nodes in the tree are labeled as [1:numLeaves] for the leaves and as [numLeaves+1:numLeaves+numBranches] for the branches. Nodes can also be a logical array of size [numLeaves+numBranches x 1] indicating the nodes to be removed.
T2 = prune(T1, Nodes, 'Mode','Exclusive')changes the property (Mode) for pruning to 'Exclusive' and removes only the descendants of the nodes listed in the vector Nodes. Nodes that do not have a predecessor become leaves in the list Nodes. In this case, pruning is the process of reducing a tree by turning some branch nodes into leaf nodes, and removing the leaf nodes under the original branch.
Load a phylogenetic tree created from a protein family
tr = phytreeread('pf00002.tree');
view(tr)
% To :
Remove all the 'mouse' proteins
ind = getbyname(tr,'mouse'); tr = prune(tr,ind); view(tr)
Remove potential outliers in the tree
[sel,sel_leaves] = select(tr,'criteria','distance',...
'threshold',.3,...
'reference','leaves',...
'exclude','leaves',...
'propagate','toleaves');
tr = prune(tr,~sel_leaves)
view(tr)
Bioinformatics Toolbox™ functions: phytree (object constructor), phytreetool
Bioinformatics Toolbox methods of phytree object: select, get
![]() | plot (phytree) | reorder (phytree) | ![]() |
| © 1984-2008- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |