Search in sources :

Example 1 with CompatibilityStatistic

use of dr.evomodel.tree.CompatibilityStatistic in project beast-mcmc by beast-dev.

the class CompatibilityStatisticParser method parseXMLObject.

public Object parseXMLObject(XMLObject xo) throws XMLParseException {
    String name = xo.getAttribute(Statistic.NAME, xo.getId());
    Tree tree1 = (Tree) xo.getChild(Tree.class);
    XMLObject cxo = xo.getChild(COMPATIBLE_WITH);
    Tree tree2 = (Tree) cxo.getChild(Tree.class);
    try {
        return new CompatibilityStatistic(name, tree1, tree2);
    } catch (TreeUtils.MissingTaxonException mte) {
        throw new XMLParseException("Taxon, " + mte + ", in " + getParserName() + "was in the source tree but not the constraints tree.");
    }
}
Also used : Tree(dr.evolution.tree.Tree) CompatibilityStatistic(dr.evomodel.tree.CompatibilityStatistic) TreeUtils(dr.evolution.tree.TreeUtils)

Aggregations

Tree (dr.evolution.tree.Tree)1 TreeUtils (dr.evolution.tree.TreeUtils)1 CompatibilityStatistic (dr.evomodel.tree.CompatibilityStatistic)1