-
Notifications
You must be signed in to change notification settings - Fork 70
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
Nasty gotcha in the AFS calculation #2729
Comments
Thanks for the report - this is indeed the wrong AFS, although not technically a bug. The problem here is that the tables did not have Here's some python code that reproduces the problem:
which outputs
|
Well spotted @petrelharp! I agree this isn't a bug since the function isn't part of the API, but it is a nasty gotcha. |
Thanks for the fast reply! :-) I created a PR with the proposed improvement: #2734 |
I get strange results when trying to calculate the AFS for the following dataset:
Am I doing something wrong when calling the tskit functions? Shouldn't the entries in the AFS histogram always sum up to the number of sites (3 in this case)?
I also find something else unintuitive, maybe you can help: If all sites are in the derived state, why is the site counted as if all sites were in ancestral state?
The text was updated successfully, but these errors were encountered: