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

Question about branch length in mugration #271

Open
Tonny-zhou opened this issue Mar 30, 2024 · 1 comment
Open

Question about branch length in mugration #271

Tonny-zhou opened this issue Mar 30, 2024 · 1 comment

Comments

@Tonny-zhou
Copy link

Hello TreeTime team,

I've been using TreeTime to reconstruct ancestral states across different branches of a phylogenetic tree, and I've encountered an issue that I wanted to bring to your attention. It appears that when the input tree has branch lengths smaller than 1E-5 (I'm not entirely sure about the exact threshold), the branch lengths in the output annotate.nexus file are rounded to 0. For example, a branch length of 4.3E-6 seems to be rounded down to 0.

I suspect this might be due to rounding or precision limitations in the way TreeTime handles small numerical values. I'm concerned about how this might affect both the reconstruction process and the visualization of the results. Small branch lengths being rounded to 0 could potentially obscure meaningful evolutionary relationships and timescales in the tree.

Could you please advise on whether this rounding behavior might impact the ancestral state reconstruction process? Additionally, would scaling up the branch lengths in the input tree by a fixed multiplier be a recommended workaround for this issue? For instance, multiplying all branch lengths by 10^6 to shift the scale and avoid the small number rounding.

I appreciate your guidance on this matter and any suggestions you might have for handling small branch lengths in TreeTime.

Thank you for your time and for developing such a valuable tool.

Best regards,
Tonny

@rneher
Copy link
Member

rneher commented Aug 11, 2024

In some modes, TreeTime collapses branches that are not supported. But the output should generally have either 6 or 8 digits precision, depending on the length of the genome being used. In the mugration step, there is typically no genome and this might be restrict the precision to 6 digits. I have increased precision a bit. Hopefully this fixes your problem.

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

2 participants