BEAST 2

Sample a discrete trait

You need BEAST v2.1.0 and BEAST-classic v1.1.1. If you already have an older version of BEAST-classic installed, you have to re-install it to ensure you have version 1.1.1 or better — the addon manager in Beauti under the menu File/Mange add-ons will show which version you have installed.

There is an small example file “examples/testDiscreteSmall.xml” that is installed with BEAST-classic v1.1.1.

It is probably easiest to start creating an XML file using BEAUti by adding a discrete trait (See Ancestral reconstruction/Discrete phylogeography tutorial for details).

Then, you need to edit the XML, and

1. add a LeaftTrait to the AncestralStateTreeLikelihood, for example in testDiscreteSmall.xml

 <leaftrait parameter='@trait(A_chicken_Fujian_1042_2005)' taxon='A_chicken_Fujian_1042_2005' spec='LeafTrait'/>

2. add a state-node to the state. In testDiscreteSmall.xml:

 <stateNode spec='parameter.IntegerParameter' id='trait(A_chicken_Fujian_1042_2005)' value='0'/>

3. add an operator to sample the trait:

   <operator id="IntegerOperator.blackbird_Hunan" spec="GeneralIntegerOperator" parameter="@trait(A_chicken_Fujian_1042_2005)" weight="30.0">
       <index id='chicken_indices' spec='parameter.IntegerParameter' value='0 2'/>
   </operator>

Note that the chicken_indices element shows the values that the trait is allowed to take. In this case, only 0 and 2, and state 1 is never sampled. These states coincide with the states defined for the location data type

   Hebei = 0,
   HongKong = 1,
   Guangdong = 2

Bayesian evolutionary analysis by sampling trees

Served through Jekyll, customised theme based on the twentyfourteen wordpress theme.