Skip to content

Commit

Permalink
fix: add unknown repeat repairer
Browse files Browse the repository at this point in the history
  • Loading branch information
nokara26 committed Oct 15, 2024
1 parent e11455b commit ba65e40
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/clj_hgvs/repairer.cljc
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,20 @@
(string/replace s #"del\d+ins" "delins")
s))

;; g.1134_1135ins(100) -> g.1134_1135insN[100]
;; r.431_432ins(5) -> r.431_432insn[5]
;; p.R78_G79ins23 -> p.R78_G79insX[23]
(defn ^:no-doc replace-unknown-repeated-seq
[s kind]
(case kind
(:genome :mitochondria :coding-dna :non-coding-dna :circular-dna)
(string/replace s #"ins\((\d+)\)$" "insN[$1]")
(:rna)
(string/replace s #"ins\((\d+)\)$" "insn[$1]")
(:protein)
(string/replace s #"ins(\d+)$" "insX[$1]")
s))

;; c.112GAT(14) -> c.112GAT[14]
(defn ^:no-doc replace-repeated-seqs-parens1
[s kind]
Expand Down Expand Up @@ -318,6 +332,7 @@
remove-alternative
remove-inv-bases
remove-del-count-from-delins
replace-unknown-repeated-seq
replace-repeated-seqs-parens1
replace-repeated-seqs-parens2
remove-genomic-bases-from-protein
Expand Down

0 comments on commit ba65e40

Please sign in to comment.