Merged
Conversation
Previously, `Machine::liftover()` returned a flat list of `ContiguousIntervalPair`s with no information about which chain each segment originated from. This made it impossible to distinguish between segments from different chains covering the same region (ambiguous mapping) and segments from the same chain separated by a gap (straddle). - `Machine::liftover()` now returns `Vec<LiftoverResult>`, where each `LiftoverResult` groups the segments from a single chain together with the full chain header. - `LiftoverResult` exposes `.chain()` (returning the `alignment::section::header::Record`) and `.segments()`. - The builder now validates that no two chain sections share the same ID with inconsistent headers, erroring via `Error::DuplicateChainId` at build time.
Replaces hand-written `Display` and `std::error::Error` impls across the crate with `#[derive(Error)]` and `#[error(...)]` attributes. Also bumps the MSRV to 1.83.0 (required by `thiserror` v2), fixes a pre-existing clippy lint in `compare-crossmap`, and updates the binary to use the new `LiftoverResult` API.
When multiple chains overlap the same single-position query, the comparison binary now selects the result from the highest-scoring chain rather than asserting that only one chain matched. This aligns with how `CrossMap` resolves ambiguous mappings.
Also bumps MSRV to 1.85.0 for `clap` 4.6.0 compatibility.
83a7d6d to
e345917
Compare
claymcleod
added a commit
that referenced
this pull request
Mar 19, 2026
3570664 to
d406f6f
Compare
9 tasks
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.
Previously,
Machine::liftover()returned a flat list ofContiguousIntervalPairs with no information about which chain each segment originated from. This made it impossible to distinguish between segments from different chains covering the same region (ambiguous mapping) and segments from the same chain separated by a gap (straddle).Machine::liftover()now returnsVec<LiftoverResult>, where eachLiftoverResultgroups the segments from a single chain together with the full chain header. This lets callers trivially distinguish ambiguous mappings (results.len() > 1) from straddle splits (results[0].segments().len() > 1).The builder also now validates at build time that no two chain sections share the same ID with inconsistent headers, surfacing a
DuplicateChainIderror rather than silently dropping metadata at query time.All hand-written
Displayandstd::error::Errorimpls across the crate have been replaced withthiserrorderives. Thecompare-crossmapbinary now selects the highest-scoring chain when multiple chains overlap a single-position query (matching CrossMap's behavior) and logs timing information for both tools. MSRV has been bumped to 1.85.0.Before submitting this PR, please make sure:
cargo testandcargo clippy).CHANGELOG.md.