only optimize skyline in last iteration -- speeds things up and allows
polytomy resolution to complete before coalescence is estimated
@@ -54,6 +54,7 @@ class TreeTime(ClockTree):
self.logger('TreeTime.run: adding coalescent prior with Tc='+str(Tc),1)
self.merger_model = Coalescent(self.tree, Tc=avg_root_to_tip,
date2dist=self.date2dist, logger=self.logger)
+ if niter==max_iter-1:
if Tc=='opt':
self.merger_model.optimize_Tc()
self.logger("optimized Tc to %f"%self.merger_model.Tc.y[0], 2)
