Newick (.newick) Format
Newick file format
Description
Examples
References
Newick is a simple text-based format for describing a tree with edge lengths using parentheses and commas.
The GraphTheory[Newick] can convert a Graph representing a tree to its Newick encoding as a string, and vice versa.
The GraphTheory[ImportGraph] and GraphTheory[ExportGraph] commands can read from and write to this format.
The general-purpose commands Import and Export also support this format.
Return the Newick encoding of a tree.
T≔GraphTheory:-Graph⁡1,11,1,12,2,10,2,12,3,10,4,5,4,9,4,11,5,7,6,12,8,11
T≔Graph 1: an undirected graph with 12 vertices and 11 edge(s)
GraphTheory:-Newick⁡T
((((7)5,9)4,8)11,(((3)10)2,6)12)1;
Export this to a file in the home directory of the current user.
Export⁡mytree.newick,DG,base=homedir
35
"Newick file format", Wikipedia, https://en.wikipedia.org/wiki/Newick_format.
See Also
Formats
GraphTheory
Download Help Document