use of dr.evomodel.treelikelihood.AncestralStateBeagleTreeLikelihood in project beast-mcmc by beast-dev.
the class AncestralStateTreeLikelihoodParser method createTreeLikelihood.
protected BeagleTreeLikelihood createTreeLikelihood(//
PatternList patternList, //
MutableTreeModel treeModel, //
BranchModel branchModel, //
GammaSiteRateModel siteRateModel, //
BranchRateModel branchRateModel, //
TipStatesModel tipStatesModel, //
boolean useAmbiguities, //
PartialsRescalingScheme scalingScheme, boolean delayScaling, Map<//
Set<String>, Parameter> partialsRestrictions, //
XMLObject xo) throws XMLParseException {
// System.err.println("XML object: " + xo.toString());
DataType dataType = branchModel.getRootSubstitutionModel().getDataType();
// default tag is RECONSTRUCTION_TAG
String tag = xo.getAttribute(RECONSTRUCTION_TAG_NAME, RECONSTRUCTION_TAG);
boolean useMAP = xo.getAttribute(MAP_RECONSTRUCTION, false);
boolean useMarginalLogLikelihood = xo.getAttribute(MARGINAL_LIKELIHOOD, true);
boolean conditionalProbabilitiesInLogSpace = xo.getAttribute(CONDITIONAL_PROBABILITIES_IN_LOG_SPACE, false);
if (patternList.areUnique()) {
throw new XMLParseException("Ancestral state reconstruction cannot be used with compressed (unique) patterns.");
}
return new // Current just returns a OldBeagleTreeLikelihood
AncestralStateBeagleTreeLikelihood(patternList, treeModel, branchModel, siteRateModel, branchRateModel, tipStatesModel, useAmbiguities, scalingScheme, delayScaling, partialsRestrictions, dataType, tag, useMAP, useMarginalLogLikelihood, conditionalProbabilitiesInLogSpace);
}
Aggregations