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 around ter codon variant #116

Merged
merged 2 commits into from
Jan 28, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions src/varity/vcf_to_hgvs/protein.clj
Original file line number Diff line number Diff line change
Expand Up @@ -590,7 +590,7 @@
(mut/protein-unknown-mutation)

:else
(let [[_ ins offset _] (diff-bases (or pref "") (or palt ""))
(let [[_ ins _ _] (diff-bases (or pref "") (or palt ""))
ini-site ((comp str first) ref-prot-seq)
first-diff-aa-info (if (= ppos 1)
{:ppos 1
Expand All @@ -612,7 +612,7 @@
(if (and (= ppos 1) (= alt-aa "Ter"))
(mut/protein-unknown-mutation)
(mut/protein-extension (if (= ppos 1) (mut/->long-amino-acid ini-site) "Ter")
(coord/protein-coordinate (if (= ppos 1) 1 (+ ppos offset)))
(coord/protein-coordinate (if (= ppos 1) 1 (:ppos first-diff-aa-info)))
alt-aa
(if (= ppos 1) :upstream :downstream)
(if new-aa-pos
Expand Down Expand Up @@ -650,6 +650,9 @@
(every? empty? [del ins])
(mut/protein-no-effect)

(= 1 (count del) (count ins))
(protein-substitution ppos* pref* palt* seq-info)

(empty? del)
(protein-insertion ppos* pref* palt* seq-info)

Expand Down
2 changes: 2 additions & 0 deletions test/varity/vcf_to_hgvs_test.clj
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,7 @@
"chr17" 31159027 "TGC" "T" '("p.A75*") ; not actual example (+, nonsense in del case)
"chr2" 47478341 "TG" "T" '("p.L762*" "p.L696*") ;; rs786204050 (+) frameshift with termination
"chr17" 7676202 "T" "TGTCCCTTAGTCTT" '("p.P58*" "p.P19*") ; cf. not actual example (-, frameshift with termination)
"chr13" 24421115 "TGACTTAGCC" "T" '("p.G1724K") ; not actual example (-, del includes termination codon)

;; deletion
"chr1" 240092288 "AGTC" "A" '("p.S61del") ; cf. rs772088733 (+)
Expand Down Expand Up @@ -282,6 +283,7 @@
"chr10" 87965468 "TC" "T" '("p.*404Eext*11" "p.*577Eext*11" "p.*207Eext*11") ; not actual example (+)
"chrX" 15823239 "ATAA" "A" '("p.*483Text*?") ; not actual example (+)
"chr13" 24421118 "CTTA" "C" '("p.*1725Vext*2") ; not actual example (-)
"chrX" 15823235 "CCAAA" "C" '("p.*483Lext*?") ; not actual example (+)
;; NOTE: There are very few correct examples...

;; Extension without termination site
Expand Down
Loading