Search in sources :

Example 1 with MulSpeciesBindings

use of dr.evomodel.alloppnet.speciation.MulSpeciesBindings 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 2 with MulSpeciesBindings

use of dr.evomodel.alloppnet.speciation.MulSpeciesBindings 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 3 with MulSpeciesBindings

use of dr.evomodel.alloppnet.speciation.MulSpeciesBindings 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)

Example 4 with MulSpeciesBindings

use of dr.evomodel.alloppnet.speciation.MulSpeciesBindings 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)

Aggregations

MulSpeciesBindings (dr.evomodel.alloppnet.speciation.MulSpeciesBindings)4 MulSpeciesTreeModel (dr.evomodel.alloppnet.speciation.MulSpeciesTreeModel)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 Parameter (dr.inference.model.Parameter)1