JAL-1685 further tests features/JAL-845splitPaneMergeDevelop
authorgmungoc <g.m.carstairs@dundee.ac.uk>
Wed, 11 Mar 2015 11:20:57 +0000 (11:20 +0000)
committergmungoc <g.m.carstairs@dundee.ac.uk>
Wed, 11 Mar 2015 11:20:57 +0000 (11:20 +0000)
test/jalview/schemes/ResiduePropertiesTest.java

index d72d1e1..fc85b02 100644 (file)
@@ -90,6 +90,7 @@ public class ResiduePropertiesTest
   {
     // Y is C or T
     assertEquals("C", ResidueProperties.codonTranslate("TGY"));
+    // Phenylalanine first base variation
     assertEquals("L", ResidueProperties.codonTranslate("YTA"));
 
     // W is A or T
@@ -101,11 +102,14 @@ public class ResiduePropertiesTest
     assertNull(ResidueProperties.codonTranslate("ATS"));
 
     // K is T or G
-    assertEquals("S", ResidueProperties.codonTranslate("TCS"));
+    assertEquals("S", ResidueProperties.codonTranslate("TCK"));
     assertNull(ResidueProperties.codonTranslate("ATK"));
 
     // M is C or A
     assertEquals("T", ResidueProperties.codonTranslate("ACM"));
+    // Arginine first base variation
+    assertEquals("R", ResidueProperties.codonTranslate("MGA"));
+    assertEquals("R", ResidueProperties.codonTranslate("MGG"));
     assertNull(ResidueProperties.codonTranslate("TAM"));
 
     // D is A, G or T
@@ -126,10 +130,25 @@ public class ResiduePropertiesTest
     assertNull(ResidueProperties.codonTranslate("TAB"));
 
     // R is A or G
+    assertEquals("L", ResidueProperties.codonTranslate("CTR"));
+    assertEquals("V", ResidueProperties.codonTranslate("GTR"));
+    assertEquals("S", ResidueProperties.codonTranslate("TCR"));
+    assertEquals("P", ResidueProperties.codonTranslate("CCR"));
+    assertEquals("T", ResidueProperties.codonTranslate("ACR"));
+    assertEquals("A", ResidueProperties.codonTranslate("GCR"));
+    assertEquals("R", ResidueProperties.codonTranslate("CGR"));
+    assertEquals("G", ResidueProperties.codonTranslate("GGR"));
+    assertNull(ResidueProperties.codonTranslate("ATR"));
+
+    // the following fail JAL-1685
     assertEquals("R", ResidueProperties.codonTranslate("AGR"));
+    assertEquals("E", ResidueProperties.codonTranslate("GAR"));
+    assertEquals("K", ResidueProperties.codonTranslate("AAR"));
+    assertEquals("L", ResidueProperties.codonTranslate("TTR"));
+    assertEquals("Q", ResidueProperties.codonTranslate("CAR"));
     assertEquals("STOP", ResidueProperties.codonTranslate("TAR"));
     assertEquals("STOP", ResidueProperties.codonTranslate("TRA"));
-    assertNull(ResidueProperties.codonTranslate("ATR"));
-
+    // Arginine first and third base ambiguity
+    assertEquals("R", ResidueProperties.codonTranslate("MGR"));
   }
 }