Search in sources :

Example 1 with MetagenomeData

use of dr.evolution.MetagenomeData in project beast-mcmc by beast-dev.

the class MetagenomeDataParser method parseXMLObject.

@Override
public Object parseXMLObject(XMLObject xo) throws XMLParseException {
    TaxonList taxa = null;
    taxa = (TaxonList) xo.getChild(TaxonList.class);
    if (taxa == null)
        taxa = (Tree) xo.getChild(Tree.class);
    Alignment alignment = (Alignment) xo.getChild(Alignment.class);
    LinkageConstraints lc = (LinkageConstraints) xo.getChild(LinkageConstraints.class);
    boolean fixedReferenceTree = false;
    if (xo.hasAttribute("fixedReferenceTree")) {
        fixedReferenceTree = xo.getBooleanAttribute("fixedReferenceTree");
    }
    MetagenomeData md = new MetagenomeData(taxa, alignment, lc, fixedReferenceTree);
    return md;
}
Also used : Alignment(dr.evolution.alignment.Alignment) TaxonList(dr.evolution.util.TaxonList) Tree(dr.evolution.tree.Tree) MetagenomeData(dr.evolution.MetagenomeData) LinkageConstraints(dr.evolution.LinkageConstraints)

Example 2 with MetagenomeData

use of dr.evolution.MetagenomeData 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)

Aggregations

MetagenomeData (dr.evolution.MetagenomeData)2 LinkageConstraints (dr.evolution.LinkageConstraints)1 Alignment (dr.evolution.alignment.Alignment)1 Tree (dr.evolution.tree.Tree)1 TaxonList (dr.evolution.util.TaxonList)1 HiddenLinkageModel (dr.evomodel.tree.HiddenLinkageModel)1