Skip to content

Commit

Permalink
Ensure passed in sample names get treated as strings when parsed from…
Browse files Browse the repository at this point in the history
… YAML as integers #25
  • Loading branch information
chapmanb committed Jan 15, 2015
1 parent 58dfd75 commit 70d0a07
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/bcbio/variation/config.clj
Original file line number Diff line number Diff line change
Expand Up @@ -161,12 +161,15 @@
(string? val) (make-absolute val)
:else val)
val))
(sample? [path k]
(or (= k :sample) (= (last path) :sample)))
(update-tree [config path]
(cond (map? config)
(reduce (fn [item [k v]]
(assoc item k (cond
(map? v) (update-tree v (conj path k))
(seq? v) (map #(update-tree % (conj path k)) v)
(sample? path k) (str v)
:else (maybe-process v (conj path k)))))
config
(vec config))
Expand Down

0 comments on commit 70d0a07

Please sign in to comment.