Search in sources :

Example 1 with HiddenLinkageModel

use of dr.evomodel.tree.HiddenLinkageModel in project beast-mcmc by beast-dev.

the class HiddenLinkageModelParser method parseXMLObject.

public Object parseXMLObject(XMLObject xo) throws XMLParseException {
    String linkageGroupCount = xo.getAttribute(LINKAGE_GROUP_COUNT, xo.getId());
    MetagenomeData data = (MetagenomeData) xo.getChild(MetagenomeData.class);
    int tc = Integer.parseInt(linkageGroupCount);
    return new HiddenLinkageModel(tc, data);
}
Also used : MetagenomeData(dr.evolution.MetagenomeData) HiddenLinkageModel(dr.evomodel.tree.HiddenLinkageModel)

Example 2 with HiddenLinkageModel

use of dr.evomodel.tree.HiddenLinkageModel in project beast-mcmc by beast-dev.

the class HiddenLinkageTreeLoggerParser method parseXMLObject.

public Object parseXMLObject(XMLObject xo) throws XMLParseException {
    parseXMLParameters(xo);
    HiddenLinkageModel hlm = (HiddenLinkageModel) xo.getChild(HiddenLinkageModel.class);
    HiddenLinkageTreeLogger logger = new HiddenLinkageTreeLogger(hlm, tree, branchRates, treeAttributeProviders, treeTraitProviders, formatter, logEvery, nexusFormat, sortTranslationTable, mapNames, format, condition);
    if (title != null) {
        logger.setTitle(title);
    }
    return logger;
}
Also used : HiddenLinkageTreeLogger(dr.evomodel.tree.HiddenLinkageTreeLogger) HiddenLinkageModel(dr.evomodel.tree.HiddenLinkageModel)

Example 3 with HiddenLinkageModel

use of dr.evomodel.tree.HiddenLinkageModel in project beast-mcmc by beast-dev.

the class HiddenLinkageLikelihoodParser method parseXMLObject.

public Object parseXMLObject(XMLObject xo) throws XMLParseException {
    HiddenLinkageModel hlm = (HiddenLinkageModel) xo.getChild(HiddenLinkageModel.class);
    TreeModel tree = (TreeModel) xo.getChild(TreeModel.class);
    return new HiddenLinkageLikelihood(hlm, tree);
}
Also used : TreeModel(dr.evomodel.tree.TreeModel) HiddenLinkageLikelihood(dr.oldevomodel.treelikelihood.HiddenLinkageLikelihood) HiddenLinkageModel(dr.evomodel.tree.HiddenLinkageModel)

Example 4 with HiddenLinkageModel

use of dr.evomodel.tree.HiddenLinkageModel in project beast-mcmc by beast-dev.

the class MoveLinkageGroupParser method parseXMLObject.

public Object parseXMLObject(XMLObject xo) throws XMLParseException {
    final double weight = xo.getDoubleAttribute(MCMCOperator.WEIGHT);
    final HiddenLinkageModel hlm = (HiddenLinkageModel) xo.getChild(HiddenLinkageModel.class);
    return new MoveLinkageGroup(hlm, weight);
}
Also used : MoveLinkageGroup(dr.evomodel.operators.MoveLinkageGroup) HiddenLinkageModel(dr.evomodel.tree.HiddenLinkageModel)

Example 5 with HiddenLinkageModel

use of dr.evomodel.tree.HiddenLinkageModel in project beast-mcmc by beast-dev.

the class HiddenLinkageLoggerParser method parseXMLObject.

/**
     * @return an object based on the XML element it was passed.
     */
public Object parseXMLObject(XMLObject xo) throws XMLParseException {
    HiddenLinkageModel hlm = (HiddenLinkageModel) xo.getChild(HiddenLinkageModel.class);
    // logEvery of zero only displays at the end
    final int logEvery = xo.getAttribute(LOG_EVERY, 0);
    final PrintWriter pw = getLogFile(xo, getParserName());
    final LogFormatter formatter = new TabDelimitedFormatter(pw);
    return new HiddenLinkageLogger(hlm, formatter, logEvery);
}
Also used : LogFormatter(dr.inference.loggers.LogFormatter) TabDelimitedFormatter(dr.inference.loggers.TabDelimitedFormatter) HiddenLinkageModel(dr.evomodel.tree.HiddenLinkageModel) HiddenLinkageLogger(dr.evomodel.tree.HiddenLinkageLogger) PrintWriter(java.io.PrintWriter)

Aggregations

HiddenLinkageModel (dr.evomodel.tree.HiddenLinkageModel)5 MetagenomeData (dr.evolution.MetagenomeData)1 MoveLinkageGroup (dr.evomodel.operators.MoveLinkageGroup)1 HiddenLinkageLogger (dr.evomodel.tree.HiddenLinkageLogger)1 HiddenLinkageTreeLogger (dr.evomodel.tree.HiddenLinkageTreeLogger)1 TreeModel (dr.evomodel.tree.TreeModel)1 LogFormatter (dr.inference.loggers.LogFormatter)1 TabDelimitedFormatter (dr.inference.loggers.TabDelimitedFormatter)1 HiddenLinkageLikelihood (dr.oldevomodel.treelikelihood.HiddenLinkageLikelihood)1 PrintWriter (java.io.PrintWriter)1