getbyname
Branches and leaves from phytree object
Syntax
S = getbyname(Tree, Expression)
S = getbyname(Tree, Key)
S = getbyname(Tree, Key,
'Exact', ExactValue)
Arguments
Tree | phytree object created by |
Expression | Regular expression or cell array
of regular expressions to search for in |
Key | Character vector or cell array of character vectors to
search for in |
ExactValue | Controls whether the full exact node name must match the character
vector(s), ignoring case. Choices are true or false (default).
When true, S is a numeric
column vector indicating which node names match a query exactly, in
full. |
Description
searches
the nodes names in S = getbyname(Tree, Expression)Tree, a phytree object,
for the regular expression(s) specified by Expression.
It returns S, a logical matrix of size NumNodes-by-M,
where M is either 1 or the length
of Expression. Each row in S corresponds
to a node, and each column corresponds to a query in Expression.
The logical matrix S indicates the node
names that match Expression, ignoring case.
searches
the nodes names in S = getbyname(Tree, Key)Tree, a phytree object,
for the character vector(s) specified by Key.
It returns S, a logical matrix of size NumNodes-by-M,
where M is either 1 or the length
of Key. Each row in S corresponds
to a node, and each column corresponds to a query in Key.
The logical matrix S indicates the node
names that match Key, ignoring case.
specifies
whether the full exact node name must match the character vector(s),
ignoring case. Choices are S = getbyname(Tree, Key,
'Exact', ExactValue)true or false (default).
When true, S is a numeric
column vector indicating which node names match a query exactly, in
full.
Examples
Read a phylogenetic tree file created from a protein family into a phytree object.
tr = phytreeread('pf00002.tree');Determine all the mouse and human proteins by searching for nodes that include the character vectors
'mouse'and'human'in their names.sel = getbyname(tr,{'mouse','human'}); view(tr,any(sel,2));
Version History
Introduced before R2006a
See Also
phytree | phytreeread | get | prune | select