Repository navigation
Pass exon annotations first when projecting transcript queries - #43
Merged
endrebak merged 1 commit intoOct 27, 2026
Merged
Conversation
Collaborator
|
Thanks for the pr :) @marco-mariotti You are the expert here :) |
Collaborator
|
This seems like a major bug that is easy to understand. I see why we did not catch it: We used the temporary pandas solution in pyranges1 still so this code was never called. |
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.
map_to_globaldocuments queries in the first table and exon annotations in the*2arrays, but passes them to an exon-first dispatcher in the opposite order. One query spanning two exons raises a length error. With equal row counts, the call can silently return wrong genomic coordinates: query[5, 10)against exon local[0, 10)/ genomic[100, 110)returns[95, 105)instead of[105, 110).Pass the annotation table first and retain the query dtype when restoring genomic coordinates. Clarify the existing sort requirement. The native kernel and other operations are unchanged.
Validation: all 51 tests pass on Python 3.12, 3.13 and 3.14; the 15 new cases fail before the correction. An independent per-base reference on public GTF/BED exon data checks query attribution and both strands, including equal and unequal table sizes. It reproduces 12 exceptions and 12 incorrect-coordinate configurations, while 12 complete identity controls remain exact. A clean ABI3 wheel repeats these results on 3.12/3.14, and 16 public PyRanges1 operation results per profile remain unchanged.