       :bin-index    (update-bin-index bin-index aln)
       :linear-index (update-linear-index linear-index aln))))
 
-(defn- make-index!
+(defn- make-index*
   [refs alns]
   (loop [[aln & rest] alns
          ref-name (:rname aln)

                                                    (:largest-seen (:linear-index idx-status)))}
                     :no-coordinate-alns no-coordinate-alns))))

(defn- make-index
  [refs alns]
  (merge
   (zipmap (map :name refs)

            [cljam.util :refer [gen-vec]]
            [cljam.util.sam-util :as sam-util]
            [cljam.util.bgzf-util :as bgzf-util]
            [cljam.bam-index.common :refer :all]
            [cljam.bam-index.chunk :as chunk])
  (:import [java.io DataOutputStream FileOutputStream Closeable]))

(defn- find-ref
