use of dr.inference.distribution.ParametricDistributionModel in project beast-mcmc by beast-dev.
the class SampleQuantileLociRatesParser method parseXMLObject.
public Object parseXMLObject(XMLObject xo) throws XMLParseException {
final boolean normalize = xo.getAttribute(NORMALIZE, false);
final double normalizeBranchRateTo = xo.getAttribute(NORMALIZE_MEAN_LOCI_RATE_TO, Double.NaN);
CompoundParameter lociRates = (CompoundParameter) xo.getElementFirstChild(LOCI_RATES);
Parameter rateQuantilesParameter = (Parameter) xo.getElementFirstChild(RATE_QUANTILES);
ParametricDistributionModel distributionModel = (ParametricDistributionModel) xo.getElementFirstChild(DISTRIBUTION);
Logger.getLogger("dr.evomodel").info("Using sample quantile loci rates model.");
Logger.getLogger("dr.evomodel").info(" parametric model = " + distributionModel.getModelName());
if (normalize) {
Logger.getLogger("dr.evomodel").info(" mean rate is normalized to " + normalizeBranchRateTo);
}
return new SampleQuantileLociRates(lociRates, rateQuantilesParameter, distributionModel, normalize, normalizeBranchRateTo);
}
Aggregations