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

Added methods to sort and squash segments in the IbdFinder output. #2460

Merged
merged 7 commits into from
Sep 23, 2024

Conversation

gtsambos
Copy link
Member

@gtsambos gtsambos commented Aug 9, 2022

Fixes #2459 -- see the issue for discussion about why this is needed. Draft only at the moment.

PR Checklist:

  • Tests that fully cover new/changed functionality.
  • Documentation including tutorial content if appropriate.
  • Changelogs, if there are API changes.

@codecov
Copy link

codecov bot commented Aug 9, 2022

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 89.72%. Comparing base (fb87f87) to head (7fe0bb8).
Report is 6 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2460   +/-   ##
=======================================
  Coverage   89.72%   89.72%           
=======================================
  Files          29       29           
  Lines       31578    31578           
  Branches     6117     6117           
=======================================
  Hits        28333    28333           
  Misses       1853     1853           
  Partials     1392     1392           
Flag Coverage Δ
c-tests 86.55% <ø> (ø)
lwt-tests 80.78% <ø> (ø)
python-c-tests 88.98% <ø> (ø)
python-tests 99.01% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

@gtsambos
Copy link
Member Author

Hey @hyanwong! Unfortunately, we both made some pretty involved changes to the test_highlevel.py file in the past few days. I think I've fixed up the merge conflict, but I can't figure out how to get my tests to run with the argument that I added into get_example_tree_sequences(). Currently I'm just skipping these tests because I don't fully understand the syntax of your additions -- do you know how to ensure these tests 'see' the argument I've added in?

@hyanwong
Copy link
Member

hyanwong commented Sep 1, 2022

It was @benjeffery who fixed up get_example_tree_sequences() to run in parallel, cached, so that parameterize worked properly. He might be able to suggest a fix?

@benjeffery
Copy link
Member

I'll take a look now

@benjeffery
Copy link
Member

I think the simplest thing here is to remove custom_max.
I've done this in a3aa3da
Currently, I've set the N numbers to those generated when custom_max was 15. Once all the IBD tests pass we should add in some even numbers again and skip them in the IBD tests? (I'm assuming that you need them to be odd, as all those generated by custom_max were?

@gtsambos
Copy link
Member Author

gtsambos commented Sep 7, 2022

Thanks @benjeffery and sorry for the late reply -- I had to take a few days off to deal with some urgent moving-to-the-US things.

Currently, I've set the N numbers to those generated when custom_max was 15. Once all the IBD tests pass we should add in some even numbers again and skip them in the IBD tests? (I'm assuming that you need them to be odd, as all those generated by custom_max were?

I added this argument because some of my changes in this PR make IbdFinder run much more slowly, to the point where they look like they're hanging. (This is likely a Python-specific problem -- as we discuss in #2459, the C code works differently because it uses an AVL tree to do the sorting). But I didn't want to omit the tests entirely, as they cover some useful edge cases, so I wanted to run them with smaller sample sizes than the ones hard-coded in.

@benjeffery
Copy link
Member

I added this argument because some of my changes in this PR make IbdFinder run much more slowly, to the point where they look like they're hanging. (This is likely a Python-specific problem -- as we discuss in #2459, the C code works differently because it uses an AVL tree to do the sorting). But I didn't want to omit the tests entirely, as they cover some useful edge cases, so I wanted to run them with smaller sample sizes than the ones hard-coded in.

We can leave the slow examples in the examples - but skip them in these tests?

@benjeffery
Copy link
Member

benjeffery commented Sep 20, 2024

I've rebased this to main - the tests here only add a few seconds on my machine, will see home CI behaves. @jeromekelleher I think this is pretty complete if you want to have a quick look to check?

@benjeffery benjeffery added this to the Python 0.5.9 milestone Sep 20, 2024
@benjeffery benjeffery added AUTOMERGE-REQUESTED Ask Mergify to merge this PR and removed AUTOMERGE-REQUESTED Ask Mergify to merge this PR labels Sep 23, 2024
@benjeffery
Copy link
Member

@Mergifyio update

Copy link
Contributor

mergify bot commented Sep 23, 2024

update

✅ Branch has been successfully updated

@mergify mergify bot merged commit d6b2303 into tskit-dev:main Sep 23, 2024
21 checks passed
@mergify mergify bot removed the AUTOMERGE-REQUESTED Ask Mergify to merge this PR label Sep 23, 2024
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.

Provide option to squash IBD output?
3 participants