Search in sources :

Example 1 with ScaledTreeLengthRateModel

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

the class ScaledTreeLengthRateModelParser method parseXMLObject.

public Object parseXMLObject(XMLObject xo) throws XMLParseException {
    TreeModel tree = (TreeModel) xo.getChild(TreeModel.class);
    Parameter totalLength = (Parameter) xo.getElementFirstChild(SCALING_FACTOR);
    if (totalLength == null) {
        totalLength = new Parameter.Default(1, 1.0);
    }
    Logger.getLogger("dr.evomodel.branchratemodel").info("\n ---------------------------------\nCreating ScaledTreeLengthRateModel model.");
    Logger.getLogger("dr.evomodel.branchratemodel").info("\tTotal tree length will be scaled to " + totalLength.getParameterValue(0) + ".");
    Logger.getLogger("dr.evomodel.branchratemodel").info("\tIf you publish results using this rate model, please cite Alekseyenko, Lee and Suchard (2008) Syst. Biol 57: 772-784." + "\n---------------------------------\n");
    return new ScaledTreeLengthRateModel(tree, totalLength);
}
Also used : TreeModel(dr.evomodel.tree.TreeModel) Parameter(dr.inference.model.Parameter) ScaledTreeLengthRateModel(dr.evomodel.branchratemodel.ScaledTreeLengthRateModel)

Aggregations

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