diff --git a/exercises/protein-translation/canonical-data.json b/exercises/protein-translation/canonical-data.json new file mode 100644 index 0000000000..0555c98488 --- /dev/null +++ b/exercises/protein-translation/canonical-data.json @@ -0,0 +1,153 @@ +{ + "exercise": "protein-translation", + "version": "1.0.0", + "cases": [ + { + "description": "Translate input RNA sequences into proteins", + "comments": [ + "Returns the name of the protein if given RNA is valid, " + , "else throws an error. " + ], + "cases": [ + { + "description": "Methionine RNA sequence", + "property": "proteins", + "strand": "AUG", + "expected": ["Methionine"] + }, + { + "description": "Phenylalanine RNA sequence 1", + "property": "proteins", + "strand": "UUU", + "expected": ["Phenylalanine"] + }, + { + "description": "Phenylalanine RNA sequence 2", + "property": "proteins", + "strand": "UUC", + "expected": ["Phenylalanine"] + }, + { + "description": "Leucine RNA sequence 1", + "property": "proteins", + "strand": "UUA", + "expected": ["Leucine"] + }, + { + "description": "Leucine RNA sequence 2", + "property": "proteins", + "strand": "UUG", + "expected": ["Leucine"] + }, + { + "description": "Serine RNA sequence 1", + "property": "proteins", + "strand": "UCU", + "expected": ["Serine"] + }, + { + "description": "Serine RNA sequence 2", + "property": "proteins", + "strand": "UCC", + "expected": ["Serine"] + }, + { + "description": "Serine RNA sequence 3", + "property": "proteins", + "strand": "UCA", + "expected": ["Serine"] + }, + { + "description": "Serine RNA sequence 4", + "property": "proteins", + "strand": "UCG", + "expected": ["Serine"] + }, + { + "description": "Tyrosine RNA sequence 1", + "property": "proteins", + "strand": "UAU", + "expected": ["Tyrosine"] + }, + { + "description": "Tyrosine RNA sequence 2", + "property": "proteins", + "strand": "UAC", + "expected": ["Tyrosine"] + }, + { + "description": "Cysteine RNA sequence 1", + "property": "proteins", + "strand": "UGU", + "expected": ["Cysteine"] + }, + { + "description": "Cysteine RNA sequence 2", + "property": "proteins", + "strand": "UGC", + "expected": ["Cysteine"] + }, + { + "description": "Tryptophan RNA sequence", + "property": "proteins", + "strand": "UGG", + "expected": ["Tryptophan"] + }, + { + "description": "STOP codon RNA sequence 1", + "property": "proteins", + "strand": "UAA", + "expected": [] + }, + { + "description": "STOP codon RNA sequence 2", + "property": "proteins", + "strand": "UAG", + "expected": [] + }, + { + "description": "STOP codon RNA sequence 3", + "property": "proteins", + "strand": "UGA", + "expected": [] + }, + { + "description": "Translate RNA strand into correct protein list", + "property": "proteins", + "strand": "AUGUUUUGG", + "expected": ["Methionine","Phenylalanine","Tryptophan"] + }, + { + "description": "Translation stops if STOP codon at beginning of sequence", + "property": "proteins", + "strand": "UAGUGG", + "expected": [] + }, + { + "description": "Translation stops if STOP codon at end of two-codon sequence", + "property": "proteins", + "strand": "UGGUAG", + "expected": ["Tryptophan"] + }, + { + "description": "Translation stops if STOP codon at end of three-codon sequence", + "property": "proteins", + "strand": "AUGUUUUAA", + "expected": ["Methionine","Phenylalanine"] + }, + { + "description": "Translation stops if STOP codon in middle of sequence of three-codon sequence", + "property": "proteins", + "strand": "UGGUAGUGG", + "expected": ["Tryptophan"] + }, + { + "description": "Translation stops if codon in middle of sequence of six-codon sequence", + "property": "proteins", + "strand": "UGGUGUUAUUAAUGGUUU", + "expected": ["Tryptophan","Cysteine","Tyrosine"] + } + ] + } + ] +} \ No newline at end of file