[beast-mcmc] r6732 committed - Bug fix

0 views
Skip to first unread message

beast...@googlecode.com

unread,
Apr 12, 2015, 1:02:45 PM4/12/15
to beast-...@googlegroups.com
Revision: 6732
Author: mdha...@gmail.com
Date: Sun Apr 12 17:02:34 2015 UTC
Log: Bug fix
https://code.google.com/p/beast-mcmc/source/detail?r=6732

Modified:
/trunk/src/dr/evolution/coalescent/FlexibleGrowth.java
/trunk/src/dr/evomodel/epidemiology/casetocase/WithinCaseCoalescent.java

=======================================
--- /trunk/src/dr/evolution/coalescent/FlexibleGrowth.java Thu Apr 9
12:40:06 2015 UTC
+++ /trunk/src/dr/evolution/coalescent/FlexibleGrowth.java Sun Apr 12
17:02:34 2015 UTC
@@ -64,10 +64,6 @@

this.K = K;
}
-
-
-
-

// Implementation of abstract methods

@@ -94,8 +90,6 @@

return 1/getN0() * (1/((getR()-1)*K) * (Math.pow(-finish, -getR() + 1) -
Math.pow(-start, -getR() +1 )) + Math.log((-start)/(-finish)));
}
-
-

public int getNumArguments() {
return 3;
=======================================
---
/trunk/src/dr/evomodel/epidemiology/casetocase/WithinCaseCoalescent.java
Thu Apr 9 12:41:26 2015 UTC
+++
/trunk/src/dr/evomodel/epidemiology/casetocase/WithinCaseCoalescent.java
Sun Apr 12 17:02:34 2015 UTC
@@ -297,9 +297,13 @@

NodeRef partitionRoot = getEarliestNodeInPartition(aCase);

+ double extraHeight;

- double infectionTime =
getInfectionTime(branchMap.get(partitionRoot.getNumber()));
- double rootTime = getNodeTime(partitionRoot);
+ if(treeModel.isRoot(partitionRoot)){
+ extraHeight = maxFirstInfToRoot.getParameterValue(0) *
aCase.getInfectionBranchPosition().getParameterValue(0);
+ } else {
+ extraHeight = treeModel.getBranchLength(partitionRoot)
* aCase.getInfectionBranchPosition().getParameterValue(0);
+ }

FlexibleNode newRoot = new FlexibleNode();

@@ -328,9 +332,27 @@

}
}
+
+
+
+

Treelet treelet = new Treelet(littleTree,
- sampleTipHeight +
(aCase.examTime-getInfectionTime(aCase)));
+ littleTree.getRootHeight() + extraHeight);
+
+
+
+
+// if(sampleTipHeight==-1){
+// System.out.println();
+// }
+
+// double heightPlusRB = treelet.getZeroHeight() -
sampleTipHeight;
+// double infectedTime = aCase.examTime -
getInfectionTime(aCase);
+//
+// if(heightPlusRB!=infectedTime){
+// System.out.println();
+// }

partitionsAsTrees.put(aCase, treelet);

Reply all
Reply to author
Forward
0 new messages