Search in sources :

Example 1 with SampleQuantileLociRates

use of dr.oldevomodel.sitemodel.SampleQuantileLociRates 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);
}
Also used : CompoundParameter(dr.inference.model.CompoundParameter) SampleQuantileLociRates(dr.oldevomodel.sitemodel.SampleQuantileLociRates) ParametricDistributionModel(dr.inference.distribution.ParametricDistributionModel) CompoundParameter(dr.inference.model.CompoundParameter) Parameter(dr.inference.model.Parameter)

Aggregations

ParametricDistributionModel (dr.inference.distribution.ParametricDistributionModel)1 CompoundParameter (dr.inference.model.CompoundParameter)1 Parameter (dr.inference.model.Parameter)1 SampleQuantileLociRates (dr.oldevomodel.sitemodel.SampleQuantileLociRates)1