-
Notifications
You must be signed in to change notification settings - Fork 23
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
TSK_ERR_MUTATION_TIME_OLDER_THAN_PARENT_NODE #352
Comments
Hi Matthias, OK, I can now see that the error is occurring on the Python side; the SLiM script runs without errors. @petrelharp any ideas as to what is going on here? |
And, I get the error now as well. It looks to be a pyslim error, since the initial .trees file is okay, it's only something that happens in recapitate. |
Okay - looking into this, the first thing I notice is that changing the recapitate line to
I get
Indeed, you should not simplify before recapitation, or if you do, use Indeed, adding |
(There's also the question of whether we should be throwing the "too many root times" error in the non-constant-Ne case that Matthias uses; but there are use cases where different roots are at different times legally, I think.) |
Oh wait - this is actually happening in
produces the same error. I'll move this to msprime, but will investigate more a bit. Anyhow - I'll bet including |
Okay - turns out this is the same issue as tskit-dev/msprime#2319 . Here's the code I used to verify this:
(Note I also hacked into msprime to save out the tables before converting them to tree sequences to verify this was the issue - but there's only one mutation so it's unambiguous.) I'm going to close this. |
Thank you very much for the quick help, Ben and Peter. Adding I guess the moral of the story is RTFM =). Thanks. |
Thanks for the report! |
Well, maybe a tiny bit of RTFM lol, but there is a bug here, also, which is very useful to get a report on. No worries, it's great to get the feedback, don't worry. |
Hi there,
I am using slim to simulate selection a denovo mutation and then pyslim to recapitate the genomic background. The versions I am using are python-3.12.4, pyslim-1.0.4, slim-4.3, msprime-1.3.3, and tskit-0.5.8.
The two files in the attached zip-file: 'isolated_error.slim' and 'isolated_error.py' reproduce the error for me. I tried to remove as much fluff from the example as I could, but beyond this, I didn't get the error anymore. Even choosing some different values for random_seed=... in the recapitate() function (like random_seed=4711 instead of random_seed=77148825) makes it run without error .
When I run "slim isolated_error.slim && python isolated_error.py", the recapitation throws the error
Any help would be appreciated,
Matthias
isolated_error.zip
The text was updated successfully, but these errors were encountered: