treetime
treetime copied to clipboard
Flagged "out-of-model" leaves are not so bad
TreeTime flags leaves that do not conform to the clock model like so:
263.56 TreeTime: The following tips don't fit the clock model, please remove
them from the tree. Their dates have been reset:
263.56 4d9c8e7e-9fa5-4340-a1bd-994e42f1cd57, input date: [2010.0013698630137,
2010.9986301369863], apparent date: 2013.32
263.56 2e86535f-7904-433e-897b-cc0f3e2ff278, input date: 2013.8972602739725,
apparent date: 2013.90
263.56 6efab9a4-5723-4f1e-9d20-9077d64be651, input date: 2014.0917808219178,
apparent date: 2014.09
263.56 992884f2-12e3-453c-8d3c-0d49443dc999, input date: 2014.5246575342467,
apparent date: 2014.52
263.56 07ea690f-25f3-4761-bdbc-46e58baa2a5b, input date: [2012.0013661202186,
2012.9986338797814], apparent date: 2018.60
But in the above example, many "apparent date" estimates are spot on. Why does TreeTime flag them?
I am running v0.7.6
Thanks a lot!
yes, this is not ideal. At first glance, this looks like a stupidity in the warning message to me. But I have to dig a little deeper.
I really appreciate this, thank you.
Maybe related to: https://github.com/neherlab/treetime/issues/159 since rtt plot seems to show something else than "apparent date".
Maybe it would help to make a separate rtt like plot but with "date vs apparent date" instead of "date vs root-to-tip-distance".
If the closest relative is used to infer apparent date, then it could happen that if one has two nearly sequences with the same non-clock-like behaviour, each gets the "apparent date" from the other outlier. I don't know enough about the internals of treetime to know whether this is how it actually works but it could cause such confusions.
this is due to leaves being initially flagged by simply excluding tips based on their deviation from the root to tip regression. Eventually, their position is estimated using phylogenetic information and then they sometimes end up being pretty ok. One could try to re-evaluate their exclusion, but this isn't currently on the roadmap.