A multitude of molecular evolution programs produce phylogenetic trees and almost universally save them in one of two formats: Newick or NEXUS. Similarly, a variety of tree viewing and printing programs exist for most major operating systems (see Joe Felsenstein's list). Outlined below are the two treefile formats, how to use PHYLIP's tree viewing programs, and instructions for ensuring that PAUP* saves in both NEXUS and Newick format.
Newick format is the treefile format used by GARLI, MrBayes, PAUP*, PHYLIP, PROTML, TREE-PUZZLE, and several other programs. Very few programs cannot read or import this treefile format. However, Newick is the only treefile format readable by the PHYLIP programs drawgram, drawtree, and retree. Here is an example Newick format treefile contents:
(((erHomoC:0.28006,erCaelC:0.22089):0.40998,(erHomoA:0.32304, (erpCaelC:0.58815,((erHomoB:0.5807,erCaelB:0.23569):0.03586, erCaelA:0.38272):0.06516):0.03492):0.14265):0.63594,(TRXHomo:0.65866, TRXSacch:0.38791):0.32147,TRXEcoli:0.57336);
NEXUS format incorporates Newick treefile formatting along with other commands relevant to other programs such as PAUP*. While many tree viewing programs can handle NEXUS, those of the PHYLIP package cannot. When saving trees in PAUP*, be sure to save them in both NEXUS and Newick format. Here is an example of PAUP* command lines for saving both formats:
savetrees file=BestMLtree.nex brlens format=nexus; savetrees file=BestMLtree.phy brlens format=phylip;
Saving both formats makes it easy to use the results in both PHYLIP and PAUP*. To understand the difference in format, here is an example NEXUS format treefile contents:
#NEXUS Begin trees; [Treefile saved Wed Jul 26 19:40:41 2000] [output from your data run] Translate 1 TRXEcoli, 2 TRXHomo, 3 TRXSacch, 4 erCaelA, 5 erCaelB, 6 erCaelC, 7 erHomoA, 8 erHomoB, 9 erHomoC, 10 erpCaelC ; tree PAUP_1 = [&U] (1,((2,3),((((4,10),(5,8)),(6,9)),7))); End;
If you need to convert a NEXUS treefile to a Newick treefile, PAUP* should be able to do the conversion. However, to do so you will need to load your alignment data, replicate exactly the settings used when the first treefile was saved (eg. outgroups, excluded taxa or sites, substitution model, etc), load the first treefile and resave it in PHYLIP format.
Viewing Newick treefiles in PHYLIP:
For easy viewing, editing, and printing, two of the easiest ways to handle Newick treefiles are the PHYLIP programs drawtree (unrooted phylogenies) and drawgram (rooted phylogenies) programs. Additionally, the PHYLIP program retree can be used to manipulate branch order before viewing or printing.
Before running drawtree or drawgram, type loadfonts in order to initiate a script which will link your working directory to the Phylip font directory which is required for both of these programs.
To create postscript files from drawtree or drawgram, select the Postscript printer file format option ("p" for plotting device, and "l" for Postscript printer file format). A preview image will be displayed and you can choose to plot the file (produces a file named "plotfile"), or further adjust the tree by selecting "change options" from the File menu. Plotfiles can be viewed with ghostview (at terminal, type: gv filename) or opened in a variety of graphics packages or Postscript editors for production of publication quality images.