Taxa, Trees, Characters ˇ

 

Phylogenetic trees

Phylogenetic trees represent the branching history of descent linking taxa, whether these taxa are species or genes. In Mesquite, a tree refers to the taxa in a particular taxa block and once created cannot be transfered to refer a different taxa block. (As explained in the page on taxa, "taxon" here is used as shorthand for "terminal taxon" or "OTU".)


Characteristics of trees

Mesquite typically treats trees as rooted, although it is possible to de-root trees. Trees may contain polytomies (multifurcations) and also unbranched internal nodes. A tree in Mesqite does not need to contain all of the taxa in the taxa block, and indeed can contain as few as one taxon. Unlike MacClade, Mesquite does not support trees with observed taxa fixed in ancestral position. Mesquite can read, edit and write branch lengths in trees. In addition to length, a branch may have various other attributes such as width (e.g. for effective population size in population genetics) and color (for display purposes).
Polytomies in trees are interpreted either as "soft" (uncertainty in resolution) or "hard" (simultaneous divergence). The default interpetation is specified in the Defaults submenu of the File menu. A change in this default applies to all projects and files. Individual trees can be marked as using a specific assumption, thus overriding the default (e.g., by using the Set Polytomy Assumption menu items in the Alter/Transform Tree submenu of the Tree menu of the Tree Window). The appropriate assumption for most phylogenetic studies is "soft", but calculations using soft polytomies are extremely difficult, and most Mesquite calculations yield results only with dichotomous trees and those with hard polytomies.


Analyzing trees

Trees can be visualized in various tree windows, and statistics about them presented in tree windows, the List of Trees window, and in charts. We will not attempt to summarize all of the options here, which are discussed elsewhere, in particular in the analysis links at left.
Tree comparison methods include the following:

Calculations with multiple trees

Often a biologist wants to perform an analysis with multiple trees, for example the many trees coming from a Bayesian analysis, to see how the analytical results vary among the trees. Mesquite offers several ways to explore analysis with multiple trees

Stored trees and tree blocks

Trees may exist within tree blocks that are stored in the data file. A tree block is a collection of trees stored as a unit. A single data file may contain more than one tree block, each containing from one to many trees.
Mesquite calculations can use trees other than those stored in tree blocks in a data file. Most calculations can use trees that are temporarily created using simulations or randomizations specifically for the purpose of the calculation and then discarded. Also, a recently edited tree in the Tree Window might not be stored in the file if the user has not explicitly stored it in the file using "Store Tree" or "Store Tree As". More details on storing trees in tree blocks in the file are given below.

To create a new, empty tree block into which to store trees, select Taxa&Trees>New Empty Block of Trees... A new block of trees is automatically created if you ask in the Tree Window to store a tree and no block has yet been created to receive trees.
It is also possible to create tree blocks that are already filled with trees. For instance, if you want to make a duplicate of an existing tree block, select Taxa&Trees>Make New Trees Block from>Stored Trees. Other choices under Taxa&Trees>Make New Trees Block from> allow you to create tree blocks filled with trees resulting from simulations or randomizations, or other tree sources.
Trees stored in a tree block can be renamed or deleted in the List of Trees window (available in the Taxa&Trees menu). To rename, edit the tree's name in the list directly. To delete a tree, select the tree's row in the list window and choose List>Delete Selected Trees. Statistics about trees can also be viewed in the List of Trees window by adding the appropriate columns using the List menu.

Tree blocks stored in a file can be renamed or deleted in the List of Tree Blocks window (available in the Taxa&Trees menu). To rename, edit the tree block's name in the list directly. To delete a tree block, select the tree block's row in the list window and choose List>Delete Selected Tree Blocks.
For tree files with too many trees to be held in memory simultaneously, Mesquite can read the trees in directly from the file, one at a time, and discard each from memory after it is used (for instance, in charts or in the Tree Window). To do this use "Use Trees from Separate NEXUS File" as your tree source.

Tree Sources

Trees for viewing and analysis can come from various sources, including tree blocks in the current file, or simulations. Some tree sources modify other trees, such as Randomly Modify Current Tree.
The tree source Concatenate 2 Tree Sources supplies trees from two separate sources as if they were one source. Trees from the first source have an attached value of "1", while trees from the second source have an attached value of "2". Concatenating tree sources can be useful for example to concatenate two large tree files that are too large to read in memory at once. To do this, first open a file that contains the taxa block that pertains to the two tree files. Then choose Save Trees to File from, Concatenate 2 Tree Sources. For the first source of trees choose Use Trees from Separate NEXUS file, and select the tree file. For the second source of trees choose Use Trees from Separate NEXUS file, and select the second tree file. Mesquite will then read all the trees in the first and then second tree file and concatenate them into a single tree file.

Consensus Trees

One source of trees available in Mesquite are consensus trees. A consensus tree summarizes the trees in another tree source; thus, you will need to tell Mesquite the source of the trees to be consensed. There are three sorts of consensus tree now available in Mesquite:


Importing Trees

Trees can be imported from other files in several ways:
When you Link File or choose an option to read trees individually, and then you save your project file, Mesquite will remember what external file is to be read. If you later separate the project file and tree file apart, Mesquite will no longer be able to find the tree file. Thus, if you ask to save a file that is using another tree file via Link File or an option to read trees individually, you should remember to keep both files together.

Filtering Trees

Trees used in charts, the tree window or to make a new tree block can be filtered. To do this, select Filter Trees from Other source as your source of trees. You will be asked for the original source of trees, and the filtering method. There are currently three filtering methods:

Modifying trees automatically

Trees can be edited by hand, as described below, or the user can request Mesquite to automatically modify trees using the "Alter/Transform" modules. These modules can be used:

The Alter/Transform modules include:

To use "Root tree with selected taxa as outgroup", you first must select the outgroup taxa in, for example, the Taxa List window. Then, choose the menu item "Root tree with selected taxa as outgroup" in the Alter/Transform Tree submenu of the Tree menu of the tree window, and in the Alter Trees submenu of the Utilities submenu of the List menu of the List of Trees window. This module will reroot the taxa in between the selected outgroups and the remaining taxa, if this is possible. If the tree cannot be rerooted so that the remaining taxa form a clade, then the tree will not be rerooted, and a warning will be given (perhaps visible only in the log). If the tree can be rerooted, then both the outgroup and ingroup will be monophyletic on the rerooted tree. In addition, if the tree has branch lengths specified, the root will be positioned at the midway point along the branch on which it is placed. That is, the length of the branch from the root to the ingroup will be equal to the length of the branch from the root to the outgroup. Future versions may allow user-choice of the branch length distribution. Adjusting of the length of the two basal branches is NOT done if the tree is already rooted between the chosen outgroups and ingroup.

Saving Trees to a file from a Tree Source

You can ask Mesquite to save a NEXUS file containing trees from a tree source. This feature can have many uses. For example, it can be very valuable if you want to create a tree file but don't want Mesquite to keep all of the trees im memory. Imagine you had a NEXUS tree file of 20,000 trees that you wanted to reroot; and the 20,000 trees could not all fit into memory. The following steps would allow you to create a new tree file with 20,000 rerooted trees, without ever having more than one in memory at once:
Mesquite will then proceed to read in one tree at a time from the original file, transform that tree, and then write it out to the new tree file.
This function was originally available from the File>Export menu as Export NEXUS Tree File from Tree Source.

Editing trees: The Basic Tree Window

The Tree Window shows a tree that can be edited and used in analyses. A new Tree Window can be requested by selecting Taxa&Trees>New Tree Window. (Mesquite allows multple tree windows, and so if you select this menu item a second time, you'll get a new tree window.) Many of the Tree Window's fundamental functions are controlled by its Tree menu. This menu contains items to select the tree source, store trees, and alter the tree. A second important menu is the Display menu, which controls the appearance of the tree. Additional menu items related to the Tree Window are found in the Analysis:Tree menu.

Tree source

The Tree Window shows trees from a particular source (although the tree being shown could differ from those in the tree source, if you've recently modified the tree using the tools). The source of trees might be a tree block in the data file. In this case, as you used the blue arrows at the upper portion of the tool palette, you would be browsing through the stored trees, scrolling from one stored tree to another. Alternatively, the source of trees might be a coalescent simulation, in which case you would be browsing through gene trees representing replicate simulations of the coalescent process. Other tree sources may be available, and can be selected when you request the Tree Window for the first time or by using the submenu Tree>Tree Source>. One tree source, "Default Trees", offers a simple pectinate tree ("Default Ladder"), a full polytomy ("Default Bush"), and a symmetrical tree. It is available merely as a last resort, in case other tree sources are unavailable.
We expect a common confusion will be that users will be unable to find the trees that they recently stored in the file. For example, when a new file is created, there are no stored trees, and hence the Tree Window would be forced to use another tree source (for example, "Default Trees"). If a user then stores a tree in the file (see next section), he or she might hit the blue scroll arrows of the Tree Window expecting to browse the stored trees, only to be shown one of the Default Trees. The problem is that the Tree Window is using Default Trees as the tree source, not Stored Trees. To see the trees stored in the file, select Tree>Tree Source>Stored Trees to change the tree source to Stored Trees.

Moving from Tree to Tree

To select which tree to view, use the tree scroll at the upper left of the Tree Window:
treeScroll.jpg
The left and right blue arrows take you to the previous and next trees, respectively, in the tree source. The Go To button takes you to the tree whose number is entered in the text area. The Recent Editings button offers you a drop down menu by which you can return to recently edited trees. The menu lists only trees that you have edited; it does not list the trees that came directly from the tree source, and is therefore not a complete history of recent trees. The number of little white triangles in the button indicates the number of recently edited trees stored.

Storing trees

Although the Tree Window can be used merely to browse existing trees, it will commonly be used as a tree editor, allowing the user to build a tree according to some prior hypothesis, or to modify trees to explore the effect of changes in the tree.
Once a tree has been edited, the user may want to store this new tree in the file. Exactly how that is done depends on the tree source being used by the Tree Window:
You can tell that a tree has been edited to be different from that in the tree source when a black diamond appears in the message area at the lower left side of the Tree Window. The message area turns green when the tree is an unsaved, edited tree and the tree source is not Stored Trees.

Tree Info Panel

The Tree Window has a Tree Info Panel, available by touching the blue "i" (showInfo.gif) in the tree window. This panel shows basic information about the tree and its notes. It also has a Values section in which you can display values from various calculations (character likelihood, etc.).

Tools

At the left side of the Tree Window is a tool palette, containing tools that you can use to interact with the tree. Exactly which tools are available will depend on the modules installed and loaded. In the description of tools below, it will be assumed that a basic set of modules is installed and loaded.
Some tools act when they are touched on a branch of the tree; others act when a branch is touched then dragged and dropped. Some tools behave differently if a key such as shift or control is held down when the tool is used. These details are explained below. Some explanation of the tool is also given in the window's Explanation Area when the tool is selected in the palette. The currently selected tool has its button darker than the rest in the tool palette.
Some tools have options that can be set. If so, then the button for the tool in the tool palette will have a small black triangle indicating the availability of a drop down menu. If you touch the button and hold down the mouse for a moment, the menu will appear to allow you to make choices.
The following tools change the topology of the tree (the fundamental relationships among taxa implied by the tree). Some of these tools might not be available if their controlling modules are not installed or loaded.

Tool
Action
arrow.gif
Arrow
If touched on a branch, dragged and dropped on another branch, the former branch is reattached to the latter. Also can be used to select taxa and branches.
interchangeBranches.gif
Interchange branches
If touched on a branch, dragged and dropped on another branch, the two branches exchange positions. Can be used to rearrange a polytomy, but can also be used for branches distant on the tree.
collapseBranch.gif
Collapse branch
Collapses branches to yield polytomy. Also removes unbranched internal nodes.
collapseAllBranches.gif
Collapse all
Collapses all branches in clade. If option or ALT is held down, collapses all branches below node touched.
rerootAtBranch.gif
Reroot
Reroots tree at branch touched.
pruneClade.gif
Prune clade
Cuts clade out of tree. Taxa cut out remain within the data file, but are not included in this particular tree.
insertUnbranchedNode.gif
Insert unbranchednode
Inserts node along branch. Currently used primarily in combination with assigned lineage widths to indicate population fluctuations for coalescent simulations.
searchBetterTool.gif
Searchwithin clade
Rearranges the branches above the node touched looking for a better tree. The objective function used (e.g., treelength, or something else) is chosen using the Objective Function submenu of the tool's popup menu. You can also choose the nature of the branch rearrangements used, and whether the tool looks for trees with higher or lower values of the objective function.
The following tools change the branch lengths or widths of the tree.

Tool
Action
adjustBranchLength.gif
Assign branch length
Brings up a small editable area in which to enter a branchlength.
stretchBranch.gif
Stretch branch
Click and drag on branch to stretch its length.
adjustNodePosition.gif
Adjust node position
Stretches branch lengths above and below node to allow node to change position without changing positions of other nodes.
assignLineageWidth.gif
Assign lineage width
Assigns a width to the branch. Currently used to assign effective population sizes for population genetics calculations.
The following tools affect the appearance of the tree, or change attributes of its branches, but do not change the topology or branch lengths. Thus the changes these tools make will not affect most calculations.

Tool
Action
zoomImage.gif
Zoom
Zooms the magnification to enlarge the tree. Holding down Option or Alt shrinks the tree. If you click and hold on the tool button, a drop down menu lets you reset back to standard magnification. Note also the Drawing Size submenu in the Display menu.
ladderizeClade.gif
Ladderize
Rotates nodes to bring the largest clades on the right side of the tree. Does not affect topology of tree. If option or ALT key held down, ladderizes to left.
drawAsTriangle.gif
Draw clade as triangle
Draws clade as small triangle to save space in drawing the tree. The full relationships within the clade remain, but are hidden. Clicking again will expand the clade to be viewed again. This drawing mode may have bugs.
magnifyClade.gif
Magnify clade
Magnifies the image of the tree so that only the clade touched is shown. Touching again on the node shows the whole tree
branchInfo.gif
Branch info
Shows available information about the branch and calculations concerning it.
colorBranch.gif
Color branch
Colors the branch. Control-click colors clade. Repeat click erases. Shift-click shrink wraps color. Touch and hold the button to obtain a menu to select color used. This is not equivalent to the Fix States tool of MacClade.
nameNode.gif
Name node
Gives a name to the node. This name must be unique, and different from the names of terminal taxa.
selectBranchesInClade.gif
Select branches in clade
Selects all the branches in a clade. Control-click extends selection. Shift-click shrink wraps selection. You can also use the arrow tool to select branches.
selectTaxaInClade.gif
Select taxa in clade
Selects all the taxa in a clade. Control-click extends selection. Shift-click shrink wraps selection. You can also use the arrow tool to select taxa.
annotateNode.gif
Annotate node
Attaches a note to a node. An asterisk appears over the node. The note can be seen by passing the Annotate cursor over the branch, or by turning on "Show Notes On Tree" using the menu that drops down from the Annotate node button in the tool palette.
showPicture.gif
Show picture
Shows image attached to taxon. Click again to hide. Control-click to attach picture.
hyperlink.gif
Hyperlink
Shows web page or another data file. Shift click to enter link explicitly. Control-click to select local file.
searchTaxonInDBTool.gif
Search for Taxon in Database
Searches a taxonomic database for the taxon name that is touched. The database searched (e.g., Tree of Life Web Project, iSpecies, Catalogue of Life, GenBank) can be chosen in the tool's popup menu.
nodeAgeConstraints.gif
Node Age Constraints
Assigns constraints on ages to a node. When you touch on a node, a text edit field appears.To indicate the minimum age is 2.0, enter "2.0+". To indicate the range is 2.0 to 4.0, enter "2.0-4.0". To indicate the maximum is 4.0, enter "0.0-4.0". To say age is exactly 3.0, enter "3.0". These constraints are not yet used by standard Mesquite modules

Selecting taxa and branches

Selecting branches or taxa in the tree window can be done by the standard arrow tool, or by special tools for selecting clades. If no branches are selected, then the entire tree looks normal. However, when some branches are selected, the other branches (those not selected) are dimmed. This can be useful to highlight branches both on trees and in other contexts such as Node Scattergram. It also allows other modules to restrict calculations to only the selected branches, for example. Taxon selection can be seen by the highlighting of a taxon name.
To select branches or taxa you can:
Alternatively, you can use the Select Branches in Clade or Select Taxa in Clade tools (above). These select either all the branches in the clade, or all the terminal taxa in the clade.

Alter/Transform menu items

In the Tree menu of the Tree Window are two submenus by which you can change the tree, "Alter/Transform Tree" and "Alter/Transform Branch Lengths". These provide various utilities to change the tree, including its branch lengths. Some, such as "Scale All Branch Lengths", affect all branches of the tree simultaneously. See the section on automatic modification for more details.

Analyses

The Tree Window has, in its Analysis:Tree menu, menu items that yield analyses using the current tree in the Tree Window. Which analyses are available depends on what modules are installed and loaded. Typically the following will be available at least:

How trees are drawn

There are many options for the appearance of trees as drawn in the Tree Window and other windows displaying trees. Trees may have diagonal, square or circular branches; they may be drawn black on white or green on blue; they may be drawn so that apparent branch length is proportional to assigned branch length. These options are controlled by the Display menu.
Some of the menu items in the Display menu are:

Printing trees and saving graphics files

Mesquite's Tree Window offers two menu items for printing trees: Print Tree and Print Tree to Fit Page. The former prints the tree in its current size, even if that requires it to be placed over multiple pages. The latter automatically reduces or enlarges to tree image to fit a single printed page. It attempts to choose landscape or portrait mode to maximize the size of the fitted image.
You can also use Save Tree As PDF in the file menu to save the tree image to a PDF file. This works well except that legends (such as the character trace legend) are not included in the image because of an apparent bug in the library we are using.
An alternative way to generate image files is to ask to print the tree image, then use your operating system's Print dialog box to direct the output to a file (e.g., postscript or PDF) instead of a printer. Printing to a PDF file is built into the Print Dialog box of Mac OS X and therefore is easy to do. On Windows, printing to a pdf or postscript file is not so straighforward. To do this, use a postscript printer and print to file. The ".prn" file created might in fact be a ".ps" postscript file on the inside. If you are using Windows but don't have a postscript printer then you can add a virtual printer via the Control Panel. Choose a postscript printer driver (e.g. a Laserjet marked as "PS"). Postscript and pdf files are editable by programs such as Adobe Illustrator.

See also this page on obtaining publication-quality tree images.

Dependent Tree Window

This window shows the same tree as in the Tree Window (hence it is "dependent"). It is available in the Tree menu of the Tree Window. It is useful when analyses or graphics are desired for the Tree Window, but which would conflict visually with currently running analyses or graphics. Thus, the Dependent Tree Window gives additional space on which to display graphics and analyses. As the tree in the Tree Window is changed, the tree in the Dependent Tree Window is also changed. Note: If the Tree Window is closed, the Dependent Tree Window will close also.
Users may find the menus of the Tree Window and Dependent Tree Window somewhat confusing when the latter is in use, as both windows include some menus of the other. This is a consequence of Mesquite's automatic menu arrangement; we realize it is not optimal in this case.

Mirror Tree Window

This window, like the Dependent Tree Window, shows the same tree as in the Tree Window. However, the Mirror Tree Window shows it twice, in mirror image. This allows you to compare, for instance, two different traced characters visually, as in this example. The analysis shown on the left side is controlled by the Left side submenu; that on the right by the Right side submenu.
Users may find menus confusing when this window is in use; see comments under Dependent Tree Window.

Multi Tree Window

This window, available in the Taxa & Trees menu, shows multiple trees simultaneously. It is not dependent on a Tree Window, but gets its trees from an available tree source.