Growing trees (the old-fashioned way!)
So far we've introduced some useful methods for zooming, navigating, an searching through existing trees, but we
still need a way to build a tree from scratch—trees don't just grow on trees, you know!
In all seriousness, however: while it is true that phylogenies don't "grow on trees", nowadays they are usually produced by computers instead of humans. So why should we
care about being able to build one by hand? This capability is still important for
- creating summary trees,
- curating computational predictions, and
- quickly producing tree diagrams,
among other tasks. So, without further ado, let's activate PhyloWidget's radial context menu
Wow, what just happened?? Well, not much, yet. You should now see the Arrow tool in the dock. Sometimes big things some in small packages, and this
little icon will now let you create your own tree!
To begin, first click on the arrow icon, then try hovering the mouse over the node circle (just to the left of the 'PhyloWidget' label).
You should see a pulsing blue circle around the node, and the mouse cursor should become a hand—as you probably guessed, this
is letting you know that you can click there to do something!
Clicking on the node brings up what's known as a radial context menu. The context of this menu is the node from which it was opened.
Even if you zoom or scroll away from the node (by using your mouse wheel for example), the menu remains attached to the node.
Upon opening, PhyloWidget's context menu displays four sub-menus which contain menu items or further sub-menus of their own. Try playing around with the menu system for
a while, and don't be afraid to experiment—if you get in trouble, just click here to reset the tree.
Power user tip: notice that every item in the context menu has a single-character label—that's its keyboard shortcut! It can be
quite efficient to use the context menu via the keyboard shortcuts, so give it a try!
A more detailed look
For reference, here is detailed overview of PhyloWidget's context menu hierarchy:
- Clipboard: for performing cut-and-paste operations
- Cut: cuts the selected node and its subtree, to be pasted back elsewhere in the tree.
- Copy: copies the selected node and subtree, to be pasted elsewhere.
- Paste: pastes the clipboard contents (if it exists) below the selected node.
- Swap: swaps this node with the clipboard contents.
- Clear: clears the current clipboard contents.
- Node Edit: for editing the current node's attributes
- Name: edits the name of the current node.
- Branch length: edits the length of the branch between this node and its parent.
- Annotations: edits the annotations associated with the current node. Most often, these annotations will represent the NHX format information contained in the tree (see the later Annotations vignette).
- Layout: for changing the layout of the tree
- Swap Children: simply swaps the order of this node's children.
- Flip Subtree: causes the entire subtree below this node to be flipped.
- Reroot: reroots the tree on this node using the midpoint method. Causes this node to become a direct
descendant of the root node.
- Tree Edit: for changing the structure of the tree
- Add child: adds a direct descendant to this node.
- Add sister: approximates creating a new speciation event, by adding a parental node just above this node and inserting a new 'sister' node.
- Delete subtree: deletes this node and the entire subtree below it.
- Delete this node: deletes this node (we'll call it X) by splicing it out of the tree, so X's children become the children of X's parent.
- Web: for web-based actions
- Here you'll find an assortment of useful external sites. This behavior is completely customizable using
PhyloWidget's modular user interface; see the later vignette on Web Links for an interactive example of this.
You may notice that one of the items under the "Web" menu is deactivated. This item requires the signed applet version of PhyloWidget,
which we will encounter in a later step. Stay tuned!