Skip to content
Permalink
Browse files
solved the first problem
  • Loading branch information
serialhex committed Apr 2, 2013
0 parents commit a2dda9e
Show file tree
Hide file tree
Showing 9 changed files with 85 additions and 0 deletions.
@@ -0,0 +1,10 @@
/target
/lib
/classes
/checkouts
pom.xml
*.jar
*.class
.lein-deps-sum
.lein-failures
.lein-plugins
@@ -0,0 +1,13 @@
# rosalind

A Clojure library designed to ... well, that part is up to you.

## Usage

FIXME

## License

Copyright © 2013 FIXME

Distributed under the Eclipse Public License, the same as Clojure.
@@ -0,0 +1 @@
ATATTCTAAGTTCCCGCACTATCTTCTAACCCGACTACGGGACCGGCATACGACCACACCCTCTCTTATACATGGCGGTTCTGACCATTGTTGATGCCTCTCTTGATACCGCAGAACGGAATCTAAGCCCGCGACAACTTATGTCGGCCCCAAGGGCATGGCCAGGCTTTTTATCAGTTACATTACATTGGAATAGGCATCTGCGGCGAGTCACTCTCGTGTCTACGGTCCGCTTCGACGAGGTTTGCCTTTGCCGGTCTCGGACGAATATCTATCGAGAATCATGCTGGACTTAACTCTATGAGTGGTCGTTAACACGCAACTTAAAACCAAAGACTAAAGGAATTGCCGTTGCATACTCGGAGATACTAACCACGACAAGATTTAGGATCGCTCCTGTCGGGTCATTACTGATTGGTTAGTGAGATTTCGACTCTTTGAGAAGAGCACTTTACTTAAGTCGCCGGTGACGTCATCACCTCAGCCATATAATAGGTACATTTTTCCGATCTCGGTGCTGGACGTCACACGCGGTTGTAGTGAGACGACGAGAATGGACTCAGTCAGAAGCTATTAACTGCTTGACACGCCCTCGACCTGGTGCCGAAAAAGTGAACTCTGTTTTGATTTTTATAAAGGGATCACGGTTTCAAAGATCCTGCTCTCTGCCTATGAACGTCATTCTTAATGCAGAGATTTACAGATGAGACGATGTAGCGGCGGCACCTAATACTGTATAGCATACCGGTGGCAGCAAATCTGTATGCGATGCCATCTGGGCCAGCTATATATCACGATGTTCTAGATAGGAGTTGCAACACGGACTCGACATCACTACGAATACAAAACCATATTATAGTCTAGCATTGAATGCTTGGAATTACTCCTAGAACTAGCCCGCACGGTATGTGGCAAAGG
@@ -0,0 +1,3 @@
# Introduction to rosalind

TODO: write [great documentation](http://jacobian.org/writing/great-documentation/what-to-write/)
@@ -0,0 +1,7 @@
(defproject rosalind "0.1.0"
:description "FIXME: write description"
:url "http://example.com/FIXME"
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
:dependencies [[org.clojure/clojure "1.4.0"]]
:main rosalind.core)
@@ -0,0 +1,24 @@
(ns rosalind.basics)

(defn dna-counter-fn
"This actually does the counting"
[dna cnt]
(loop [d dna
c cnt]
(let [l (first d)
r (rest d)]
(case l
\A (def h (assoc c :A (+ 1 (:A c))))
\G (def h (assoc c :G (+ 1 (:G c))))
\C (def h (assoc c :C (+ 1 (:C c))))
\T (def h (assoc c :T (+ 1 (:T c))))
nil)
(if (empty? r)
h
(recur r h)))))

(defn dna-count
"Counts DNA Neucleotides"
[dna]
(let [h (dna-counter-fn dna {:A 0 :C 0 :T 0 :G 0})]
[(:A h) (:C h) (:G h) (:T h)]))
@@ -0,0 +1,11 @@
(ns rosalind.core)

(defn foo
"I don't do a whole lot."
[x]
(println x "Hello, World!"))

(defn -main
"Main entry point"
[]
(foo "oh bother..."))
@@ -0,0 +1,9 @@
(ns rosalind.basics-test
(:use clojure.test
rosalind.basics))

(deftest a-test
(testing "DNA counting stuff"
(is (=
[20 12 17 21]
(dna-count "AGCTTTTCATTCTGACTGCAACGGGCAATATGTCTCTGTGTGGATTAAAAAAAGAGTGTCTGATAGCAGC")))))
@@ -0,0 +1,7 @@
(ns rosalind.core-test
(:use clojure.test
rosalind.core))

(deftest a-test
(testing "FIXME, I fail."
(is (= 0 0))))

0 comments on commit a2dda9e

Please sign in to comment.