Search in sources :

Example 1 with ExternalLengthStatistic

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

the class ExternalLengthStatisticParser method parseXMLObject.

public Object parseXMLObject(XMLObject xo) throws XMLParseException {
    String name = xo.getAttribute(Statistic.NAME, xo.getId());
    Tree tree = (Tree) xo.getChild(Tree.class);
    TaxonList taxa = (TaxonList) xo.getChild(Taxa.class);
    try {
        return new ExternalLengthStatistic(name, tree, taxa);
    } catch (TreeUtils.MissingTaxonException mte) {
        throw new XMLParseException("Taxon, " + mte + ", in " + getParserName() + "was not found in the tree.");
    }
}
Also used : Taxa(dr.evolution.util.Taxa) TaxonList(dr.evolution.util.TaxonList) Tree(dr.evolution.tree.Tree) ExternalLengthStatistic(dr.evomodel.tree.ExternalLengthStatistic) TreeUtils(dr.evolution.tree.TreeUtils)

Aggregations

Tree (dr.evolution.tree.Tree)1 TreeUtils (dr.evolution.tree.TreeUtils)1 Taxa (dr.evolution.util.Taxa)1 TaxonList (dr.evolution.util.TaxonList)1 ExternalLengthStatistic (dr.evomodel.tree.ExternalLengthStatistic)1