Skip to content

Commit

Permalink
fix: fix changed amino acid in extension
Browse files Browse the repository at this point in the history
  • Loading branch information
nokara26 committed Dec 22, 2023
1 parent 367a363 commit 146ed99
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/varity/vcf_to_hgvs/protein.clj
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,9 @@
ter-site (some-> (string/index-of rest-seq (if (= ppos 1) "M" "*")) inc)]
(mut/protein-extension (if (= ppos 1) "Met" "Ter")
(coord/protein-coordinate (if (= ppos 1) 1 (+ ppos offset)))
(mut/->long-amino-acid (last ins))
(mut/->long-amino-acid (if (= ppos 1)
(last ins)
(or (last ins) (first rest-seq))))
(if (= ppos 1) :upstream :downstream)
(if ter-site
(coord/protein-coordinate ter-site)
Expand Down
2 changes: 1 addition & 1 deletion test/varity/vcf_to_hgvs_test.clj
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@
;; NOTE: There are very few correct examples...

;; Extension without termination site
"chr17" 81537077 "CT" "C" '("p.*517ext*?" "p.*493ext*?") ; not actual example (+)
"chr17" 81537077 "CT" "C" '("p.*517Eext*?" "p.*493Eext*?") ; not actual example (+)
"chr17" 9771487 "GT" "G" '("p.*312Yext*?" "p.*313Yext*?") ; not actual example (-)

;; no effect
Expand Down

0 comments on commit 146ed99

Please sign in to comment.