Search in sources :

Example 1 with EmergingEpidemicModel

use of dr.evomodel.coalescent.EmergingEpidemicModel in project beast-mcmc by beast-dev.

the class EmergingEpidemicModelParser method parseXMLObject.

public Object parseXMLObject(XMLObject xo) throws XMLParseException {
    Units.Type units = XMLUnits.Utils.getUnitsAttr(xo);
    Parameter growthRateParameter = (Parameter) xo.getElementFirstChild(GROWTH_RATE);
    Parameter generationTimeParameter = (Parameter) xo.getElementFirstChild(GENERATION_TIME);
    Parameter generationShapeParameter = (Parameter) xo.getElementFirstChild(GENERATION_DISTRIBUTION_SHAPE);
    Parameter offspringDispersionParameter = (Parameter) xo.getElementFirstChild(OFFSPRING_DISPERSION);
    TreeModel tree = (TreeModel) xo.getElementFirstChild(TREE);
    return new EmergingEpidemicModel(growthRateParameter, generationTimeParameter, generationShapeParameter, offspringDispersionParameter, tree, units);
}
Also used : TreeModel(dr.evomodel.tree.TreeModel) EmergingEpidemicModel(dr.evomodel.coalescent.EmergingEpidemicModel) Parameter(dr.inference.model.Parameter) Units(dr.evolution.util.Units) XMLUnits(dr.evoxml.util.XMLUnits)

Aggregations

Units (dr.evolution.util.Units)1 EmergingEpidemicModel (dr.evomodel.coalescent.EmergingEpidemicModel)1 TreeModel (dr.evomodel.tree.TreeModel)1 XMLUnits (dr.evoxml.util.XMLUnits)1 Parameter (dr.inference.model.Parameter)1