| 1 | <HTML> | 
|---|
| 2 | <HEAD> | 
|---|
| 3 | <TITLE> "Newick's 8:45" Tree Format Standard </TITLE> | 
|---|
| 4 | </HEAD> | 
|---|
| 5 | <BODY> | 
|---|
| 6 | <PRE> | 
|---|
| 7 | Thursday, August 30, 1990 | 
|---|
| 8 |  | 
|---|
| 9 |  | 
|---|
| 10 | Gary Olsen's Interpretation of the "Newick's 8:45" Tree Format Standard | 
|---|
| 11 |  | 
|---|
| 12 | (<A HREF=http://www.newicks.com>Here is the reason for the Newick name</A>) | 
|---|
| 13 |  | 
|---|
| 14 | Conventions: | 
|---|
| 15 | Items in { } may appear zero or more times. | 
|---|
| 16 | Items in [ ] are optional, they may appear once or not at all. | 
|---|
| 17 | All other punctuation marks (colon, semicolon, parentheses, comma and | 
|---|
| 18 | single quote) are required parts of the format. | 
|---|
| 19 |  | 
|---|
| 20 |  | 
|---|
| 21 | tree ==> descendant_list [ root_label ] [ : branch_length ] ; | 
|---|
| 22 |  | 
|---|
| 23 | descendant_list ==> ( subtree { , subtree } ) | 
|---|
| 24 |  | 
|---|
| 25 | subtree ==> descendant_list [internal_node_label] [: branch_length] | 
|---|
| 26 | ==> leaf_label [: branch_length] | 
|---|
| 27 |  | 
|---|
| 28 | root_label ==> label | 
|---|
| 29 | internal_node_label ==> label | 
|---|
| 30 | leaf_label ==> label | 
|---|
| 31 |  | 
|---|
| 32 | label ==> unquoted_label | 
|---|
| 33 | ==> quoted_label | 
|---|
| 34 |  | 
|---|
| 35 | unquoted_label ==> string_of_printing_characters | 
|---|
| 36 | quoted_label ==> ' string_of_printing_characters ' | 
|---|
| 37 |  | 
|---|
| 38 | branch_length ==> signed_number | 
|---|
| 39 | ==> unsigned_number | 
|---|
| 40 |  | 
|---|
| 41 |  | 
|---|
| 42 | Notes: | 
|---|
| 43 | Unquoted labels may not contain blanks, parentheses, square brackets, | 
|---|
| 44 | single_quotes, colons, semicolons, or commas. | 
|---|
| 45 | Underscore characters in unquoted labels are converted to blanks. | 
|---|
| 46 | Single quote characters in a quoted label are represented by two single | 
|---|
| 47 | quotes. | 
|---|
| 48 | Blanks or tabs may appear anywhere except within unquoted labels or | 
|---|
| 49 | branch_lengths. | 
|---|
| 50 | Newlines may appear anywhere except within labels or branch_lengths. | 
|---|
| 51 | Comments are enclosed in square brackets and may appear anywhere | 
|---|
| 52 | newlines are permitted. | 
|---|
| 53 |  | 
|---|
| 54 |  | 
|---|
| 55 | Other notes: | 
|---|
| 56 | PAUP (David Swofford) allows nesting of comments. | 
|---|
| 57 | TreeAlign (Jotun Hein) writes a root node branch length (with a value of | 
|---|
| 58 | 0.0). | 
|---|
| 59 | PHYLIP (Joseph Felsenstein) requires that an unrooted tree begin with a | 
|---|
| 60 | trifurcation; it will not "uproot" a rooted tree. | 
|---|
| 61 |  | 
|---|
| 62 |  | 
|---|
| 63 | Example: | 
|---|
| 64 |  | 
|---|
| 65 | (((One:0.2,Two:0.3):0.3,(Three:0.5,Four:0.3):0.2):0.3,Five:0.7):0.0; | 
|---|
| 66 |  | 
|---|
| 67 | +-+ One | 
|---|
| 68 | +--+ | 
|---|
| 69 | |  +--+ Two | 
|---|
| 70 | +--+ | 
|---|
| 71 | |  |  +----+ Three | 
|---|
| 72 | |  +--+ | 
|---|
| 73 | |     +--+ Four | 
|---|
| 74 | + | 
|---|
| 75 | +------+ Five | 
|---|
| 76 |  | 
|---|
| 77 | </PRE> | 
|---|
| 78 | </BODY> | 
|---|
| 79 | </HTML> | 
|---|