Search in sources :

Example 1 with RelaxedDriftModel

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);
}
Also used : TreeModel(dr.evomodel.tree.TreeModel) ArbitraryBranchRates(dr.evomodel.branchratemodel.ArbitraryBranchRates) RelaxedDriftModel(dr.evomodel.branchratemodel.RelaxedDriftModel) Parameter(dr.inference.model.Parameter)

Aggregations

ArbitraryBranchRates (dr.evomodel.branchratemodel.ArbitraryBranchRates)1 RelaxedDriftModel (dr.evomodel.branchratemodel.RelaxedDriftModel)1 TreeModel (dr.evomodel.tree.TreeModel)1 Parameter (dr.inference.model.Parameter)1