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);
}
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;
}
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);
}
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);
}
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);
}
Aggregations