Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flagged "out-of-model" leaves are not so bad #131

Closed
phiweger opened this issue Sep 7, 2020 · 5 comments
Closed

Flagged "out-of-model" leaves are not so bad #131

phiweger opened this issue Sep 7, 2020 · 5 comments

Comments

@phiweger
Copy link

phiweger commented Sep 7, 2020

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!

@phiweger
Copy link
Author

phiweger commented Sep 7, 2020

@rneher
Copy link
Member

rneher commented Sep 10, 2020

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.

@phiweger
Copy link
Author

I really appreciate this, thank you.

@corneliusroemer
Copy link
Member

Maybe related to: #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.

@rneher
Copy link
Member

rneher commented May 17, 2023

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.

@rneher rneher closed this as completed May 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants