getnewickstr (phytree) - Create Newick-formatted string

Syntax

String = getnewickstr(Tree)

getnewickstr(..., 'PropertyName', PropertyValue,...)
getnewickstr(..., 'Distances', DistancesValue)
getnewickstr(..., 'BranchNames', BranchNamesValue)

Arguments

TreePhytree object created with the function phytree.
DistancesValueProperty to control including or excluding distances in the output. Enter either true (include distances) or false (exclude distances). Default is true.
BranchNamesValueProperty to control including or excluding branch names in the output. Enter either true (include branch names) or false (exclude branch names). Default is false.

Description

String = getnewickstr(Tree) returns the Newick formatted string of a phylogenetic tree object (Tree).


getnewickstr(..., 'PropertyName', PropertyValue,...)
defines optional properties using property name/value pairs.

getnewickstr(..., 'Distances', DistancesValue), when DistancesValue is false, excludes the distances from the output.

getnewickstr(..., 'BranchNames', BranchNamesValue), when BranchNamesValue is true, includes the branch names in the output.

References

Information about the Newick tree format.

http://evolution.genetics.washington.edu/phylip/newicktree.html 

Examples

  1. Create some random sequences.

    seqs = int2nt(ceil(rand(10)*4));
  2. Calculate pairwise distances.

    dist = seqpdist(seqs,'alpha','nt');
  3. Construct a phylogenetic tree.

    tree = seqlinkage(dist);  
  4. Get the Newick string.

    str  = getnewickstr(tree) 

See Also

Bioinformatics Toolbox functions: phytree (object constructor), phytreeread, phytreetool, phytreewrite, seqlinkage

Bioinformatics Toolbox methods of phytree object: get, getbyname, getcanonical

  


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