             [(int (* 0.8 q1)) 0]
             [0 (int (* 0.8 q2))]))))))
 
-(defn- correct-pair-transducer
-  [correct-fn]
-  (fn [rf]
-    (let [quals1 (volatile! (transient []))
-          quals2 (volatile! (transient []))]
-      (fn
-        ([] (rf))
-        ([acc]
-         (-> acc
-             (rf (persistent! @quals1))
-             (rf (persistent! @quals2))))
-        ([acc pos]
-         (let [[q1 q2] (correct-fn pos)]
-           (vswap! quals1 conj! q1)
-           (vswap! quals2 conj! q2)
-           acc))))))
-
 (defn- correct-pair-quals
   "Correct quals of a pair. Returns a map with corrected quals."
   [^SAMAlignment a1 ^SAMAlignment a2]

  [^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)

    (when (and (pos? (.pnext a1))
               (<= correct-start (.end a1)))
      (let [[quals1 quals2] (into []
                                  (two-vec-transducer
                                   (correct-pair-qual a1 a2))
                                  (range correct-start (inc correct-end)))
            new-quals1 (merge-corrected-quals a1
