source: branches/tree/SOURCE_TOOLS/docs/newick_845_doc.html

Last change on this file was 19811, checked in by westram, 2 weeks ago
  • updated PHYLIP urls
  • store Interpretation of "Newick's 8:45" Tree Format Standard
File size: 6.0 KB
Line 
1<html class=" ljnppfrsi idc0_350"><head>
2<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
3
4<title>My Interpretation of "Newick's 8:45" Tree Format Standard</title>
5
6</head>
7<body>
8  [ Cloned on 2026-May-21 from <a href="https://www.life.illinois.edu/gary/Newicks_845_Tree_Std.html" ">https://www.life.illinois.edu/gary/Newicks_845_Tree_Std.html</a>] <br>
9
10<h1 align="center">"Newick's 8:45" Tree Format Standard</h1>
11
12
13<h2 align="center">Interpretation by Gary Olsen</h2>
14
15<h3>Revision History:</h3>
16
17<table>
18   <tbody><tr>
19      <td nowrap="nowrap" align="right" valign="top">Aug. 30, 1990:</td>
20      <td>My interpretation from discussions and a copy of "Committee" notes.</td>
21   </tr>
22
23   <tr>
24      <td nowrap="nowrap" align="right" valign="top">Oct.  4, 1991:</td>
25      <td>Revised to reflect discussions with Joseph Felsenstein, David
26Madison and David Swofford at 1991 Woods Hole MBL Molecular Evolution
27Workshop.</td>
28   </tr>
29
30   <tr>
31      <td nowrap="nowrap" align="right" valign="top">Jan. 24, 1992:</td>
32      <td>Text revised.
33   </td></tr>
34
35   <tr>
36      <td nowrap="nowrap" align="right" valign="top">Jan. 20, 1994:</td>
37      <td>Revised to reflect discussions with David Swofford regarding
38quotation marks in comments (they will have no special meaning; thus,
39[Newick's 8:45 Tree Standard] is a legal comment).</td>
40   </tr>
41
42   <tr>
43      <td nowrap="nowrap" align="right" valign="top">Aug. 23, 1994:</td>
44      <td>Text revised.</td>
45   </tr>
46
47   <tr>
48      <td nowrap="nowrap" align="right" valign="top">Oct. 16, 2003:</td>
49      <td>Branch length in "Printer Plot" of tree example fixed to match
50 value (thanks to Al Gernon).  Minor text revision.  HTML version of
51this document produced.</td>
52   </tr>
53</tbody></table>
54
55<h3>Conventions Used in Syntax Diagram:</h3>
56
57<tt><pre>   Items in { } may appear zero or more times.
58   Items in [ ] are optional, they may appear once or not at all.
59   All other punctuation marks (colon, semicolon, parentheses, comma and
60         single quote) are required parts of the format.
61</pre></tt>
62
63
64<h3>Rough Syntax Diagram:</h3>
65
66<tt><pre>              tree ==&gt; descendant_list [ root_label ] [ : branch_length ] ;
67
68   descendant_list ==&gt; ( subtree { , subtree } )
69
70           subtree ==&gt; descendant_list [internal_node_label] [: branch_length]
71                   ==&gt; leaf_label [: branch_length]
72
73            root_label ==&gt; label
74   internal_node_label ==&gt; label
75            leaf_label ==&gt; label
76
77                 label ==&gt; unquoted_label
78                       ==&gt; quoted_label
79
80        unquoted_label ==&gt; string_of_printing_characters
81          quoted_label ==&gt; ' string_of_printing_characters '
82
83         branch_length ==&gt; signed_number
84                       ==&gt; unsigned_number
85</pre></tt>
86
87<h3>Notes:</h3>
88Unquoted labels may not contain blanks, parentheses, square brackets,
89single_quotes, colons, semicolons, or commas.<p>
90
91Underscore characters in unquoted labels are converted to blanks.</p><p>
92
93Single quote characters in a quoted label are represented by two single
94quotes.</p><p>
95
96Blanks or tabs may appear anywhere except within unquoted labels or
97branch_lengths.</p><p>
98
99Newlines may appear anywhere except within labels or branch_lengths.</p><p>
100
101Comments are enclosed in square brackets and may appear anywhere
102newlines are permitted.
103
104
105</p><h3>Other notes:</h3>
106
107PAUP (David Swofford) allows nesting of comments.  My software supports
108this as well.<p>
109
110TreeAlign (Jotun Hein) writes a root node branch length (with a value of
1110.0).  Most other software (including my own) seems to as well.</p><p>
112
113PHYLIP (Joseph Felsenstein) requires that an unrooted tree begin with a
114trifurcation; it will not "uproot" a rooted tree.
115
116
117</p><h3>Example of rooted tree:</h3>
118
119<tt><pre>   (((One:0.2,Two:0.3):0.3,(Three:0.5,Four:0.3):0.2):0.3,Five:0.7):0.0;
120
121           +-+ One
122        +--+
123        |  +--+ Two
124     +--+
125     |  | +----+ Three
126     |  +-+
127     |    +--+ Four
128     +
129     +------+ Five
130</pre></tt>
131
132
133
134<h3>Addendum (October 4, 1991):</h3>
135
136At the 1991 Woods Hole Marine Biology Laboratory Molecular Evolution Course,
137the following special comments were defined (by Joseph Felsenstein, David
138Madison, Gary Olsen and David Swofford):
139
140<tt><pre>      [&amp;rooted]
141      [&amp;unrooted]
142</pre></tt>
143
144One of these two comments may precede a tree to define whether it is meant to
145be read as a rooted or unrooted tree.  The default treatment, when neither of
146these comments is present, may be context and/or application specific.
147
148<tt><pre>      [&amp;&amp;ApplicationID: Application_specific_comments ]
149</pre></tt>
150
151This form permits users of the Newick 8:45 format to tag comments that are
152meant to be machine readable by specific programs.  There is no registration of
153IDs, though it is expected that users of this convention will choose
154sufficiently descriptive IDs that coincidental conflicts are unlikely.<p>
155
156Other forms of comments beginning with "[&amp;" are reserved to the "Standard".</p><p>
157
158It was also decided that names embedded within single quotes can contain any
159printable character and the space character.  If a name is quoted, this must be
160done in its entirety.  All compliant programs must be able to handle names of
161at least eight characters.
162
163
164</p><h3>Addendum (January 20, 1994):</h3>
165
166In response to discussions with David Swofford, quotation marks in comments
167will have no special meaning.  Thus,
168
169<tt><pre>      [Newick's 8:45 Tree Standard]
170</pre></tt>
171
172is a legal comment.  On the other hand,
173
174<tt><pre>      [('B. subtilis':0.1, 'E. coli rrnB]':0.2):0.3]
175</pre></tt>
176
177is not legal because the square bracket in the quotation marks ends the
178comment.  Because comments can be nested, the following would be a legal
179comment:
180
181<tt><pre>      [('B. subtilis':0.1, 'E. coli [rrnB]':0.2):0.3]
182</pre></tt>
183
184
185<hr>
186<p><small>Page written and maintained by Gary J. Olsen (gjo<!-- -->☮<!-- -->illinois.edu)</small></p>
187  [ Cloned on 2026-May-21 from <a href="https://www.life.illinois.edu/gary/Newicks_845_Tree_Std.html" ">https://www.life.illinois.edu/gary/Newicks_845_Tree_Std.html</a>] <br>
188
189
190
191</body></html>
Note: See TracBrowser for help on using the repository browser.