Search in sources :

Example 6 with SpeciesTreeModel

use of dr.evomodel.speciation.SpeciesTreeModel 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);
}
Also used : ParametricDistributionModel(dr.inference.distribution.ParametricDistributionModel) SpeciesTreeBMPrior(dr.evomodel.speciation.SpeciesTreeBMPrior) Parameter(dr.inference.model.Parameter) SpeciesTreeModel(dr.evomodel.speciation.SpeciesTreeModel)

Aggregations

SpeciesTreeModel (dr.evomodel.speciation.SpeciesTreeModel)6 SpeciesBindings (dr.evomodel.speciation.SpeciesBindings)3 Parameter (dr.inference.model.Parameter)3 ParametricDistributionModel (dr.inference.distribution.ParametricDistributionModel)2 Tree (dr.evolution.tree.Tree)1 BirthDeathCollapseModel (dr.evomodel.alloppnet.speciation.BirthDeathCollapseModel)1 BirthDeathCollapseNClustersStatistic (dr.evomodel.alloppnet.speciation.BirthDeathCollapseNClustersStatistic)1 TreeNodeSlide (dr.evomodel.operators.TreeNodeSlide)1 MultiSpeciesCoalescent (dr.evomodel.speciation.MultiSpeciesCoalescent)1 SpeciesTreeBMPrior (dr.evomodel.speciation.SpeciesTreeBMPrior)1 SpeciesTreeSimplePrior (dr.evomodel.speciation.SpeciesTreeSimplePrior)1