Failed to convert long deletion including stop codon chr17:80090386 CAGCACGTGCATGAACAACACAGGACACACACAGCACGTGCATGAACAACACAGGACACACACA>C
federkasten opened this issue · 1 comments
federkasten commented
I encountered a failure while converting with vcf-to-hgvs
for the variant below:
{:chr "chr17", :pos 80090386, :ref "CAGCACGTGCATGAACAACACAGGACACACACAGCACGTGCATGAACAACACAGGACACACACA", :alt "C"}
The current method for handling deletion/insertion, which includes the stop codon introduced in #81, is probably insufficient.
Repro 🐛
(require '[varity.vcf-to-hgvs :as v2h]
'[varity.ref-gene :as rg]
'[cljam.io.sequence :as io-seq])
(def rgidx (rg/index (rg/load-ref-genes "/data/chrovis/resources/ncbiRefSeq/ncbiRefSeq_hg38_20210909.txt.gz")))
(with-open [seq-rdr (io-seq/reader "/data/chrovis/resources/genome/hg38.fa")] (doall (v2h/vcf-variant->protein-hgvs {:chr "chr17", :pos 80090386, :ref "CAGCACGTGCATGAACAACACAGGACACACACAGCACGTGCATGAACAACACAGGACACACACA", :alt "C"} seq-rdr rgidx)))
;; Execution error (AssertionError) at clj-hgvs.mutation/protein-indel (mutation.cljc:1828).
;; => Assert failed: (intl/valid? :clj-hgvs.mutation/protein-indel %)
;;
;; #error {
;; :cause "Assert failed: (intl/valid? :clj-hgvs.mutation/protein-indel %)"
;; :via
;; [{:type java.lang.AssertionError
;; :message "Assert failed: (intl/valid? :clj-hgvs.mutation/protein-indel %)"
;; :at [clj_hgvs.mutation$protein_indel invokeStatic "mutation.cljc" 1828]}]
;; :trace
;; [[clj_hgvs.mutation$protein_indel invokeStatic "mutation.cljc" 1828]
;; [clj_hgvs.mutation$protein_indel invoke "mutation.cljc" 1828]
;; [varity.vcf_to_hgvs.protein$protein_indel invokeStatic "protein.clj" 419]
;; [varity.vcf_to_hgvs.protein$protein_indel invoke "protein.clj" 401]
;; [varity.vcf_to_hgvs.protein$mutation invokeStatic "protein.clj" 508]
;; [varity.vcf_to_hgvs.protein$mutation invoke "protein.clj" 495]
;; [varity.vcf_to_hgvs.protein$__GT_hgvs invokeStatic "protein.clj" 520]
;; [varity.vcf_to_hgvs.protein$__GT_hgvs invoke "protein.clj" 516]
;; [varity.vcf_to_hgvs$eval19717$fn__19720$fn__19726 invoke "vcf_to_hgvs.clj" 194]
;; [clojure.core$keep$fn__8649 invoke "core.clj" 7405]
;; [clojure.lang.LazySeq sval "LazySeq.java" 42]
;; [clojure.lang.LazySeq seq "LazySeq.java" 51]
;; [clojure.lang.RT seq "RT.java" 535]
;; [clojure.lang.RT nthFrom "RT.java" 982]
;; [clojure.lang.RT nth "RT.java" 940]
;; [clojure.core$distinct$step__6481$fn__6482$fn__6484 invoke "core.clj" 5073]
;; [clojure.core$distinct$step__6481$fn__6482 invoke "core.clj" 5073]
;; [clojure.lang.LazySeq sval "LazySeq.java" 42]
;; [clojure.lang.LazySeq seq "LazySeq.java" 51]
;; [clojure.lang.RT seq "RT.java" 535]
;; [clojure.core$seq__5467 invokeStatic "core.clj" 139]
;; [clojure.core$dorun invokeStatic "core.clj" 3134]
;; [clojure.core$doall invokeStatic "core.clj" 3149]
;; [clojure.core$doall invoke "core.clj" 3149]
;; [user$eval19802 invokeStatic "form-init2137462480306236238.clj" 1]
;; [user$eval19802 invoke "form-init2137462480306236238.clj" 1]
;; [clojure.lang.Compiler eval "Compiler.java" 7194]
;; [clojure.lang.Compiler eval "Compiler.java" 7149]
;; [clojure.core$eval invokeStatic "core.clj" 3215]
;; [clojure.core$eval invoke "core.clj" 3211]
;; [nrepl.middleware.interruptible_eval$evaluate$fn__1251$fn__1252 invoke "interruptible_eval.clj" 87]
;; [clojure.lang.AFn applyToHelper "AFn.java" 152]
;; [clojure.lang.AFn applyTo "AFn.java" 144]
;; [clojure.core$apply invokeStatic "core.clj" 667]
;; [clojure.core$with_bindings_STAR_ invokeStatic "core.clj" 1990]
;; [clojure.core$with_bindings_STAR_ doInvoke "core.clj" 1990]
;; [clojure.lang.RestFn invoke "RestFn.java" 425]
;; [nrepl.middleware.interruptible_eval$evaluate$fn__1251 invoke "interruptible_eval.clj" 87]
;; [clojure.main$repl$read_eval_print__9206$fn__9209 invoke "main.clj" 437]
;; [clojure.main$repl$read_eval_print__9206 invoke "main.clj" 437]
;; [clojure.main$repl$fn__9215 invoke "main.clj" 458]
;; [clojure.main$repl invokeStatic "main.clj" 458]
;; [clojure.main$repl doInvoke "main.clj" 368]
;; [clojure.lang.RestFn invoke "RestFn.java" 1523]
;; [nrepl.middleware.interruptible_eval$evaluate invokeStatic "interruptible_eval.clj" 84]
;; [nrepl.middleware.interruptible_eval$evaluate invoke "interruptible_eval.clj" 56]
;; [nrepl.middleware.interruptible_eval$interruptible_eval$fn__1284$fn__1288 invoke "interruptible_eval.clj" 152]
;; [clojure.lang.AFn run "AFn.java" 22]
;; [nrepl.middleware.session$session_exec$main_loop__1354$fn__1358 invoke "session.clj" 218]
;; [nrepl.middleware.session$session_exec$main_loop__1354 invoke "session.clj" 217]
;; [clojure.lang.AFn run "AFn.java" 22]
;; [java.lang.Thread run "Thread.java" 840]]}
;;
federkasten commented
@nokara26 Can you try to fix this issue? 🙏