Skip to content

Fix add_hmmer_domains crashes on DigitalSequenceBlock and query=True (2.1.5) - #54

Merged
YalanBi merged 3 commits into
masterfrom
fix/hmmer-domain-crashes
Aug 7, 2026
Merged

Fix add_hmmer_domains crashes on DigitalSequenceBlock and query=True (2.1.5)#54
YalanBi merged 3 commits into
masterfrom
fix/hmmer-domain-crashes

Conversation

@YalanBi

@YalanBi YalanBi commented Aug 7, 2026

Copy link
Copy Markdown
Collaborator

Summary

Closes #53: add_hmmer_domains crashed on any call, in two independent ways.

  • get_hmmer_sequences returned a plain Python list, but Pipeline.search_hmm has required a DigitalSequenceBlock since pyhmmer 0.7.0 (pinned version: 0.12.1) -- reproduced directly: TypeError: Function call with ambiguous argument types.
  • query/ref_query (default query=True, ref_query=False, documented as "True/False to include/exclude all transcripts") were passed straight through as filter expressions into iter_transcripts/iter_ref_transcripts. True crashed with AssertionError: expression should be a string, since _filter_function asserts its input is a string. Verified query=None returns all transcripts unfiltered (same as omitting the argument), so the fix preserves the documented "True = include all" contract.

Bumps version to 2.1.5.

Test plan

  • Full pytest suite passes (26 passed, 1 pre-existing unrelated failure deselected -- test_anno_domains fails on master too, from a local pandas/pickle version mismatch unrelated to this change)
  • New regression tests reproduce both original crashes against the pre-fix code and pass after the fix, including a real end-to-end pipeline.search_hmm() call
  • flake8/black clean
  • python -m build + twine check dist/* pass at 2.1.5

YalanBi and others added 3 commits August 7, 2026 19:48
- get_hmmer_sequences now returns a pyhmmer DigitalSequenceBlock, required by Pipeline.search_hmm since pyhmmer 0.7.0
- query/ref_query are no longer passed through as a filter expression when they're True (the documented "include all transcripts" value)
- black-format the new regression tests
- update CHANGELOG
@YalanBi YalanBi added the bug Something isn't working label Aug 7, 2026
@YalanBi YalanBi self-assigned this Aug 7, 2026
@github-actions

github-actions Bot commented Aug 7, 2026

Copy link
Copy Markdown

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Scanned Files

None

@YalanBi
YalanBi merged commit 84c9c7d into master Aug 7, 2026
20 checks passed
@YalanBi
YalanBi deleted the fix/hmmer-domain-crashes branch August 7, 2026 18:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

add_hmmer_domains crashes: DigitalSequenceBlock and ref_query=True

2 participants