getbyname (phytree)

Branches and leaves from phytree object

Syntax

S = getbyname(Tree, Expression)
S = getbyname(Tree, String)
S = getbyname(Tree, String, 'Exact', ExactValue)

Arguments

Tree

phytree object created by phytree function (object constructor) or phytreeread function.

Expression

Regular expression or cell array of regular expressions to search for in Tree.

String

String or cell array of strings to search for in Tree.

ExactValueControls whether the full exact node name must match the string(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

S = getbyname(Tree, Expression) searches the nodes names in 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.

S = getbyname(Tree, String) searches the nodes names in Tree, a phytree object, for the string(s) specified by String. It returns S, a logical matrix of size NumNodes-by-M, where M is either 1 or the length of String. Each row in S corresponds to a node, and each column corresponds to a query in String. The logical matrix S indicates the node names that match String, ignoring case.

S = getbyname(Tree, String, 'Exact', ExactValue) specifies whether the full exact node name must match the string(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.

Examples

  1. Read a phylogenetic tree file created from a protein family into a phytree object.

    tr = phytreeread('pf00002.tree');
  2. Determine all the mouse and human proteins by searching for nodes that include the strings 'mouse' and 'human' in their names.

    sel = getbyname(tr,{'mouse','human'});
    view(tr,any(sel,2));

More About

Was this topic helpful?