From c14cfa3f135920bdf2719791f35e283f8592483b Mon Sep 17 00:00:00 2001 From: "Fabio K. Mendes" Date: Thu, 1 Oct 2020 14:28:23 +1300 Subject: [PATCH] shortened class name. --- .../BMMVNLikelihoodOneTrait_YuleTree.xml | 2 +- .../BMMVNLikelihoodOneTrait_fixedtree.xml | 2 +- ...LikelihoodOneTrait_FBDTree_RateCatClock.xml | 2 +- ...ikelihoodOneTrait_YuleTree_RateCatClock.xml | 2 +- ...kelihoodOneTrait_fixedtree_RateCatClock.xml | 2 +- ...lihoodOneTrait_FBDTree_RandomLocalClock.xml | 2 +- ...LikelihoodOneTrait_FBDTree_RateCatClock.xml | 2 +- ...ikelihoodOneTrait_YuleTree_RateCatClock.xml | 2 +- ...kelihoodOneTrait_fixedtree_RateCatClock.xml | 2 +- examples/testing/WNLikelihoodOneTrait.xml | 2 +- .../mvnlikelihood/BMMVNLikelihoodOneTrait.java | 6 +++--- .../BMMVNShiftLikelihoodOneTrait.java | 6 +++--- .../mvnlikelihood/OUMVNLikelihoodOneTrait.java | 6 +++--- .../otherlikelihood/WNLikelihoodOneTrait.java | 8 ++++---- src/test/BMMVNLikelihoodOneTraitTest.java | 12 ++++++------ src/test/BMMVNShiftLikelihoodOneTraitTest.java | 18 +++++++++--------- src/test/OUMVNLikelihoodOneTraitTest.java | 8 ++++---- src/test/WNLikelihoodOneTraitTest.java | 4 ++-- 18 files changed, 44 insertions(+), 44 deletions(-) diff --git a/examples/testing/BMMVNLikelihoodOneTrait_YuleTree.xml b/examples/testing/BMMVNLikelihoodOneTrait_YuleTree.xml index ed265db..475b62b 100644 --- a/examples/testing/BMMVNLikelihoodOneTrait_YuleTree.xml +++ b/examples/testing/BMMVNLikelihoodOneTrait_YuleTree.xml @@ -48,7 +48,7 @@ - + 1.4822794118 diff --git a/examples/testing/BMMVNLikelihoodOneTrait_fixedtree.xml b/examples/testing/BMMVNLikelihoodOneTrait_fixedtree.xml index 56d059c..7c049e9 100644 --- a/examples/testing/BMMVNLikelihoodOneTrait_fixedtree.xml +++ b/examples/testing/BMMVNLikelihoodOneTrait_fixedtree.xml @@ -40,7 +40,7 @@ - + 1.4822794118 diff --git a/examples/testing/BMMVNShiftLikelihoodOneTrait_FBDTree_RateCatClock.xml b/examples/testing/BMMVNShiftLikelihoodOneTrait_FBDTree_RateCatClock.xml index 310875a..fc165f8 100644 --- a/examples/testing/BMMVNShiftLikelihoodOneTrait_FBDTree_RateCatClock.xml +++ b/examples/testing/BMMVNShiftLikelihoodOneTrait_FBDTree_RateCatClock.xml @@ -92,7 +92,7 @@ - + diff --git a/examples/testing/BMMVNShiftLikelihoodOneTrait_YuleTree_RateCatClock.xml b/examples/testing/BMMVNShiftLikelihoodOneTrait_YuleTree_RateCatClock.xml index b457757..e887729 100644 --- a/examples/testing/BMMVNShiftLikelihoodOneTrait_YuleTree_RateCatClock.xml +++ b/examples/testing/BMMVNShiftLikelihoodOneTrait_YuleTree_RateCatClock.xml @@ -50,7 +50,7 @@ - + diff --git a/examples/testing/BMMVNShiftLikelihoodOneTrait_fixedtree_RateCatClock.xml b/examples/testing/BMMVNShiftLikelihoodOneTrait_fixedtree_RateCatClock.xml index 778f420..00d9ac5 100644 --- a/examples/testing/BMMVNShiftLikelihoodOneTrait_fixedtree_RateCatClock.xml +++ b/examples/testing/BMMVNShiftLikelihoodOneTrait_fixedtree_RateCatClock.xml @@ -43,7 +43,7 @@ - + diff --git a/examples/testing/OUMVNLikelihoodOneTrait_FBDTree_RandomLocalClock.xml b/examples/testing/OUMVNLikelihoodOneTrait_FBDTree_RandomLocalClock.xml index 6af0f79..5c0a632 100644 --- a/examples/testing/OUMVNLikelihoodOneTrait_FBDTree_RandomLocalClock.xml +++ b/examples/testing/OUMVNLikelihoodOneTrait_FBDTree_RandomLocalClock.xml @@ -234,7 +234,7 @@ - + diff --git a/examples/testing/OUMVNLikelihoodOneTrait_FBDTree_RateCatClock.xml b/examples/testing/OUMVNLikelihoodOneTrait_FBDTree_RateCatClock.xml index 1f1b0fd..ac8f76f 100644 --- a/examples/testing/OUMVNLikelihoodOneTrait_FBDTree_RateCatClock.xml +++ b/examples/testing/OUMVNLikelihoodOneTrait_FBDTree_RateCatClock.xml @@ -98,7 +98,7 @@ - + diff --git a/examples/testing/OUMVNLikelihoodOneTrait_YuleTree_RateCatClock.xml b/examples/testing/OUMVNLikelihoodOneTrait_YuleTree_RateCatClock.xml index d54d5fd..05b518a 100644 --- a/examples/testing/OUMVNLikelihoodOneTrait_YuleTree_RateCatClock.xml +++ b/examples/testing/OUMVNLikelihoodOneTrait_YuleTree_RateCatClock.xml @@ -55,7 +55,7 @@ - + diff --git a/examples/testing/OUMVNLikelihoodOneTrait_fixedtree_RateCatClock.xml b/examples/testing/OUMVNLikelihoodOneTrait_fixedtree_RateCatClock.xml index 89a93f5..414f218 100644 --- a/examples/testing/OUMVNLikelihoodOneTrait_fixedtree_RateCatClock.xml +++ b/examples/testing/OUMVNLikelihoodOneTrait_fixedtree_RateCatClock.xml @@ -50,7 +50,7 @@ - + diff --git a/examples/testing/WNLikelihoodOneTrait.xml b/examples/testing/WNLikelihoodOneTrait.xml index 33cfadb..f51b3c3 100644 --- a/examples/testing/WNLikelihoodOneTrait.xml +++ b/examples/testing/WNLikelihoodOneTrait.xml @@ -32,7 +32,7 @@ - + 1.0 diff --git a/src/contraband/mvnlikelihood/BMMVNLikelihoodOneTrait.java b/src/contraband/mvnlikelihood/BMMVNLikelihoodOneTrait.java index cbfbadf..36cd813 100644 --- a/src/contraband/mvnlikelihood/BMMVNLikelihoodOneTrait.java +++ b/src/contraband/mvnlikelihood/BMMVNLikelihoodOneTrait.java @@ -10,7 +10,7 @@ import beast.core.State; import beast.core.parameter.RealParameter; import beast.core.Input.Validate; -import outercore.parameter.KeyEnhancedRealParameter; +import outercore.parameter.KeyRealParameter; /** * @author Fabio K. Mendes @@ -27,7 +27,7 @@ public class BMMVNLikelihoodOneTrait extends MVNProcessOneTrait { final public Input sigmasqInput = new Input<>("sigmaSq", "Sigma^2, the variance of the process.", Validate.REQUIRED); // OPTIONAL because BMMVNShift has ColorManager instead final public Input rootValueInput = new Input<>("rootValue", "rootValue, or y_0, the root value and the expected value at the tips.", Validate.REQUIRED); - final public Input oneTraitInput = new Input<>("oneTraitData", "continuous data values for one trait.", Validate.REQUIRED); + final public Input oneTraitInput = new Input<>("oneTraitData", "continuous data values for one trait.", Validate.REQUIRED); // final public Input oneTraitInput = new Input<>("oneTraitData", "continuous data values for one trait.", Validate.REQUIRED); // original implementation (for the above line) with OneValueContTraits data wrapper private boolean dirty; @@ -134,7 +134,7 @@ protected void populateOneTraitDataVector() { // } String[] spNamesInPhyloTMatOrder = getSpNamesInPhyloTMatOrder(); - KeyEnhancedRealParameter oneTraitValues = oneTraitInput.get(); + KeyRealParameter oneTraitValues = oneTraitInput.get(); int i = 0; for (String spName: spNamesInPhyloTMatOrder) { oneTraitDataVec.setEntry(i, oneTraitValues.getValue(spName)); diff --git a/src/contraband/mvnlikelihood/BMMVNShiftLikelihoodOneTrait.java b/src/contraband/mvnlikelihood/BMMVNShiftLikelihoodOneTrait.java index 9c6c2a9..66e893e 100644 --- a/src/contraband/mvnlikelihood/BMMVNShiftLikelihoodOneTrait.java +++ b/src/contraband/mvnlikelihood/BMMVNShiftLikelihoodOneTrait.java @@ -12,7 +12,7 @@ import beast.core.Input; import beast.core.Input.Validate; import beast.core.parameter.RealParameter; -import outercore.parameter.KeyEnhancedRealParameter; +import outercore.parameter.KeyRealParameter; /** * @author Fabio K. Mendes @@ -30,7 +30,7 @@ public class BMMVNShiftLikelihoodOneTrait extends MVNShiftProcessOneTrait { final public Input rootValueInput = new Input<>("rootValue", "rootValue, or y_0, the root value and the expected value at the tips.", Validate.REQUIRED); final public Input rateManagerInput = new Input<>("rateManager", "color manager object that paints branches with their own rates.", Validate.REQUIRED); - final public Input oneTraitInput = new Input<>("oneTraitData", "continuous data values for one trait.", Validate.REQUIRED); + final public Input oneTraitInput = new Input<>("oneTraitData", "continuous data values for one trait.", Validate.REQUIRED); // final public Input oneTraitInput = new Input<>("oneTraitData", "continuous data values for one trait.", Validate.REQUIRED); // original implementation (for the above line) with OneValueContTraits data wrapper /* @@ -189,7 +189,7 @@ protected void populateOneTraitDataVector() { // } String[] spNamesInPhyloTMatOrder = rateManager.getSpNamesInVCVMatOrder(); - KeyEnhancedRealParameter oneTraitValues = oneTraitInput.get(); + KeyRealParameter oneTraitValues = oneTraitInput.get(); int i = 0; for (String spName: spNamesInPhyloTMatOrder) { oneTraitDataVec.setEntry(i, oneTraitValues.getValue(spName)); diff --git a/src/contraband/mvnlikelihood/OUMVNLikelihoodOneTrait.java b/src/contraband/mvnlikelihood/OUMVNLikelihoodOneTrait.java index 38cf4f3..c01c080 100644 --- a/src/contraband/mvnlikelihood/OUMVNLikelihoodOneTrait.java +++ b/src/contraband/mvnlikelihood/OUMVNLikelihoodOneTrait.java @@ -18,7 +18,7 @@ import beast.core.State; import beast.core.parameter.RealParameter; import beast.core.Input.Validate; -import outercore.parameter.KeyEnhancedRealParameter; +import outercore.parameter.KeyRealParameter; /** * @author Fabio K. Mendes @@ -40,7 +40,7 @@ public class OUMVNLikelihoodOneTrait extends MVNProcessOneTrait { final public Input useRootMetaDataInput = new Input<>("useRootMetaData", "Whether or not to use root meta data (specified optimum). If set to 'false', root optimum is set to eldest regime (regimes are numbered from the root toward the tips).", Validate.REQUIRED); final public Input optimumManagerInput = new Input<>("optimumManager", "color manager object that paints branches with their own optima.", Validate.REQUIRED); final public Input alphaInput = new Input<>("alpha", "Pull toward optimum or optima.", Validate.REQUIRED); - final public Input oneTraitInput = new Input<>("oneTraitData", "continuous data values for one trait.", Validate.REQUIRED); + final public Input oneTraitInput = new Input<>("oneTraitData", "continuous data values for one trait.", Validate.REQUIRED); // final public Input oneTraitInput = new Input<>("oneTraitData", "continuous data values for one trait.", Validate.REQUIRED); // original implementation (for the above line) with OneValueContTraits data wrapper // final public Input optimumManagerInput = new Input<>("optimumManager", "color manager object that paints branches with their own optima.", Validate.REQUIRED); @@ -217,7 +217,7 @@ protected void populateOneTraitDataVector() { // } String[] spNamesInPhyloTMatOrder = getSpNamesInPhyloTMatOrder(); - KeyEnhancedRealParameter oneTraitValues = oneTraitInput.get(); + KeyRealParameter oneTraitValues = oneTraitInput.get(); int i = 0; for (String spName: spNamesInPhyloTMatOrder) { oneTraitDataVec.setEntry(i, oneTraitValues.getValue(spName)); diff --git a/src/contraband/otherlikelihood/WNLikelihoodOneTrait.java b/src/contraband/otherlikelihood/WNLikelihoodOneTrait.java index fdea085..93306f0 100644 --- a/src/contraband/otherlikelihood/WNLikelihoodOneTrait.java +++ b/src/contraband/otherlikelihood/WNLikelihoodOneTrait.java @@ -11,7 +11,7 @@ import beast.core.parameter.IntegerParameter; import beast.core.parameter.RealParameter; import contraband.utils.MVNUtils; -import outercore.parameter.KeyEnhancedRealParameter; +import outercore.parameter.KeyRealParameter; /** * @author Fabio K. Mendes @@ -27,7 +27,7 @@ public class WNLikelihoodOneTrait extends Distribution { final public Input sigmaSqsInput = new Input<>("sigmaSqs", "Sigma^2 of each species' normal density.", Validate.REQUIRED); final public Input meansInput = new Input<>("mus", "Means of each species' normal density.", Validate.REQUIRED); final public Input normalAssignmentsInput = new Input<>("normalAssignments", "Which normal density each species has.", Validate.REQUIRED); - final public Input oneTraitInput = new Input<>("oneTraitData", "continuous data values for one trait.", Validate.REQUIRED); + final public Input oneTraitInput = new Input<>("oneTraitData", "continuous data values for one trait.", Validate.REQUIRED); // final public Input oneTraitInput = new Input<>("oneTraitData", "continuous data values for one trait.", Validate.REQUIRED); // original implementation (for the above line) with OneValueContTraits data wrapper // private OneValueContTraits sampleData; // original implementation with OneValueContTraits data wrapper @@ -41,7 +41,7 @@ public class WNLikelihoodOneTrait extends Distribution { public void initAndValidate() { super.initAndValidate(); - KeyEnhancedRealParameter oneTraitValues = oneTraitInput.get(); + KeyRealParameter oneTraitValues = oneTraitInput.get(); oneTraitDataArr = oneTraitValues.getValues(); int nSpp = oneTraitValues.getMinorDimension2(); @@ -79,7 +79,7 @@ public double calculateLogP() { private void populateSampleData(boolean updateTipValues) { if (updateTipValues) { - KeyEnhancedRealParameter oneTraitValues = oneTraitInput.get(); + KeyRealParameter oneTraitValues = oneTraitInput.get(); /* This is the safest way to do it when there is a PhyloTMatrix whose species orders might not match diff --git a/src/test/BMMVNLikelihoodOneTraitTest.java b/src/test/BMMVNLikelihoodOneTraitTest.java index 0990fcf..309c1df 100644 --- a/src/test/BMMVNLikelihoodOneTraitTest.java +++ b/src/test/BMMVNLikelihoodOneTraitTest.java @@ -7,7 +7,7 @@ import contraband.mvnlikelihood.BMMVNLikelihoodOneTrait; import org.junit.Assert; import org.junit.Test; -import outercore.parameter.KeyEnhancedRealParameter; +import outercore.parameter.KeyRealParameter; import java.util.Arrays; import java.util.List; @@ -31,7 +31,7 @@ public class BMMVNLikelihoodOneTraitTest { Double[] rootValueVectorInput; RealParameter rootValue; List oneTraitValues; - KeyEnhancedRealParameter oneTraitData; + KeyRealParameter oneTraitData; BMMVNLikelihoodOneTrait bmLk; /* @@ -52,7 +52,7 @@ public void testBMMVNLkOneTraitSmallTree() { // initializing data spNames = "sp1 sp2 sp3"; oneTraitValues = Arrays.asList(4.1, 4.5, 5.9); - oneTraitData = new KeyEnhancedRealParameter(); + oneTraitData = new KeyRealParameter(); oneTraitData.initByName("value", oneTraitValues, "keys", spNames); // sigmasq @@ -93,7 +93,7 @@ public void testBMMVNLkOneTraitLargeTree() { // initializing data spNames = "t39 t26 t9 t7 t34 t13 t19 t50 t4 t1 t40 t30 t43 t25 t16 t24 t11 t20 t8 t3 t29 t42 t33 t12 t22 t17 t10 t28 t46 t32 t14 t45 t2 t49 t44 t23 t6 t48 t21 t35 t38 t5 t27 t47 t36 t41 t37 t18 t15 t31"; - oneTraitData = new KeyEnhancedRealParameter(); + oneTraitData = new KeyRealParameter(); oneTraitValues = Arrays.asList(2.6217033, 2.3837527, 0.66385, 2.0554696, 4.6116682, 4.2175155, 1.6890947, 1.1548256, -0.6414763, 2.02788, -0.4061393, 0.2212728, 3.1044734, 2.3983881, 3.4179581, 1.994293, -0.2234107, -0.1731294, -0.9781789, 0.3593945, -1.1369789, 1.7804662, 4.4069651, -0.3154813, 2.3581627, 2.7665761, 2.6999333, 1.051665, 1.5705502, 1.2644854, 2.0151375, 0.0178691, 3.1121187, 2.4489679, 4.461729, 2.8168993, 2.2227894, 6.3508146, 4.6171196, 2.1775336, 2.5118373, -0.2920445, 0.1249836, 1.775187, 1.5983678, 1.4397621, 1.4127476, 3.1335225, 2.7158012, 2.668979); oneTraitData.initByName("value", oneTraitValues, "keys", spNames); @@ -130,7 +130,7 @@ public void testBMMVNLkOneTraitLargeTreeNonUltra() { // initializing data oneTraitValues = Arrays.asList(2.27209315774825,2.35770577479828,2.28619045504381,2.10885751414985,2.21395120993299,2.21616242171277,2.10440705636749,2.23088719352124,2.01612727139994,1.97250353865042,2.04619347343212,1.98626432483887,2.13708092824067,2.0924140883466,2.1149054702513,2.21828980377753,2.21523666408597,2.11038317942733,2.20594065029627,2.17222408711307,2.15525917958223,4.61079655144365,2.05099175361785,2.00896701757015,3.48910077756198,2.57568303611276,2.12434389950229,3.2130625470875,3.07020561053238,1.96918061689753,1.3901244857742,1.45248420753707,1.48390042153334,3.53093468620019,2.88001212857536,1.73916538132083,1.74793606069044,2.15738753957675,1.72286491883736,1.81294836498846,2.03876259543693,1.59727328820493,3.91840500639177,3.23605812584825,3.23116427461224,3.04963684259685,1.99914518841533,3.83711101138963,5.36818679644893,4.67121421317176); spNames = "t35 t32 t10 t18 t47 t9 t43 t38 t20 t14 t19 t24 t50 t8 t25 t12 t5 t37 t42 t13 t41 t34 t4 t36 t7 t29 t22 t46 t40 t28 t33 t21 t26 t48 t39 t2 t44 t23 t11 t49 t45 t31 t16 t30 t1 t17 t15 t3 t27 t6"; - oneTraitData = new KeyEnhancedRealParameter(); + oneTraitData = new KeyRealParameter(); oneTraitData.initByName("value", oneTraitValues, "keys", spNames); // sigmasq @@ -177,7 +177,7 @@ public void testBMMVNLkOneTraitSmallTreeDiffPopSizes() { // initializing data spNames = "sp1 sp2 sp3 sp4"; oneTraitValues = Arrays.asList(0.07680552, -0.07201447, -0.03776352, 0.29705797); - oneTraitData = new KeyEnhancedRealParameter(); + oneTraitData = new KeyRealParameter(); oneTraitData.initByName("value", oneTraitValues, "keys", spNames); // sigmasq diff --git a/src/test/BMMVNShiftLikelihoodOneTraitTest.java b/src/test/BMMVNShiftLikelihoodOneTraitTest.java index b5fd8ef..71d5850 100644 --- a/src/test/BMMVNShiftLikelihoodOneTraitTest.java +++ b/src/test/BMMVNShiftLikelihoodOneTraitTest.java @@ -10,7 +10,7 @@ import contraband.mvnlikelihood.BMMVNShiftLikelihoodOneTrait; import contraband.clock.RateCategoryClockModel; import contraband.clock.TreeToVCVMat; -import outercore.parameter.KeyEnhancedRealParameter; +import outercore.parameter.KeyRealParameter; import java.util.Arrays; import java.util.List; @@ -36,7 +36,7 @@ public class BMMVNShiftLikelihoodOneTraitTest { Double[] rootValueVectorInput; RealParameter rootValue; List oneTraitValues; - KeyEnhancedRealParameter oneTraitData; + KeyRealParameter oneTraitData; BMMVNShiftLikelihoodOneTrait bmLk; /* @@ -69,7 +69,7 @@ public void testBMMVNShiftLkOneTraitSmallTree() { // initializing data spNames = "sp1 sp2 sp3"; oneTraitValues = Arrays.asList(4.1, 4.5, 5.9); - oneTraitData = new KeyEnhancedRealParameter(); + oneTraitData = new KeyRealParameter(); oneTraitData.initByName("value", oneTraitValues, "keys", spNames); // root value vector @@ -110,7 +110,7 @@ public void testBMMVNShiftLkOneTraitLargeTree() { // initializing data oneTraitValues = Arrays.asList(-1.98102089083783, 0.425095619275142, -2.64278670721857, 4.67301038174566, 0.980837136224631, -1.50747992926933, 0.291651433101693, 1.38909936714432, 4.03813926115063, 2.67745449448204, 6.39102061816721, 6.40419053691823, 2.20955411315545, 0.772842105471847, 3.55734391167665, 0.498071400234979, 0.550315407342643, 3.84375731077216, 3.18235300029237, 3.91668458860299, 5.2164188658234, 3.39905904957137, 2.69218348604267, -3.93463904654453, 2.03170767420157, 0.996489601169867, 0.742277069809021, -1.83602057962268, -1.01090704411752, 3.03382850811265, 5.43622150183381, 1.74925732548084, 3.5197105768139, 3.19459541434014, -0.457078134951209, 0.193865716678944, -0.088604135083334, 0.12961684230114, 1.65864752553039, 1.73675049380547, 1.25491657987277, 1.37659283253291, 2.25570866291172, 1.14726492498239, 0.25210113076106, 0.776384238776296, 1.31397115366671, -0.0419698505695754, -0.21193756283334, -0.138788530248324); spNames = "t39 t26 t9 t7 t34 t13 t19 t50 t4 t1 t40 t30 t43 t25 t16 t24 t11 t20 t8 t3 t29 t42 t33 t12 t22 t17 t10 t28 t46 t32 t14 t45 t2 t49 t44 t23 t6 t48 t21 t35 t38 t5 t27 t47 t36 t41 t37 t18 t15 t31"; - oneTraitData = new KeyEnhancedRealParameter(); + oneTraitData = new KeyRealParameter(); oneTraitData.initByName("value", oneTraitValues, "keys", spNames); // root value vector @@ -146,7 +146,7 @@ public void testBMMVNShiftLkOneTraitLargeTreeNonUltra() { // initializing data oneTraitValues = Arrays.asList(-0.140079330558364, -0.0874251270522149, -0.194010550881256, 0.129301918296212, 0.0774210684049538, -0.047482768983324, 0.0956948735831467, 0.162500177959304, 0.18863127851286, 0.125036602967829, 0.350150590083319, 0.272741469616044, 0.116302901473441, -0.150985676720302, 0.236398643978856, 0.18383828082074, 0.184437478591962, 0.306155108012576, 0.308705544566368, 0.356922129276011, 0.437517619840372, 2.47333215098386, 0.70777639704284, -2.62662966633079, 0.454522834320791, -0.132242095134662, -0.439104186981486, -3.92360496759795, -2.41829387918679, 0.101516116711762, 2.6441683780108, 2.13821582254339, 2.54220446636924, -0.520807491795214, -4.29749916896601, -2.68665542778722, -3.01604647309455, -2.57037860992468, 2.0262053690181, 2.69837639068034, 1.01248730643342, 0.662522088866049, 1.70637323736846, 2.25896738991068, 2.20128394055548, -1.06070652973863, 1.20670535726105, 2.35323217229207, 1.91628626588915, 2.92725041007494); spNames = "t35 t32 t10 t18 t47 t9 t43 t38 t20 t14 t19 t24 t50 t8 t25 t12 t5 t37 t42 t13 t41 t34 t4 t36 t7 t29 t22 t46 t40 t28 t33 t21 t26 t48 t39 t2 t44 t23 t11 t49 t45 t31 t16 t30 t1 t17 t15 t3 t27 t6"; - oneTraitData = new KeyEnhancedRealParameter(); + oneTraitData = new KeyRealParameter(); oneTraitData.initByName("value", oneTraitValues, "keys", spNames); // root value vector @@ -182,7 +182,7 @@ public void testBMMVNShiftLkOneTraitSmallTreeTwoRates() { // initializing data oneTraitValues = Arrays.asList(-2.53718502574816, -2.85562629168723, 1.79661600241838); spNames = "sp1 sp2 sp3"; - oneTraitData = new KeyEnhancedRealParameter(); + oneTraitData = new KeyRealParameter(); oneTraitData.initByName("value", oneTraitValues, "keys", spNames); // root value vector @@ -234,7 +234,7 @@ public void testBMMVNShiftLkOneTraitLargeTreeThreeRates() { // initializing data oneTraitValues = Arrays.asList(-4.24865266388791, 1.12694466883781, -6.02979129548445, 9.62359673885322, 0.17990827089315, -5.46776437171474, 0.486983190714245, 2.08585804088066, 0.753683973121965, -0.242019913226091, 0.946577159488485, 6.22141276151274, 2.91113662785022, -2.0374126462967, -1.10293312619706, -0.179708562978063, -0.198701248227853, 4.58084601841762, 5.64277550994041, 0.919256884182315, 1.09524719371436, 0.782136300731067, 0.0962378659531526, -5.33631896191408, 1.4905959236315, -0.0744248296375519, -0.177479586475342, -4.26961572362966, -2.86137408169925, -0.974994208280936, 1.41858116564816, -0.187048179444733, 0.282668872536788, -0.244597214204735, -1.19517123879371, -1.10037443643529, -0.261483237873604, -0.207560694831451, 0.348278374786552, -0.168277479250151, -0.406155392866917, -0.3594972601634, -0.0234868583801822, 1.00637046502527, -0.000469931947963076, -0.329563226090097, 0.043226745691999, 0.739816593725853, -0.238002140615943, -0.214951085346446); spNames = "t37 t42 t24 t19 t12 t5 t18 t25 t10 t47 t9 t20 t14 t43 t38 t13 t41 t50 t8 t35 t32 t34 t6 t48 t39 t17 t15 t40 t46 t29 t22 t16 t28 t31 t45 t23 t7 t4 t36 t11 t49 t3 t27 t26 t33 t21 t2 t44 t30 t1"; - oneTraitData = new KeyEnhancedRealParameter(); + oneTraitData = new KeyRealParameter(); oneTraitData.initByName("value", oneTraitValues, "keys", spNames); // root value vector @@ -270,7 +270,7 @@ public void testBMMVNShiftLkOneTraitLargeTreeNonUltraSampledAnc() { // initializing data oneTraitValues = Arrays.asList(-5.05744071356103, -1.11052196957346, -0.575427737395457, -0.202953693279079, 1.14969399531796, -1.64202406456342, 1.79417473949251, 0.073438714146757, 0.726726641446067, 3.93444954633643, -0.491682932895839, -1.74464882096195, -0.0780925842656348, 4.81261164374873, 4.49854934867917, 3.04106820281915, -0.803750712288891, 0.523401664662935, -0.456279043339767, 1.2741332640877, 2.87956906600202, 3.91356152320114, 3.59597823070803, -0.389239530235073, -0.63498836297618, -0.789764345711418, -1.20679458892863, -1.48400428008497); spNames = "t4_1 t12_1 t2_3 t7_1 t13_4 t15_1 t16_1 t5_1 t8_1 t10_3 t6_1 t9_1 t3_1 t14_1 t1_1 t11_1 t2_1 t2_2 t13_1 t13_2 t13_3 t10_1 t10_2 t19_1 t20_1 t20_2 t20_3 t28_1"; - oneTraitData = new KeyEnhancedRealParameter(); + oneTraitData = new KeyRealParameter(); oneTraitData.initByName("value", oneTraitValues, "keys", spNames); // root value vector @@ -306,7 +306,7 @@ public void testBMMVNShiftLkOneTraitLargeTreeNonUltraSampledAncNoFossils() { // initializing data oneTraitValues = Arrays.asList(-5.05744071356103, -1.11052196957346, -0.575427737395457, -0.202953693279079, 1.14969399531796, -1.64202406456342, 1.79417473949251, 0.073438714146757, 0.726726641446067, 3.93444954633643, 0.750504711256288, -0.587613596378262, 2.75170560121156, 3.31308844229513, 3.23260100181807, 3.97279694209149, 3.75757747655993, 1.43752567783899, -1.53225408723805, -0.667885599149076, 0.266271594649991, 0.98828295113675); spNames = "t4_1 t12_1 t2_3 t7_1 t13_4 t15_1 t16_1 t5_1 t8_1 t10_3 t2_1 t2_2 t13_1 t13_2 t13_3 t10_1 t10_2 t19_1 t20_1 t20_2 t20_3 t28_1"; - oneTraitData = new KeyEnhancedRealParameter(); + oneTraitData = new KeyRealParameter(); oneTraitData.initByName("value", oneTraitValues, "keys", spNames); // root value vector diff --git a/src/test/OUMVNLikelihoodOneTraitTest.java b/src/test/OUMVNLikelihoodOneTraitTest.java index 1104334..e693c83 100644 --- a/src/test/OUMVNLikelihoodOneTraitTest.java +++ b/src/test/OUMVNLikelihoodOneTraitTest.java @@ -11,7 +11,7 @@ import contraband.mvnlikelihood.OUMVNLikelihoodOneTrait; import contraband.clock.RateCategoryClockModel; import contraband.clock.TreeToVCVMat; -import outercore.parameter.KeyEnhancedRealParameter; +import outercore.parameter.KeyRealParameter; import java.util.Arrays; import java.util.List; @@ -35,7 +35,7 @@ public class OUMVNLikelihoodOneTraitTest { Double[] rootValueInput; RealParameter rootValue1, rootValue2, rootValue; List oneTraitValues; - KeyEnhancedRealParameter oneTraitData; + KeyRealParameter oneTraitData; OUMVNLikelihoodOneTrait ouLk; /* Original implementation with data wrapper, prior to Parameter having .getValue(aString) */ @@ -61,7 +61,7 @@ public void setUp() { // oneTraitData.initByName("nTraits", 1, "traitValues", oneTraitValues, "spNames", spNames); spNames = "sp1 sp2 sp3 sp4"; oneTraitValues = Arrays.asList(0.237649365136715, 0.295018750722361, 0.881225138279161, 0.206222932069516); - oneTraitData = new KeyEnhancedRealParameter(); + oneTraitData = new KeyRealParameter(); oneTraitData.initByName("value", oneTraitValues, "keys", spNames); // sigma 1, alpha 1 and root value 1 @@ -305,7 +305,7 @@ public void testOUMVNLkOneTraitLargeNonUltraTree1optCondOnRVEstimateRV() { // oneTraitData.initByName("nTraits", 1, "traitValues", oneTraitValues, "spNames", spNames); spNames = "t47_1 t44_1 t81_3 t29_5 t39_1 t7_1 t70_1 t32_1 t59_2 t14_1 t36_1 t79_1 t5_1 t61_4 t22_1 t27_2 t23_2 t3_2 t77_1 t87_1 t74_1 t2_1 t65_1 t20_1 t60_1 t43_3 t28_1 t49_1 t85_3 t62_1 t64_2 t68_2 t30_1 t15_1 t58_2 t75_1 t53_1 t78_2 t37_1 t56_1 t4_1 t40_3 t63_1 t17_1 t54_1 t9_1 t24_1 t69_1 t21_1 t71_1 t25_2 t57_2 t18_1 t1_1 t66_1 t55_1 t41_1 t82_1 t19_1 t84_1 t11_2 t73_3 t50_2 t26_1 t13_1 t46_1 t38_2 t42_1 t67_2 t83_1 t8_1 t34_1 t31_1 t80_1 t12_1 t10_1 t35_1 t48_1 t86_1 t33_2 t51_1 t52_1 t6_1 t76_1 t45_2 t16_2 t72_1 t81_1 t81_2 t29_1 t29_2 t29_3 t29_4 t59_1 t61_1 t61_2 t61_3 t27_1 t23_1 t3_1 t43_1 t43_2 t85_1 t85_2 t64_1 t68_1 t58_1 t78_1 t40_1 t40_2 t25_1 t57_1 t11_1 t73_1 t73_2 t50_1 t38_1 t67_1 t33_1 t45_1 t16_1 t92_1 t99_1 t100_1 t104_1 t106_1 t109_1 t113_1 t115_1 t120_1 t122_1 t126_1 t131_1 t132_1 t132_2 t138_1 t142_1 t143_1 t146_1 t150_1 t160_1 t160_2 t162_1 t165_1 t169_1 t172_1"; oneTraitValues = Arrays.asList(-0.120540925368686, -0.160339196119639, 0.339711780786955, 0.366620606449858, 0.33088594760519, 0.240619559058153, 0.290536304372365, -0.0901170041442549, 0.341338296432439, -0.0628145511095494, 0.0580385312534993, -0.327327215900842, -0.0518215793539553, 0.33460186054066, 0.327108133275378, 0.163999857771553, -0.0625322749065135, 0.473100099350845, -0.18548137014437, 0.182392891817864, 0.0635218896061768, -0.0692694738005909, 0.226987428950308, -0.0135619972058633, 0.215366928258746, 0.30056737056481, 0.312907629853014, 0.275301281455329, 0.515793851411512, -0.0331061262646763, 0.552621356036791, 0.0812736250137989, 0.029500783167557, 0.355533617814899, 0.226135370395429, 0.35733531062027, 0.132222943832334, 0.386522540915343, 0.223921904096349, 0.247184759229459, 0.206342673206047, 0.49090135847057, -0.127630867933923, -0.163114992198786, 0.285977651079011, 0.590086989328278, 0.204482309523344, 0.0951399327857863, -0.186578808911084, 0.438175763843511, 0.307394267727196, 0.230745719707747, 0.376416248991533, 0.015059308494915, 0.254547570530282, -0.0235761692154553, 0.455228154309083, -0.243392546580896, 0.194520124445963, 0.153455693187263, -0.0207109572209939, 0.108876605908814, 0.0853388155408518, -0.0261917713957721, -0.181563099673691, 0.598439787340723, -0.145307160355961, 0.158228203216972, 0.171675227407924, -0.0415889203783169, 0.23912156617336, -0.0663147445692704, 0.187870149577858, -0.176702690795953, 0.0625705762692598, 0.282082324865967, -0.34947856036343, 0.154309228836352, 0.324847770367215, 0.272495695719496, 0.356018737503574, -0.0286542881780232, 0.162373514467401, 0.0301730646940898, 0.14344777534431, 0.413025722015541, 0.138415356600982, -0.0756638106298703, 0.253105483929284, 0.435068723137525, 0.187599226491797, 0.0792622583121616, 0.166598040080181, 0.108375803217645, 0.20390709863448, 0.367963844490222, 0.281057351966486, 0.0673500911931306, 0.382454086988514, 0.140311163307048, 0.0945200530794752, 0.174999612642347, 0.231026476185091, 0.226220487819618, -0.0515643818227237, 0.226908996988942, 0.233647101034971, 0.170618432275688, 0.330053268957442, 0.212922368401166, -0.120113266676103, -0.297073778660506, 0.745154054326884, 0.410473276891546, 0.222125735804677, 0.0673003797775433, 0.0445273257571818, 0.327534883207233, -0.0106841482120232, 0.125740419588887, 0.325803704776373, -0.045762978254612, 0.234871127364338, 0.430714626348258, 0.388572986226116, 0.27356995328721, -0.220756150970401, 0.117111468872904, -0.0116525857230558, 0.15116217224561, 0.0642469156709887, -0.222758595055236, 0.188856275423778, -0.115686175121437, -0.052489420279737, 0.35585389337747, 0.27098637632671, 0.0117372993387806, 0.33551924588533, 0.346790730504337, 0.216496852706343, 0.483101983845081, 0.292554498008609, 0.410138399734205, 0.138258175735177, 0.045149840801478); - oneTraitData = new KeyEnhancedRealParameter(); + oneTraitData = new KeyRealParameter(); oneTraitData.initByName("value", oneTraitValues, "keys", spNames); // thetas diff --git a/src/test/WNLikelihoodOneTraitTest.java b/src/test/WNLikelihoodOneTraitTest.java index 2edd6d6..624bc58 100644 --- a/src/test/WNLikelihoodOneTraitTest.java +++ b/src/test/WNLikelihoodOneTraitTest.java @@ -6,7 +6,7 @@ import beast.core.parameter.IntegerParameter; import beast.core.parameter.RealParameter; import contraband.otherlikelihood.WNLikelihoodOneTrait; -import outercore.parameter.KeyEnhancedRealParameter; +import outercore.parameter.KeyRealParameter; import java.util.Arrays; import java.util.List; @@ -32,7 +32,7 @@ public void testWNLkOneTrait() { // initializing data String spNames = "sp1 sp2 sp3"; List oneTraitValues = Arrays.asList(1.5952808, 0.3295078, -0.8204684); - KeyEnhancedRealParameter oneTraitData = new KeyEnhancedRealParameter(); + KeyRealParameter oneTraitData = new KeyRealParameter(); oneTraitData.initByName("value", oneTraitValues, "keys", spNames); RealParameter sigmaSqs = new RealParameter(new Double[] { 0.9733856, 0.0, 1.0 });