             [[c xs] q]
             [[c (subs seqs (first xs) (last xs))] q]))))))
 
-(defn- index-transducer
-  [convert-fn]
-  (fn [rf]
-    (let [seqs-at-ref (volatile! (transient []))
-          quals-at-ref (volatile! (transient []))]
-      (fn
-        ([] (rf))
-        ([acc]
-         (-> acc
-             (rf (persistent! @seqs-at-ref))
-             (rf (persistent! @quals-at-ref))))
-        ([acc idx]
-         (let [[s q] (convert-fn idx)]
-           (vswap! seqs-at-ref conj! s)
-           (vswap! quals-at-ref conj! q)
-           acc))))))
-
 (defn index-cigar
   "Align bases and base quality scores with the reference coordinate."
   [^SAMAlignment aln]

  [^long start ^long end alns]
  (seq-step start end 0 alns))

(defn- index-to-seq-qual
  [^String seqs ^String quals]
  (let [empty-qual? (and (= (.length quals) 1)

        ^String seqs (:seq aln)
        ^String quals (.qual aln)
        [seqs-at-ref quals-at-ref] (into []
                                         (two-vec-transducer
                                          (index-to-seq-qual seqs quals))
                                         idx)]
    (assoc aln
