Home
Home

 Help Documentation
 Current document  

Ancestral States

SIMMAP offers the option to calculate ancestral states. The method used is a Bayesian, either empirical or heirarchical, approach (see Huelsenbeck and Bollback. 2001. Empirical and hierarchical Bayesian estimation of ancestral states. Systematic Biology. 50(3): 351-366. PDF). The approach is an indirect approach in which the tree(s) and model estimates used are derived from an external program (e.g., MrBayes) or defined a priori by the user.

Two steps are required to setup SIMMAP for an analysis of ancestral states: (1) designating a clade constraint, and (2) configuring the analysis. Each of these is discussed below.

Clade Constraints (Managing Constraints)

The first step in performing an analysis of ancestral states is defining the clade or clades which you wish to analyze.

This is accomplished in SIMMAP using the Manage Constraints... menu item in the Trees main menu option. Selecting this option opens the window show on the right.

The Constraint Manager window has three primary elements: (1) a table (at the top of the window) displaying information regarding defined constraints (name, number of members, and frequency of trees in memory that have the defined clade), (2) a table showing the taxa not included (Non-Members) in the defined constraint, and (3) a table showing taxa included (Constraint Members) in the defined constraint. The last two tables are empty unless a constraint is selected in the primary table showing constraint information.

To add a constraint select the Add (+) button at the top left of the window. This will open a window requesting a name for the new constraint - enter a unique name (identifier). Once a name has been defined select the constraint in the primary table. The Non-Members table will be displaying all of the taxa currently in memory. To Include members in the constraint select the taxa in the Non-Members table
and either use the right arrow button or double-click the taxon name. This taxon will be appear in the Constraint Members table and is now included in the constraint. A constraint must include at least two taxa and the constraint will be ignored during analysis if none of the trees in memory contain the clade. If you wish to determine the frequency (fraction) of trees in memory that contain the clade select the Update button in the top right corner of the window to update the frequency column.

Alternatively, constraints can be added more simply from the Tree View window using the tree modifications options by selecting the Turn On Tree Modifications [L] menu item in the Trees main menu. When tree modifications are active the upper right corner of the Tree View window displays a notice in red showing the status of the ability to modify trees. In addition, when modifications are activated the mouse cursor will appear as a cross-hair when positioned over the Tree View window. To add a constraint for a particular node double-click the cross-hair mouse on the desired node. Once a node has been selected successfully you will see the following:


Most of these options are dealt with elsewhere but to create a constraint select the Create Constraint button. From this point on follow the description above to add a constraint. By default, constraints apply to all trees in memory that are consistent with it, unlike the other options availble in the window displayed above.

Saving Constraints

Once a constraint(s) have been defined they can be saved to a file for later use in SIMMAP. Constraints can be saved using the Save As button in the Constraints Manager window, or by selecting the Save Constraints To File... item in the Trees menu. The constraints are saved to an XML plist file with the following format:
In the example above we have a constraint name, "Constraint One", enclosed by an opening, <key>, and closing, </key>, tags. The members of the constraint are contained within an <array> as <string>s representing the taxon names. The names need to match those of the tree and data file. The constraints file can be manually edited in a text editor, the Apple program Property List Editor if you have the Developer Tools installed (location: /Developer/Applications/Utilities), or the command line utility plutil. The command line utility is particularly useful if you have modified the file in a text editor and want to check whether the syntax is correct.

Loading Constraints

Loading constraints from the XML plist file can be accomplished using the Load button in the Constraints Manager window, or by selecting the Load Constraints From File... item in the Trees menu. Duplicate constraints, defined by having common taxon members and not the constraint name, are ignored; only unique constraints are loaded. (Note: The exclusion of duplicate constraints was implemented in version 1.0 Beta 2.1 builds later than Build 19052006-1.0-B2.1.)

Calculate Posterior Ancestral States

Calculating ancestral states requires a clade constraint be defined as described above. Once define ancestral states can be calculated for constraints selecting Posterior Ancestral States... available under the Analysis menu. Once selected, the Calculate Ancestral States window (see below) will open allowing the analysis to be configured.
Selecting a character:
To select a character (site) to reconstruct select the site number from the Select a site: pop-up button, or select All to evaluate all sites. Next select a constraint from the Select a constraint: pop-up button or select All to evaluate all constraints that have been defined. Trees that lack the constraint(s) are excluded from the analysis - the posterior probability of ancestral states is conditional on the presence of the constraint.

Tree options:
A number of tree options are available. First, you can select to Use all trees consistent with constraint(s) (default) or Use the currently displayed tree. When Use all trees consistent with constraint(s) is chosen you have the further option of excluding a number of trees from those in memory using the Burnin to exclude option. This option excludes trees from the start of those read into memory. To verify the first tree in memory check the tree number in the Tree View window. Finally, if ancestral states have been fixed at an internal node on a tree these constraints can be included or ecluded from the analysis of ancestral state reconstructions. (For more information on fixing ancestral states go here.) Note: It is meaningless to perform an analysis on a fixed node but these constraints can be used to explore its affects on other nodes.

Morphology options:
When analyzing morphological or standard data the number of Draws from prior distribution can be set. Using multiple draws from the prior distributions allows the probability of ancestral states to accommodate the variance arising from these distributions. If the priors are fixed this option has no effect on the probabilities but will increase the computational time. I recommend setting the sampling from the priors at some value greater than 10. There is no good notion as to what the best value is but you can check that the influence of increasing prior sampling does not effect the results (the choice of parameters on the prior can also be evaluated in this way). For more information on morphology priors read more here. The second option, Log prior information, will return the values for each discrete category in the prior distributions and, more importantly, the values sampled from the prior distributions for each draw. This later information can be used to determine the posterior distribution of the bias parameter (two-state characters only) and the overall rate parameter, and the afects of the choice of priors on the inference of ancestral states. This information can be written to a file (Save to file (Desktop/SIMMAP.log)) or displayed in the output window (Save to results window).

Molecular options:
A single molecular option is available: Link parameter and tree samples. This option links the model parameters associated with a tree to be used during the calculation. This option assumes that the model has been appropriately configured (see the help pages on Substitution Models and Molecular Model Parameters).

Example of Morphological Analysis

When the analysis is complete the results will be displayed in the Ancestral State Reconstruction (ASR) window (see below). A number of features should be pointed out. First, the window consists of three tabs: Ancestral Reconstructions, Posterior Samples from Priors, and Log. The first tab displays the primary results. The second tab displays samples from the prior distributions (morphological/standard data only). And, the third tab displays the prior log - a description of the prior distributions (morphological/standard data only).

The data can be saved to a text file by selecting the Save button and choosing a location and file name. This file can then be imported into a program for further analysis or preparation for publication. Below is an example using the Apple spreadsheet program Numbers to display the posterior ancestral states for a particular node, overlayed on a single realization of a mutational map:

About Search System Requirements License Acknowledgements Contact
Tutorial   Character Coding
Page Last Updated: 6 August 2008