File tree 2 files changed +11
-4
lines changed
2 files changed +11
-4
lines changed Original file line number Diff line number Diff line change 503
503
:else :frame-shift )
504
504
(or (and (zero? nprefo) (zero? npalto))
505
505
(and (= nprefo 1 ) (= npalto 1 ))) :substitution
506
+ (and ref-include-ter-site (pos? (count pref)) (= (first palt) \*)) :ter-substitution
506
507
(and prefer-deletion? (pos? nprefo) (zero? npalto)) :deletion
507
508
(and prefer-insertion? (zero? nprefo) (pos? npalto)) (if first-diff-aa-is-ter-site
508
509
:extension
519
520
:extension
520
521
:insertion )
521
522
: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)
523
524
:pos base-ppos
524
- :ref (if (= t :fs-ter-substitution )
525
+ :ref (cond
526
+ (= t :fs-ter-substitution )
525
527
(let [pref-len (count pref)
526
528
palt-len (count palt)
527
529
palt-ter-len (inc palt-len)]
528
530
(if (<= pref-len palt-ter-len)
529
531
(str pref (subs ref-prot-rest 0 (inc (- palt-len pref-len))))
530
532
(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)
533
539
(str palt \*)
534
540
palt)})))
535
541
Original file line number Diff line number Diff line change 221
221
" chr2" 47478341 " TG" " T" '(" p.L762*" " p.L696*" ) ; ; rs786204050 (+) frameshift with termination
222
222
" chr17" 7676202 " T" " TGTCCCTTAGTCTT" '(" p.P58*" " p.P19*" ) ; cf. not actual example (-, frameshift with termination)
223
223
" 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)
224
225
225
226
; ; deletion
226
227
" chr1" 240092288 " AGTC" " A" '(" p.S61del" ) ; cf. rs772088733 (+)
You can’t perform that action at this time.
0 commit comments