   "Alpha - subject to change.
   Generator of a FASTA sequence dictionary file."
   (:require [clojure.java.io :refer [file writer]]
-            [clojure.string :as str]
             [cljam.common :refer [version]]
             [cljam.fasta :as fasta]
             [cljam.util :refer [string->bytes]])

  file (.fasta/fa)."
  [fasta out-dict]
  (let [ur (.toString (.toURI (file fasta)))]
   (with-open [r ^RandomAccessFile (fasta/reader fasta)
               w ^BufferedWriter (writer out-dict)]
     (write-header w)
     (doseq [sq (fasta/read r)]

        (str (subs "00000000000000000000000000000000" 0 (- 32 (count s))) s)
        s))))

(def ^:private upper-case-offset
  (- (byte \A) (byte \a)))

(defn- upper-case [b]
  (if (or (< b (byte \a)) (> b (byte \z)))
    b
    (byte (+ b upper-case-offset))))

(defn- make-hash [seq]
  (let [bases ^bytes (string->bytes seq)]
    (loop [i 0]
      (when (< i (count bases))
        (aset bases i ^byte (upper-case (nth bases i)))
        (recur (inc i))))
    (md5-hash bases)))

