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

            [[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]

        ^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
