Repository navigation
fix: detect intronic RNA (r.) variants in is_intronic - #642
Conversation
is_intronic only recognized coding (c.) introns because it gated on the interval being a BaseOffsetInterval. RNA (r.) coordinates parse to a plain Interval whose endpoints are still BaseOffsetPosition objects, so intronic r. variants were reported as non-intronic and slipped past the 'Intronic HGVS variants are not supported' guard. Inspect the interval endpoints instead of the interval type; g./p. coordinates lack base-offset positions and remain non-intronic. Closes ga4gh#628
|
Thanks @knQzx ! I was wondering if we should include the entire tests that @theferrit32 included in addition to the ones you added? @theferrit32 did you want to review this? |
|
Good call - added theferrit32's four ClinVar r. examples from #628 as exonic (non-intronic) regression pins. They parse offline so the fixture stays network-free, all 11 cases pass locally. |
|
Confirming this on hgvs 1.5.7, with one data point that I think strengthens the case for merging. The missed guard is not only a missing That is the Allele for exonic base 100, returned without any warning. So on current |
|
I'm okay with merging this as-is to I think there is additional follow-up needed to handle a few more edge cases but that can be a separate piece of work from this. |
Forward-merge main into vrs/2.1 so it is no longer behind. Net change to vrs/2.1 is ga4gh#642 (is_intronic r. fix); the other main commits since the merge base (ga4gh#635, ga4gh#639, ga4gh#645, ga4gh#648) were already ported as parallel PRs. Conflict resolution: - src/ga4gh/core/models.py: conflict between ga4gh#645 (main) and vrs/2.1's restructured models (ga4gh#644 + gkm-core updates). Took vrs/2.1's version, which already includes the int Extension.value fix. - src/ga4gh/core/__init__.py: auto-merged without conflict but incorrectly, duplicating main's __version__ block (undefined `version`) and CORE_VERSION = "1.0.0" from ga4gh#648. Took vrs/2.1's version (CORE_VERSION from ga4gh.core.version, 1.3.0).
is_introniconly recognized introns on coding (c.) coordinates because it gated on the interval being aBaseOffsetInterval. RNA (r.) coordinates parse to a plainIntervalwhose endpoints are stillBaseOffsetPosition, so intronic r. variants slipped past the "Intronic HGVS variants are not supported" guardinspect the interval endpoints instead of the interval type. g./p. coordinates have no base-offset positions and stay non-intronic
closes #628