-
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 frameshift conversion failure #59
Conversation
Codecov Report
@@ Coverage Diff @@
## master #59 +/- ##
==========================================
- Coverage 45.65% 45.63% -0.03%
==========================================
Files 16 16
Lines 1969 1970 +1
Branches 60 60
==========================================
Hits 899 899
- Misses 1010 1011 +1
Partials 60 60
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
(= palt (subs pref 0 (count palt)))) | ||
(= (last palt-only) \*)) | ||
:fs-ter-substitution | ||
:frame-shift) |
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.
The fs-ter-subsitution
detection added by #15 is insufficient because varity.vcf-to-hgvs.common/diff-bases
considers right-side commons as well as left-side commons. In this case,
(require '[varity.vcf-to-hgvs.common :refer [diff-bases]])
(diff-bases "SGI" "I")
;;=> ["SG" "" 0 1] ; [pref-only palt-only offset _]
So (empty? palt-only)
cannot detect frameshift in the changed proteins and wrongly detect it as fs-ter-substitution
. A direct comparison between pref
and palt
is needed.
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.
Does that mean :fs-ter-substitution
had been correct for (diff-bases "SGI" "S")
but not for (diff-bases "SGI" "I")
?
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.
Yes. If the ref proteins ...SGIXXXX...
change into the alt proteins ...S*YYYY...
, that is substitution of G
and *
, not frameshift.
In #58 case, the ref proteins ...SGIXXXX...
change into the alt proteins ...I*YYYY...
. That is frameshift caused by the change of SGI
to I
. The previous implementation using diff-bases
result wrongly detect it as substitution because the alt protein I
correspondes to the right-side of the ref proteins SGI
.
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. That makes sense!
@@ -205,6 +205,8 @@ | |||
"chr1" 69567 "A" "AT" '("p.L160Sfs*7") | |||
"chr1" 963222 "GCG" "G" '("p.A386Gfs*12") | |||
"chr2" 47478341 "T" "TGG" '("p.L762Gfs*2" "p.L696Gfs*2") | |||
"chr5" 112839837 "AGTGGCAT" "A" '("p.S1397Ifs*2" | |||
"p.S1415Ifs*2") ; https://github.com/chrovis/varity/issues/58 |
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.
A conversion case of #58 on hg38 assembly.
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 your quick investigation and fix.
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 for the fix and explanation. LGTM
fixes #58
I confirmed
lein test :all
passed.