use of dr.evomodel.speciation.SpeciesTreeBMPrior in project beast-mcmc by beast-dev.
the class SpeciesTreeBMPriorParser method parseXMLObject.
public Object parseXMLObject(XMLObject xo) throws XMLParseException {
final SpeciesTreeModel st = (SpeciesTreeModel) xo.getChild(SpeciesTreeModel.class);
//ParametricDistributionModel pr = (ParametricDistributionModel) xo.getChild(ParametricDistributionModel.class);
final Object child = xo.getChild(SIGMA);
Parameter popSigma = child != null ? (Parameter) ((XMLObject) child).getChild(Parameter.class) : null;
Parameter stSigma = (Parameter) ((XMLObject) xo.getChild(STSIGMA)).getChild(Parameter.class);
final XMLObject cxo = (XMLObject) xo.getChild(TIPS);
final ParametricDistributionModel tipsPrior = (ParametricDistributionModel) cxo.getChild(ParametricDistributionModel.class);
final boolean logRoot = xo.getAttribute(LOG_ROOT, false);
return new SpeciesTreeBMPrior(st, popSigma, stSigma, tipsPrior, logRoot);
}
Aggregations