Skip to Main Content Skip to Search
Product Documentation

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

get | getbyname | getcanonical | phytree | phytreeread | phytreetool | phytreewrite | seqlinkage

How To

  


Free Computational Biology Interactive Kit

See how to analyze, visualize, and model biological data and systems using MathWorks products.

Get free kit

Trials Available

Try the latest computational biology products.

Get trial software
 © 1984-2012- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS