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

fix: regularize mutation rate calculation #255

Merged
merged 1 commit into from
Sep 7, 2023
Merged

Conversation

rneher
Copy link
Member

@rneher rneher commented Aug 5, 2023

The GTR inference was failing when there were no mutations on the tree, i.e. the entire alignment consisted of identical sequences. In that case, there is not data to estimate a model. But the pseudo-count in the GTR inference should in principle then simply result in a flat JC-type model. However, the rate calculation wasn't properly regularized with pseudocounts and ended up being zero, leading to a division by 0 and subsequent NaN type errors.

fixes: #253

@rneher rneher merged commit 354899c into master Sep 7, 2023
5 checks passed
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

Successfully merging this pull request may close these issues.

Joint ancestral sequence reconstruction fails when input sequences are identical and GTR is inferred
1 participant