Skip to content

Instantly share code, notes, and snippets.

@danielcompton danielcompton/dna.clj Secret
Created May 15, 2014

Embed
What would you like to do?
(defn dna-frequencies [coll]
(->> (frequencies coll)
sort
(map second)
(clojure.string/join " ")))
(def test-str "AGCTTTTCATTCTGACTGCAACGGGCAATATGTCTCTGTGTGGATTAAAAAAAGAGTGTCTGATAGCAGC")
; (dna-frequencies test-str)
; => "20 12 17 21"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.