All about starting trees

Before starting an MCMC run, BEAST uses State Node initialisers to set up the starting trees (and other parameters). Often a good starting tree is already available from another analysis (e.g. a maximum likelihood tree). Though it is against the spirit of MCMC, which guarantees any random starting state will lead to convergence, a good starting tree can help with large analysis to speed up convergence quite a bit. Of course another reason to specify a starting tree is if you want to do an analysis using just a single known tree topology.

We start with standard analysis, but see below for *BEAST and StarBeast2 analyses.

Standard analysis

For a standard analysis, there are a number of ways to specify a starting tree

a random tree based on the coalescent

a tree in Newick format

a cluster tree, e.g. through UPGMA or neighbour joining

a simple random tree

The easiest way to set up a starting tree is in BEAUti; click the menu View/Starting tree panel.

From the drop-down box you can select the type of tree you want to start with.

A random tree is a tree drawn from a coalescent process, so it uses a population function to guide that process. When there are time calibrations in the tree, it is possible the tree will not conform to these calibrations. You can increase or decrease the population size to get bigger or smaller (respectively) trees. Alternatively, you can give a target root height and the tree will be scaled to match that height if constraints allow this.

A rough and ready tree can be obtained using clustering, which can be expected to be fairly close to trees from the posterior (at least for the topology). BEAST has a number of cluster algorithms implemented, including UPGMA and neighbour joining. Note that using such a tree is non-random, so using it as starting tree means the starting tree will always be the same one. The ClusterTree attempts to take monophyletic constraints in account.

When you have another source for a starting tree and have it in Newick format, you can select the Newick tree and paste it in the Nnewick entry. Note that if you only have the topology and have timing constraints (i.e., MRCA priors) branch lengths are set to 0.001. Furthermore, if the Adjust Tip Heights flag is set, then tip heights will be set to the height specified in the tip-dating panel (or at zero, if nothing is specified), adjusting branch lengths in the process.
You can scale the tree with a fixed factor using the scale entry.

The RandomTree will not always be able to deal with all combinations of calibrations. The SimpleRandomTree available in the BEASTLabs package is more robust. However, it is not based on the coalescent. For BEAST 2.5, a template will be available so you can choose this in BEAUti. For v2.4, it is possible to set edit the XML (see below).

Editing the XML for a Standard Analysis

By default, BEAUti uses a RandomTree state-node initialiser to generate a starting tree. If you want to replace it with a Newick tree or cluster tree, first you need to remove (or comment out) the RandomTree element from the XML. For a tree in partition XYZ26, just search for RandomTree and remove the XML fragment with id RandomTree.t:XYZ26. It should look something like this:

id="NewickTree.t:XYZ26" the ID should be unique, so something like NewickTree.t: plus the name of the tree would be suitable.

initial="@Tree.t:XYZ26" this refers to the tree being initialised. It should be the same as the initial attribute of the RandomTree that was removed.

taxa="@XYZ26" this refers to the alignment and ensures that taxa in the tree are lined with those in the alignment. For BEAST v2.1.x, this must be specified to prevent starting with a mislabelled tree

newick="((your,(tree,goes)),here)" obviously needs to be replaced with your own tree in Newick format.

This is all you need to know to set up a starting tree. There are a few optional attributes you can use to make life a bit easier:

adjustTipHeights is true by default, which means tips of the tree will be set to zero, or if tip dates are specified to these particular tip dates. By setting to adjustTipHeights="false", tips will be initialised by the heights in the Newick tree.

if adjustTipHeights="false" then threshold specifies threshold under which node heights (derived from lengths) are set to zero. This helps when there are numeric issues with adding the lengths.

Simple Random Tree

For using a SimpleRandomTree you need to install the BEASTLabs package. Instead of removing the Random tree, only remove the population model and in the spec-attribute, replace RandomTree with SimpleRandomTree:

*BEAST analysis

For a *BEAST analysis, the default in BEAUti is to generate a UPGMA tree for the species tree, then generate UPGMA trees for each of the gene trees and fit them inside the species tree. In previous incarnations of BEAST, a random tree was generated for species as well as for gene trees, but gene tree branches ending in leaves were lengthened such that each first coalescence of a gene tree was above the root of the species tree. Though this ensures that the gene trees fit inside the species tree, it leads to long burn-in times.

If you want to use a different starting tree for the species tree, first move (not remove!) the StarBeastStartState element generated by BEAUti to just before the run-element with id="mcmc". BEAUti will have generated some elements inside the start-state (such as the species-tree-prior) that we need elsewhere in the analysis. By moving the init element outside the run element, it will not activate the StarBeastStartState.

The only thing to set up is the Newick using the newick attribute — all other attributes should be as they are (it is using the species tree, which is identified by the Species partition in every *BEAST analysis generated by BEAUti).

For each of the gene trees, you need to specify a tree as well. You can specify them using a Newick tree as for the Standard analysis (see above). Alternatively, you can use a random tree that is placed ‘above’ the species tree. To do this, you add for the first gene tree (just below the new Species tree start tree):

where you replace the initial='@Tree.t:29' and taxa="@29" attributes to match your tree (instead of 29) and make sure the id is unique.

StarBEAST2 analysis

StarBEAST2 analysis require the StarBEAST2 package.
Setting up starting trees is very similar to setting them up for a *BEAST analysis, but
these analyses use a custom species tree, and a custom StarBeastInitialiser with id="SBI". To change the starting trees, you should remove the element with id="SBI", and follow instructions for *BEAST starting trees above.