Repository navigation
Sort and clip transcript projections in the core - #15
Merged
Merged
Conversation
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.
Transcript projection can extrapolate outside an exon: query
[-5,5)against local exon[0,10)/ genomic[100,110)returns[95,105). It also silently assumes both input tables are sorted, which prevents callers from safely passing their original row order.Clip both query boundaries to each exon and omit empty intersections. Sort numeric query/exon row permutations in the core only when needed, keeping already-sorted inputs on the allocation-free permutation path. Both projection APIs retain original query and annotation indices;
sort_output=truerestores their original row order. This gives the NumPy and Polaranges callers one implementation of sorting and clipping. Exon local spans remain required to be non-overlapping within each transcript.Bump the crate, lockfile, and changelog to
0.1.16. The dependent NumPy PR #45 and PyRanges1 PR #211 require this version before enabling the Rust mapping path.Validation:
cargo test --offline).rustfmt --check src/map_to_global.rsandgit diff --checkpass. Repository-wide formatting still reports an existingsrc/ranks.rsdifference; strict Clippy still fails on existing crate-wide diagnostics. Normalcargo clippy --all-targetssucceeds with those warnings.No repository unit tests were added or modified in this core PR; the additional development checks were kept outside the repository.