BEAST2-Dev / bdsky

Birth Death Serial Skyline Model for BEAST2
GNU General Public License v3.0
2 stars 11 forks source link

Trouble resuming BirthDeathSkylineModel #20

Closed rbouckaert closed 7 years ago

rbouckaert commented 7 years ago

With a 10000 year old tree, rho sampling and no sampling rates, I had trouble resuming because the restored tree had a tip height that differed more than 1e-10 from a rho sampling time (consequently, the isRhoTip array marked the tip as 'false', and a sampling rate was assumed for that node, giving a zero likelihood for BirthDeathSkylineModel).

This larger difference is due to the fact sample ages are not stored in the state file to that resolution. It should be sufficient to do the check that node age does not differ from rho sampling time relative to root age. That is, check that

(node age - rho time)/root age < 1e-10 

instead of

(node age - rho time) < 1e-10 

which we have now.