Skip to content

Warn about corrupted reads in DIAMOND output parser#302

Open
wwood wants to merge 1 commit into
mainfrom
codex/github-mention-corrupted-reads-unexpected-line-format-for
Open

Warn about corrupted reads in DIAMOND output parser#302
wwood wants to merge 1 commit into
mainfrom
codex/github-mention-corrupted-reads-unexpected-line-format-for

Conversation

@wwood

@wwood wwood commented Jun 16, 2026

Copy link
Copy Markdown
Owner

Motivation

  • Make the error raised when parsing DIAMOND output more actionable because DIAMOND can emit malformed rows when input reads are corrupted.
  • Help users quickly diagnose cases where a ValueError: not enough values to unpack originates from bad FASTQ/FASTA input rather than DIAMOND itself.

Description

  • Update the exception in singlem/diamond_spkg_searcher.py to include guidance recommending validation of the input FASTQ/FASTA files when an unexpected DIAMOND output line is encountered.
  • Add a focused unit test test/test_diamond_spkg_searcher.py that mocks Popen to emit a malformed DIAMOND row and verifies the new guidance is included in the raised exception.

Testing

  • Ran pixi run -e dev pytest test/test_diamond_spkg_searcher.py and the new test passed.
  • Ran the full suite with pixi run -e dev pytest test which completed successfully with 224 passed, 25 skipped, 1 warning.
  • Running python -m pytest test/test_diamond_spkg_searcher.py outside the pixi dev environment failed due to the missing extern dependency and is not representative of CI results.

Codex Task

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant