Search in sources :

Example 1 with MicrosatelliteSimulator

use of dr.app.seqgen.MicrosatelliteSimulator in project beast-mcmc by beast-dev.

the class MicrosatelliteSimulatorParser method parseXMLObject.

public Object parseXMLObject(XMLObject xo) throws XMLParseException {
    Microsatellite msatDataType = (Microsatellite) xo.getChild(Microsatellite.class);
    Taxa taxa = (Taxa) xo.getChild(Taxa.class);
    Tree tree = (Tree) xo.getChild(Tree.class);
    MicrosatelliteModel msatModel = (MicrosatelliteModel) xo.getChild(MicrosatelliteModel.class);
    BranchRateModel brModel = (BranchRateModel) xo.getChild(BranchRateModel.class);
    if (brModel == null) {
        brModel = new DefaultBranchRateModel();
    }
    MicrosatelliteSimulator msatSim = new MicrosatelliteSimulator(msatDataType, taxa, tree, new GammaSiteModel(msatModel), brModel);
    Patterns patterns = msatSim.simulateMsatPattern();
    String msatPatId = xo.getAttribute("id", "simMsatPat");
    patterns.setId(msatPatId);
    MicrosatellitePatternParser.printDetails(patterns);
    MicrosatellitePatternParser.printMicrosatContent(patterns);
    return patterns;
}
Also used : Microsatellite(dr.evolution.datatype.Microsatellite) Taxa(dr.evolution.util.Taxa) MicrosatelliteModel(dr.oldevomodel.substmodel.MicrosatelliteModel) GammaSiteModel(dr.oldevomodel.sitemodel.GammaSiteModel) BranchRateModel(dr.evomodel.branchratemodel.BranchRateModel) DefaultBranchRateModel(dr.evomodel.branchratemodel.DefaultBranchRateModel) MicrosatelliteSimulator(dr.app.seqgen.MicrosatelliteSimulator) Tree(dr.evolution.tree.Tree) Patterns(dr.evolution.alignment.Patterns) DefaultBranchRateModel(dr.evomodel.branchratemodel.DefaultBranchRateModel)

Aggregations

MicrosatelliteSimulator (dr.app.seqgen.MicrosatelliteSimulator)1 Patterns (dr.evolution.alignment.Patterns)1 Microsatellite (dr.evolution.datatype.Microsatellite)1 Tree (dr.evolution.tree.Tree)1 Taxa (dr.evolution.util.Taxa)1 BranchRateModel (dr.evomodel.branchratemodel.BranchRateModel)1 DefaultBranchRateModel (dr.evomodel.branchratemodel.DefaultBranchRateModel)1 GammaSiteModel (dr.oldevomodel.sitemodel.GammaSiteModel)1 MicrosatelliteModel (dr.oldevomodel.substmodel.MicrosatelliteModel)1