Search in sources :

Example 1 with BeagleOperationReport

use of dr.evomodel.treelikelihood.BeagleOperationReport in project beast-mcmc by beast-dev.

the class BeagleOperationParser method parseXMLObject.

public Object parseXMLObject(XMLObject xo) throws XMLParseException {
    SitePatterns patternList = (SitePatterns) xo.getChild(PatternList.class);
    TreeModel treeModel = (TreeModel) xo.getChild(TreeModel.class);
    BranchRateModel rateModel = (BranchRateModel) xo.getChild(BranchRateModel.class);
    Alignment alignment = (Alignment) xo.getChild(Alignment.class);
    GammaSiteRateModel substitutionModel = (GammaSiteRateModel) xo.getChild(GammaSiteRateModel.class);
    PrintWriter branch = null, operation = null;
    if (xo.hasAttribute(BRANCH_FILE_NAME)) {
        branch = XMLParser.getFilePrintWriter(xo, OPERATION_REPORT, BRANCH_FILE_NAME);
    }
    if (xo.hasAttribute(OPERATION_FILE_NAME)) {
        operation = XMLParser.getFilePrintWriter(xo, OPERATION_REPORT, OPERATION_FILE_NAME);
    }
    return new BeagleOperationReport(treeModel, patternList, rateModel, substitutionModel, alignment, branch, operation);
}
Also used : SitePatterns(dr.evolution.alignment.SitePatterns) TreeModel(dr.evomodel.tree.TreeModel) Alignment(dr.evolution.alignment.Alignment) BeagleOperationReport(dr.evomodel.treelikelihood.BeagleOperationReport) BranchRateModel(dr.evomodel.branchratemodel.BranchRateModel) PatternList(dr.evolution.alignment.PatternList) GammaSiteRateModel(dr.evomodel.siteratemodel.GammaSiteRateModel) PrintWriter(java.io.PrintWriter)

Aggregations

Alignment (dr.evolution.alignment.Alignment)1 PatternList (dr.evolution.alignment.PatternList)1 SitePatterns (dr.evolution.alignment.SitePatterns)1 BranchRateModel (dr.evomodel.branchratemodel.BranchRateModel)1 GammaSiteRateModel (dr.evomodel.siteratemodel.GammaSiteRateModel)1 TreeModel (dr.evomodel.tree.TreeModel)1 BeagleOperationReport (dr.evomodel.treelikelihood.BeagleOperationReport)1 PrintWriter (java.io.PrintWriter)1