Annotations: a little something extra
In the very first vignette, you may have noticed that a couple of the trees in the gallery showed up with colorful annotations
in PhyloWidget. They looked something like this:
- Colorful trees:
This is done using the standard NHX annotation format, which (as mentioned in the previous vignette
) is a simple way to add
certain annotations to a Newick-formatted tree.
When PhyloWidget detects NHX annotations in a tree, it does the following:
- All nodes marked as representing a duplication event (using the D=T annotation) are colored red, and those marked as a speciation event (using the D=F annotation) are colored blue
- Leaf nodes are grouped according to the species (S) or taxon (T) and assigned different colors according to their groups
- Bootstrap values (B) are drawn on top of the branch which they represent
- Bootstrap values are used to shade their corresponding branch
All of the above behaviors are configurable. Using PhyloWidget's configuration settings (see the last vignette) you can individually
enable or disable , theAt any point, you can turn off both the display and output of annotations by going to the toolbar and choosing Tree->Annotation->Ignore Annotations.
PhyloWidget provides a convenient user interface for viewing and editing tree annotations. Just click on a node with the arrow, tool,
type 'e' for edit, and 'a' for annotation, and the annotation
dialog should come up showing the annotation for the current node. Then just edit the text, making sure
to keep to the described formatting guidelines. Click "ok", and the annotation will be updated.
In this way, you can easily annotate one of your trees with the standard NHX values, causing it to become rendered just
like the NHX trees you saw above. If you then save your tree, PhyloWidget will output all annotations in the NHX format.
Going a step further
The great thing about the NHX format is that, although it formally defines only a list of 15 or so possible
annotation types (click here
for the format definition), the format is extensible to any number of non-standard annotations.
This means that you can use PhyloWidget's annotation functionality to attach arbitrary information to your tree. For example, you
may want to include URL links within your tree file or a PubMed ID for reference. We will be exploring a very web-aware
application of this annotation in the next vignette.
PhyloWidget contains beta-level support for adding and displaying image annotations within your trees. If you annotate your tree
with the IMG key, and a valid URL as the value, then PhyloWidget will attempt to load and display the referred image in the tree.
Image support is nice, but manually finding images for a large number of leaf nodes would be extremely time-consuming. PhyloWidget can do a simple automated
Google image search to make things easier. Try playing with the context menu and toolbar options named Load Image or Load Google Images.
Support for images in tree is in a very early beta stage, so be prepared for some things not to work as expected! Of course, we would appreciate any feedback
you may have on this feature. Our contact information can be found here.