Skip to content

Commit

Permalink
protein-translation: Add canonical data. (#997)
Browse files Browse the repository at this point in the history
* Add protein translation canonical data as per #577.

* Update properties to reflect different return types.

* Update to test only one property, and fix formatting.

* Update test description for clarity.

* Reduced length of test descriptions.

* Update tests including 'STOP' codons for consistency.

* Update 'STOP' test description

* Update 'STOP' codon tests to expect an empty list.

* Rename 'property', add a larger range of STOP codon tests, rearrange existing stop codon tests, remove testing for invalid data.
  • Loading branch information
sjwarner-bp authored and ErikSchierboom committed Nov 10, 2017
1 parent 6fb7833 commit 5c2b2b5
Showing 1 changed file with 153 additions and 0 deletions.
153 changes: 153 additions & 0 deletions exercises/protein-translation/canonical-data.json
Original file line number Diff line number Diff line change
@@ -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"]
}
]
}
]
}

0 comments on commit 5c2b2b5

Please sign in to comment.