Skip to content

Fix genomicdist bugs#244

Merged
sanghoonio merged 1 commit intodevfrom
gdist-edits
Mar 11, 2026
Merged

Fix genomicdist bugs#244
sanghoonio merged 1 commit intodevfrom
gdist-edits

Conversation

@nsheff
Copy link
Copy Markdown
Member

@nsheff nsheff commented Mar 11, 2026

  • Fix closest() nearest-neighbor search to use bidirectional expanding scan instead of fixed ±2 window that missed true nearest neighbors (5 new tests)
  • Replace unsafe native-endian f64 serialization in signal.rs with safe explicit little-endian encoding, bump SIGM_VERSION to 2 (3 new tests)
  • Fix WASM classify_bed_js to return Result instead of panicking on error
  • Fix R binding integer casts: add checked_u32 helper for i32→u32 inputs, change outputs from Vec to Vec to prevent truncation (10 new tests)

…, R casts

- Fix closest() nearest-neighbor search to use bidirectional expanding scan
  instead of fixed ±2 window that missed true nearest neighbors (5 new tests)
- Replace unsafe native-endian f64 serialization in signal.rs with safe
  explicit little-endian encoding, bump SIGM_VERSION to 2 (3 new tests)
- Fix WASM classify_bed_js to return Result instead of panicking on error
- Fix R binding integer casts: add checked_u32 helper for i32→u32 inputs,
  change outputs from Vec<i32> to Vec<f64> to prevent truncation (10 new tests)
@nsheff nsheff requested a review from sanghoonio March 11, 2026 13:06
@nsheff nsheff marked this pull request as ready for review March 11, 2026 13:31
Copy link
Copy Markdown
Member

@sanghoonio sanghoonio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good

@sanghoonio sanghoonio merged commit 04addb8 into dev Mar 11, 2026
sanghoonio added a commit that referenced this pull request Mar 11, 2026
Resolve conflicts from gdist-edits PR (#244) merge:

- regionset_ops: Keep min_overlap on RegionSetOverlaps trait (needed by
  R bindings), delegate to MCO batch methods for fast path (min_bp <= 1),
  fall back to in-place iteration with overlap-size filtering for min_bp > 1.
  Add 7 new tests for min_overlap edge cases.

- genomicdist.rs: Combine gtars-lola's chrom_sizes params and no-reduce
  partition fix with dev's checked_u32 input validation.

- multi_chrom_overlapper.rs: Fix MCO consistency test to pass min_overlap.

- region_set.rs (Python): Update callers for min_overlap signature.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
nsheff added a commit that referenced this pull request Mar 11, 2026
Resolve conflict: interval_ranges.rs deleted on this branch,
modified on dev (PR #244 closest() fix + R cast safety).
The closest() improvements are already in RegionSet::closest().
R/WASM safe-cast changes from dev merge cleanly.
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