| Bioinformatics Toolbox | ![]() |
Select tree branches and leaves in phytree object
S = select(T) S = select(T, N) [S, Selleaves, Selbranches] = select(...) S = select(..., 'Reference', ReferenceValue) S = select(..., 'Criteria', CriteriaValue) S = select(..., 'Threshold', ThresholdValue) S = select(..., 'Exclude', ExcludeValue) S = select(..., 'Propagate', PropagateValue)
Tree | Phylogenetic tree created with the function phytree (phytree). |
N | Number of closest nodes to the root node. |
| ReferenceValue | Property to select a reference point for measuring distance. |
CriteriaValue | Property to select a criteria for measuring distance. |
ThresholdValue | Property to select a distance value. Nodes with distances below this value are selected. |
| ExcludeValue | Property to remove (exclude) branch or leaf nodes from the output. Enter 'none', 'branchs', or 'leaves'. The default value is 'none'. |
| PropagateValue | Property to select propagating nodes toward the leaves or the root. |
S = select(Tree, N) returns a logical vector (S) of size [NumNodes x 1] indicating the N closest nodes to the root node of a phytree object (Tree) where NumNodes = NumLeaves + NumBranches. The first criterion select uses is branch levels, then patristic distance (also known as tree distance). By default, select uses inf as the value of N, and select(Tree) returns a vector with values of true.
S = select(..., 'Reference', ReferenceValue) changes the reference point(s) to measure the closeness. Reference can be the root (default) or leaves. When using leaves, a node can have multiple distances to its descendant leaves (nonultrametric tree). If this the case, select considers the minimum distance to any descendant leaf.
S = select(..., 'Criteria', CriteriaValue) changes the criteria select uses to measure closeness. If C = 'levels' (default), the first criterion is branch levels and then patristic distance. If C = 'distance', the first criterion is patristic distance and then branch levels.
S = select(..., 'Threshold', ThresholdValue) selects all the nodes where closeness is less than or equal to the threshold value V. Notice that you can also use either of the properties 'criteria' or 'reference', if N is not specified, then N = infF; otherwise you can limit the number of selected nodes by N.
S = select(..., 'Exclude', ExcludeValue) sets a postfilter that excludes all the branch nodes from S when E='branches' or all the leaf nodes when E='leaves'. The default is 'none'.
S = select(..., 'Propagate', PropagateValue) activates a postfunctionality that propagates the selected nodes to the leaves when P=='toleaves' or toward the root finding a common ancestor when P == 'toroot'. The default value is 'none'. P may also be 'both'. The 'Propagate' property acts after the 'Exclude' property.
[S, Selleaves, Selbranches] = select(...) returns two additional logical vectors, one for the selected leaves and one for the selected branches.
% Load a phylogenetic tree created from a protein family:
tr = phytreeread('pf00002.tree');
% To find close products for a given protein (e.g. vips_human):
ind = getbyname(tr,'vips_human');
[sel,sel_leaves] = select(tr,'criteria','distance',...
'threshold',0.6,'reference',ind);
view(tr,sel_leaves)
% To find potential outliers in the tree, use
[sel,sel_leaves] = select(tr,'criteria','distance',...
'threshold',.3,...
'reference','leaves',...
'exclude','leaves',...
'propagate','toleaves');
view(tr,~sel_leaves)
The Bioinformatics Toolbox functions phytree (phytree), phytreetool
phytree object methods pdist, get.
| scfread | seq2regexp | ![]() |
© 1994-2005 The MathWorks, Inc.