-
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 reference protein seq in fs-ter-substitution #40
Conversation
Codecov Report
@@ Coverage Diff @@
## master #40 +/- ##
==========================================
- Coverage 39.06% 38.94% -0.12%
==========================================
Files 15 15
Lines 1687 1692 +5
Branches 33 33
==========================================
Hits 659 659
- Misses 995 1000 +5
Partials 33 33
Continue to review full report at Codecov.
|
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.
Thank you. Your fix seems to work fine. I have left the only comment at the nonsense code.
src/varity/vcf_to_hgvs/protein.clj
Outdated
palt-len (count palt) | ||
palt-ter-len (inc palt-len)] | ||
(if (<= pref-len palt-ter-len) | ||
(str pref (subs ref-prot-rest 0 (max 0 (inc (- palt-len pref-len))))) |
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.
(max 0 ...)
is nonsense because (inc (- palt-len pref-len))
is at least 0 under (<= pref-len palt-ter-len)
.
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.
Oh, exactly, I'm kind of too focused on to keep the original code. I'll fix it!
Thank you for the review! I fixed the code you pointed to. Could you review that again? |
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.
LGTM
Thanks for the merge! 🙏 |
This PR fixes the assert error that is occured if returning
:ref
contains stop symbol, '*', at the end.VCV000965170.1 is a one of example case to cause this.
You can reproduce this problem like below steps:
So I fixed this issue by trimming
:ref
, that is returned caller, with returning:alt
's length. In the above case, "KK" for:ref
, "K*" for:alt
.Now,
vcf-variant-hgvs
should returns following HGVS instances:I confirmed
lein test :all
passed.