phytreewrite - Write phylogenetic tree object to Newick-formatted file

Syntax

phytreewrite('File', Tree)
phytreewrite(Tree)

Arguments

File

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.

Examples

Read tree data from a Newick-formatted file.

tr = phytreeread('pf00002.tree')

Remove all the mouse proteins

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: phytree (object constructor), phytreeread, phytreetool, seqlinkage

Bioinformatics Toolbox object: phytree object

Bioinformatics Toolbox methods of phytree object: getnewickstr

  


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