Difference between revisions of "Phylogenetics: BEAST Lab"

From EEBedia
Jump to: navigation, search
(Saving the XML file)
(Setting up the Priors)
Line 80: Line 80:
 
=== Setting up the Priors ===
 
=== Setting up the Priors ===
  
Click on the ''Priors'' tab in BEAUTi and set up the priors as follows.
+
Click on the ''Priors'' tab in BEAUTi and set up the priors as follows. '''Before doing anything else,''' go to ''Mode'' in the main menu and uncheck both ''Automatic set clock rate'' and ''Automatic set fix mean substitution rate flag''.
  
 
==== Tree ====
 
==== Tree ====
Line 101: Line 101:
  
 
Keep this set to a Uniform(0,1) distribution (do not check ''estimate'')
 
Keep this set to a Uniform(0,1) distribution (do not check ''estimate'')
 +
 +
==== ucldMean ====
 +
 +
Keep this set to an Exponential distribution with mean 100 (do not check ''estimate'')
  
 
==== ucldStdev ====
 
==== ucldStdev ====

Revision as of 17:45, 13 April 2016

Adiantum.png EEB 5349: Phylogenetics
In this lab you will learn how to use the program BEAST, and its companion BEAUTi, written by Alexei Drummond, Andrew Rambaut, Marc Suchard, Remco Bouckaert, and numerous other contributors. BEAST specializes in estimating divergence times under uncorrelated relaxed clock models, estimating species trees using a model that accounts for the independent coalescent history of each gene tree, and Bayesian skyline analyses that estimate population growth or decline through time. While BEAST itself is written in C and Java and has no user interface, the companion program BEAUTi has a nice graphical user interface that allows you to create an XML data file that is consulted by BEAST when it runs.

In this lab, you will use BEAST to estimate divergence times. Rather than analyze a real data set, you will simulated a data set in which you know the true values of all parameters, and then see how to obtain estimates of those parameters in BEAST.

Login to the UConn Bioinformatics cluster

Once you login, type

qlogin

to obtain a session on a currently unused node.

Download BEAUTi and BEAST

While we will be using BEAST on the cluster, you will need to download the software locally in order to get BEAUTi, which cannot be easily run remotely on the cluster because of its interactive GUI (Graphical User Interface).

Download the version of BEAST 2.4.0 from the BEAST web site. You will also need FigTree and Tracer (but you should already have those).

BEAST and BEAUti form a pair. BEAUti is a user-friendly, graphical Java application that can be used to create the data file that is then fed to BEAST, which is neither user-friendly nor graphical, but is nevertheless also written in Java. Thus, to do anything with BEAST, you will need a working Java runtime environment. You will actually use the cluster to run BEAST, but you will need to run BEAUti on your own laptop. If you have trouble getting Java running on your laptop, pair with another student until you have an XML file. At that point, you can use your own computer to interact with the cluster.

Analysis of simulated data

Download the file simyule.nex to your hard drive and import it into BEAUTi using the File > Import alignment menu command. An entry called simyule should appear in the Partitions section.

The tree from which these data were simulated was itself simulated using the Yule model. Here are some facts about the true tree:

Number of leaves (species) 20
Per-lineage speciation rate 10
Tree length (sum of all edge times) 1.77537
Tree height (length of path from root to any tip) 0.279743

Sequence data (10000 sites) was simulated using this Yule tree. Here are some facts about the true substitution model:

Model HKY85
Gamma rate heterogeneity shape 0.5
Equilibrium frequency for A 0.3
Equilibrium frequency for C 0.2
Equilibrium frequency for G 0.2
Equilibrium frequency for T 0.3
Kappa (trs./trv. rate ratio) 4.0

Setting up the Site Model

Click on the Site Model tab in BEAUTi and set Gamma Category Count to 4, Proportion Invariant to 0.1, the model to HKY, and check estimate' for everything.

Setting up the Clock Model

Click on the Clock Model tab in BEAUTi and set the clock model to Relaxed Clock Log Normal(leave Number of Discrete Rates set to -1 and leave Clock.rate set to 1.0).

Setting up the Priors

Click on the Priors tab in BEAUTi and set up the priors as follows. Before doing anything else, go to Mode in the main menu and uncheck both Automatic set clock rate and Automatic set fix mean substitution rate flag.

Tree

Keep this set to Yule Model and be sure estimate is checked (but leave Conditional On Root unchecked)

birthRate

Set this to an Exponential distribution with mean 100 (do not check estimate)

gammaShape

Set this to an Exponential distribution with mean 100 (do not check estimate)

kappa

Set this to an Exponential distribution with mean 100 (do not check estimate)

proportionInvariant

Keep this set to a Uniform(0,1) distribution (do not check estimate)

ucldMean

Keep this set to an Exponential distribution with mean 100 (do not check estimate)

ucldStdev

Keep this set to an Exponential distribution with mean 100 (do not check estimate)

Setting up MCMC

Click on the MCMC tab in BEAUTi and set the Chain Length to 100000, leave Store Every set to -1, and set Pre Burnin to 10000.

Note (but do NOT check) the box at the bottom labeled Sample From Prior

Saving the XML file

You are now ready to save the XML file that BEAST will use. To do this, choose File > Save As from the main menu and save the file as simyule.xml in a directory of your choosing. Upload this file to your home directory on the cluster.

Running BEAST on the cluster