Skip to content
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

Merged
merged 2 commits into from
Jun 26, 2023

Conversation

nokara26
Copy link
Contributor

@nokara26 nokara26 commented Jun 6, 2023

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.

@nokara26 nokara26 requested a review from federkasten June 6, 2023 06:12
@nokara26 nokara26 self-assigned this Jun 6, 2023
@codecov
Copy link

codecov bot commented Jun 6, 2023

Codecov Report

Merging #77 (767f941) into master (a155c38) will increase coverage by 0.05%.
The diff coverage is 20.00%.

@@            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     
Impacted Files Coverage Δ
src/varity/vcf_to_hgvs/protein.clj 28.45% <20.00%> (+0.39%) ⬆️

@@ -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)
Copy link
Contributor Author

@nokara26 nokara26 Jun 6, 2023

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.

apply-offset #(or (ffirst (alt-exon-ranges [[% %]] pos ref alt))
(some (fn [[_ e]] (when (<= e %) e)) (reverse alt-exon-ranges*)))]

Copy link
Member

@federkasten federkasten left a 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]])
Copy link
Member

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.

@federkasten federkasten merged commit 71dad6b into master Jun 26, 2023
32 checks passed
@federkasten federkasten deleted the feature/fix-exon-edge-confirmation branch June 26, 2023 14:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants