           (split-barcodes (sample-ifq-xref samp)
                           sqxform-fn
                           (bc-file-specs ibc)
+                          no-barcodes?
                           (barcode-maps ibc)
                           (red1codes sid)
                           qc-ctpt sqc%))))

           (fn[v] (#{"tnseq", "rnaseq", "termseq" "wgseq"} (first v)))
           recs)
        recs (if (seq x) x (cons ["rnaseq" "noexp" "noexp"] recs))
        exp-rec [(coll/takev 3 (first recs))]] ; ensure 3 fields
    (loop [S (rest recs)
           I [exp-rec]]
      (if (not (seq S))

                                   (conj V rec))
                                 V v)))
                      (fn[V fqrec]
                        (let [[id sq aux qc] (sqxform-fn fqrec)]

                          (if no-barcodes?
                            ;; typical in vivo no replicates branch
                            (if (pass-qcscore qc qc-ctpt sqc%)
                              (reduce (fn[V bc]
                                        (conj V [bc [id sq aux qc]]))
                                      V no-barcodes-bcs)
                              V)

                            ;; This is the usual branch (in vitro replicate)
                            (let [bc (get-sq-bc sq bclen
                                                barcodes-map
                                                other-barcodes)]
                              (if bc
                                (if (pass-qcscore qc qc-ctpt sqc%)
                                  (let [len (count sq)
                                        sq (str/substring sq bclen len)
                                        qc (str/substring qc bclen len)]
                                    (conj V [bc [id sq aux qc]]))
                                  V)
                                V)))))
                      recs)]
            (write-chunk-to-files ot-fd-map recs)
            (recur (bufiles/read-fqrecs inf rec-chunk-size)))))
