getbyname (phytree) - Branches and leaves from phytree object

Syntax

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

Arguments

Treephytree object created by phytree function (object constructor).
Expression

Regular expression. When Expression is a cell array of strings, getbyname returns a matrix where every column corresponds to every query in Expression.

For information about the symbols that you can use in a matching regular expression, see the MATLAB® function regexp.

StringString or cell array of strings.

Description

S = getbyname(Tree, Expression) returns a logical vector (S) of size NumNodes-by-1 with the node names of a phylogenetic tree (Tree) that match the regular expression (Expression) regardless of letter case.

S = getbyname(Tree, String, 'Exact', true) looks for exact string matches and ignores case. When String is a cell array of char strings, getbyname returns a vector with indices.

Examples

  1. Load a phylogenetic tree created from a protein family.

    tr = phytreeread('pf00002.tree');
  2. Select all the 'mouse' and 'human' proteins.

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

See Also

Bioinformatics Toolbox™ function: phytree (object constructor)

Bioinformatics Toolbox methods of phytree object: get, prune, select

  


 © 1984-2008- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS