use of dr.evolution.LinkageConstraints in project beast-mcmc by beast-dev.
the class LinkageConstraintsParser method parseXMLObject.
public Object parseXMLObject(XMLObject xo) throws XMLParseException {
ArrayList<LinkedGroup> groups = new ArrayList<LinkedGroup>();
for (int i = 0; i < xo.getChildCount(); i++) {
Object child = xo.getChild(i);
if (child instanceof LinkedGroup) {
groups.add((LinkedGroup) child);
}
}
LinkageConstraints lc = new LinkageConstraints(groups);
return lc;
}
use of dr.evolution.LinkageConstraints in project beast-mcmc by beast-dev.
the class MetagenomeDataParser method parseXMLObject.
@Override
public Object parseXMLObject(XMLObject xo) throws XMLParseException {
TaxonList taxa = null;
taxa = (TaxonList) xo.getChild(TaxonList.class);
if (taxa == null)
taxa = (Tree) xo.getChild(Tree.class);
Alignment alignment = (Alignment) xo.getChild(Alignment.class);
LinkageConstraints lc = (LinkageConstraints) xo.getChild(LinkageConstraints.class);
boolean fixedReferenceTree = false;
if (xo.hasAttribute("fixedReferenceTree")) {
fixedReferenceTree = xo.getBooleanAttribute("fixedReferenceTree");
}
MetagenomeData md = new MetagenomeData(taxa, alignment, lc, fixedReferenceTree);
return md;
}
Aggregations