Sha256: 3c80655e10a342e87c15cc000647003f630393430fee4558cb8dcdd3f36ad336
Contents?: true
Size: 720 Bytes
Versions: 79
Compression:
Stored size: 720 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 proteins (rna: string) = rna |> Seq.chunkBySize 3 |> Seq.map (String >> codonToProtein) |> Seq.takeWhile (fun str -> str <> "STOP") |> Seq.toList
Version data entries
79 entries across 79 versions & 1 rubygems