Newick format
≈ 5 min read
Names in other languages
No names in other languages are held for this entry yet.
Article bodies are English and are not machine-translated. A name in another language is not a translation of the article.
In mathematics and phylogenetics, Newick tree format (or Newick notation or New Hampshire tree format) is a way of representing graph-theoretical trees with edge lengths using parentheses and commas. It was adopted by James Archie, William H. E. Day, Joseph Felsenstein, Wayne Maddison, Christopher Meacham, F. James Rohlf, and David Swofford, at two meetings in 1986, the second of which was at Newick's restaurant in Dover, New Hampshire, US. The adopted format is a generalization of the format developed by Meacham in 1984 for the first tree-drawing programs in Felsenstein's PHYLIP package.
In mathematics and phylogenetics, Newick tree format (or Newick notation or New Hampshire tree format) is a way of representing graph-theoretical trees with edge lengths using parentheses and commas. It was adopted by James Archie, William H. E. Day, Joseph Felsenstein, Wayne Maddison, Christopher Meacham, F. James Rohlf, and David Swofford, at two meetings in 1986, the second of which was at Newick's restaurant in Dover, New Hampshire, US. The adopted format is a generalization of the format developed by Meacham in 1984 for the first tree-drawing programs in Felsenstein's PHYLIP package.
Examples
The following tree: could be represented in Newick format in several ways ( (,)); no nodes are named (A,B,(C,D)); leaf nodes are named (A,B,(C,D)E)F; all nodes are named (:0.1,:0.2,(:0.3,:0.4):0.5); all but root node have a distance to parent (:0.1,:0.2,(:0.3,:0.4):0.5):0.0; all have a distance to parent (A:0.1,B:0.2,(C:0.3,D:0.4):0.5); distances and leaf names (popular) (A:0.1,B:0.2,(C:0.3,D:0.4)E:0.5)F; distances and all names ((B:0.2,(C:0.3,D:0.4)E:0.5)F:0.1)A; a tree rooted on a leaf node (rare) Newick format is typically used for tools like PHYLIP and is a minimal definition for a phylogenetic tree.
Rooted, unrooted, and binary trees
When an unrooted tree is represented in Newick notation, an arbitrary node is chosen as its root. Whether rooted or unrooted, typically a tree's representation is rooted on an internal node and it is rare (but legal) to root a tree on a leaf node. A rooted binary tree that is rooted on an internal node has exactly two immediate descendant nodes for each internal node. An unrooted binary tree that is rooted on an arbitrary internal node has exactly three immediate descendant nodes for the root node, and each other internal node has exactly two immediate descendant nodes. A binary tree rooted from a leaf has at most one immediate descendant node for the root node, and each internal node has exactly two immediate descendant nodes.
Grammar
A grammar for parsing the Newick format (roughly based on ): The New Hampshire X (NHX) format is an extension to Newick that adds key-value data (gene duplication, etc.) to Newick nodes. This is done by putting the additional data in square brackets [&&NHX:key=value:...] in the node labels. The brackets are used because they represent comments in the Nexus file format, so any parser not understanding these additional information will ignore them. node4[&node_age=10,node_color=blue]:[&branch_posterior_probability=0.7]1.0 or node4[&node_age=10,node_color=blue]:1.0[&branch_posterior_probability=0.7] Attributes represent key=value pairs that are separated by commas. Some software packages do not distinguish between node and branch comments. BEAST does distinguish between them, although only for Newick trees contained in a NEXUS file. IQ-TREE likewise distinguishes between node and branch comments. If commas are used to separate key=value pairs, then a special mechanism is required to allow values that contain commas. BEAST allows values to contain multiple elements separated by commas if surrounded by curly braces: tip1:[&colour={0, 8.0, 1, 12.0, 0}] 20.0 IQ-TREE instead uses double-quotes to protect values: 0.0022086528[&gCF="33.33",gCF/gDF1/gDF2/gDFP="33.33/0/33.33/33.33"] Type → empty | string -- type of reticulation, e.g., H = hybridisation, LGT = lateral gene transfer, R = recombination. In the visualization of LGT events, for a given reticulate node, one incoming edge is usually drawn as an "acceptor" edge and all other incoming edges are drawn as "transfer" edges. Some programs (e.g. Dendroscope and SplitsTree) allow exactly one copy of the reticulate node to be labeled with to indicate that it corresponds to the acceptor edge. Extended Newick is backward-compatible: a hybrid node would simply be interpreted as a few strangely-named nodes for legacy parsers.
External links
Miyamoto and Goodman's Phylogram of Eutherian Mammals An example of a large phylogram with its Newick format representation. Phylogenetic tree (newick) viewer (By Huerta-Cepas et al. 2016)
Text derived from https://en.wikipedia.org/w/index.php?oldid=1375769084 under CC BY-SA 4.0; modifications have been made.