Over-paramiterizing SkyGrid Relaxed Clock model?

391 views
Skip to first unread message

Taj Azarian

unread,
Dec 23, 2014, 10:09:49 AM12/23/14
to beast...@googlegroups.com
It am trying to test SkyGrid models between strict and relaxed clocks for a 158 nucleotide SNP alignment of a 26 bacterial taxa.  I have run both models for 750 million iterations, but the relaxed clock model keep failing with Java errors.  The strict clock model finishes with ESS values well over 200, but the only run to finish the 750 (and failed on the path-sampling and stepping stone) had poor ESS values for the likelihood, posterior, and several SkyGrid parameters.  Am I over-paramiterizing the relaxed clock model?  Or am I missing something.  Please see the two errors below.  Any assistance would be greatly appreciated.

Failed in the middle of the run:

Exception in thread "Thread-7" java.lang.ArrayIndexOutOfBoundsException: 51
at dr.evolution.coalescent.TreeIntervals.getIntervalTime(Unknown Source)
at dr.evomodel.coalescent.GMRFMultilocusSkyrideLikelihood.setupSufficientStatistics(Unknown Source)
at dr.evomodel.coalescent.GMRFMultilocusSkyrideLikelihood.calculateLogCoalescentLikelihood(Unknown Source)
at dr.evomodel.coalescent.GMRFMultilocusSkyrideLikelihood.getLogLikelihood(Unknown Source)
at dr.inference.model.CompoundLikelihood.evaluateLikelihoods(Unknown Source)
at dr.inference.model.CompoundLikelihood.getLogLikelihood(Unknown Source)
at dr.inference.model.CompoundLikelihood.evaluateLikelihoods(Unknown Source)
at dr.inference.model.CompoundLikelihood.getLogLikelihood(Unknown Source)
at dr.inference.markovchain.MarkovChain.evaluate(Unknown Source)
at dr.inference.markovchain.MarkovChain.runChain(Unknown Source)
at dr.inference.mcmc.MCMC.chain(Unknown Source)
at dr.inference.mcmc.MCMC.run(Unknown Source)
at java.lang.Thread.run(Thread.java:695)
Error running file: Study2_t045_SkyGrid_HKY_RC_750m.xml
Fatal exception: 51
java.lang.ArrayIndexOutOfBoundsException: 51
at dr.evolution.coalescent.TreeIntervals.getIntervalTime(Unknown Source)
at dr.evomodel.coalescent.GMRFMultilocusSkyrideLikelihood.setupSufficientStatistics(Unknown Source)
at dr.evomodel.coalescent.GMRFMultilocusSkyrideLikelihood.calculateLogCoalescentLikelihood(Unknown Source)
at dr.evomodel.coalescent.GMRFMultilocusSkyrideLikelihood.getLogLikelihood(Unknown Source)
at dr.inference.model.CompoundLikelihood.evaluateLikelihoods(Unknown Source)
at dr.inference.model.CompoundLikelihood.getLogLikelihood(Unknown Source)
at dr.inference.model.CompoundLikelihood.evaluateLikelihoods(Unknown Source)
at dr.inference.model.CompoundLikelihood.getLogLikelihood(Unknown Source)
at dr.inference.model.PathLikelihood.getLogLikelihood(Unknown Source)
at dr.inference.markovchain.MarkovChain.evaluate(Unknown Source)
at dr.inference.markovchain.MarkovChain.<init>(Unknown Source)
at dr.inference.mcmc
BEAST has terminated with an error. Please select QUIT from the menu.
.MarginalLikelihoodEstimator.<init>(Unknown Source)
at dr.inference.mcmc.MarginalLikelihoodEstimator$2.parseXMLObject(Unknown Source)
at dr.xml.AbstractXMLObjectParser.parseXMLObject(Unknown Source)
at dr.xml.XMLParser.convert(Unknown Source)
at dr.xml.XMLParser.convert(Unknown Source)
at dr.xml.XMLParser.parse(Unknown Source)
at dr.app.beast.BeastMain.<init>(Unknown Source)
at dr.app.beast.BeastMain.main(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at apple.launcher.LaunchRunner.run(LaunchRunner.java:116)
at apple.launcher.LaunchRunner.callMain(LaunchRunner.java:51)
at apple.launcher.JavaApplicationLauncher.launch(JavaApplicationLauncher.java:52)
 

Failed during the MLE step:
Exception in thread "Thread-8" java.lang.ArrayIndexOutOfBoundsException: 51
at dr.evolution.coalescent.TreeIntervals.getIntervalTime(Unknown Source)
at dr.evomodel.coalescent.GMRFMultilocusSkyrideLikelihood.setupSufficientStatistics(Unknown Source)
at dr.evomodel.coalescent.GMRFMultilocusSkyrideLikelihood.calculateLogCoalescentLikelihood(Unknown Source)
at dr.evomodel.coalescent.GMRFMultilocusSkyrideLikelihood.getLogLikelihood(Unknown Source)
at dr.inference.model.CompoundLikelihood.evaluateLikelihoods(Unknown Source)
at dr.inference.model.CompoundLikelihood.getLogLikelihood(Unknown Source)
at dr.inference.model.CompoundLikelihood.evaluateLikelihoods(Unknown Source)
at dr.inference.model.CompoundLikelihood.getLogLikelihood(Unknown Source)
at dr.inference.model.PathLikelihood.getLogLikelihood(Unknown Source)
at dr.inference.markovchain.MarkovChain.evaluate(Unknown Source)
at dr.inference.markovchain.MarkovChain.runChain(Unknown Source)
at dr.inference.mcmc.MarginalLikelihoodEstimator.integrate(Unknown Source)
at dr.inference.mcmc.MarginalLikelihoodEstimator.run(Unknown Source)
at java.lang.Thread.run(Thread.java:695)

Andrew Rambaut

unread,
Dec 23, 2014, 11:03:40 AM12/23/14
to beast...@googlegroups.com
How many change-points are you using on the SkyGrid (I am guessing 50)? Try reducing this to (say) 10.

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.
For more options, visit https://groups.google.com/d/optout.

Taj Azarian

unread,
Dec 23, 2014, 11:33:30 AM12/23/14
to beast...@googlegroups.com
Thank you for the reply Andrew.  Yes, I was using 49 grid points.  In the Gill article, it is suggested to set the number of grid points to one less then number of taxa; however, it also recommends spacing the grid points based on the cutoff value.  What would you say the priority?   


<parameter id="skygrid.logPopSize" dimension="50" value="4.127134385045092"/>

</populationSizes>

<precisionParameter>

<parameter id="skygrid.precision" value="1.0" lower="0.0"/>

</precisionParameter>

<numGridPoints>

<parameter id="skygrid.numGridPoints" value="49.0"/>

</numGridPoints>

<cutOff>

<parameter id="skygrid.cutOff" value="15.0"/>

</cutOff>

Marc Suchard

unread,
Jan 1, 2015, 1:56:23 PM1/1/15
to beast...@googlegroups.com
If you could email me your XML and the pseudo-random number seed you used, I can take a look.  Trying to access the 51st pop-size (when there should be only 50) seems like a coding bug or an error in your XML to me.

best, Marc

Brittany Rife

unread,
Jul 21, 2015, 2:28:14 PM7/21/15
to beast...@googlegroups.com
Marc,

I am also having the same issue, except that my error looks like the following:

java.lang.ArrayIndexOutOfBoundsException: 49
at dr.evomodel.coalescent.GMRFMultilocusSkyrideLikelihood.setupSufficientStatistics(Unknown Source)
at dr.evomodel.coalescent.GMRFMultilocusSkyrideLikelihood.<init>(Unknown Source)
at dr.evomodelxml.coalescent.GMRFSkyrideLikelihoodParser.parseXMLObject(Unknown Source)
at dr.xml.AbstractXMLObjectParser.parseXMLObject(Unknown Source)
at dr.xml.XMLParser.convert(Unknown Source)
at dr.xml.XMLParser.convert(Unknown Source)
at dr.xml.XMLParser.parse(Unknown Source)
at dr.app.beast.BeastMain.<init>(Unknown Source)
at dr.app.beast.BeastMain.main(Unknown Source)
java.lang.RuntimeException: Terminate
at dr.app.beast.BeastMain.<init>(Unknown Source)
at dr.app.beast.BeastMain.main(Unknown Source)
Uc_03),021N09Oc_08),((021N09Pc_06,021N09Pc_103),092N09Pc_119)))),((((((092N09Bc_02,092N09Bc_26),(092N09Bc_11,092N09Bc_18)),021N09Oc_15),021N09Oc_19),((092N09Bc_09,092N09Bc_12),021N09Bc_19)),((021N09Kc_12,021N09Pc_114),021N09Bc_06))))),035N09Uc_12))
  tree height = 342.4291728002593
The gmrfSkyrideLikelihood has time aware smoothing

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

Any suggestions would be extremely helpful!
SIVE_HPM_2bi_RC_SG_SH_Test.xml
Message has been deleted

Marc Suchard

unread,
Jul 22, 2015, 12:06:19 PM7/22/15
to beast-users
Hi Brittany,

I see two issues here:

1. Your starting trees have negative branch lengths; negative branch lengths can never exist.
2. The BEAST code reading these negative branch lengths is doing something odd to produce a really unreasonable starting value for the Markov chain.

I'll see what I can patch in terms of (2) and get back to you.

best, Marc

Marc Suchard

unread,
Jul 22, 2015, 12:29:50 PM7/22/15
to beast-users
The BEAST issue with your starting trees goes away with adding two attributes to your newick descriptors, like the following:

<newick id="N02.startingTree" usingDates="false" usingHeights="true">

best, M

Brittany Rife

unread,
Jul 23, 2015, 9:32:37 AM7/23/15
to beast-users
Great! Thank you!

Also, I was wondering if, since I'm using the HPM, and my trees will have very different root heights, should I change the skygrid parameters so that either the number of grid points or grid size is the same across all partitions?

Reply all
Reply to author
Forward
0 new messages