                        from-hex-digit (nth s (inc (* % 2)))))
         (range (count s)))))
 
-(defn ra-line-seq
-  [rdr]
-  (when-let [line (.readLine rdr)]
-    (cons line (lazy-seq (ra-line-seq rdr)))))
+;;;
 
 (defn reg->bin
   "Calculates bin given an alignment covering [beg,end) (zero-based, half-close-half-open),

(ns cljam.util
  (:require [clojure.string :refer [join]])
  (:import net.sf.samtools.util.StringUtil))

(defn ubyte
  "Casts to byte avoiding an error about out of range for byte."
  [n]
  {:pre [(<= 0 n 255)]}
  (byte (if (< n 0x80) n (- n 0x100))))

(defn string->bytes [s]
  (let [buf (byte-array (count s))]


(defn normalize-bases [bases]
  (map-indexed (fn [idx _]
                 (aset bases idx (upper-case (nth bases idx)))
                 (if (= (nth bases idx) \.)
                   (aset bases idx \N)))
               bases)
