Sha256: ec3db819c4220aa63f19ecd95ff653ede9cf28955b18d5a9501811b7267914c7

Contents?: true

Size: 468 Bytes

Versions: 121

Compression:

Stored size: 468 Bytes

Contents

(ns protein-translation)

(defn translate-codon [codon]
  (case codon
    "AUG" "Methionine"
    ("UUU" "UUC") "Phenylalanine"
    ("UUA" "UUG") "Leucine"
    ("UCU" "UCC" "UCA" "UCG") "Serine"
    ("UAU" "UAC") "Tyrosine"
    ("UGU" "UGC") "Cysteine"
    "UGG" "Tryptophan"
    ("UAA" "UAG" "UGA") "STOP"))

(defn translate-rna [rna]
  (->> rna
       (partition 3)
       (map (partial apply str))
       (map translate-codon)
       (take-while #(not= "STOP" %))))

Version data entries

121 entries across 121 versions & 1 rubygems

Version Path
trackler-2.2.1.180 tracks/clojure/exercises/protein-translation/src/example.clj
trackler-2.2.1.179 tracks/clojure/exercises/protein-translation/src/example.clj
trackler-2.2.1.178 tracks/clojure/exercises/protein-translation/src/example.clj
trackler-2.2.1.177 tracks/clojure/exercises/protein-translation/src/example.clj
trackler-2.2.1.176 tracks/clojure/exercises/protein-translation/src/example.clj
trackler-2.2.1.175 tracks/clojure/exercises/protein-translation/src/example.clj
trackler-2.2.1.174 tracks/clojure/exercises/protein-translation/src/example.clj
trackler-2.2.1.173 tracks/clojure/exercises/protein-translation/src/example.clj
trackler-2.2.1.172 tracks/clojure/exercises/protein-translation/src/example.clj
trackler-2.2.1.171 tracks/clojure/exercises/protein-translation/src/example.clj
trackler-2.2.1.170 tracks/clojure/exercises/protein-translation/src/example.clj
trackler-2.2.1.169 tracks/clojure/exercises/protein-translation/src/example.clj
trackler-2.2.1.167 tracks/clojure/exercises/protein-translation/src/example.clj
trackler-2.2.1.166 tracks/clojure/exercises/protein-translation/src/example.clj
trackler-2.2.1.165 tracks/clojure/exercises/protein-translation/src/example.clj
trackler-2.2.1.164 tracks/clojure/exercises/protein-translation/src/example.clj
trackler-2.2.1.163 tracks/clojure/exercises/protein-translation/src/example.clj
trackler-2.2.1.162 tracks/clojure/exercises/protein-translation/src/example.clj
trackler-2.2.1.161 tracks/clojure/exercises/protein-translation/src/example.clj
trackler-2.2.1.160 tracks/clojure/exercises/protein-translation/src/example.clj