-
Notifications
You must be signed in to change notification settings - Fork 73
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
pair_coalescence_rates fails with overall time window [0, float('inf')] and sometimes also with [0, 20000, 100000, float('inf')] #3035
Comments
I realized, when trying my script with smaller time windows on different
I attached now two I extracted also some general information for both files, but there is nothing obvious for me:
|
Thanks for the thorough report, I'll take a look! |
This seems to just be floating point error, in a check that Just a usage note that the coalescence rate with a single time window [0, inf) (what you call "overall coalescence rate") should be equal to diversity (or divergence if it's a cross-coalescence rate between two populations), sans some slight differences in how missing sequence is handled. That is, aside from testing one shouldn't every really want to calculate coalescence rates with a single time window (use |
Hey @Luker121 this bug should be fixed in the current github head of tskit. If you don't mind trying it out on your actual data, that'd be very helpful. Thanks! |
Hi @nspope, I just tried it out and it works perfectly now (also on my inferred files by SINGER). Thanks so much for your fast help! |
Hi,
This bug is similar to what was reported in #2986, where we discussed a similar issue that occurs with pairwise coalescent rate calculations. I have to say, that I am using the 0.6.0-dev version of tskit.
Here is my problem:
When trying to calculate the overall pairwise coalescent rates using the time window [0, float('inf')] and genomic windows, I get a similar bug, which we had before already in #2986:
Bug detected in lib/tskit/trees.c at line 9801. If you are using tskit directly please open an issue on GitHub, ideally with a reproducible example.
Here is the non-working code that produces the bug using this time window
[0, float('inf')]
:And here is the example of code that works when dividing the time windows into smaller intervals
[0, 20000, 100000, float('inf')]
:The error seems to be triggered when using the time window
[0, float('inf')]
only. I attached mytest_tree_SINGER.trees
file as a zip file. This is actually a.trees
file created by SINGER (ARG-inference by Yun Deng: https://github.com/popgenmethods/SINGER). But when using both scripts on a simulated.trees
file created by SLiM, both scripts work perfectly fine. So there must be something in the.trees
file created by SINGER triggering this bug.I attached both files (
test_tree_SINGER.trees
andtest_tree_slim.trees
).test_tree_files.zip
The text was updated successfully, but these errors were encountered: