       (cond->
         (:genomes m) (conj (str "Genomes=" (:genomes m)))
         (:mixture m) (conj (str "Mixture=" (:mixture m))))
-      (conj (str "Description=\"" (:description m) "\""))
+      (conj (str "Description=\"" (escape-special-chars (:description m)) "\""))
       (pack-meta-info m [:id :genomes :mixture :description])))
 
 (defn- stringify-meta-info-pedigree

(defn- stringify-meta-info-alt
  [m]
  (-> [(str "ID=" (:id m))
       (str "Description=\"" (:description m) "\"")]
      (pack-meta-info m [:id :description])))

(defn- stringify-meta-info-sample

    (cstr/upper-case (name k))
    (->camelCaseString k)))

(defn- escape-special-chars [s]
  (-> s (cstr/replace "\\" "\\\\") (cstr/replace "\"" "\\\"")))

(defn- add-extra-fields
  [fields m required-keys]
  (reduce-kv (fn [fields k v]
               (conj fields
                     (str (->PascalCaseString k) "=\""
                          (escape-special-chars v) "\"")))
             fields
             (apply dissoc m required-keys)))

