Uncertainty on tips date + Clades specific subst. models

1,329 views
Skip to first unread message

adrien...@gmail.com

unread,
Mar 20, 2013, 8:44:43 AM3/20/13
to beast...@googlegroups.com
Dear BEAST users/developers,

I'm wondering if and how (in case it is possible) I could modify an xml file to the following purpose. I couldn't find a way to do it in BEAUTI:

1- Add uncertainty on tips date.

BEAUTI allows to date tips. Is there a way to specify a distribution instead of a fixed date (to account for example in uncertainty on sampling time) ?

2- Applying clades specific subst. models

I suspect the process of evolution to differ over my tree for a given scheme of sites. I'd thus like to account for such heterogeneity and apply different models of evolution to different clades. Is there a way to account for that ?

Thanks by advance for your help/advices
Cheers

Adrien




Andrew Rambaut

unread,
Mar 21, 2013, 8:27:54 AM3/21/13
to beast...@googlegroups.com
Dear Adrien,

There are two ways of doing it:

If you want to sample the date of a specific tip (or a few tips) then create a taxon set and add your tips to it. Then in the 'Tips' tab, turn on 'Tip date sampling: Sampling with individual priors' and 'Apply to taxon set' choosing your taxon set. If you now look in the Priors table you will see parameters called 'age(My_Tip)' on which you can now set a prior. These ages will be recorded in the log file.

Some warning - these will generally need to be tips that are embedded within clades with known tip dates (if it is a basal branch then it will be able to wander as old as it wants).

The second method is for when you have dates but there is a lack of precision (i.e., you only know the year of sampling) and you want to sample uniformly from that date uncertainty. This will usually not be informative about the date but will allow you to accommodate the lack of precision. For this you add a 'precision' attribute to the date element:

<taxon id="D4Brazi82">
<date value="1982.0" direction="forwards" units="years" precision="1.0"/>
</taxon>

The date value is the start of the range and the precision is the width. So in the above the precision is 1 year so the uncertainty in the date ranges from 1982.0 to 1983.0.

You then need to add:

<leafHeight taxon="D4Brazi82">
<parameter id="D4Brazi82.height"/>
</leafHeight>

to the tree model,

<randomWalkOperator windowSize="0.1" weight="1">
<parameter idref="D4Brazi82.height"/>
</randomWalkOperator>

to the operators, and if you want:

<parameter idref="D4Brazi82.height"/>

to the log file.

An example XML file for this can be found here: examples/testXML/testTipDatePrecision.xml

This is on my list of features to add to BEAUti.

Andrew
> --
> You received this message because you are subscribed to the Google Groups "beast-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to beast-users...@googlegroups.com.
> To post to this group, send email to beast...@googlegroups.com.
> Visit this group at http://groups.google.com/group/beast-users?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>

adrien...@gmail.com

unread,
Mar 21, 2013, 3:26:57 PM3/21/13
to beast...@googlegroups.com
That's great...thanks Andrew !

Regarding the second point of my post, is there a way to account for heterogeneity in subst.model among the tree and apply different models of evolution to different clades ?

Cheers

Adrien

Andrew Rambaut

unread,
Mar 21, 2013, 5:04:27 PM3/21/13
to beast...@googlegroups.com
That is being worked on. Hopefully we will have it working shortly.

Andrew

adrien...@gmail.com

unread,
Mar 22, 2013, 7:22:51 AM3/22/13
to beast...@googlegroups.com
Great, thanks Andrew....I'll be happy to test this option when it comes out...
Regards,
A.

Kate Baker

unread,
May 19, 2014, 8:14:14 AM5/19/14
to beast...@googlegroups.com
Hi Andrew, 
I have just tried this alteration to the xml and ended up with erratic traces (on a data set that had previously converged well) and I just wanted to please check that I'm using the  precision element correctly: 
My data set is ~1000bp (whole genome) SNP alignment of 181 taxa dated in days before present, spanning five years, but I have only year of isolation for five of the samples. I tried to account for this by altering the date for the taxa to 01/01/isolation_year and changing the precision for these taxa to 365 (leaving the date direction as forwards) to try and account for the uncertainty.
Was this the right approach?
Thanks very much in advance,
Kate Baker

Brian Muchmore

unread,
Aug 29, 2014, 1:52:38 PM8/29/14
to beast...@googlegroups.com
Can precision dating be done for beast 2.x?

Thanks.
Reply all
Reply to author
Forward
0 new messages