Fix add_hmmer_domains crashes on DigitalSequenceBlock and query=True (2.1.5) - #54
Merged
Conversation
- 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
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Scanned FilesNone |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes #53:
add_hmmer_domainscrashed on any call, in two independent ways.get_hmmer_sequencesreturned a plain Python list, butPipeline.search_hmmhas required aDigitalSequenceBlocksince pyhmmer 0.7.0 (pinned version: 0.12.1) -- reproduced directly:TypeError: Function call with ambiguous argument types.query/ref_query(defaultquery=True, ref_query=False, documented as "True/False to include/exclude all transcripts") were passed straight through as filter expressions intoiter_transcripts/iter_ref_transcripts.Truecrashed withAssertionError: expression should be a string, since_filter_functionasserts its input is a string. Verifiedquery=Nonereturns 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
pytestsuite passes (26 passed, 1 pre-existing unrelated failure deselected --test_anno_domainsfails on master too, from a local pandas/pickle version mismatch unrelated to this change)pipeline.search_hmm()callflake8/blackcleanpython -m build+twine check dist/*pass at 2.1.5