                                           (:chromEnd position)))])
         [:insert-field {:id field-id :dataset_id dataset-id :name (:field column)}]))
 
-(defmethod load-field "genes" [dataset-id field-id {:keys [field rows]} _]
+(defmethod load-field "genes" [dataset-id field-id {:keys [field rows]}]
   (conj (mapcat (fn [[genes row]]
                   (for [gene genes]
                     [:insert-gene {:field_id field-id :row row :gene gene}]))

(defn- fields-in-exp [exp]
  (subselect field (fields :id) (where {:dataset_id exp})))

(defn- scores-with-fields [fs]
  (subselect field_score (fields :scores_id) (where {:field_id [in fs]})))

(defn- clear-by-exp [exp]
  (let [f (fields-in-exp exp)]
    (delete scores (where {:id [in (scores-with-fields f)]}))
    (delete field_score (where {:field_id [in f]}))
    (delete field (where {:id [in f]}))))


   UNIQUE(`dataset_id`, `name`),
   FOREIGN KEY (`dataset_id`) REFERENCES `dataset` (`id`))"])

(def field-score-table
  [(format  "CREATE TABLE IF NOT EXISTS `field_score` (
            `field_id` INT,
            `i` INT,
            `scores` VARBINARY(%d) NOT NULL,
            UNIQUE (`field_id`, `i`),
            FOREIGN KEY (`field_id`) REFERENCES `field` (`id`))" score-size)])

(def cohorts-table
  ["CREATE TABLE IF NOT EXISTS `cohorts` (
