                    [\d \D]    (:d  compressed-bases-high)
                    [\b \B]    (:b  compressed-bases-high)}))
 
-(definline char->compressed-base-high
+(defn char->compressed-base-high
   "Convert from a char to BAM nybble representation of a base in high-order nybble."
   [base]
-  `(let [base# ~base]
-     (or
-       (_char->compressed-base-high base#)
-       (throw (IllegalArgumentException. (str "Bad type: " base#))))))
+  (or
+   (_char->compressed-base-high base)
+   (throw (IllegalArgumentException. (str "Bad type: " base)))))
 
 (def ^:private _compressed-base->char-low
   {(:eq compressed-bases-low) \=


;;; fastq and phred

(definline fastq-char->phred-byte [ch]
  `(let [ch# (int ~ch)]
     (assert (<= 33 ch# 126))
     (byte (- ch# 33))))

(defn fastq->phred [^String fastq]
  (let [length (count fastq)

                   [\d \D]    (:d  compressed-bases-low)
                   [\b \B]    (:b  compressed-bases-low)}))

(defn char->compressed-base-low
  "Convert from a char to BAM nybble representation of a base in low-order nybble."
  [base]
  (or
   (_char->compressed-base-low base)
   (throw (IllegalArgumentException. (str "Bad type: " base)))))

(def ^:private _char->compressed-base-high
  (unfold-ksv-map {[\=]       (:eq compressed-bases-high)
