Products & Services Solutions Academia Support User Community Company

Learn more about Bioinformatics Toolbox   

phytreewrite - Write phylogenetic tree object to Newick-formatted file

Syntax

phytreewrite(File, Tree)
phytreewrite(Tree)

phytreewrite(..., 'Distances', DistancesValue, ...)
phytreewrite(..., 'BranchNames', BranchNamesValue, ...)

Arguments

File

String specifying a Newick-formatted file. Enter either a file name or a path and file name supported by your operating system (ASCII text file).

TreePhylogenetic tree object, either created with phytree (object constructor function) or imported using the phytreeread function.

Description

phytreewrite(File, Tree) copies the contents of a phytree object from the MATLAB workspace to a file. Data in the file uses the Newick format for describing trees.

The Newick tree format can be found at

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

phytreewrite(Tree) opens the Save Phylogenetic Tree As dialog box for you to enter or select a file name.

phytreewrite(..., 'PropertyName', PropertyValue, ...) calls phytreewrite with optional properties that use property name/property value pairs. You can specify one or more properties in any order. Enclose each PropertyName in single quotation marks. Each PropertyName is case insensitive. These property name/property value pairs are as follows:


phytreewrite(..., 'Distances', DistancesValue, ...)
specifies whether to exclude the distances from the output. DistancesValue can be true (default) or false.

phytreewrite(..., 'BranchNames', BranchNamesValue, ...) specifies whether to exclude the branch names from the output. BranchNamesValue can be true (default) or false.

Examples

Read tree data from a Newick-formatted file.

tr = phytreeread('pf00002.tree')

Remove all the mouse proteins and view the pruned tree.

ind = getbyname(tr,'mouse');
tr = prune(tr,ind);
view(tr)

Write pruned tree data to a file.

phytreewrite('newtree.tree', tr)

See Also

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

Bioinformatics Toolbox object: phytree object

Bioinformatics Toolbox methods of phytree object: getnewickstr

  


Recommended Products

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.

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