Continuous morphological traits in BEAST2?

571 views
Skip to first unread message

Tom Brougham

unread,
Oct 30, 2017, 2:45:12 AM10/30/17
to beast-users
I've been searching through posts to this group looking for a way to include continuous morphological data in a BEAST2 analysis. BEAST1 provided a method of incorporating a set of traits as a multivariate partition using BEAUti, as in this tutorial: http://beast.community/continuous_traits. However, that functionality appears not to have been transferred into BEAUti in version 2. The only mentions I have been able to find regarding continuous morphological traits in BEAST2 refer to using the implementation of continuous phylogeography, which does not seem to be suitable for analysing an arbitrarily large number of continuous traits. How can I configure a BEAST2 analysis to achieve the desired outcome, or must I use BEAST1 for this purpose?

Regards, Tom.

Nelson

unread,
Mar 1, 2018, 10:49:32 AM3/1/18
to beast-users
Dear Tom (beast users and developers)

Did you manage to use continuous morphological traits in Beast2? I'd be especially interested in evaluating how STACEY estimates change in the presence of (continuous) morphological data. Unforunately, the species I'm working with are not vaiable for discrte traits.

Cheers
Nelson

Mike Lee

unread,
Mar 5, 2018, 12:56:14 AM3/5/18
to beast-users

Hi

I have added a continuous trait to the Gavryshkina et al penguin dataset in BEAST2 (all the same value - 0.52, for reasons discussed below) and runs fine; note you need to use the -java option to avoid null pointer errors.  However, I noticed two issues

(1) There is an error message "AbstractMultivariateTraitLikelihood: likelihood is infinite".  But when you look at the log file e.g. in Tracer, the likelihood for the continuous trait (LocationTreeLikelihood.continuousTrait.joint) is a normal negative number, not infinity.  The total likelihood also makes sense: it is the sum of the discrete character partition likelihoods, and the continuous trait likelihood.   So question 1 is, should we just disregard the error message?

(2) If you used the SABD tree prior, the number of sampled ancestors always drops to 0 when you add the continuous trait.  This is not due to the new continuous data making ancestors less likely - in the xml file attached, every terminal has a continuous trait value of 0.52, hence the new data should not reduce the likelihood of direct ancestors.  So question 2 is, does SABD work with continous traits?

Cheers, Mike Lee
8+continuous.xml

Remco Bouckaert

unread,
Mar 5, 2018, 4:23:42 PM3/5/18
to beast...@googlegroups.com
Hi Mike,

Just quickly run this through a debugger, and it looks like whenever a proposal results in a node becoming ancestral, the SampledMultivariateTraitLikelihood sees a zero length branch and that results in an infinite likelihood. Since the SampledMultivariateTraitLikelihood is not aware of ancestrally, it returns an infinite likelihood and the proposal is rejected. That explains why the SACount remains at zero. I think it is fair to say SABD and continuous traits do not work well together.

Cheers,

Remco


--
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 https://groups.google.com/group/beast-users.
For more options, visit https://groups.google.com/d/optout.
<8+continuous.xml>

Mike Lee

unread,
Mar 5, 2018, 6:04:06 PM3/5/18
to beast-users
Thanks Remco, that explains both issues.  Tom, you'll need to use a different tree prior e.g. BDSS but the prevous xml file probably gives similar results in a less efficient way (SABD with ancestor moves rejected).  Cheers, Mike

David Bapst

unread,
Mar 6, 2018, 4:14:50 PM3/6/18
to beast-users
Seems like SampledMultivariateTraitLikelihood returning an infinite likelihood must be an artificial constraint. I'm pretty sure that there's plenty of applications that get the likelihood for Brownian Motion and Ornstein-Uhlenbeck models (both univariate and multivariate) on trees with zero-length branches, and that's essentially what any application does that let's you reconstruct ancestral states with some node values constrained...
-Dave

Alexei Drummond

unread,
Mar 6, 2018, 4:18:00 PM3/6/18
to beast...@googlegroups.com
Hey Dave,

This is definitely an artificial constraint. It is just a little bit a programming to fix, as the code for multivariate continuous likelihood wasn’t initially written with sampled ancestor trees in mind :)

Cheers
Alexei
Reply all
Reply to author
Forward
0 new messages