Search in sources :

Example 21 with Patterns

use of dr.evolution.alignment.Patterns 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

Patterns (dr.evolution.alignment.Patterns)21 Microsatellite (dr.evolution.datatype.Microsatellite)9 Taxa (dr.evolution.util.Taxa)9 Taxon (dr.evolution.util.Taxon)9 TreeModel (dr.evomodel.tree.TreeModel)9 ArrayList (java.util.ArrayList)9 Tree (dr.evolution.tree.Tree)7 BranchRateModel (dr.evomodel.branchratemodel.BranchRateModel)6 PatternList (dr.evolution.alignment.PatternList)4 NewickImporter (dr.evolution.io.NewickImporter)4 BranchModel (dr.evomodel.branchmodel.BranchModel)4 GammaSiteRateModel (dr.evomodel.siteratemodel.GammaSiteRateModel)4 PartialsRescalingScheme (dr.evomodel.treelikelihood.PartialsRescalingScheme)4 Parameter (dr.inference.model.Parameter)4 GammaSiteModel (dr.oldevomodel.sitemodel.GammaSiteModel)4 AsymmetricQuadraticModel (dr.oldevomodel.substmodel.AsymmetricQuadraticModel)4 SitePatterns (dr.evolution.alignment.SitePatterns)3 TaxonList (dr.evolution.util.TaxonList)3 HomogeneousBranchModel (dr.evomodel.branchmodel.HomogeneousBranchModel)3 FrequencyModel (dr.evomodel.substmodel.FrequencyModel)3