-
-
Save danielcompton/1c741fcac42424433943 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(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