use of dr.evomodel.branchratemodel.RelaxedDriftModel in project beast-mcmc by beast-dev.
the class RelaxedDriftModelParser method parseXMLObject.
public Object parseXMLObject(XMLObject xo) throws XMLParseException {
TreeModel tree = (TreeModel) xo.getChild(TreeModel.class);
Parameter ratesParameter = (Parameter) xo.getElementFirstChild(RATES);
Parameter rateIndicatorParameter = (Parameter) xo.getElementFirstChild(RATE_IND);
Parameter driftRates = null;
if (xo.hasChildNamed(DRIFT_RATES)) {
driftRates = (Parameter) xo.getElementFirstChild(DRIFT_RATES);
}
ArbitraryBranchRates branchChanges = null;
if (xo.hasChildNamed(BRANCH_CHANGES)) {
branchChanges = (ArbitraryBranchRates) xo.getElementFirstChild(BRANCH_CHANGES);
}
Logger.getLogger("dr.evomodel").info("Using relaxed drift model.");
return new RelaxedDriftModel(tree, rateIndicatorParameter, ratesParameter, driftRates, branchChanges);
}
Aggregations