use of dr.evomodel.branchmodel.RandomBranchAssignmentModel in project beast-mcmc by beast-dev.
the class RandomBranchAssignmentModelParser method parseXMLObject.
@Override
public Object parseXMLObject(XMLObject xo) throws XMLParseException {
Logger.getLogger("dr.evomodel").info("\nUsing random assignment branch model.");
TreeModel treeModel = (TreeModel) xo.getChild(TreeModel.class);
XMLObject cxo = xo.getChild(MODELS);
List<SubstitutionModel> substitutionModels = new ArrayList<SubstitutionModel>();
for (int i = 0; i < cxo.getChildCount(); i++) {
SubstitutionModel substModel = (SubstitutionModel) cxo.getChild(i);
substitutionModels.add(substModel);
}
return new RandomBranchAssignmentModel(treeModel, substitutionModels);
}
Aggregations