fix: locateVariants no longer silently drops intronic variants (#87)#98
Open
jmg421 wants to merge 1 commit into
Open
fix: locateVariants no longer silently drops intronic variants (#87)#98jmg421 wants to merge 1 commit into
jmg421 wants to merge 1 commit into
Conversation
Contributor
|
Thanks for this. Have you acknowledged which agentic systems were used for this PR? We are developing guidelines for this process. I think it would be good to have this information in the text of the PR commentary. |
Author
|
Thanks Vince. Yes — this PR was produced with the assistance of two agentic CLI tools:
In both cases I review the diffs, understand the reasoning behind each change, and verify correctness before submitting. Happy to include this disclosure in future PR descriptions as standard practice — let me know if you'd like a specific format. |
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.
Summary
Fixes #87 (and the earlier #76).
locateVariants()silently returned 0 hits for variants that overlap intronic regions when the TxDb contains transcripts with empty feature sets (e.g., single-exon non-coding RNAs with no intron records).Root Cause
All six internal cache-population sites in
methods-locateVariants.Rstored the rawGRangesListfromcdsBy(),intronsByTranscript(), etc. without filtering out empty list elements.mapToTranscripts()(viafindOverlaps(type="within")) behaves unexpectedly when the subject contains empty elements — variants that should match are silently dropped.Fix
Add
z[lengths(z) > 0L]filtering at every cache-fill site:cdsbytx(CodingVariants)intbytx(IntronVariants, SpliceSiteVariants)threeUTRbytx(ThreeUTRVariants)fiveUTRbytx(FiveUTRVariants)txbygene(IntergenicVariants)AllVariantsmethodTesting
test_locateVariants_emptyGRangesList_issue87that creates a syntheticGRangesListwith an empty element and verifies that variants in valid introns are still found.What was verified