Search in sources :

Example 1 with RestrictedPartials

use of dr.evomodel.continuous.RestrictedPartials in project beast-mcmc by beast-dev.

the class RestrictedPartialsParser method parseXMLObject.

public Object parseXMLObject(XMLObject xo) throws XMLParseException {
    String name = xo.getId();
    TreeModel tree = (TreeModel) xo.getChild(TreeModel.class);
    TaxonList taxa = MonophylyStatisticParser.parseTaxonListOrTaxa(xo.getChild(MonophylyStatisticParser.MRCA));
    Parameter meanParameter = (Parameter) xo.getElementFirstChild(MultivariateDistributionLikelihood.MVN_MEAN);
    Parameter priorSampleSize = (Parameter) xo.getElementFirstChild(AbstractMultivariateTraitLikelihood.PRIOR_SAMPLE_SIZE);
    RestrictedPartials rp = null;
    try {
        rp = new RestrictedPartials(name, tree, taxa, meanParameter, priorSampleSize);
    } catch (TreeUtils.MissingTaxonException e) {
        throw new XMLParseException("Unable to find taxa for " + xo.getId());
    }
    return rp;
}
Also used : TreeModel(dr.evomodel.tree.TreeModel) TaxonList(dr.evolution.util.TaxonList) Parameter(dr.inference.model.Parameter) RestrictedPartials(dr.evomodel.continuous.RestrictedPartials) TreeUtils(dr.evolution.tree.TreeUtils)

Aggregations

TreeUtils (dr.evolution.tree.TreeUtils)1 TaxonList (dr.evolution.util.TaxonList)1 RestrictedPartials (dr.evomodel.continuous.RestrictedPartials)1 TreeModel (dr.evomodel.tree.TreeModel)1 Parameter (dr.inference.model.Parameter)1