use of dr.evolution.MetagenomeData 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;
}
use of dr.evolution.MetagenomeData in project beast-mcmc by beast-dev.
the class HiddenLinkageModelParser method parseXMLObject.
public Object parseXMLObject(XMLObject xo) throws XMLParseException {
String linkageGroupCount = xo.getAttribute(LINKAGE_GROUP_COUNT, xo.getId());
MetagenomeData data = (MetagenomeData) xo.getChild(MetagenomeData.class);
int tc = Integer.parseInt(linkageGroupCount);
return new HiddenLinkageModel(tc, data);
}
Aggregations