1 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> |
---|
2 | <HTML> |
---|
3 | <HEAD> |
---|
4 | <TITLE>retree</TITLE> |
---|
5 | <META NAME="description" CONTENT="retree"> |
---|
6 | <META NAME="keywords" CONTENT="retree"> |
---|
7 | <META NAME="resource-type" CONTENT="document"> |
---|
8 | <META NAME="distribution" CONTENT="global"> |
---|
9 | <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1"> |
---|
10 | </HEAD> |
---|
11 | <BODY BGCOLOR="#ccffff"> |
---|
12 | <DIV ALIGN=RIGHT> |
---|
13 | version 3.6 |
---|
14 | </DIV> |
---|
15 | <P> |
---|
16 | <DIV ALIGN=CENTER> |
---|
17 | <H1>RETREE -- Interactive Tree Rearrangement</H1> |
---|
18 | </DIV> |
---|
19 | <P> |
---|
20 | © Copyright 1993-2002 by The University of |
---|
21 | Washington. Written by Joseph Felsenstein. Permission is granted to copy |
---|
22 | this document provided that no fee is charged for it and that this copyright |
---|
23 | notice is not removed. |
---|
24 | <P> |
---|
25 | RETREE is a tree editor. It reads in a tree, |
---|
26 | or allows the user to construct one, and |
---|
27 | displays this tree on the screen. The |
---|
28 | user then can specify how the tree is to |
---|
29 | be rearraranged, rerooted or written out to a file. |
---|
30 | <P> |
---|
31 | The input trees are in one file (with default file name |
---|
32 | <TT>intree</TT>), the |
---|
33 | output trees are written into another (<TT>outtree</TT>). The user |
---|
34 | can reroot, flip branches, change names of species, change or remove |
---|
35 | branch lengths, and move around to look at various parts of the tree if it is |
---|
36 | too large to fit on the screen. The trees can be multifurcating at any |
---|
37 | level, although the user is warned that many PHYLIP programs still cannot |
---|
38 | handle multifurcations above the root, or even at the root. |
---|
39 | <P> |
---|
40 | A major use for this program will be to change rootedness of trees so that |
---|
41 | a rooted tree derived from one program can be fed in as an unrooted tree to |
---|
42 | another (you are asked about this when you give the command to write out |
---|
43 | the tree onto the tree output file). It will also be useful for specifying |
---|
44 | the length of a branch in |
---|
45 | a tree where you want a program like DNAML, DNAMLK, FITCH, or CONTML to |
---|
46 | hold that branch length constant (see the L suboption of the User Tree |
---|
47 | option in those programs. It will also be useful for changing the order |
---|
48 | of species for purely cosmetic reasons for DRAWGRAM and DRAWTREE, including |
---|
49 | using the Midpoint method of rooting the tree. It can also be used to write out |
---|
50 | a tree file in the Nexus format used by Paup and MacClade or in our XML tree |
---|
51 | file format. |
---|
52 | <P> |
---|
53 | This program uses graphic characters that show the tree to best |
---|
54 | advantage on some computer systems. |
---|
55 | Its graphic characters will work best on MSDOS systems or MSDOS windows in |
---|
56 | Windows, and to |
---|
57 | any system whose screen or terminals emulate ANSI standard terminals |
---|
58 | such as old Digitial VT100 terminals, |
---|
59 | Telnet programs, |
---|
60 | or VT100-compatible windows in the X windowing system. |
---|
61 | For any other screen types, (such as Macintosh windows) there is a generic |
---|
62 | option which does |
---|
63 | not make use of screen graphics characters. The program will work well |
---|
64 | in those cases, but the tree it displays will look a bit uglier. |
---|
65 | <P> |
---|
66 | The user interaction starts with the program presenting a menu. The |
---|
67 | menu looks like this: |
---|
68 | <P> |
---|
69 | <TABLE><TR><TD BGCOLOR=white> |
---|
70 | <PRE> |
---|
71 | |
---|
72 | Tree Rearrangement, version 3.6a3 |
---|
73 | |
---|
74 | Settings for this run: |
---|
75 | U Initial tree (arbitrary, user, specify)? User tree from tree file |
---|
76 | N Format to write out trees (PHYLIP, Nexus, XML)? PHYLIP |
---|
77 | 0 Graphics type (IBM PC, ANSI)? (none) |
---|
78 | W Width of terminal screen, of plotting area? 80, 80 |
---|
79 | L Number of lines on screen? 24 |
---|
80 | |
---|
81 | Are these settings correct? (type Y or the letter for one to change) |
---|
82 | |
---|
83 | </PRE> |
---|
84 | </TD></TR></TABLE> |
---|
85 | <P> |
---|
86 | The 0 (Graphics type) option is the usual |
---|
87 | one and is described in the main documentation file. The U (initial tree) |
---|
88 | option allows the user to choose whether |
---|
89 | the initial tree is to be arbitrary, interactively specified by the user, or |
---|
90 | read from a tree file. Typing U causes the program to change among the |
---|
91 | three possibilities in turn. Usually we will want to use a User Tree from |
---|
92 | a file. It requires that you have available a tree file |
---|
93 | with the tree topology of the initial tree. If you wish to set up some other |
---|
94 | particular tree you can either use the "specify" choice in the initial tree |
---|
95 | option (which is somewhat clumsy to use) or rearrange a User Tree of an |
---|
96 | arbitrary tree into the shape you want by using |
---|
97 | the rearrangement commands given below. |
---|
98 | <P> |
---|
99 | The L (screen Lines) option allows the user to change the height of the |
---|
100 | screen (in lines of characters) that is assumed to be available on the |
---|
101 | display. This may be particularly helpful when displaying large trees |
---|
102 | on displays that have more than 24 lines per screen, or on workstation |
---|
103 | or X-terminal screens that can emulate the ANSI terminals with more than |
---|
104 | 24 lines. |
---|
105 | <P> |
---|
106 | The N (output file format) option allows the user to specify that the tree files that |
---|
107 | are written by the program will be in one of three formats: |
---|
108 | <P> |
---|
109 | <OL> |
---|
110 | <LI>The <B>PHYLIP</B> default file format (the Newick standard) used by the |
---|
111 | programs in this package. |
---|
112 | <LI> The <B>Nexus</B> format defined by |
---|
113 | David Swofford and by Wayne Maddison and David Maddison for their programs |
---|
114 | PAUP and MacClade. A tree file written in Nexus format should be directly |
---|
115 | readable by those programs (They also have options to read a regular |
---|
116 | PHYLIP tree file as well). |
---|
117 | <LI> An <B>XML</B> tree file format which we have defined. |
---|
118 | </OL> |
---|
119 | <P> |
---|
120 | The XML tree file format is fairly simple. Each tree is included in tags |
---|
121 | <PHYLOGENY> ... </PHYLOGENY>. Each branch of the tree is enclosed in a pair of tags |
---|
122 | <BRANCH> ... </BRANCH>, which enclose the branch and all its descendants. |
---|
123 | If the branch has a length, this is given by the LENGTH attribute of the |
---|
124 | BRANCH tag, so that the pair of tags looks like this: |
---|
125 | <P> |
---|
126 | <PRE> |
---|
127 | <BRANCH LENGTH=0.09362> ... </BRANCH> |
---|
128 | </PRE> |
---|
129 | <P> |
---|
130 | A tip of the tree is at the end of a branch (and hence enclosed in a pair of |
---|
131 | <BRANCH> ... </BRANCH> tags. Its name is enclosed by <NAME> ... </NAME> |
---|
132 | tags. Here is an XML tree: |
---|
133 | <P> |
---|
134 | <TABLE><TR><TD BGCOLOR=white> |
---|
135 | <PRE> |
---|
136 | <phylogeny> |
---|
137 | <branch> |
---|
138 | <branch length=0.87231><name>Mouse</name></branch> |
---|
139 | <branch length=0.49807><name>Bovine</name></branch> |
---|
140 | <branch length=0.39538> |
---|
141 | <branch length=0.25930><name>Gibbon</name></branch> |
---|
142 | <branch length=0.10815> |
---|
143 | <branch length=0.24166><name>Orang</name></branch> |
---|
144 | <branch length=0.04405> |
---|
145 | <branch length=0.12322><name>Gorilla</name></branch> |
---|
146 | <branch length=0.06026> |
---|
147 | <branch length=0.13846><name>Chimp</name></branch> |
---|
148 | <branch length=0.0857><name>Human</name></branch> |
---|
149 | </branch> |
---|
150 | </branch> |
---|
151 | </branch> |
---|
152 | </branch> |
---|
153 | </branch> |
---|
154 | </phylogeny> |
---|
155 | </PRE> |
---|
156 | </TD></TR></TABLE> |
---|
157 | <P> |
---|
158 | The indentation is for readability but is not part of the XML tree |
---|
159 | standard, which ignores that kind of white space. |
---|
160 | <P> |
---|
161 | What programs can read an XML tree? None right now, not even PHYLIP programs. |
---|
162 | But soon our lab's LAMARC package will have programs that can read an XML tree. |
---|
163 | XML is rapidly becoming the standard for representing and interchanging |
---|
164 | complex data -- it is time to have an XML tree standard. Certain extensions |
---|
165 | are obvious (to represent the bootstrap proportion for a branch, use |
---|
166 | BOOTP=0.83 in the BRANCH tag, for example). |
---|
167 | <P> |
---|
168 | The W (screen and window Width) option specifies the width in characters |
---|
169 | of the area which the trees will be plotted to fit into. This is by |
---|
170 | default 80 characters so that they will fit on a normal width terminal. The |
---|
171 | actual width of the display on the terminal (normally 80 characters) will |
---|
172 | be regarded as a window displaying part of the tree. Thus you could |
---|
173 | set the "plotting area" to 132 characters, and inform the program that |
---|
174 | the screen width is 80 characters. Then the program will display only part |
---|
175 | of the tree at any one time. Below we will show how to move the "window" |
---|
176 | and see other parts of the tree. |
---|
177 | <P> |
---|
178 | After the initial menu is displayed and the choices are made, |
---|
179 | the program then sets up an initial tree and displays it. Below it will be a |
---|
180 | one-line menu of possible commands. Here is what the tree and the menu |
---|
181 | look like (this is the tree specified by the example input tree given at |
---|
182 | the bottom of this page, as it displays when the terminal type is "none"): |
---|
183 | <P> |
---|
184 | <TABLE><TR><TD BGCOLOR=white> |
---|
185 | <PRE> |
---|
186 | ,>>1:Human |
---|
187 | ,>22 |
---|
188 | ,>21 `>>2:Chimp |
---|
189 | ! ! |
---|
190 | ,>20 `>>>>>3:Gorilla |
---|
191 | ! ! |
---|
192 | ,>>>>>>>>>>19 `>>>>>>>>4:Orang |
---|
193 | ! ! |
---|
194 | ,>18 `>>>>>>>>>>>5:Gibbon |
---|
195 | ! ! |
---|
196 | ! ! ,>>>>>>>>6:Barbary Ma |
---|
197 | ! `>>>>>>>>>>>>>23 |
---|
198 | ! ! ,>>>>>7:Crab-e. Ma |
---|
199 | ,>>>>>>>17 `>24 |
---|
200 | ! ! ! ,>>8:Rhesus Mac |
---|
201 | ! ! `>25 |
---|
202 | ! ! `>>9:Jpn Macaq |
---|
203 | ,>16 ! |
---|
204 | ! ! `>>>>>>>>>>>>>>>>>>>>>>>>>10:Squir. Mon |
---|
205 | ! ! |
---|
206 | ! ! ,>11:Tarsier |
---|
207 | ** 7 lines below screen ** |
---|
208 | |
---|
209 | NEXT? (Options: R . U W O T F D B N H J K L C + ? X Q) (? for Help) |
---|
210 | </PRE> |
---|
211 | </TD></TR></TABLE> |
---|
212 | <P> |
---|
213 | The tree that was read in had no branch lengths on its branches. The |
---|
214 | absence of a branch length is indicated by drawing the branch with "<TT>></TT>" |
---|
215 | characters (<TT>>>>>>>></TT>). When branches have branch lengths, they are |
---|
216 | drawn with "-" characters (<TT>-------</TT>) and their |
---|
217 | lengths on the screen are approximately proportional to the branch length. |
---|
218 | <P> |
---|
219 | If you type "?" you will get a single screen showing a description of each |
---|
220 | of these commands in a few words. Here are slightly more detailed |
---|
221 | descriptions of the commands: |
---|
222 | <P> |
---|
223 | <DL COMPACT> |
---|
224 | <DT>R</DT> <DD>("Rearrange"). This command asks for the number of a node which is to be |
---|
225 | removed from the tree. It and everything to the right of it on the tree is to |
---|
226 | be removed (by breaking the branch immediately below it). (This is also |
---|
227 | everything "above" it on the tree when the tree grows upwards, but as the |
---|
228 | tree grows from left to right on the screen we use "right" rather than |
---|
229 | "above"). The command also |
---|
230 | asks whether that branch is to be inserted At a node or Before a node. |
---|
231 | The first will insert it as an additional branch coming out of an |
---|
232 | existing node (creating a more multifurcating tree), and the second will insert |
---|
233 | it so that a new internal node is created in the tree, located in the |
---|
234 | branch that precedes the node (to the left of it), with the branch that is |
---|
235 | inserted coming off from that new node. In both cases the program asks you |
---|
236 | for the number of a node at (or before) which that group is to be inserted. |
---|
237 | If an |
---|
238 | impossible number is given, the program refuses to carry out the rearrangement |
---|
239 | and asks for a new command. The rearranged tree is displayed: it will often |
---|
240 | have a different number of steps than the original. If you wish to undo a |
---|
241 | rearrangement, use the Undo command, for which see below.</DD> |
---|
242 | <P> |
---|
243 | <DT>.</DT> <DD> (dot) This command simply causes the current tree to be redisplayed. It is of |
---|
244 | use when the tree has partly disappeared off of the top of the screen owing to |
---|
245 | too many responses to commands being printed out at the bottom of the screen.</DD> |
---|
246 | <P> |
---|
247 | <DT>=</DT> <DD>(toggle display of branch lengths). This option is available whenever |
---|
248 | the tree has a full set of branch lengths. It toggles on and off whether |
---|
249 | the tree displayed on the screen is shown with the relative branch lengths |
---|
250 | roughly correct. (It cannot be better than roughly correct because the |
---|
251 | display is in units of length of whole character widths on the screen). It |
---|
252 | does not actually remove any branch lengths from the tree: if the tree |
---|
253 | showing on the screen seems to have no branch lengths after use of the "=" |
---|
254 | option, if it were written out at that point, it would still have a full] |
---|
255 | set of branch lengths.</DD> |
---|
256 | <P> |
---|
257 | <DT>U</DT> <DD>("Undo"). This command reverses the effect of the most recent |
---|
258 | rearrangement, outgroup re-rooting, or flipping of branches. It returns to the |
---|
259 | previous tree topology. It will be of great use when rearranging the tree and |
---|
260 | when one -- it permits you to |
---|
261 | abandon the new one and return to the previous one without remembering its |
---|
262 | topology in detail. Some operations, such as the simultaneous removal of |
---|
263 | lengths from all branches, cannot be reversed.</DD> |
---|
264 | <P> |
---|
265 | <DT>W</DT> <DD>("Write"). This command writes out the current tree onto a tree output |
---|
266 | file. If the file already has been written to by this run of RETREE, it will |
---|
267 | ask you whether you want to replace the contents of the file, add the tree to |
---|
268 | the end of the file, or not write out the tree to the file. It will also |
---|
269 | ask you whether you want the tree to written out as Rooted or Unrooted. If |
---|
270 | you choose Unrooted, it will write the outermost split of the tree as a |
---|
271 | three-way split with the three branches being those that issue from one of |
---|
272 | the nodes. This node will be the left (upper) interior node which is next |
---|
273 | to the root, or the other one if there is no interior node to the left (above) |
---|
274 | the root. The tree |
---|
275 | is written in the standard format used by PHYLIP (a subset of the |
---|
276 | Newick standard), in the Nexus format, or in an XML tree file format. |
---|
277 | A normal PHYLIP tree |
---|
278 | is in the proper format to serve as the |
---|
279 | User-Defined Tree for setting up the initial tree in a subsequent run of the |
---|
280 | program. However, some programs also require a line in the tree input |
---|
281 | file that gives the number of trees in the file. You may have to add this |
---|
282 | line using an editor such as <TT>vi</TT>, <TT>Emacs</TT>, Windows |
---|
283 | <TT>Notepad</TT>, or MacOS's <TT>Simpletext</TT>.</DD> |
---|
284 | <P> |
---|
285 | <DT>O</DT> <DD>("Outgroup"). This asks for the number of a node which is to be the |
---|
286 | outgroup. The tree will be redisplayed with that node |
---|
287 | as the left descendant of the bottom fork. Note that it is possible to |
---|
288 | use this to make a multi-species group the outgroup (i.e., you can give the |
---|
289 | number of an interior node of the tree as the outgroup, and the program will |
---|
290 | re-root the tree properly with that on the left of the bottom fork.</DD> |
---|
291 | <P> |
---|
292 | <DT>M</DT> <DD>("Midpoint root"). This reroots a tree that has a complete set of |
---|
293 | branches using the Midpoint rooting method. That rooting method finds the |
---|
294 | centroid of the tree -- the point that is equidistant from the two |
---|
295 | farthest points of the tree, and roots the tree there. This is the point |
---|
296 | in the middle of the longest path from one tip to another in the tree. |
---|
297 | This has the effect |
---|
298 | of making the two farthest tips stick out an equal distance to the |
---|
299 | right. Note that as the tree is rerooted, the scale may change on the screen |
---|
300 | so that it looks like it ahas suddenly gotted a bit longer. It will not |
---|
301 | have actually changed in total length. This option is not in the menu |
---|
302 | if the tree does not have a full set of branch lengths.</DD> |
---|
303 | <P> |
---|
304 | <DT>T</DT> <DD>("Transpose"). This asks for a node number and then flips the two |
---|
305 | branches at that node, so that the left-right order of branches at that node is |
---|
306 | changed. This also does not actually change the tree topology |
---|
307 | but it does change the appearance of the tree. However, unlike the <TT>F</TT> |
---|
308 | option discussed below, the individual subtrees defined by those branches do |
---|
309 | not have the order of any branches reversed in them.</DD> |
---|
310 | <P> |
---|
311 | <DT>F</DT> <DD>("Flip"). This asks for a node number and then flips the entire |
---|
312 | subtree at that node, so that the left-right order of branches in the whole |
---|
313 | subtree is changed. This does not actually change the tree topology |
---|
314 | but it does change the appearance of the tree. Note that it works differently |
---|
315 | than the <TT>F</TT> option in the programs MOVE, DNAMOVE, and DOLMOVE, which |
---|
316 | is actually like the <TT>T</TT> option mentioned above.</DD> |
---|
317 | <P> |
---|
318 | <DT>B</DT> <DD>("Branch length"). This asks you for the number of a node |
---|
319 | which is at the end of a branch length, then asks you whether you want to |
---|
320 | enter a branch length for that branch, change the branch length for that |
---|
321 | branch (if there is one already) or remove the branch length from the |
---|
322 | branch.</DD> |
---|
323 | <P> |
---|
324 | <DT>N</DT> <DD>("Name"). This asks you which species you want to change the |
---|
325 | name for (referring to it by the number for that branch), then gives you the |
---|
326 | option of either removing the name, typing a new name, or leaving the |
---|
327 | name as is. Be sure not to try to enter a parentheses ("(" or ")"), a |
---|
328 | colon (":"), a comma (",") or a semicolon (";") in a name, as those may |
---|
329 | be mistaken for structural information about the tree when the tree file |
---|
330 | is read by another program.</DD> |
---|
331 | <P> |
---|
332 | <DT>H, J, K, or L.</DT> <DD>These are the movement commands for scrolling the |
---|
333 | "window" across a tree. H moves the "window" leftwards (though not beyond |
---|
334 | column 1, J moves it down, K up, and L right. The "window" will |
---|
335 | move 20 columns or rows at a time, and the tree will be redrawn in |
---|
336 | the new "window". Note that this amount of movement is not a full screen.</DD> |
---|
337 | <P> |
---|
338 | <DT>C</DT> <DD>("Clade"). The C command instructs the program to print out |
---|
339 | only that part of the |
---|
340 | tree (the "clade") from a certain node on up. The program will prompt you for |
---|
341 | the number of this node. Remember that thereafter you are not looking at the |
---|
342 | whole tree. To go back to looking at the whole tree give the C command again |
---|
343 | and enter "0" for the node number when asked. Most users will not want to use |
---|
344 | this option unless forced to, as much can be accomplished with the window |
---|
345 | movement commands H, J, K, and L.</DD> |
---|
346 | <P> |
---|
347 | <DT>+</DT> <DD>("next tree"). This causes the program to read in the next tree in |
---|
348 | the input file, if there is one. Currently the program does not detect |
---|
349 | gracefully that it has come to the end of the input tree file, and may |
---|
350 | crash with a "segmentation fault" if it does. However usually it will not |
---|
351 | lose any tree file that it has written. On Unix or Linux systems the |
---|
352 | crash may produce a useless "core dump" (a big file named "core") which |
---|
353 | you will want to delete.</DD> |
---|
354 | <P> |
---|
355 | <DT>?</DT> <DD>("Help"). Prints a one-screen summary of what the commands do, a few |
---|
356 | words for each command.</DD> |
---|
357 | <P> |
---|
358 | <DT>X</DT> <DD>("Exit"). Exit from program. If the current tree has not yet been saved |
---|
359 | into a file, the program will first ask you whether it should be saved.</DD> |
---|
360 | <P> |
---|
361 | <DT>Q</DT> <DD>("Quit"). A synonym for X. Same as the eXit command.</DD> |
---|
362 | </DL> |
---|
363 | <P> |
---|
364 | The program was written by Andrew Keeffe, using some code from DNAMOVE, which |
---|
365 | he also wrote. |
---|
366 | <P> |
---|
367 | Below is a test tree file. We have already showed (above), what the |
---|
368 | resulting tree display looks like when the terminal type is "none". |
---|
369 | For ANSI or IBM PC screens it will look better, using the graphics characters |
---|
370 | of those screens, which we do not attempt to show here. |
---|
371 | <P> |
---|
372 | <HR> |
---|
373 | <P> |
---|
374 | <H3>TEST INPUT TREE FILE</H3> |
---|
375 | <P> |
---|
376 | <TABLE><TR><TD BGCOLOR=white> |
---|
377 | <PRE> |
---|
378 | ((((((((Human,Chimp),Gorilla),Orang),Gibbon),(Barbary_Ma,(Crab-e._Ma, |
---|
379 | (Rhesus_Mac,Jpn_Macaq)))),Squir._Mon),((Tarsier,Lemur),Bovine)),Mouse); |
---|
380 | </PRE> |
---|
381 | </TD></TR></TABLE> |
---|
382 | </BODY> |
---|
383 | </HTML> |
---|