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 |
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