   (let [fqzmap (get-all-replicate-fqzs eid)
         rnm-bits (str/split #"-" repname)
         fqzs (fqzmap (cljstr/join "-" (coll/takev 2 rnm-bits)))]
+    (assert (seq fqzs)
+            (format "%s : There are no fastq files for %s" eid repname))
     (if (< (count rnm-bits) 3)
       fqzs
       (->> fqzs

  (fn[exptype & args] exptype))

(defn run-phase-1
  [eid recipient get-toolinfo template & {:keys [repk]}]
  (let [exp (get-exp-info eid :exp)
        phase1-job-template template
        bt (if (-> template (get-in [:nodes :ph1 :name])

                       (mapcat #((get-exp-info eid :replicate-names) %)
                               (get-exp-info eid :sample-names))
                       sample-names)]
    (swap! status-atom assoc :DONE [])
    (loop [tuples (partition-all 2 sample-names)
           abort? false]
      (if (or (empty? tuples) abort?)
        abort?
        (let [tuple (first tuples)
              futs-vecs
              (mapv
               (fn[snm]
                 (let [job (assoc-in phase1-job-template [:nodes :ph1 :args]
                                     (get-phase-1-args
                                      exp eid snm :repk repk
                                      :bowtie bt :star star))
                       cfg (-> job
                               (pg/config-pgm-graph-nodes get-toolinfo nil nil)
                               pg/config-pgm-graph)]
                   #_(clojure.pprint/pprint cfg)
                   (->> cfg pg/make-flow-graph pg/run-flow-program)))
               tuple)]
          (recur (rest tuples)
                 (coll/reducem
                  (fn[replicate futs]
                    (let [abort? (job-flow-node-results futs status-atom)
                          flow-results (@status-atom :done)]
                      (swap! status-atom
                             #(assoc % :DONE
                                     (conj (% :DONE) [replicate flow-results])))
                      abort?))
                  (fn ([] false) ([x y] #_(println x y) (or x y)))
                  :|| tuple futs-vecs)))))
    (pg/send-msg
     [recipient]
     (str "Aerobio job status: " exp " phase-1  " eid)
     (str "Finished " (if repk "replicates" "merged") " for " eid ))))

#_(let [a (atom [])]
  [(coll/reducem
    (fn [x y]
      (swap! a conj [x y])
      (if (= 0 x) true false))
    (fn ([] false) ([x y] (println x y) (or x y)))
    :|| (range 5) [:one :two :three :four :five])
   @a])

;;;(ns-unmap 'aerobio.htseq.common 'get-comparison-files)
(defmulti
