             sorted-fields (map #(update-in % [:rows] resort order) (consume-vec fields))]
         sorted-fields)
       (consume-vec fields))))
+;
+; mutationVector
+;
+
+(def ^:private mutation-column-types
+  {:sampleID :category
+   :chrom :category
+   :ref :category
+   :chromStart :float
+   :chromEnd :float
+   :position :position
+   :genes :gene
+   :reference :category
+   :alt :category
+   :effect :category
+   :dna-vaf :float
+   :rna-vaf :float
+   :amino-acid :category})
+
+(def mutation-columns
+  {#"(?i)sample[ _]*(name|id)?" :sampleID
+   #"(?i)chr(om)?" :chrom
+   #"(?i)start" :chromStart
+   #"(?i)end" :chromEnd
+   #"(?i)genes?" :genes
+   #"(?i)alt(ernate)?" :alt
+   #"(?i)ref(erence)?" :ref
+   #"(?i)effect" :effect
+   #"(?i)dna[-_ ]*v?af" :dna-vaf
+   #"(?i)rna[-_ ]*v?af" :rna-vaf
+   #"(?i)amino[-_ ]*acid[-_ ]*(change)?" :amino-acid})
+
+(def ^:private mutation-default-columns
+  [:sampleID :chrom :chromStart :chromEnd :genes :ref :alt :effect :dna-vaf :rna-vaf :amino-acid])
 
 (defn mutation-file
   "Return a map describing a cgData mutation file. This will read

                                 (mapv (fn [t i parse] [t (parse (get % i ""))])
                                       tlist ilist plist))
                           (tsv-rows in))))})))

(def ^:private mutation-column-types
  {:sampleID :category
   :chrom :category
   :ref :category
   :chromStart :float
   :chromEnd :float
   :position :position
   :genes :gene
   :reference :category
   :alt :category
   :effect :category
   :dna-vaf :float
   :rna-vaf :float
   :amino-acid :category})

(def mutation-columns
  {#"(?i)sample[ _]*(name|id)?" :sampleID
   #"(?i)chr(om)?" :chrom
   #"(?i)start" :chromStart
   #"(?i)end" :chromEnd
   #"(?i)genes?" :genes
   #"(?i)alt(ernate)?" :alt
   #"(?i)ref(erence)?" :ref
   #"(?i)effect" :effect
   #"(?i)dna[-_ ]*v?af" :dna-vaf
   #"(?i)rna[-_ ]*v?af" :rna-vaf
   #"(?i)amino[-_ ]*acid[-_ ]*(change)?" :amino-acid})

(def ^:private mutation-default-columns
  [:sampleID :chrom :chromStart :chromEnd :genes :ref :alt :effect :dna-vaf :rna-vaf :amino-acid])

(defn columns-from-header [header patterns]
  (when header

     :features feature   ; slurped clinicalFeatures
     :data-fn (fn [in] (matrix-data metadata feature (line-seq ((:reader in)))))}))

(defn- chr-order [position]
  (mapv position [:chrom :chromStart]))

;
; general tsv reader
;

(defn tsv-rows [in]
  (map tabbed (filter #(and (not-blank? %)
