apply version 2.7 copyright
[jalview.git] / src / jalview / schemes / ResidueProperties.java
index 48a9272..c46c07d 100755 (executable)
@@ -1,20 +1,19 @@
 /*
- * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1)
- * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
  * 
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * This file is part of Jalview.
  * 
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
+ * Jalview is free software: you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License 
+ * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
  * 
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
+ * Jalview is distributed in the hope that it will be useful, but 
+ * WITHOUT ANY WARRANTY; without even the implied warranty 
+ * of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ * 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/>.
  */
 package jalview.schemes;
 
@@ -93,7 +92,7 @@ public class ResidueProperties
     aaIndex['z'] = 21;
     aaIndex['x'] = 22;
     aaIndex['u'] = 22; // TODO: selenocystine triplet and codons needed. also
-                        // extend subt. matrices
+    // extend subt. matrices
   }
 
   static
@@ -281,12 +280,12 @@ public class ResidueProperties
       new Color(235, 65, 60), // G
       new Color(60, 136, 238), // T
       new Color(60, 136, 238), // U
-  Color.white, // I
-  Color.white, // X
-  Color.white, // R
-  Color.white, // Y
-  Color.white, // N
-  Color.white, // Gap
+      Color.white, // I
+      Color.white, // X
+      Color.white, // R
+      Color.white, // Y
+      Color.white, // N
+      Color.white, // Gap
   };
 
   // Zappo
@@ -496,7 +495,7 @@ public class ResidueProperties
           -8, -8, -8, -8, -8, -8, 1 }, };
 
   public static final Hashtable ssHash = new Hashtable(); // stores the number
-                                                          // value of the aa
+  // value of the aa
 
   static
   {
@@ -510,27 +509,24 @@ public class ResidueProperties
     ssHash.put("I", Color.pink);
     ssHash.put("B", Color.yellow);
   }
-/*      new Color(60, 136, 238), // U
-  Color.white, // I
-  Color.white, // X
-  Color.white, // R
-  Color.white, // Y
-  Color.white, // N
-  Color.white, // Gap
-*/
+
+  /*
+   * new Color(60, 136, 238), // U Color.white, // I Color.white, // X
+   * Color.white, // R Color.white, // Y Color.white, // N Color.white, // Gap
+   */
   static final int[][] DNA =
   {
-  { 10, -8, -8, -8, 1, 0  ,0  ,0  ,0  ,0 ,1 }, // C
-  { -8, 10, -8, -8, 1, 0  ,0  ,0  ,0  ,0 ,1 }, // T
-  { -8, -8, 10, -8, 1, 0  ,0  ,0  ,0  ,0 ,1 }, // A
-  { -8, -8, -8, 10, 1, 0  ,0  ,0  ,0  ,0 ,1 }, // G
-  { 1,   1,  1, 1, 10,0  ,0  ,0  ,0  ,0 ,1 }, // -
-  { 1,   1,  1, 1, 1 ,10 ,0  ,0  ,0  ,0 ,1 }, // -
-  { 1,   1,  1, 1, 1 ,0  ,10 ,0  ,0  ,0 ,1 }, // -
-  { 1,   1,  1, 1, 1 ,0  ,0  ,10 ,0  ,0 ,1 }, // -
-  { 1,   1,  1, 1, 1 ,0  ,0  ,0  ,10 ,0 ,1 }, // -
-  { 1,   1,  1, 1, 1 ,0  ,0  ,0  ,0 ,10 ,1 }, // -
-  { 1,   1,  1, 1, 1 ,1  ,1  ,1  ,1  ,1 ,1 }, // -
+  { 10, -8, -8, -8, 1, 0, 0, 0, 0, 0, 1 }, // C
+      { -8, 10, -8, -8, 1, 0, 0, 0, 0, 0, 1 }, // T
+      { -8, -8, 10, -8, 1, 0, 0, 0, 0, 0, 1 }, // A
+      { -8, -8, -8, 10, 1, 0, 0, 0, 0, 0, 1 }, // G
+      { 1, 1, 1, 1, 10, 0, 0, 0, 0, 0, 1 }, // -
+      { 1, 1, 1, 1, 1, 10, 0, 0, 0, 0, 1 }, // -
+      { 1, 1, 1, 1, 1, 0, 10, 0, 0, 0, 1 }, // -
+      { 1, 1, 1, 1, 1, 0, 0, 10, 0, 0, 1 }, // -
+      { 1, 1, 1, 1, 1, 0, 0, 0, 10, 0, 1 }, // -
+      { 1, 1, 1, 1, 1, 0, 0, 0, 0, 10, 1 }, // -
+      { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }, // -
   };
   /**
    * register matrices in list
@@ -544,7 +540,7 @@ public class ResidueProperties
 
   public static final Color[] pidColours =
   { midBlue, new Color(153, 153, 255),
-  // Color.lightGray,
+      // Color.lightGray,
       new Color(204, 204, 255), };
 
   public static final float[] pidThresholds =
@@ -964,7 +960,9 @@ public class ResidueProperties
     charged.put("E", new Integer(1));
     charged.put("Q", new Integer(0));
     charged.put("D", new Integer(1));
-    charged.put("N", new Integer(0)); // Asparagine is polar but not charged. Alternative would be charged and negative (in basic form)?
+    charged.put("N", new Integer(0)); // Asparagine is polar but not charged.
+                                      // Alternative would be charged and
+                                      // negative (in basic form)?
     charged.put("S", new Integer(0));
     charged.put("T", new Integer(0));
     charged.put("P", new Integer(0));
@@ -1159,9 +1157,9 @@ public class ResidueProperties
 
   public static String codonTranslate(String lccodon)
   {
-    String codon=lccodon.toUpperCase();
+    String codon = lccodon.toUpperCase();
     // all base ambiguity codes yield an 'X' amino acid residue
-    if (codon.indexOf('X')>-1 || codon.indexOf('N')>-1)
+    if (codon.indexOf('X') > -1 || codon.indexOf('N') > -1)
     {
       return "X";
     }