starbeast2 run will not start

75 views
Skip to first unread message

Keir Wefferling

unread,
Feb 27, 2017, 10:59:43 PM2/27/17
to beast-users
Hi all, 

I'm having some trouble with a *BEAST2 analysis (please see error message copied below). 
I have 161 or 222 sequences for two loci from two "species", and am trying to estimate divergence time between these species as well as the crown group age within each species. Not even convinced that *BEAST is the best choice for these questions, but I want to explore the data with the multispecies coalescent. 

No idea what I've done wrong in setting up the xml... any help will be greatly appreciated! 

Best, Keir

Start likelihood: -Infinity after 10 initialisation attempts
P(posterior) = -Infinity (was -Infinity)
P(speciescoalescent) = 1585.6552036261621 (was 1585.6552036261621)
P(SpeciesTreePopSize.Species) = 11.08977966666869 (was 11.08977966666869)
P(treePrior.t:its21) = 781.5814851870571 (was 781.5814851870571)
P(treePrior.t:part1) = 792.9839387724363 (was 792.9839387724363)
P(prior) = -Infinity (was -Infinity)
P(CoalescentConstant.t:Species) = 1.1592076862303857 (was 1.1592076862303857)
P(BMT_PropInvariablePrior.s:58S) = 1.0702128141464131 (was 1.0702128141464131)
P(BMT_PropInvariablePrior.s:its21) = 1.0702128141464131 (was 1.0702128141464131)
P(BMT_PropInvariablePrior.s:part1) = 1.0702128141464131 (was 1.0702128141464131)
P(BMT_PropInvariablePrior.s:part2) = 1.0702128141464131 (was 1.0702128141464131)
P(BMT_PropInvariablePrior.s:part3) = 1.0702128141464131 (was 1.0702128141464131)
P(BMT_PropInvariablePrior.s:part4) = 1.0702128141464131 (was 1.0702128141464131)
P(BMT_RatesPrior.s:58S) = -3.462082084518882 (was -3.462082084518882)
P(BMT_RatesPrior.s:its21) = -3.462082084518882 (was -3.462082084518882)
P(BMT_RatesPrior.s:part1) = -3.462082084518882 (was -3.462082084518882)
P(BMT_RatesPrior.s:part2) = -3.462082084518882 (was -3.462082084518882)
P(BMT_RatesPrior.s:part3) = -3.462082084518882 (was -3.462082084518882)
P(BMT_RatesPrior.s:part4) = -3.462082084518882 (was -3.462082084518882)
P(BMT_GammaShapePrior.s:58S) = -1.0 (was -1.0)
P(BMT_GammaShapePrior.s:its21) = -1.0 (was -1.0)
P(BMT_GammaShapePrior.s:part1) = -1.0 (was -1.0)
P(BMT_GammaShapePrior.s:part2) = -1.0 (was -1.0)
P(BMT_GammaShapePrior.s:part3) = -1.0 (was -1.0)
P(BMT_GammaShapePrior.s:part4) = -1.0 (was -1.0)
P(RRateChangesPrior.c:its21) = -0.6931471805599453 (was -0.6931471805599453)
P(ClockPrior.c:part1) = 6.953550505747477 (was 6.953550505747477)
P(RRatesPrior.c:sits21) = -16839.29956383282 (was -16839.29956383282)
P(RRatesPrior.c:s58S) = -16839.29956383282 (was -16839.29956383282)
P(popMean.prior) = 5.003446041662952 (was 5.003446041662952)
P(PopSizePrior.Fatal exception: Could not find a proper state to initialise. Perhaps try another seed.
t:Species) = -Infinity (was -Infinity)
P(all_cp.prior) = NaN (was NaN)  **
P(all_its.prior) = NaN (was NaN)  **
P(likelihood) = NaN (was NaN)  **
P(treeLikelihood.part1) = NaN (was NaN)  **
P(treeLikelihood.part2) = NaN (was NaN)  **
P(treeLikelihood.part3) = NaN (was NaN)  **
P(treeLikelihood.part4) = NaN (was NaN)  **
P(treeLikelihood.its21) = NaN (was NaN)  **
P(treeLikelihood.58S) = NaN (was NaN)  **
java.lang.RuntimeException: Could not find a proper state to initialise. Perhaps try another seed.
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 a proper state to initialise. Perhaps try another seed.
sb3.xml

Keir Wefferling

unread,
Feb 27, 2017, 11:05:40 PM2/27/17
to beast-users
I'll add that clockrates.c:its21 appears twice in my priors pane. Not sure how (or whether) to edit that out of the xml.

Best, Keir

Huw A. Ogilvie

unread,
Feb 28, 2017, 12:55:40 AM2/28/17
to beast-users
Hi Keir,

First of all, this is not a StarBEAST2 analysis. Somewhat confusingly there is (1) *BEAST built into BEAST1.x, (2) *BEAST built into BEAST2.x, and (3) StarBEAST2 a separate package for BEAST2.

Anyway, there are a number of problems with your XML file.

a) Somehow two population size parameters have been created, popSize and popSize.t:Species. These need to be merged into a single parameter (a simple find a replace will do)
b) The lower bound on population size set to 1 is way too high. In *BEAST (and most other programs), population size is actually scaled by mutation rate per generation time. This means "population size" is, somewhat counter-intuitively, often less than 1.
c) The MRCA priors have been applied to the gene trees, when they should almost certainly be applied to the species tree. This is preventing *BEAST from initializing even when the population size prior is fixed.

I would recommend running through some tutorials first before setting up your own analysis. For example the "Species Trees with Relaxed Molecular Clocks" and "Calibrated Species Trees" tutorials from the Taming the BEAST workshop: https://taming-the-beast.github.io/tutorials/

Regards,

Huw

Huw A. Ogilvie

unread,
Feb 28, 2017, 1:09:00 AM2/28/17
to beast-users
Actually looking at your analysis in more detail, shouldn't the per-gene molecular rate calibrations be sufficient for divergence time estimation, without using any MRCA priors? Regarding the appropriateness of a *BEAST analysis I do think it's appropriate if there is zero or very limited gene flow between the two species. If you suspect that gene flow between your species is relatively common, you might look into a structured coalescent analysis like MTT or BASTA.

- Huw

Keir Wefferling

unread,
Feb 28, 2017, 7:30:40 AM2/28/17
to beast-users
Hi Huw, 

Thanks so much for the reply and for looking this over! 
I will do the tutorials you suggested (thanks for that link! Somehow I hadn't found it in all my searches for tutorials) and at BASTA and MTT. I didn't realize how different the *BEAST analyses are from standard BEAST2 timetrees.

So I am now able to get it running, and apparently it was the population size lower bound that was causing the problem. I had previously tried removing the mrca priors (and you're absolutely right, they are redundant to the molecular rate calibration priors) to no avail.

However, I was not able to successfully merge the popSize and popSize.t:Species parameters. I've tried 1) renaming all the popSize.t:Species as popSize (get a duplicate error in BEAUti), and 2) removing the popSize.t:Species parameters, but that did not work either. I suspect that some instances need to be outright removed and some renamed? 

Best, and thank you again, 
Keir

Huw A. Ogilvie

unread,
Feb 28, 2017, 9:14:23 PM2/28/17
to beast-users
I should have mentioned if popSize is merged with popSize.t:Species, that parameter will be declared twice. One of the declarations (something like <parameter id="popSize"...>) will need to be removed. I'm not sure why these two parameters were created, but StarBEAST2 should not have this problem.

Keir Wefferling

unread,
Mar 1, 2017, 8:20:41 PM3/1/17
to beast-users
Thanks again, Huw!
I think I'm figuring it out. I appreciate the help.

Best, Keir
Reply all
Reply to author
Forward
0 new messages