Error at the beginning of stepping stone sampling when using UCLN/Skygrid or Strict/Skygrid combinations

109 views
Skip to first unread message

cmh

unread,
Nov 12, 2024, 1:08:17 PM11/12/24
to beast-users
Hello,
Our runs are failing when using the UCLN or Strict clock models combined with the Skygrid demographic model, but not when combined with the Constant demographic model. Wondering if anyone has tips for getting through the stepping stone sampling.

Here are the errors we are seeing:

Loading log /scratch/zbarrand/CulexSurveillance/WNV/BEAST_10272024/WNV_10252024_StrictSkyGrid_A.log ...
2.6669835119552547, skygrid.precision=[0.0, Infinity]
1
WARNING: Likelihood component, null, created but not used in the MCMC
WARNING: Likelihood component, null, created but not used in the MCMC
WARNING: Likelihood component, null, created but not used in the MCMC
WARNING: Likelihood component, exponentials, created but not used in the MCMC
WARNING: Likelihood component, null, created but not used in the MCMC
WARNING: Likelihood component, null, created but not used in the MCMC
WARNING: Likelihood component, null, created but not used in the MCMC

Creating the Marginal Likelihood Estimator chain:
  chainLength=1000000
  pathSteps=100
  pathScheme=betaQuantile(0.3)

Citations for this analysis:

FRAMEWORK
Marginal likelihood estimation using path sampling / stepping-stone sampling (first 2 citations) and generalized stepping-stone sampling (3rd citation):
        Baele G, Lemey P, Bedford T, Rambaut A, Suchard MA, Alekseyenko AV (2012) Improving the accuracy of demographic and molecular clock model comparison while accommodating phylogenetic uncertainty. Mol. Biol. Evol.. 29, 2157-2167
        Baele G, Li WLS, Drummond AJ, Suchard MA, Lemey P (2013) Accurate model selection of relaxed molecular clocks in Bayesian phylogenetics. Mol. Biol. Evol.. 30, 239-243
        Baele G, Lemey P, Suchard MA (2016) Genealogical working distributions for Bayesian model testing with phylogenetic uncertainty. Syst. Biol.. 65, 250-264


Attempting theta (1/101) = 1.0 for 1000000 iterations + 100000 burnin.
Exception in thread "Thread-1" java.lang.IllegalArgumentException: The initial likelihood is zero:
CompoundLikelihood(compoundModel)=(
  MultivariateDistributionLikelihood(dirichletDistribution)=-5.9631,
  Exponential(alpha)=-0.0837,
  Uniform(pInv)=0.0,
  CTMCScalePrior(ctmcScalePrior)=3.7958,
  Gamma(skygrid.precision)=-7.8967,
  GMRFMultilocusSkyrideLikelihood(gmrfSkyrideLikelihood[skygrid])=-30539.7511,
  StrictClockBranchRates(strictClockBranchRates[branchRates])=0.0
  Total = -30549.898814250355
),
CompoundLikelihood(compoundModel)=(
  TreeDataLikelihood(TreeDataLikelihood[treeLikelihood])=-267989.9386
  Total = -267989.9385952399
)
Total = -298539.83740949025:
MultivariateDistributionLikelihood(multivariateKDE)=21.7754,
TransformedNormalKDE(alpha)=3.5618,
TransformedNormalKDE(pInv)=3.5955,
TransformedNormalKDE(clock.rate)=10.9055,
StrictClockBranchRates(strictClockBranchRates[branchRates])=0.0,
MultivariateDistributionLikelihood(multivariateKDE)=NaN,
TransformedNormalKDE(skygrid.precision)=0.8085,
ExponentialProductPosteriorMeansLikelihood(treeModel)=-30830.2636
Total = NaN
        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.base/java.lang.Thread.run(Thread.java:840)
1 file(s) found with marginal likelihood samples
Loading log /scratch/zbarrand/CulexSurveillance/WNV/BEAST_10272024/WNV_10252024_StrictSkyGrid_A.mle.log ...
Nov 09, 2024 12:51:26 PM dr.app.beast.BeastMain <init>
SEVERE:
******
Error in input BEAST XML file, WNV_10252024_StrictSkyGrid_A.xml:
Error parsing '<generalizedSteppingStoneSamplingAnalysis>' element with id, 'null':
Incorrect file format, no sample is found !
******

srun: error: g-h-1-9-31: task 0: Exited with exit code 1

Thank you,
Crystal


Mateusz Baca

unread,
Apr 29, 2025, 2:50:21 PM4/29/25
to beast-users
Hi Crystal, 

I was wondering if you have received any responses or found a workaround?
I am encountering the same issue — my MLE estimation fails with a MultivariateDistributionLikelihood(multivariateKDE) = NaN error when using the SkyGrid tree prior.

Best wishes,

Mateusz 

Artem B

unread,
Jun 11, 2025, 8:50:06 AM6/11/25
to beast-users
Hey Mateusz,
As I remember, SkyGrid has improper priors which do not integrate to 1, so the error can be explained by that. If I'm not wrong, from all non-parametric models, only Skyride has proper priors (all of them you set on your own in BEAUti). So if you see in some papers SkyLine or Skigrid in model selection by marginal likelihood estimation, it's not correct.

Best,
Artem



среда, 30 апреля 2025 г. в 02:50:21 UTC+8, Mateusz Baca:
Reply all
Reply to author
Forward
0 new messages