Fatal exception: Index 10 out of bounds for length 10

120 views
Skip to first unread message

Courtney Hofman

unread,
Apr 15, 2020, 2:12:21 PM4/15/20
to beast-users
Hi,

I am trying to run a bayesian skyline model on a set of mammal mitogenomes (3 partitions) with tip dates in Beast 1.10.4. and beagle. The xml was made with Beauti 1.10.4. The dataset includes ancient and historic samples and sampling with individual priors. I've tried playing with a number of parameters/ models but seem to get errors no matter what. 

If I run the attached skyline xml file, I get the following error. The fatal exception seems to be with number of groups in the tree prior as the "Index 10" value changes to whatever I set as the number of groups. 

Fatal exception: Index 10 out of bounds for length 10

java.lang.ArrayIndexOutOfBoundsException: Index 10 out of bounds for length 10

        at dr.inference.model.Parameter$Default.getParameterValue(Unknown Source)

        at dr.evomodel.coalescent.BayesianSkylineLikelihood.getPopSize(Unknown Source)

        at dr.evomodel.coalescent.BayesianSkylineLikelihood.getLogLikelihood(Unknown Source)

        at dr.inference.model.CompoundLikelihood.getDiagnosis(Unknown Source)

        at dr.inference.model.CompoundLikelihood.getDiagnosis(Unknown Source)

        at dr.inferencexml.MCMCParser.parseMCMC(Unknown Source)

        at dr.inferencexml.MCMCParser.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)



If I add the -verbose -warnings -strict flags, I get this error:

SEVERE: Parsing error - poorly formed BEAST file, FinalAlignment4.9.20N2ShortSubsetBSP4.xml:

Element named coalescentTree with idref=startingTree does not match stored object with same id and tag name coalescentSimulator


Error thrown at: dr.xml.XMLParser.convert(Unknown Source)


I've also tried with the CTMC Rate reference or a gamma distribution as previously recommended in the group for the ucld.mean prior in my attempts to trouble shoot and that seems to lock up at this step and will hang for hours: 

Creating the tree model, 'treeModel'

  taxon count = 28

  tree height = NaN

Bayesian skyline plot: 6 stepwise control points


With a constant size model, the likelihood is -Infinity and fails.

  CompoundLikelihood(compoundModel)=(

    TreeDataLikelihood(TreeDataLikelihood[Subset1.treeLikelihood])=-Inf, 

    TreeDataLikelihood(TreeDataLikelihood[Subset2.treeLikelihood])=-Inf, 

    TreeDataLikelihood(TreeDataLikelihood[Subset3.treeLikelihood])=-Inf

    Total = -Infinity

  )

  Total = -Infinity


Any help would be greatly appreciated!

Best,

Courtney 


FinalAlignment4.9.20N2ShortSubsetBSP4.xml

Guy Baele

unread,
Apr 19, 2020, 3:52:46 PM4/19/20
to beast-users
I personally think that your use of the "backwards" approach to specify sampling times is causing the starting tree generator to provide an odd tree which doesn't work well with the skyline model.
Can you use the more standard "forwards" approach to specify sampling times and let me know if the problem persists?

Best regards,
Guy


Op woensdag 15 april 2020 20:12:21 UTC+2 schreef Courtney Hofman:

Neo One

unread,
Jan 28, 2026, 3:41:22 PM (6 days ago) Jan 28
to beast-users
I've faced similar problems when I used discrete traits, but without any trait the run works. any solution? 

Start likelihood: -152678.4123369848
Warning: Overwriting file /Users/2746827a/Downloads/ngii4/nii4Final.log
Warning: Overwriting file /Users/2746827a/Downloads/ngii4/nii4Final-ngii4Final.trees
Warning: Overwriting file /Users/2746827a/Downloads/ngii4/status_tree_with_trait.trees
         Sample      posterior     likelihood          prior
              0   -152678.4123   -149253.3138     -3425.0985 --
java.lang.ArrayIndexOutOfBoundsException: Index 2 out of bounds for length 2
at beast.base.math.matrixalgebra.RobustEigenDecomposition.tql2(Unknown Source)
at beast.base.math.matrixalgebra.RobustEigenDecomposition.<init>(Unknown Source)
at beast.base.evolution.substitutionmodel.ColtEigenSystem.decomposeMatrix(Unknown Source)
at beast.base.evolution.substitutionmodel.ComplexSubstitutionModel.getTransitionProbabilities(Unknown Source)
at beast.base.evolution.likelihood.TreeLikelihood.traverse(Unknown Source)
at beast.base.evolution.likelihood.TreeLikelihood.traverse(Unknown Source)
at beast.base.evolution.likelihood.TreeLikelihood.calculateLogP(Unknown Source)
at beastclassic.evolution.likelihood.AncestralStateTreeLikelihood.calculateLogP(Unknown Source)
at beast.base.inference.CompoundDistribution.calculateLogP(Unknown Source)
at beast.base.inference.CompoundDistribution.calculateLogP(Unknown Source)
at beast.base.inference.MCMC.propagateState(Unknown Source)
at beast.base.inference.MCMC.doLoop(Unknown Source)
at beast.base.inference.MCMC.run(Unknown Source)
at beastfx.app.beast.BeastMCMC.run(Unknown Source)
at beastfx.app.beast.Controller$2.run(Unknown Source)

Reply all
Reply to author
Forward
0 new messages