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

improve time checks for add mutation #799

Merged
merged 1 commit into from Jul 13, 2021

Conversation

molpopgen
Copy link
Owner

  • Update comments re: return value.
  • Add new function to choose origin time of the new mutation:

@molpopgen molpopgen force-pushed the improve_time_checks_for_add_mutation branch from 3c73577 to f21f4f3 Compare July 12, 2021 19:23
@@ -158,6 +158,46 @@ namespace
}
}

std::int64_t
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is close, but not right yet. We are ignoring the case when the node's time cannot be represented exactly as an int64 and the node's parent's time is such that no int64 exists between the two node times.

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
@molpopgen molpopgen force-pushed the improve_time_checks_for_add_mutation branch from f97522b to 42b2235 Compare July 13, 2021 21:27
@molpopgen molpopgen merged commit 20c0076 into dev Jul 13, 2021
@molpopgen molpopgen deleted the improve_time_checks_for_add_mutation branch July 13, 2021 23:14
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.

None yet

1 participant