Search in sources :

Example 1 with MulSpeciesTreeModel

use of dr.evomodel.alloppnet.speciation.MulSpeciesTreeModel in project beast-mcmc by beast-dev.

the class MulMSCoalescentParser method parseXMLObject.

public Object parseXMLObject(XMLObject xo) throws XMLParseException {
    final MulSpeciesBindings sb = (MulSpeciesBindings) xo.getChild(MulSpeciesBindings.class);
    final MulSpeciesTreeModel tree = (MulSpeciesTreeModel) xo.getChild(MulSpeciesTreeModel.class);
    return new MulMSCoalescent(sb, tree);
}
Also used : MulSpeciesBindings(dr.evomodel.alloppnet.speciation.MulSpeciesBindings) MulSpeciesTreeModel(dr.evomodel.alloppnet.speciation.MulSpeciesTreeModel) MulMSCoalescent(dr.evomodel.alloppnet.speciation.MulMSCoalescent)

Example 2 with MulSpeciesTreeModel

use of dr.evomodel.alloppnet.speciation.MulSpeciesTreeModel in project beast-mcmc by beast-dev.

the class MulSpeciesTreePriorParser method parseXMLObject.

@Override
public Object parseXMLObject(XMLObject xo) throws XMLParseException {
    final XMLObject mxo = xo.getChild(MODEL);
    final SpeciationModel sppm = (SpeciationModel) mxo.getChild(SpeciationModel.class);
    final XMLObject mulsptxo = xo.getChild(MUL_SPECIES_TREE);
    final MulSpeciesTreeModel mulspt = (MulSpeciesTreeModel) mulsptxo.getChild(MulSpeciesTreeModel.class);
    return new MulSpeciesTreePrior(sppm, mulspt);
}
Also used : MulSpeciesTreePrior(dr.evomodel.alloppnet.speciation.MulSpeciesTreePrior) XMLObject(dr.xml.XMLObject) MulSpeciesTreeModel(dr.evomodel.alloppnet.speciation.MulSpeciesTreeModel) SpeciationModel(dr.evomodel.speciation.SpeciationModel)

Example 3 with MulSpeciesTreeModel

use of dr.evomodel.alloppnet.speciation.MulSpeciesTreeModel in project beast-mcmc by beast-dev.

the class MulTreeNodeSlideParser method parseXMLObject.

public Object parseXMLObject(XMLObject xo) throws XMLParseException {
    MulSpeciesBindings species = (MulSpeciesBindings) xo.getChild(MulSpeciesBindings.class);
    MulSpeciesTreeModel tree = (MulSpeciesTreeModel) xo.getChild(MulSpeciesTreeModel.class);
    final double weight = xo.getDoubleAttribute(MCMCOperator.WEIGHT);
    // final boolean oo = xo.getAttribute("outgroup", false);
    return new MulTreeNodeSlide(tree, species, /*, oo*/
    weight);
}
Also used : MulTreeNodeSlide(dr.evomodel.alloppnet.operators.MulTreeNodeSlide) MulSpeciesBindings(dr.evomodel.alloppnet.speciation.MulSpeciesBindings) MulSpeciesTreeModel(dr.evomodel.alloppnet.speciation.MulSpeciesTreeModel)

Example 4 with MulSpeciesTreeModel

use of dr.evomodel.alloppnet.speciation.MulSpeciesTreeModel in project beast-mcmc by beast-dev.

the class MulTreeSequenceReassignmentParser method parseXMLObject.

@Override
public Object parseXMLObject(XMLObject xo) throws XMLParseException {
    MulSpeciesBindings mulspb = (MulSpeciesBindings) xo.getChild(MulSpeciesBindings.class);
    MulSpeciesTreeModel multree = (MulSpeciesTreeModel) xo.getChild(MulSpeciesTreeModel.class);
    final double weight = xo.getDoubleAttribute(MCMCOperator.WEIGHT);
    return new MulTreeSequenceReassignment(multree, mulspb, weight);
}
Also used : MulSpeciesBindings(dr.evomodel.alloppnet.speciation.MulSpeciesBindings) MulSpeciesTreeModel(dr.evomodel.alloppnet.speciation.MulSpeciesTreeModel) MulTreeSequenceReassignment(dr.evomodel.alloppnet.operators.MulTreeSequenceReassignment)

Example 5 with MulSpeciesTreeModel

use of dr.evomodel.alloppnet.speciation.MulSpeciesTreeModel in project beast-mcmc by beast-dev.

the class MulSpeciesTreeModelParser method parseXMLObject.

public Object parseXMLObject(XMLObject xo) throws XMLParseException {
    MulSpeciesBindings spb = (MulSpeciesBindings) xo.getChild(MulSpeciesBindings.class);
    final Boolean cr = xo.getAttribute(CONST_ROOT_POPULATION, false);
    final Boolean cp = xo.getAttribute(CONSTANT_POPULATION, false);
    final XMLObject cxo = xo.getChild(SPP_SPLIT_POPULATIONS);
    final double value = cxo.getAttribute(Attributable.VALUE, 1.0);
    final boolean nonConstRootPopulation = !cr;
    final Parameter sppSplitPopulations = MulSpeciesTreeModel.createSplitPopulationsParameter(spb, value, nonConstRootPopulation, cp);
    ParameterParser.replaceParameter(cxo, sppSplitPopulations);
    final Parameter.DefaultBounds bounds = new Parameter.DefaultBounds(Double.MAX_VALUE, 0, sppSplitPopulations.getDimension());
    sppSplitPopulations.addBounds(bounds);
    // (Tree) xo.getChild(Tree.class);
    final Tree startTree = null;
    return new MulSpeciesTreeModel(spb, sppSplitPopulations, null, null, startTree, false, nonConstRootPopulation, cp);
}
Also used : MulSpeciesBindings(dr.evomodel.alloppnet.speciation.MulSpeciesBindings) Parameter(dr.inference.model.Parameter) Tree(dr.evolution.tree.Tree) MulSpeciesTreeModel(dr.evomodel.alloppnet.speciation.MulSpeciesTreeModel)

Aggregations

MulSpeciesTreeModel (dr.evomodel.alloppnet.speciation.MulSpeciesTreeModel)5 MulSpeciesBindings (dr.evomodel.alloppnet.speciation.MulSpeciesBindings)4 Tree (dr.evolution.tree.Tree)1 MulTreeNodeSlide (dr.evomodel.alloppnet.operators.MulTreeNodeSlide)1 MulTreeSequenceReassignment (dr.evomodel.alloppnet.operators.MulTreeSequenceReassignment)1 MulMSCoalescent (dr.evomodel.alloppnet.speciation.MulMSCoalescent)1 MulSpeciesTreePrior (dr.evomodel.alloppnet.speciation.MulSpeciesTreePrior)1 SpeciationModel (dr.evomodel.speciation.SpeciationModel)1 Parameter (dr.inference.model.Parameter)1 XMLObject (dr.xml.XMLObject)1