Help - Old:Exporting trees as Newick/Nexus files (until 2.5.0)

From TreeGraph help
Jump to: navigation, search
ArticleOnOlderVersion.png This article describes this feature for TreeGraph 2.5.0 or (not necessaryly all) earlier versions. See here for the article on the latest version and a list on other available article versions.


TreeGraph 2 allows you (besides saving in its own XTG format) to export your trees to the Newick- or Nexus-format.

Supported formats

Newick format

Newick files are simply text files that consist of one or more tree descriptions in the Newick notation. In contrast to Nexus files they contain no further syntax elements or other information than the trees.

Nexus format

The Nexus format is widely used in phylogenetics and can contain trees in Newick notation and furthermore also information about taxa and phylogenetic datasets such as sequence alignments. Several common programs such as PAUP*, Mesquite and MacClade generate trees in this format. A Nexus file usually consists of different blocks which contain different types of information, whereas the trees-block is the only relevant one for TreeGraph 2. Just like Newick files, Nexus files can contain several trees.

The dialog

The "Export to Newick/ Nexus"-dialog

You can access the "Export to Newick/ Nexus"-dialog by selecting "Export to Newick/ Nexus..." from the file menu or with the keyboard shortcut F11.

File name

You have to enter the file name and location of the tree file to be exported here. (The proper file extension will be added automatically.)

File type

Here you can choose either Newick or Nexus as the tree format for the file to be exported.

Source data

Here you can select the node/branch data column to be written to the exported newick-string for the internal node names, the leaf node names and the branch lengths. You could e.g. select the "Node names" column for the leaf node names in the newick string and one type of label for the internal node names to store support values there.

Note that you can use only node/branch data columns with numeric values for the branch lengths. If your document does not contain any this option is disabled. You can choose to have no branch lengths in your exported file even if numeric data would be available by deselecting the checkbox left of the the drop down list.

Known problems on Macintosh systems

Due an error in the java implementation on Macintosh systems a file name entered in the Save as text field will not be approved when OK is clicked, if the file type has been changed before. You can work around this error if you first make all necessary setting in the dialog than go back to Save as text field and press Enter while this text field has the focus. This way the file name should be approved and the dialog is closed.

See also

Additional resources