Help for BEAST2 vntr / diploid data

250 views
Skip to first unread message

Mattia Calzolari

unread,
Apr 6, 2018, 2:28:08 PM4/6/18
to beast-users

Dear All,

I tried to use the BEAST2 vntr package to build a phylogenetic tree with microsatellite data

I have a set of 14 diploid markers with 114 taxa (that I inserted as two different partitions, linking the trees of the two). Summarizing the obtained trees I obtained a nice tree, with good node-posterior probability, but:

1)            Beast produce this message several time during the run:

 

P(posterior) = -846.6273016367398 (was -846.674156228279)  **

                P(prior) = -68.69095724116303 (was -68.69095724116303)

                                P(CoalescentConstant.t:er1) = -61.65427653187921 (was -61.65427653187921)

                                P(biasMagnitudePrior.s:er1) = 0.0 (was 0.0)

                                P(biasMagnitudePrior.s:er2) = 0.0 (was 0.0)

                                P(ClockPrior.c:er2) = 0.0 (was 0.0)

                                P(focalPointPrior.s:er1) = -2.639057329615259 (was -2.639057329615259)

                                P(focalPointPrior.s:er2) = -2.639057329615259 (was -2.639057329615259)

                                P(gPrior.s:er1) = 0.0 (was 0.0)

                                P(gPrior.s:er2) = 0.0 (was 0.0)

                                P(GammaShapePrior.s:er1) = -0.6126226121293556 (was -0.6126226121293556)

                                P(GammaShapePrior.s:er2) = -0.9794176114436127 (was -0.9794176114436127)

                                P(oneOnA1Prior.s:er1) = 0.0 (was 0.0)

                                P(oneOnA1Prior.s:er2) = 0.0 (was 0.0)

                                P(PopSizePrior.t:er1) = -0.16652582648034264 (was -0.16652582648034264)

                P(likelihood) = -777.9363443955768 (was -777.983198987116)  **

                                P(treAt sample 2350000

Likelihood incorrectly calculated: -846.674156228279 != -846.6273016367398(-0.04685459153915872) Operator: beast.evolution.operators.SubtreeSlide

eLikelihood.er1) = -419.970920388403 (was -419.970920388403)

 

 

2)            Beast terminated after about 4 millions of replications, even if I set 10 million of replications

3)            Posterior and priors of the obtained log file don’t reach the 200 ess

I would ask if I can use the obtained summarized tree confidently and if someone could help me in set correctly the beauti template  to obtain a complete run.

Thanks for the help and kind regards

Mattia 

Carlo Pacioni

unread,
Apr 8, 2018, 8:12:50 PM4/8/18
to beast...@googlegroups.com, Remco Bouckaert
Hi Mattia, 
I have reported this error in January and Remco had a look at it. His reply is pasted below, but I don't think he had the time to track the problem down. I'm not sure whether an issue has been open for this, but maybe we should?

Cheers,
carlo

Hi Carlo,

Thanks for the bug-report. I can confirm this is still a problem with the development code, but stopped being a problem when sampling from the prior. Also, there is no problem when only using a single alignment. This implies there is a problem with the likelihood and perhaps the way the site models interact. Hope to get back with a solution soon...

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+unsubscribe@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.

Mattia Calzolari

unread,
Apr 9, 2018, 3:26:36 AM4/9/18
to beast-users

Dear Carlo,

Thanks for your answer.

I tried to rerun my template and this time it terminated after 3.1 million of replications with this message

 

 

3102000      -672.8099         6.4         -785.2834       112.4734 1h31m30s/Msamples

Fatal exception: Could not find zero eigenvalue.

java.lang.RuntimeException: Could not find zero eigenvalue.

                at beast.evolution.substitutionmodel.Sainudiin.findStationaryDistribution(Unknown Source)

                at beast.evolution.substitutionmodel.Sainudiin.getTransitionProbabilities(Unknown Source)

                at beast.evolution.likelihood.TreeLikelihood.traverse(Unknown Source)

                at beast.evolution.likelihood.TreeLikelihood.traverse(Unknown Source)

                at beast.evolution.likelihood.TreeLikelihood.calculateLogP(Unknown Source)

                at beast.evolution.likelihood.ThreadedTreeLikelihood.calculateLogPByBeagle(Unknown Source)

                at beast.evolution.likelihood.ThreadedTreeLikelihood.calculateLogP(Unknown Source)

                at beast.core.util.CompoundDistribution.calculateLogP(Unknown Source)

                at beast.core.util.CompoundDistribution.calculateLogP(Unknown Source)

                at beast.core.MCMC.propagateState(Unknown Source)

                at beast.core.MCMC.doLoop(Unknown Source)

                at beast.core.MCMC.run(Unknown Source)

                at beast.app.BeastMCMC.run(Unknown Source)

                at beast.app.beastapp.BeastMain.<init>(Unknown Source)

                at beast.app.beastapp.BeastMain.main(Unknown Source)

                at beast.app.beastapp.BeastLauncher.main(Unknown Source)

Fatal exception: Could not find zero eigenvalue.

 

BEAST has terminated with an error. Please select QUIT from the menu.

 

Maybe is possible to obtain a complete run changing the parameters in the prior setting, but I don’t know in which way.

Thank you again

Mattia

To unsubscribe from this group and stop receiving emails from it, send an email to beast-users...@googlegroups.com.

Remco Bouckaert

unread,
Apr 10, 2018, 7:34:43 PM4/10/18
to beast...@googlegroups.com
Dear BEAST user,

We are pleased to announce the release of BEAST v2.5.0. The main changes are:

        BEAST & friends are now compatible with Java 8, 9 and 10.
        All appllications start a bit faster now package discovery is cached.
        Versions available with Java bundled

        

BEAST   
        A command line option is added to parameterise XML files.
        Maximum MCMC length was 2147483647 is now 9223372036854775807.
        Fix for resume of coalescent, which sometimes failed.
        RPNCalculator logs starting from 1 consistent with multi dimensional parameters

BEAUti
        Facility to automatic update packages when BEAUti is started
        Tip dates panel supports wider range of formats
        Added clear classpath menu 
        More robust NEXUS parsing
        Allow top level templates, to easily switch between say MCMC and nested sampling
        Bug fix for unlimited prior distributions to be changed
        More robust substitution model initialisation

        

Utilities: 
        Renamed appstore => applauncher to preven confusion with OS X app store.
        Renamed addonmanager => packagemanager 
        Packagemanager has an -update option to check for updates and -updatenow to install without asking
        Better progress reporting on logcombiner, treeannotator, loganalyser

More details are available here: http://www.beast2.org/2018/04/10/what-is-new-in-v2.5.0.html

You can download this version of BEAST from here (upgrading via package manager is not possible for this major release):

http://www.beast2.org/

and choose the version for your operating system.

Most but not all packages are available for v2.5.0 yet (working on that), but for those package that do not work you can still run v2.4.x separately next to v2.5.0.

Note that BEAST 2 requires Java 8, which can be downloaded from http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html

BEAST core development team

Remco Bouckaert

unread,
Apr 10, 2018, 8:56:46 PM4/10/18
to beast...@googlegroups.com
Hi Mattia,

This first two problems should be fixed with the latest BEASTvntr release v0.1.2, which is available for the just released BEAST v2.5.0 (to install, just click the appropriate link in the download section at http://www.beast2.org). Be aware that the BEASTvntr implementation does not work well with BEAGLE, so you should run with the -java option for BEAST. 

Let me know if you still encounter incorrectly calculated likelihood problems.

Cheers, Remco


Mattia Calzolari

unread,
Apr 13, 2018, 2:00:25 PM4/13/18
to beast-users
Dear Remco,
Yes, now the program works well, without likelihood calculation problems. Thank you for the advice!
But, I still have problem in my beast analysis, maybe linked with wrong settings. After a variable number of runs Beast terminated with this error


Fatal exception: Could not find zero eigenvalue.

java.lang.RuntimeException: Could not find zero eigenvalue.

    at beast.evolution.substitutionmodel.Sainudiin.findStationaryDistribution(Unknown Source)

    at beast.evolution.substitutionmodel.Sainudiin.getTransitionProbabilities(Unknown Source)

    at beast.evolution.likelihood.TreeLikelihood.traverse(Unknown Source)

    at beast.evolution.likelihood.TreeLikelihood.traverse(Unknown Source)

    at beast.evolution.likelihood.TreeLikelihood.calculateLogP(Unknown Source)

    at beast.evolution.likelihood.ThreadedTreeLikelihood.calculateLogPByBeagle(Unknown Source)

    at beast.evolution.likelihood.ThreadedTreeLikelihood.calculateLogP(Unknown Source)

    at beast.core.util.CompoundDistribution.calculateLogP(Unknown Source)

    at beast.core.util.CompoundDistribution.calculateLogP(Unknown Source)

    at beast.core.MCMC.propagateState(Unknown Source)

    at beast.core.MCMC.doLoop(Unknown Source)

    at beast.core.MCMC.run(Unknown Source)

    at beast.app.BeastMCMC.run(Unknown Source)

    at beast.app.beastapp.BeastMain.<init>(Unknown Source)

    at beast.app.beastapp.BeastMain.main(Unknown Source)

Fatal exception: Could not find zero eigenvalue.

BEAST has terminated with an error. Please select QUIT from the menu.

I looked the log file with tracer, and posterior and prior ESS are low, while likelihood is good. I tried to link the clocks of the two partitions, I set frequencies of the model as empirical, I changed the distribution of population size prior in lognormal, but the problem persist. The xml file of my first analysis without modification is attached. A help on this issue will be very appreciated. 
Thank you again and kind regards
Mattia
er.xml

Remco Bouckaert

unread,
Apr 15, 2018, 3:58:01 PM4/15/18
to beast...@googlegroups.com
Hi Mattia,

Perhaps you can have a look at the log file and see whether any of the parameters of the substitution model are becoming very large of very small. If so, you can change the bounds on these parameters to ensure they remain in a more reasonable area so that you do not run into these numerical problems.

Hope this helps,

Remco


> On 13/04/2018, at 8:55 PM, Mattia Calzolari <mcalz...@gmail.com> wrote:
>
> <er.xml>

Don

unread,
Apr 17, 2018, 2:28:35 PM4/17/18
to beast-users
Hi Mattia

I've run your xml and get the same error on Windows (without beagle), but not Linux until 5M samples (with beagle). I'm not sure about the error, but regarding the low ESS (and maybe related to the error) you have many free parameters with wide priors in your model. Can't you couple the site and clock models as well, to start with?

Best wishes
Don

Mattia Calzolari

unread,
Apr 23, 2018, 5:18:13 AM4/23/18
to beast-users
Dear all,
Thanks for the answers!
I didn’t find extremely diverse parameters of the substitution model (thy range from 0.3 to 24). I tried to couple the site and clock models (I hope this don’t affect too negatively the result) and beast reach the 5 M of steps imposed at the beginning. ESSs of posterior and prior are not very satisfactory, but I will try increasing the number steps. Every advice will be very welcome.
Thanks again and kind regards
Mattia
Reply all
Reply to author
Forward
0 new messages