Search in sources :

Example 1 with FixedDriftModel

use of dr.evomodel.branchratemodel.FixedDriftModel in project beast-mcmc by beast-dev.

the class FixedDriftModelParser method parseXMLObject.

public Object parseXMLObject(XMLObject xo) throws XMLParseException {
    /*
        String idOne = xo.getStringAttribute(RATE_ONE_ID);

        String idTwo = xo.getStringAttribute(RATE_TWO_ID);

        Parameter rateOne = (Parameter) xo.getElementFirstChild(RATE_ONE);

        Parameter rateTwo = (Parameter) xo.getElementFirstChild(RATE_TWO);

        Parameter remainingRates = (Parameter) xo.getElementFirstChild(REMAINING_RATES);
        */
    TaxonList taxonList = (TaxonList) xo.getElementFirstChild(BACKBONE_TAXON_LIST);
    TreeModel treeModel = (TreeModel) xo.getChild(TreeModel.class);
    Parameter backboneDrift = (Parameter) xo.getElementFirstChild(BACKBONE_DRIFT);
    Parameter otherDrift = (Parameter) xo.getElementFirstChild(OTHER_DRIFT);
    Logger.getLogger("dr.evomodel").info("Using fixed drift model.");
    return new FixedDriftModel(treeModel, backboneDrift, otherDrift, taxonList);
//  return new FixedDriftModel(rateOne, rateTwo, remainingRates, idOne, idTwo);
}
Also used : TreeModel(dr.evomodel.tree.TreeModel) TaxonList(dr.evolution.util.TaxonList) FixedDriftModel(dr.evomodel.branchratemodel.FixedDriftModel) Parameter(dr.inference.model.Parameter)

Aggregations

TaxonList (dr.evolution.util.TaxonList)1 FixedDriftModel (dr.evomodel.branchratemodel.FixedDriftModel)1 TreeModel (dr.evomodel.tree.TreeModel)1 Parameter (dr.inference.model.Parameter)1