                    [io :as io]
                    [bam :as bam]
                    [bam-indexer :as bai]
+                   [normal :as normal]
                    [sorter :as sorter]
                    [fasta :as fa]
                    [fasta-indexer :as fai]

              (io/write-alignments wtr alns hdr)))))))
  nil)

;;; sort command

(def ^:private sort-cli-options

                                          :options  [["-h" "--help" "Show help" :default false :flag true]]
                                          :commands [["view"    "Extract/print all or sub alignments in SAM or BAM format."]
                                                     ["convert" "Convert SAM to BAM or BAM to SAM."]
                                                     ["normalize" "Normalize references of alignments"]
                                                     ["sort"    "Sort alignments by leftmost coordinates."]
                                                     ["index"   "Index sorted alignment for fast random access."]
                                                     ["pileup"  "Generate pileup for the BAM file."]
