Skip to content

Commit

Permalink
Merge pull request #66 from chrovis/feature/fix-protein-fs-change-pos…
Browse files Browse the repository at this point in the history
…ition
  • Loading branch information
federkasten authored Oct 31, 2022
2 parents ed13cba + 48a7fde commit e401a36
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 11 deletions.
20 changes: 9 additions & 11 deletions src/varity/vcf_to_hgvs/protein.clj
Original file line number Diff line number Diff line change
Expand Up @@ -278,16 +278,14 @@
alt-repeat)))

(defn- protein-frame-shift
[ppos pref palt seq-info]
(let [[ppos pref palt] (if (= pref palt)
(->> (map vector (:ref-prot-seq seq-info) (:alt-prot-seq seq-info))
(drop (dec ppos))
(map-indexed vector)
(drop-while (fn [[_ [r a]]] (= r a)))
first
((fn [[i [r a]]]
[(+ ppos i) (str r) (str a)])))
[ppos pref palt])
[ppos seq-info]
(let [[ppos pref palt] (->> (map vector (:ref-prot-seq seq-info) (:alt-prot-seq seq-info))
(drop (dec ppos))
(map-indexed vector)
(drop-while (fn [[_ [r a]]] (= r a)))
first
((fn [[i [r a]]]
[(+ ppos i) (str r) (str a)])))
[_ _ offset _] (diff-bases pref palt)
alt-prot-seq (format-alt-prot-seq seq-info)
ref (nth (:ref-prot-seq seq-info) (dec (+ ppos offset)))
Expand Down Expand Up @@ -338,7 +336,7 @@
:insertion (protein-insertion ppos pref palt seq-info)
:indel (protein-indel ppos pref palt)
:repeated-seqs (protein-repeated-seqs ppos pref palt seq-info)
:frame-shift (protein-frame-shift ppos pref palt seq-info)
:frame-shift (protein-frame-shift ppos seq-info)
:extension (protein-extension ppos pref palt seq-info)
:no-effect (mut/protein-no-effect)
:unknown (mut/protein-unknown-mutation))))))
Expand Down
1 change: 1 addition & 0 deletions test/varity/vcf_to_hgvs_test.clj
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,7 @@
"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
"chr17" 31261816 "CC" "C" '("p.N1542Tfs*11" "p.N1563Tfs*11") ; cf. rs1555619041 (+)

;; frame shift with initiation codon change (e.g. NM_007298:c.-19_80del from BRCA Share)
"chr17" 43124016 "CCAGATGGGACACTCTAAGATTTTCTGCATAGCATTAATGACATTTTGTACTTCTTCAACGCGAAGAGCAGATAAATCCATTTCTTTCTGTTCCAATGAA" "C"
Expand Down

0 comments on commit e401a36

Please sign in to comment.