Step 7 of 10: Input / Output

What happened to the applet??!?

Where did our trusty applet in the left panel go? We intentionally didn't load the applet yet, because PhyloWidget's file I/O requires a signed applet, which will load up a security warning asking you if you trust the program.

We thought it would be kind to warn you before this happens! If you wish to test out the I/O features, just click ok at the security warning, and you'll be all set! Click below to start loading the signed applet version of PhyloWidget:

If all goes well, you'll notice that now the Save Tree, Export Image, and Load Tree from File menu items are enabled.

Local tree input

For inputting a tree from your own computer, you have two primary options:

  • File input: select the menu item File->Load Tree->From File, and choose your input file. Quick and easy.
  • Manual cut and paste: select the menu item File->Load Tree->Manual Input, and paste your tree string into the text box. Also quick, also easy!

Remote URL input

Now is also a good time to mention PhyloWidget's URL loading capability. When you're using PhyloWidget as a signed applet or a standalone program, you can substitute a URL for the Newick tree string, and PhyloWidget will instead load the tree to which the URL is referring.

As an example, try pasting the following URL into PhyloWidget's Manual Input dialog:

http://www.molevol.org/camel/projects/nexus/NEXUS/barns-combined.nex

If you notice that the taxon labels appear to be cut off in this example, know that that is not a PhyloWidget artifact; the original Nexus file has all labels cut off to 9 characters!

Supported tree formats

PhyloWidget can parse the standard array of tree file formats with varying degrees of support:

  • Newick, or New Hampshire (link)
    • The Newick format is the simplest possible format for communicating a phylogenetic tree, and PhyloWidget is based primarily on Joe Felsenstein's description of the format, available here.
  • NHX, or New Hampshire eXtended (link)
    • The NHX format is an extension to the Newick format that provides for (a) a way to incorporate further annotations into Newick-formatted trees, and (b) some standardized annotation types that may be useful for biologists.
    • PhyloWidget can read all NHX annotations and stores them in its data structure, but only the following annotations are currently used in a visually meaningful way:
      • D for duplication vs. speciation
      • S or T for species or taxon coloring
      • B for bootstrap value
    • Note: If you actively use an NHX annotation type not listed here and would like PhyloWidget to visualize it in a meaningful way, please feel free to contact us!
  • Nexus (link)
    • The Nexus file format is a very complex data format capable of storing diverse types of data in evolutionary biology. PhyloWidget does not contain a full Nexus parser, but rather a simple method for obtaining a phylogenetic tree described within a Nexus file.
    • PhyloWidget will currently only read the FIRST tree from the trees block of a Nexus file. Please let us know if you find this limitation to be a severe problem; we have some ideas on how to include support for multiple trees, but it's only worth the effort if people will use the feature!
    • Note: This support has not been fully tested. In practice, however, it tends to work well on a variety of Nexus files. If you find specific cases where the Nexus parsing does not work, please file a bug report.

Tree Output

PhyloWidget can output trees in Newick or NHX format. This choice is usually made automatically, outputting the NHX annotations only for nodes that contain annotation data. However, there is a configuration setting named ignoreAnnotations (see the Menu vignette) that allows all NHX-style annotations to be ignored when viewing and outputting the tree.

There are currently no plans to implement Nexus output in PhyloWidget. If you are looking for this functionality, Mesquite is a widely-used, open source program that can handle the Nexus format. Additionally, you may consult Joe Felsenstein's extensive listing of phylogenetic software for other available alternatives.

Image Export

Image export is another way of outputting your tree of interest. Clicking the Image Export menu item will open up a dialog with various options governing the export process. PhyloWidget can export to the following image formats:
  • PDF (vector-based), PNG, JPEG, and TIFF

Created with Processing.