Discrete phylogeography asymmetric rate matrix

134 views
Skip to first unread message

Chris Ruis

unread,
Oct 24, 2016, 10:24:16 AM10/24/16
to beast-users
Hi,

I've been running discrete phylogeographic analysis using BEAST v2.4.2. I have 5 locations and roughly 300 samples.

When I run with a symmetric matrix for the location transitions, the analyses runs well. Triplicate runs converge on the same values for all parameters in the log file and the parameter estimates I'm getting look reasonable.

However, I'd like to run with an asymmetric rate matrix to allow for different transition rates in each direction between locations. In BEAUTi, I've unchecked the 'symmetric' box in the substitution model for the trait which has added the 'symmetric=FALSE' flag in the XML file. However, when I run the analysis I get the following error:

java.lang.Error: randomChoiceUnnormalized falls through -- negative components in input distribution?

Please report error to Marc


Some runs then terminate with the error:

Exception in thread "main" java.lang.Error: randomChoiceUnnormalized falls through -- negative components in input distribution?

        at beast.util.Randomizer.randomChoicePDF(Unknown Source)

        at beast.evolution.likelihood.AncestralStateTreeLikelihood.drawChoice(Unknown Source)

        at beast.evolution.likelihood.AncestralStateTreeLikelihood.traverseSample(Unknown Source)

        at beast.evolution.likelihood.AncestralStateTreeLikelihood.traverseSample(Unknown Source)

        at beast.evolution.likelihood.AncestralStateTreeLikelihood.redrawAncestralStates(Unknown Source)

        at beast.evolution.likelihood.AncestralStateTreeLikelihood.getStatesForNode(Unknown Source)

        at beast.evolution.likelihood.AncestralStateTreeLikelihood$1.getTraitString(Unknown Source)

        at beast.evolution.tree.TreeWithTraitLogger.toNewick(Unknown Source)

        at beast.evolution.tree.TreeWithTraitLogger.toNewick(Unknown Source)

        at beast.evolution.tree.TreeWithTraitLogger.toNewick(Unknown Source)

        at beast.evolution.tree.TreeWithTraitLogger.toNewick(Unknown Source)

        at beast.evolution.tree.TreeWithTraitLogger.toNewick(Unknown Source)

        at beast.evolution.tree.TreeWithTraitLogger.toNewick(Unknown Source)

        at beast.evolution.tree.TreeWithTraitLogger.toNewick(Unknown Source)

        at beast.evolution.tree.TreeWithTraitLogger.toNewick(Unknown Source)

        at beast.evolution.tree.TreeWithTraitLogger.toNewick(Unknown Source)

        at beast.evolution.tree.TreeWithTraitLogger.toNewick(Unknown Source)

        at beast.evolution.tree.TreeWithTraitLogger.toNewick(Unknown Source)

        at beast.evolution.tree.TreeWithTraitLogger.toNewick(Unknown Source)

        at beast.evolution.tree.TreeWithTraitLogger.toNewick(Unknown Source)

        at beast.evolution.tree.TreeWithTraitLogger.log(Unknown Source)

        at beast.core.Logger.log(Unknown Source)

        at beast.core.MCMC.log(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)


I've run all my analyses in triplicate and all of my runs crash with the likelihood and posterior scores in the log file going to Infinity. Some terminate within a few thousand steps in the MCMC chain while others run for up to 10s of millions of steps before crashing, but they all crash and all have the same error message. From this, I'm inferring that the issue is with the matrix decomposition during the likelihood calculation using the asymmetric trait substitution matrix. I've tried changing the eigenSystem flag to robustEigenSystem as suggested in this post (https://groups.google.com/forum/#!topic/beast-users/40zS_u7qQfI), which results in the entry for the trait substitution model in the XML file looking like this:


<substModel id="svs.s:location" spec="SVSGeneralSubstitutionModel" rateIndicator="@rateIndicator.s:location" rates="@relativeGeoRates.s:location" symmetric="false" eigenSystem="beast.evolution.substitutionmodel.RobustEigenSystem">


However, these runs still crash with the same error. I've tried changing the priors on the 'nonZeroRates' and 'traitClockRate' parameters but this hasn't resolved the issue. Looking at the log file output, I can't see anything that obviously changes to an unreasonable value at the point of the crash.


I'm not sure what the RobustEigenSystem flag does, but is there anything else I can try? In a ML tree of the same data, samples from the different locations are rather interspersed, so I'm expecting a large number of rates will be switched on. I'm not sure whether this is more likely to result in problems with the matrix decomposition? Any help will be gratefully received.


Thanks


Chris

Reply all
Reply to author
Forward
0 new messages