Sha256: 6cd7bc1555c1e54f01872e783e3085f3cb60a09d3bb70ef55b0065c5203eab49
Contents?: true
Size: 725 Bytes
Versions: 317
Compression:
Stored size: 725 Bytes
Contents
module ProteinTranslation open System let codonToProtein = function | "AUG" -> "Methionine" | "UUC" -> "Phenylalanine" | "UUU" -> "Phenylalanine" | "UUA" -> "Leucine" | "UUG" -> "Leucine" | "UCU" -> "Serine" | "UCC" -> "Serine" | "UCA" -> "Serine" | "UCG" -> "Serine" | "UAU" -> "Tyrosine" | "UAC" -> "Tyrosine" | "UGU" -> "Cysteine" | "UGC" -> "Cysteine" | "UGG" -> "Tryptophan" | "UAA" -> "STOP" | "UAG" -> "STOP" | "UGA" -> "STOP" | _ -> failwith "Invalid codon" let translate (input: string) = input |> Seq.chunkBySize 3 |> Seq.map (String >> codonToProtein) |> Seq.takeWhile (fun str -> str <> "STOP") |> Seq.toList
Version data entries
317 entries across 317 versions & 1 rubygems