Description Usage Arguments Details Value References See Also Examples
Coerce phylogenetic trees to phyloXML documents, objects of class xml_document.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | write_phyloxml(
tree,
file = "",
overwrite = FALSE,
read_options = list(),
write_options = list(),
events = NULL,
...
)
## S3 method for class 'phylo'
write_phyloxml(
tree,
file = "",
overwrite = FALSE,
read_options = list(),
write_options = list(),
events = NULL,
name = "A phylogenetic tree",
description = "Some description",
xmlns = "http://www.phyloxml.org",
digits = 20,
...
)
|
tree |
A phylogenetic tree. |
file |
Character scalar. When equal to |
overwrite |
When |
read_options, write_options |
List of arguments passed to xml2::read_xml and xml2::write_xml respectively. |
events |
A data.frame with events. It must be |
... |
Further arguments to be passed to the method (see details). |
name |
Character scalar. Name of the tree. |
description |
Character scalar. Description of the tree. |
xmlns |
Character scalar. Location of the default namespace (see the XML Namespaces section in w3schools). |
digits |
Integer scalar. Precision to use when writing numbers. |
So far, this function has a method for phylo objects
from the ape package. The following elements are supported:
Branch lengths as stored in edge.length
Labels, which are exported as name, as stored in tip.label and, if
available, Node.label.
Tree topology as stored in edges
An XML document (see xml2::read_xml)
Han M.V. and Zmasek C.M. (2009) "phyloXML: XML for evolutionary biology and comparative genomics" BMC Bioinformatics, 10:356 doi:10.1186/1471-2105-10-356
validate_phyloxml
1 2 3 4 5 6 | # Random tree from the ape package ------------------------------------------
set.seed(1)
x <- ape::rtree(5)
x
write_phyloxml(x)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.