JAL-1432 updated copyright notices
[jalview.git] / src / jalview / schemes / ResidueProperties.java
index a5c4e84..9acfc24 100755 (executable)
@@ -1,6 +1,6 @@
 /*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8)
- * Copyright (C) 2012 J Procter, AM Waterhouse, LM Lui, J Engelhardt, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.0b1)
+ * Copyright (C) 2014 The Jalview Authors
  * 
  * This file is part of Jalview.
  * 
@@ -14,6 +14,7 @@
  * PURPOSE.  See the GNU General Public License for more details.
  * 
  * You should have received a copy of the GNU General Public License along with Jalview.  If not, see <http://www.gnu.org/licenses/>.
+ * The Jalview Authors are detailed in the 'AUTHORS' file.
  */
 package jalview.schemes;
 
@@ -813,13 +814,13 @@ public class ResidueProperties
     codonHash2.put("AAC", "N");
     codonHash2.put("AAT", "N");
 
-    codonHash2.put("CAA", "E");
-    codonHash2.put("CAG", "E");
+    codonHash2.put("CAA", "Q");
+    codonHash2.put("CAG", "Q");
     codonHash2.put("CAC", "H");
     codonHash2.put("CAT", "H");
 
-    codonHash2.put("GAA", "Q");
-    codonHash2.put("GAG", "Q");
+    codonHash2.put("GAA", "E");
+    codonHash2.put("GAG", "E");
     codonHash2.put("GAC", "D");
     codonHash2.put("GAT", "D");
 
@@ -827,9 +828,9 @@ public class ResidueProperties
     codonHash2.put("TAT", "Y");
 
     codonHash2.put("ACA", "T");
-    codonHash2.put("AAG", "T");
     codonHash2.put("ACC", "T");
     codonHash2.put("ACT", "T");
+    codonHash2.put("ACG", "T");
 
     codonHash2.put("CCA", "P");
     codonHash2.put("CCG", "P");
@@ -1485,6 +1486,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)