-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix overlapping condition of boundary of exon/intron #77
Conversation
Codecov Report
@@ Coverage Diff @@
## master #77 +/- ##
==========================================
+ Coverage 45.60% 45.66% +0.05%
==========================================
Files 16 16
Lines 2004 2006 +2
Branches 64 65 +1
==========================================
+ Hits 914 916 +2
+ Misses 1026 1025 -1
- Partials 64 65 +1
|
@@ -26,8 +26,10 @@ | |||
d (Math/abs (- nref nalt))] | |||
(when (and (not= 1 nref) (not= 1 nalt) | |||
(some (fn [[s e]] | |||
(or (<= pos s (+ pos nref -1)) | |||
(<= pos e (+ pos nref -1)))) exon-ranges)) | |||
(and (not= s e) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Usually s
and e
are different value.
But when calculate offset, s
and e
are same value and this sometimes causes Variants overlapping a boundary of exon/intron are unsupported error
.
So I added (not= s e)
condition.
varity/src/varity/vcf_to_hgvs/protein.clj
Lines 93 to 94 in a155c38
apply-offset #(or (ffirst (alt-exon-ranges [[% %]] pos ref alt)) | |
(some (fn [[_ e]] (when (<= e %) e)) (reverse alt-exon-ranges*)))] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. LGTM 🙆♂️ I'm sorry for the late reply.
@@ -17,7 +17,8 @@ | |||
6 "XX" "X" [[2 4] [7 10]] | |||
6 "XXX" "X" [[2 4] [7 9]] | |||
3 "XXX" "X" [[2 3] [6 9]] | |||
1 "XXXXX" "X" [[4 7]]) | |||
1 "XXXXX" "X" [[4 7]] | |||
9 "XXX" "XXX" [[2 4] [8 11]]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Including tests for cases where s
equals e
is recommended.
I found
Variants overlapping a boundary of exon/intron are unsupported error
when mutation occur at termination codon.Then I fix boundary of exon/intron overlapping condition.