Skip to content

Drop haplotype matcher code - #3499

Merged
jeromekelleher merged 1 commit into
tskit-dev:mainfrom
jeromekelleher:drop-haplotype-matcher
Oct 30, 2026
Merged

jeromekelleher merged 1 commit into
tskit-dev:mainfrom
jeromekelleher:drop-haplotype-matcher

Conversation

@jeromekelleher

Copy link
Copy Markdown
Member

This is superceded by https://github.com/tskit-dev/tsls/, which absorbs all functionality and is many times faster.

As the API is private, the only real impact on users is that C builds will need to change, if they are building in haplotype_matching.c

@codecov

codecov Bot commented Oct 30, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.71%. Comparing base (7b93306) to head (d937386).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3499      +/-   ##
==========================================
+ Coverage   91.68%   91.71%   +0.03%     
==========================================
  Files          38       37       -1     
  Lines       32242    30831    -1411     
  Branches     5155     4919     -236     
==========================================
- Hits        29560    28278    -1282     
+ Misses       2346     2223     -123     
+ Partials      336      330       -6     
Flag Coverage Δ
C 82.32% <ø> (+0.05%) ⬆️
c-python 77.05% <ø> (-0.47%) ⬇️
python-tests 96.44% <ø> (ø)
python-tests-no-jit 33.29% <ø> (ø)

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

Components Coverage Δ
Python API 98.73% <ø> (ø)
Python C interface 91.21% <ø> (-0.05%) ⬇️
C library 91.27% <ø> (+0.05%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

The Li and Stephens HMM (tsk_ls_hmm_t and the compressed and Viterbi
matrices) is replaced by the tsls package, which tsinfer and sc2ts use.
Nothing else in the library uses it.

Remove the low-level haplotype matching classes

_tskit.LsHmm, CompressedMatrix and ViterbiMatrix wrapped the C haplotype
matching code removed in the previous commit, and were never public API.
Their tests compared against the lshmm package, which is no longer
needed. The tests that were worth keeping are ported to tsls.
@jeromekelleher

Copy link
Copy Markdown
Member Author

This is a straightforward improvement, that's been long-planned, so merging.

@jeromekelleher
jeromekelleher merged commit 50fef49 into tskit-dev:main Oct 30, 2026
17 checks passed
@jeromekelleher
jeromekelleher deleted the drop-haplotype-matcher branch October 30, 2026 13:02
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.

1 participant