From 8f8f511d85fa3ed614c54d0d59f256de30f7701e Mon Sep 17 00:00:00 2001 From: Denise Date: Mon, 21 Mar 2016 15:28:44 +0100 Subject: [PATCH] update addon --- build.xml | 4 ++-- .../tree/coalescent/BirthDeathSkylineTest.java | 17 ++++++++++++++++- version.xml | 2 +- 3 files changed, 19 insertions(+), 4 deletions(-) diff --git a/build.xml b/build.xml index a5d5f44..1c88ff3 100644 --- a/build.xml +++ b/build.xml @@ -17,7 +17,7 @@ - + @@ -32,7 +32,7 @@ - + diff --git a/src/test/beast/evolution/tree/coalescent/BirthDeathSkylineTest.java b/src/test/beast/evolution/tree/coalescent/BirthDeathSkylineTest.java index 038868b..d6627f3 100644 --- a/src/test/beast/evolution/tree/coalescent/BirthDeathSkylineTest.java +++ b/src/test/beast/evolution/tree/coalescent/BirthDeathSkylineTest.java @@ -158,6 +158,21 @@ public void test3intsmitRho() throws Exception { bdssm.initAndValidate(); assertEquals(-106.06555718977357, bdssm.calculateTreeLogLikelihood(tree), 1e-4); } + case 3:{ + BirthDeathSkylineModel bdssm = new BirthDeathSkylineModel(); + bdssm.setInputValue("tree", tree); + bdssm.setInputValue("origin", new RealParameter("2")); + bdssm.setInputValue("conditionOnSurvival", false); + + bdssm.setInputValue("birthRate", new RealParameter("3. 2. 4. 4.")); + bdssm.setInputValue("deathRate", new RealParameter("2.5 1. .5 0.5")); + bdssm.setInputValue("samplingRate", new RealParameter("2. 0.5 1. 2.0")); + bdssm.setInputValue("rho", new RealParameter("0.05 0.01")); + bdssm.setInputValue("rhoSamplingTimes","0. 1."); + bdssm.setInputValue("intervalTimes", new RealParameter("0. 0.5 1. 1.1")); + bdssm.initAndValidate(); + assertEquals(-109.6105592003162, bdssm.calculateTreeLogLikelihood(tree), 1e-4); + } } } } @@ -700,7 +715,7 @@ public void testLikelihoodCalculation5reverseAll() throws Exception { public void testTreeParser() throws Exception { TreeParser tree = new TreeParser(); - String newick = "(((1[&state='1']:1, (2[&state='0']:.5)[&state='1']:1.5)[&state='1']:2)[&state='0']:1, (3[&state='0']:1.5, (4[&state='1']:1.5)[&state='0']:1 )[&state='0']:2)[&state='0']:1;"; + String newick = "(((1[&state='1']:1, (2[&state='0']:0.5)[&state='1']:1.5)[&state='1']:2)[&state='0']:1, (3[&state='0']:1.5, (4[&state='1']:1.5)[&state='0']:1 )[&state='0']:2)[&state='0']:1;"; tree.initByName("adjustTipHeights",false, "singlechild", true, "newick", newick); printNodeState(tree.getRoot()); diff --git a/version.xml b/version.xml index ad10ba1..2e6ca60 100644 --- a/version.xml +++ b/version.xml @@ -1,3 +1,3 @@ - +