Validate NAIBR BEDPE records before inferring structural-variant classes - #297
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (1)
Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 WalkthroughWalkthrough
ChangesBEDPE input validation
Priority: ⬇️ Low Estimated code review effort: 3 (Moderate) | ~15–30 minutes Merge Risk: ⚪ Minimal · up to The command now rejects malformed NAIBR BEDPE input with specific errors while preserving existing passing, FAIL, and SV classification behavior. No current merge-blocking risk remains. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Thank you for submitting this PR! I'm in favor of the validation, but I also have to ask about what use-case you have encountered that a malformed BEDPE file would be used as input for the utility? Within harpy, |
|
Thanks Pavel, that makes sense. I mainly had two defensive edge cases in mind:
The validation is intended to give a clear line-specific error in those cases while leaving the normal Does that make sense? |
|
Yeah, that makes sense. Thanks for the helpful contribution! |
Summary
harpy-utils infer-svpreviously assumed that every NAIBR BEDPE record contained the expected number of columns and a valid orientation code. Malformed or changed input could therefore produce an uninformativeIndexErrororKeyError.This change validates the input before structural-variant inference:
FAILrecords.The resulting error messages identify the offending line and value, making upstream-format changes and damaged files much easier to diagnose.
Scope
This is intentionally limited to input validation and diagnostics. It does not change the structural-variant classification rules.
Summary by CodeRabbit