write_nwka_nexus.Rd
This function writes one or more trees to a NEXUS format file. Within the NEXUS file, the trees are stored in the Newick-with-Attributes (NWKA) format.
write_nwka_nexus(trees, file, translate = TRUE, translate_quotes = TRUE)
trees | An object of class |
---|---|
file | A file name. |
translate | If this is |
translate_quotes | If this is |
Only the tip labels are included in the Taxa
block and the Translate
instruction (if applicable).
The trees inside the NEXUS file will be stored in NWKA format, including all of the available attributes. This is compatible
with the NEXUS specification, because attributes that cannot be represented in standard Newick format are enclosed within
square brackets ([]
);
The tip names can be specified either as a Name
element in the tree's tip.attributes
element, or as the tip.label
element of the tree. If both are specified, the values stored in
the Name
attribute take precedence (this allows backward compatibility for trees created
using ape
).
The node names and support values can similarly be specified either with a Name
or Support
element in the tree's node.attributes
, or as the tree's node.label
. If all the node labels
can be parsed as numbers, they will be assumed to contain support values; otherwise, they will be
assumed to contain node names. If the node.attributes
already contain a Name
or Support
element, the node labels will be ignored.
https://github.com/arklumpus/TreeNode/blob/master/NWKA.md
Other functions to write trees:
keep_writing_binary_trees()
,
write_binary_trees()
,
write_nwka_tree()