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

Error in generating origin times for mutations added "manually" via DiploidPopulation.add_mutation #798

Closed
molpopgen opened this issue Jul 10, 2021 · 1 comment
Milestone

Comments

@molpopgen
Copy link
Owner

The features added in #764 cause LibraryError due to invalid times.

The issue is probably a complication of the precapitation. We need tests of precapitate/evolve/export to know if this is an issue specific to the dev branch or if it affects the current release for certain work flows. Either way, this will be fixed on 0.16.0 rather than a point release for 0.15.

@molpopgen molpopgen added this to the 0.16.0 milestone Jul 10, 2021
@molpopgen
Copy link
Owner Author

Hint to self: this seems to be related to converting the floating-point node times that come from msprime to the integer node times that fwdpy11 requires.

molpopgen added a commit that referenced this issue Jul 12, 2021
1. If the mutation's node's parent is NULL, choose
   the closest int64 <= the node's time.
2. Otherwise, choose a uniform int64 <= the node time and >
   the parent node's time.

Fixes #798
@molpopgen molpopgen changed the title Error exporting to tskit after adding mutations manually Error in generating origin times for mutations added "manually" via DiploidPopulation.add_mutation Jul 12, 2021
molpopgen added a commit that referenced this issue Jul 12, 2021
0. If the motation's node's time can be represented exactly as
   int64, the use that representation as the time.
1. If the mutation's node's parent is NULL, choose
   the closest int64 <= the node's time.
2. Otherwise, choose a uniform int64 <= the node time and >
   the parent node's time.

Fixes #798
molpopgen added a commit that referenced this issue Jul 13, 2021
0. If the motation's node's time can be represented exactly as
   int64, the use that representation as the time.
1. If the mutation's node's parent is NULL, choose
   the closest int64 <= the node's time.
2. Otherwise, choose a uniform int64 <= the node time and >
   the parent node's time.
3. Add new tests to tests/test_add_mutation.py
   tests/test_selective_sweeps.py

Fixes #798
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

1 participant