Skip to content

Reject invalid zero-width SV candidate intervals - #132

Merged
J35P312 merged 1 commit into
SciLifeLab:masterfrom
lsmc-bio:codex/upstream-zero-width-candidate
Jul 20, 2026
Merged

Reject invalid zero-width SV candidate intervals#132
J35P312 merged 1 commit into
SciLifeLab:masterfrom
lsmc-bio:codex/upstream-zero-width-candidate

Conversation

@iamh2o

@iamh2o iamh2o commented Jul 18, 2026

Copy link
Copy Markdown
Contributor

Summary

  • reject invalid A/B inclusive intervals before coverage lookup
  • guard get_region against non-positive widths
  • emit a deterministic diagnostic with exact bounds and support
  • do not swap bounds or fabricate coverage

Motivation

A real LongRead/short-read SV analysis exposed a candidate whose normalized interval had invalid inclusive bounds. The current coverage expression divides by end-start+1, causing ZeroDivisionError. This patch rejects the structurally invalid candidate before coverage calculation and keeps a defensive guard in get_region.

Validation

  • native Linux arm64 compiled suite: 6/6 passed
  • emulated Linux amd64 compiled suite: 6/6 passed
  • installed amd64 wheel smoke test passed

The branch is based on TIDDIT 3.9.6 (141e39f).

@J35P312

J35P312 commented Jul 20, 2026

Copy link
Copy Markdown
Member

Hello!
Thanks for this pull request, it looks really nice! I hope you get a bugfree tiddit experience now ;).

Best regards
Jesper

@J35P312
J35P312 merged commit 7b0ecea into SciLifeLab:master Jul 20, 2026
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.

2 participants