getnewickstr
Create Newick-formatted character vector
Syntax
nwk = getnewickstr(Tree)
getnewickstr(..., 'PropertyName', PropertyValue,...)
getnewickstr(..., 'Distances', DistancesValue)
getnewickstr(..., 'BranchNames', BranchNamesValue)
Arguments
Tree | Phytree object created with the function phytree. |
DistancesValue | Property to control including or excluding
distances in the output. Enter either true (include
distances) or false (exclude distances). Default
is true. |
BranchNamesValue | Property 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
returns
the Newick-formatted character vector of a phylogenetic tree object
(nwk = getnewickstr(Tree)Tree).
getnewickstr(..., ' defines
optional properties using property name/value pairs.PropertyName', PropertyValue,...)
getnewickstr(..., 'Distances', ,
when DistancesValue)DistancesValue is false,
excludes the distances from the output.
getnewickstr(..., 'BranchNames', ,
when BranchNamesValue)BranchNamesValue is true,
includes the branch names in the output.
Examples
Create some random sequences.
seqs = int2nt(ceil(rand(10)*4));
Calculate pairwise distances.
dist = seqpdist(seqs,'alpha','nt');
Construct a phylogenetic tree.
tree = seqlinkage(dist);
Get the Newick-formatted character vector.
nwk = getnewickstr(tree)
References
Information about the Newick tree format.
Version History
Introduced before R2006a
See Also
phytree | phytreeread | phytreeviewer | phytreewrite | seqlinkage | get | getbyname | getcanonical