File tree Expand file tree Collapse file tree 2 files changed +11
-4
lines changed
Expand file tree Collapse file tree 2 files changed +11
-4
lines changed Original file line number Diff line number Diff line change 503503 :else :frame-shift )
504504 (or (and (zero? nprefo) (zero? npalto))
505505 (and (= nprefo 1 ) (= npalto 1 ))) :substitution
506+ (and ref-include-ter-site (pos? (count pref)) (= (first palt) \*)) :ter-substitution
506507 (and prefer-deletion? (pos? nprefo) (zero? npalto)) :deletion
507508 (and prefer-insertion? (zero? nprefo) (pos? npalto)) (if first-diff-aa-is-ter-site
508509 :extension
519520 :extension
520521 :insertion )
521522 :else (throw (ex-info " Unsupported variant" {:type ::unsupported-variant })))]
522- {:type (if (= t :fs-ter-substitution ) :substitution t)
523+ {:type (if (#{ :fs-ter-substitution :ter-substitution } t ) :substitution t)
523524 :pos base-ppos
524- :ref (if (= t :fs-ter-substitution )
525+ :ref (cond
526+ (= t :fs-ter-substitution )
525527 (let [pref-len (count pref)
526528 palt-len (count palt)
527529 palt-ter-len (inc palt-len)]
528530 (if (<= pref-len palt-ter-len)
529531 (str pref (subs ref-prot-rest 0 (inc (- palt-len pref-len))))
530532 (subs pref 0 palt-ter-len)))
531- pref)
532- :alt (if (= t :fs-ter-substitution )
533+
534+ (= t :ter-substitution )
535+ (first (string/split pref #"\* " ))
536+
537+ :else pref)
538+ :alt (if (#{:fs-ter-substitution :ter-substitution } t)
533539 (str palt \*)
534540 palt)})))
535541
Original file line number Diff line number Diff line change 221221 " chr2" 47478341 " TG" " T" '(" p.L762*" " p.L696*" ) ; ; rs786204050 (+) frameshift with termination
222222 " chr17" 7676202 " T" " TGTCCCTTAGTCTT" '(" p.P58*" " p.P19*" ) ; cf. not actual example (-, frameshift with termination)
223223 " chr13" 24421115 " TGACTTAGCC" " T" '(" p.G1724K" ) ; not actual example (-, del includes termination codon)
224+ " chrX" 15823233 " ATCCAAATAAAC" " A" '(" p.S481*" ) ; not actual example (+, del includes termination codon)
224225
225226 ; ; deletion
226227 " chr1" 240092288 " AGTC" " A" '(" p.S61del" ) ; cf. rs772088733 (+)
You can’t perform that action at this time.
0 commit comments