JAL-1027 use alternative codon table in ResidueProperties.codonHash2 for translation
authorJim Procter <jprocter@compbio.dundee.ac.uk>
Mon, 17 Jun 2013 16:41:40 +0000 (17:41 +0100)
committerJim Procter <jprocter@compbio.dundee.ac.uk>
Mon, 17 Jun 2013 16:44:50 +0000 (17:44 +0100)
src/jalview/schemes/ResidueProperties.java

index a5c4e84..62e46be 100755 (executable)
@@ -1485,6 +1485,19 @@ public class ResidueProperties
 
   public static String codonTranslate(String lccodon)
   {
+    if (false)
+    {
+      return _codonTranslate(lccodon);
+    }
+    String cdn = codonHash2.get(lccodon.toUpperCase());
+    if (cdn!=null && cdn.equals("*"))
+    {
+      return "STOP";
+    }
+    return cdn;
+  }
+  public static String _codonTranslate(String lccodon)
+  {
     String codon = lccodon.toUpperCase();
     // all base ambiguity codes yield an 'X' amino acid residue
     if (codon.indexOf('X') > -1 || codon.indexOf('N') > -1)