use of dr.evomodel.tree.MonophylyStatistic in project beast-mcmc by beast-dev.
the class MonophylyStatisticParser method parseXMLObject.
public Object parseXMLObject(XMLObject xo) throws XMLParseException {
String name = xo.getAttribute(Statistic.NAME, xo.getId());
Boolean inverse = xo.getAttribute(INVERSE, false);
Tree tree = (Tree) xo.getChild(Tree.class);
TaxonList taxa = parseTaxonListOrTaxa(xo.getChild(MRCA));
TaxonList ignore = null;
if (xo.hasChildNamed(IGNORE)) {
ignore = parseTaxonListOrTaxa(xo.getChild(IGNORE));
}
try {
return new MonophylyStatistic(name, tree, taxa, ignore, inverse);
} catch (TreeUtils.MissingTaxonException mte) {
throw new XMLParseException("Taxon, " + mte + ", in " + getParserName() + "was not found in the tree.");
}
}
Aggregations