 
 (s/def ::gbk? gbk?)
 (s/def ::gtf? gtf?)
+
 (s/def ::index? index?)
 (s/def ::bt1index? bt1index?)
+(s/def ::bowtie? (s/and ::index? ::bt1index?))
+(s/def ::starindex? starindex?)
+(s/def ::bowtie-or-star? (s/or :bowtie ::bowtie? :star ::starindex?))
 (s/def ::normgenes? normgenes?)
 
 (s/def ::ncid string?)


(defn gbk? [x] (contains? (get-exp-sheet-data (x :EID) :gbks) (x :ncid)))
(defn gtf? [x] (contains? (get-exp-sheet-data (x :EID) :gtfs) (x :ncid)))
(defn index? [x] (contains? (get-exp-sheet-data (x :EID) :indices) (x :ncid)))
(defn bt1index? [x]
  (contains? (get-exp-sheet-data (x :EID) :bt1indices) (x :ncid)))
(defn normgenes? [x]
  (or (not= (ac/get-exp-info (x :EID) :exp) :tnseq)
      (contains? (get-exp-sheet-data (x :EID) :norms) (x :ncid))))

  (contains? (get-exp-sheet-data (x :EID) :strains) (x :s)))

(defn nodup? [x] (= 0 (x :dupcnt)))

(defn cond-ok? [x]
  (let [c (x :c)]
    (and c (re-matches #"[A-Za-z0-9]+" (x :c)))))

(defn repid-ok? [x]
  (let [r (x :r)]
    (and r (re-matches #"[A-Z]|[a-z]|[0-9]" (x :r)))))

(defn len3? [x] (and (= (count (dissoc x :EID :v :dupcnt)) 3)
                     (x :s) (x :c) (x :r)))

(s/def ::len3? len3?)
(s/def ::strain? strain?)
