Skip to content

Instantly share code, notes, and snippets.

@danielcompton
Created May 15, 2014 06:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save danielcompton/1c741fcac42424433943 to your computer and use it in GitHub Desktop.
Save danielcompton/1c741fcac42424433943 to your computer and use it in GitHub Desktop.
(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