Search in sources :

Example 6 with AsymmetricQuadraticModel

use of dr.oldevomodel.substmodel.AsymmetricQuadraticModel in project beast-mcmc by beast-dev.

the class MsatFullLikelihoodTest method setUpExample3.

private void setUpExample3() throws Exception {
    //taxa
    ArrayList<Taxon> taxonList3 = new ArrayList<Taxon>();
    Collections.addAll(taxonList3, new Taxon("taxon1"), new Taxon("taxon2"), new Taxon("taxon3"), new Taxon("taxon4"), new Taxon("taxon5"), new Taxon("taxon6"), new Taxon("taxon7"));
    Taxa taxa3 = new Taxa(taxonList3);
    //msat datatype
    Microsatellite msat = new Microsatellite(1, 4);
    Patterns msatPatterns = new Patterns(msat, taxa3);
    //pattern in the correct code form.
    msatPatterns.addPattern(new int[] { 0, 3, 1, 2, 3, 0, 1 });
    //create tree
    NewickImporter importer = new NewickImporter("(((taxon1:0.3,taxon2:0.3):0.6,taxon3:0.9):0.9,((taxon4:0.5,taxon5:0.5):0.3,(taxon6:0.7,taxon7:0.7):0.1):1.0);");
    Tree tree = importer.importTree(null);
    //treeModel
    TreeModel treeModel = new TreeModel(tree);
    //msatsubstModel
    AsymmetricQuadraticModel aqm3 = new AsymmetricQuadraticModel(msat, null);
    //siteModel
    GammaSiteModel siteModel = new GammaSiteModel(aqm3);
    //treeLikelihood
    treeLikelihood3 = new TreeLikelihood(msatPatterns, treeModel, siteModel, null, null, false, false, true, false, false);
}
Also used : Taxa(dr.evolution.util.Taxa) Microsatellite(dr.evolution.datatype.Microsatellite) TreeModel(dr.evomodel.tree.TreeModel) GammaSiteModel(dr.oldevomodel.sitemodel.GammaSiteModel) Taxon(dr.evolution.util.Taxon) NewickImporter(dr.evolution.io.NewickImporter) ArrayList(java.util.ArrayList) AsymmetricQuadraticModel(dr.oldevomodel.substmodel.AsymmetricQuadraticModel) TreeLikelihood(dr.oldevomodel.treelikelihood.TreeLikelihood) Tree(dr.evolution.tree.Tree) Patterns(dr.evolution.alignment.Patterns)

Aggregations

Microsatellite (dr.evolution.datatype.Microsatellite)6 AsymmetricQuadraticModel (dr.oldevomodel.substmodel.AsymmetricQuadraticModel)6 Patterns (dr.evolution.alignment.Patterns)4 NewickImporter (dr.evolution.io.NewickImporter)4 Tree (dr.evolution.tree.Tree)4 Taxa (dr.evolution.util.Taxa)4 Taxon (dr.evolution.util.Taxon)4 TreeModel (dr.evomodel.tree.TreeModel)4 ArrayList (java.util.ArrayList)4 Parameter (dr.inference.model.Parameter)3 GammaSiteModel (dr.oldevomodel.sitemodel.GammaSiteModel)3 TreeLikelihood (dr.oldevomodel.treelikelihood.TreeLikelihood)3 BranchRateModel (dr.evomodel.branchratemodel.BranchRateModel)1 StrictClockBranchRates (dr.evomodel.branchratemodel.StrictClockBranchRates)1 MicrosatelliteSamplerTreeModel (dr.evomodel.tree.MicrosatelliteSamplerTreeModel)1 FrequencyModel (dr.oldevomodel.substmodel.FrequencyModel)1 LinearBiasModel (dr.oldevomodel.substmodel.LinearBiasModel)1 TwoPhaseModel (dr.oldevomodel.substmodel.TwoPhaseModel)1 MicrosatelliteSamplerTreeLikelihood (dr.oldevomodel.treelikelihood.MicrosatelliteSamplerTreeLikelihood)1 HashMap (java.util.HashMap)1