Learn R Programming

ape (version 5.8-1)

write.phyloXML: Write Tree File in phyloXML Format

Description

This function writes trees to a file of phyloXML format.

Usage

write.phyloXML(phy, file = "", tree.names = FALSE)

Value

None (invisible NULL).

Arguments

phy

an object of class "phylo" or "multiPhylo".

file

a file name specified by either a variable of mode character, or a double-quoted string; if file = "" (the default) then the tree is written on the standard output connection (i.e. the console).

tree.names

either a logical or a vector of mode character specifying whether or which tree names should be written to the file.

Author

Federico Marotta

Details

If several trees are given, they will be represented as multiple <phylogeny> elements. Contrary to write.nexus, the trees need not have the same tip labels.

When tree.names is TRUE, the tree names will be always added as <name> tags to each phylogeny element. If the phy object is unnamed, then the names will be automatically generated from the tree indices as "tree<index>" (e.g. tree1, tree2, ...). If tree.names is a character vector, the specified names will be used instead.

Branch lengths, labels, and rootedness are preserved in the phyloXML file.

References

Han, M. V. and Zmasek, C. M. (2009) phyloXML: XML for evolutionary biology and comparative genomics. BMC Bioinformatics, 10, 356.

See Also

read.tree, write.tree, read.nexus, write.nexus, read.nexus.data, write.nexus.data