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

LS model refactoring #2799

Merged
merged 2 commits into from
Aug 6, 2023
Merged

Conversation

jeromekelleher
Copy link
Member

@jeromekelleher jeromekelleher commented Jul 13, 2023

Some refactoring of the LS hmm code. WIP

based on #2786 (so has a bunch of extra commits).

@codecov
Copy link

codecov bot commented Jul 13, 2023

Codecov Report

Merging #2799 (64aedbf) into main (11dd2f5) will decrease coverage by 0.19%.
The diff coverage is 81.42%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #2799      +/-   ##
==========================================
- Coverage   89.97%   89.78%   -0.19%     
==========================================
  Files          30       30              
  Lines       29322    29447     +125     
  Branches     5707     5731      +24     
==========================================
+ Hits        26383    26440      +57     
- Misses       1669     1723      +54     
- Partials     1270     1284      +14     
Flag Coverage Δ
c-tests 86.08% <74.50%> (-0.42%) ⬇️
lwt-tests 80.78% <ø> (ø)
python-c-tests 67.89% <100.00%> (+0.07%) ⬆️
python-tests 99.02% <ø> (ø)

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

Files Changed Coverage Δ
c/tskit/haplotype_matching.c 84.47% <74.50%> (-6.20%) ⬇️
python/_tskitmodule.c 88.68% <100.00%> (+0.06%) ⬆️

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 11dd2f5...64aedbf. Read the comment docs.

@jeromekelleher
Copy link
Member Author

@astheeggeggs I've made some progress here on refactoring the Python tree LS HMM code, mainly to deduplicate things a bit and also to remove the need for mirroring the coords of the ts. I think it's pretty close to the point where I can implement it in C.

It would be helpful if you could take a look at the code at this point to see if you spot any howlers (just the test_haplotype_matching.py code, everthing else is incidental). I've made a start on refactoring the tests a bit as well, to move away from the current class-based approach where we internally iterate over a bunch of parameters, towards something that's much more modular, and where you can run a single example with a single set of parameters easily. It's a WIP though

@jeromekelleher
Copy link
Member Author

I think this is breaking on some lshmm bugs that have been fixed, so the simplest thing is to wait for version 0.0.5 (astheeggeggs/lshmm#25)

I've added a commit to bump the requirements.

@jeromekelleher jeromekelleher force-pushed the ls-forward-native branch 2 times, most recently from f7269b4 to 90a578a Compare August 3, 2023 11:01
jeromekelleher added a commit to jeromekelleher/tskit that referenced this pull request Aug 4, 2023
jeromekelleher added a commit to jeromekelleher/tskit that referenced this pull request Aug 4, 2023
Also update changed parameter names for lshmm 0.0.5
@jeromekelleher jeromekelleher merged commit b6f9872 into tskit-dev:main Aug 6, 2023
18 of 19 checks passed
@jeromekelleher jeromekelleher deleted the ls-forward-native branch August 6, 2023 09:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

1 participant