Search in sources :

Example 1 with AlloppNetworkPriorModel

use of dr.evomodel.alloppnet.speciation.AlloppNetworkPriorModel in project beast-mcmc by beast-dev.

the class AlloppNetworkPriorParser method parseXMLObject.

/*
	<apspNetworkPrior id="apspnetwork.prior" units="substitutions">
    <eventRate>
      <parameter id="apspnetwork.prior.eventRate" value="0.1" lower="0.0" upper="Infinity"/>
    </eventRate>
    <apspNetwork>
      <apspNetwork idref="apspnetwork"/>
		</apspNetwork>
	</apspNetworkPrior>
*/
@Override
public Object parseXMLObject(XMLObject xo) throws XMLParseException {
    final XMLObject mxo = xo.getChild(MODEL);
    final AlloppNetworkPriorModel anpm = (AlloppNetworkPriorModel) mxo.getChild(AlloppNetworkPriorModel.class);
    final XMLObject asnmxo = xo.getChild(APSPNETWORK);
    final AlloppSpeciesNetworkModel asnm = (AlloppSpeciesNetworkModel) asnmxo.getChild(AlloppSpeciesNetworkModel.class);
    return new AlloppNetworkPrior(anpm, asnm);
}
Also used : AlloppNetworkPriorModel(dr.evomodel.alloppnet.speciation.AlloppNetworkPriorModel) AlloppSpeciesNetworkModel(dr.evomodel.alloppnet.speciation.AlloppSpeciesNetworkModel) AlloppNetworkPrior(dr.evomodel.alloppnet.speciation.AlloppNetworkPrior)

Example 2 with AlloppNetworkPriorModel

use of dr.evomodel.alloppnet.speciation.AlloppNetworkPriorModel in project beast-mcmc by beast-dev.

the class AlloppNetworkPriorModelParser method parseXMLObject.

@Override
public Object parseXMLObject(XMLObject xo) throws XMLParseException {
    final Units.Type units = XMLUnits.Utils.getUnitsAttr(xo);
    final XMLObject erXo = xo.getChild(EVENTRATE);
    final Parameter eventrate = (Parameter) erXo.getChild(Parameter.class);
    final XMLObject psfXo = xo.getChild(POPULATION_SCALING_FACTOR);
    final Parameter popscalingfactor = (Parameter) psfXo.getChild(Parameter.class);
    final XMLObject tpdXo = xo.getChild(TIP_POPULATION_DISTRIBUTION);
    ParametricDistributionModel tippopmodel = (ParametricDistributionModel) tpdXo.getChild(ParametricDistributionModel.class);
    final XMLObject rpdXo = xo.getChild(ROOT_POPULATION_DISTRIBUTION);
    ParametricDistributionModel rootpopmodel = (ParametricDistributionModel) rpdXo.getChild(ParametricDistributionModel.class);
    final XMLObject hpdXo = xo.getChild(HYBRID_POPULATION_DISTRIBUTION);
    ParametricDistributionModel hybpopmodel = (ParametricDistributionModel) hpdXo.getChild(ParametricDistributionModel.class);
    return new AlloppNetworkPriorModel(eventrate, popscalingfactor, tippopmodel, rootpopmodel, hybpopmodel, units);
}
Also used : AlloppNetworkPriorModel(dr.evomodel.alloppnet.speciation.AlloppNetworkPriorModel) ParametricDistributionModel(dr.inference.distribution.ParametricDistributionModel) XMLObject(dr.xml.XMLObject) Parameter(dr.inference.model.Parameter) Units(dr.evolution.util.Units) XMLUnits(dr.evoxml.util.XMLUnits)

Aggregations

AlloppNetworkPriorModel (dr.evomodel.alloppnet.speciation.AlloppNetworkPriorModel)2 Units (dr.evolution.util.Units)1 AlloppNetworkPrior (dr.evomodel.alloppnet.speciation.AlloppNetworkPrior)1 AlloppSpeciesNetworkModel (dr.evomodel.alloppnet.speciation.AlloppSpeciesNetworkModel)1 XMLUnits (dr.evoxml.util.XMLUnits)1 ParametricDistributionModel (dr.inference.distribution.ParametricDistributionModel)1 Parameter (dr.inference.model.Parameter)1 XMLObject (dr.xml.XMLObject)1