JAL-2418 source formatting
[jalview.git] / src / jalview / schemes / ResidueProperties.java
index 77fa9e8..55df1d1 100755 (executable)
@@ -363,8 +363,11 @@ public class ResidueProperties
   };
 
   // Added for PurinePyrimidineColourScheme
-  public static final Color[] purinepyrimidine = {
-      new Color(255, 131, 250), // A, G, R purines purplish/orchid
+  public static final Color[] purinepyrimidine = { new Color(255, 131, 250), // A,
+                                                                             // G,
+                                                                             // R
+                                                                             // purines
+                                                                             // purplish/orchid
       new Color(64, 224, 208), // C,U, T, Y pyrimidines turquoise
       Color.white, // all other nucleotides
       Color.white // Gap
@@ -379,7 +382,7 @@ public class ResidueProperties
       Color.green, // Q
       Color.red, // E
       Color.magenta, // G
-      midBlue,// Color.red, // H
+      midBlue, // Color.red, // H
       Color.pink, // I
       Color.pink, // L
       midBlue, // K
@@ -426,9 +429,9 @@ public class ResidueProperties
       0.0 // X
   };
 
-  public static final double[] helix = { 1.42, 0.98, 0.67, 1.01, 0.70,
-      1.11, 1.51, 0.57, 1.00, 1.08, 1.21, 1.16, 1.45, 1.13, 0.57, 0.77,
-      0.83, 1.08, 0.69, 1.06, 0.84, 1.31, 1.00, 0.0 };
+  public static final double[] helix = { 1.42, 0.98, 0.67, 1.01, 0.70, 1.11,
+      1.51, 0.57, 1.00, 1.08, 1.21, 1.16, 1.45, 1.13, 0.57, 0.77, 0.83,
+      1.08, 0.69, 1.06, 0.84, 1.31, 1.00, 0.0 };
 
   public static final double helixmin = 0.57;
 
@@ -450,9 +453,9 @@ public class ResidueProperties
 
   public static final double turnmax = 1.56;
 
-  public static final double[] buried = { 1.7, 0.1, 0.4, 0.4, 4.6, 0.3,
-      0.3, 1.8, 0.8, 3.1, 2.4, 0.05, 1.9, 2.2, 0.6, 0.8, 0.7, 1.6, 0.5,
-      2.9, 0.4, 0.3, 1.358, 0.00 };
+  public static final double[] buried = { 1.7, 0.1, 0.4, 0.4, 4.6, 0.3, 0.3,
+      1.8, 0.8, 3.1, 2.4, 0.05, 1.9, 2.2, 0.6, 0.8, 0.7, 1.6, 0.5, 2.9, 0.4,
+      0.3, 1.358, 0.00 };
 
   public static final double buriedmin = 0.05;
 
@@ -471,55 +474,6 @@ public class ResidueProperties
 
   // public static final double hydmax = 1.38;
   // public static final double hydmin = -2.53;
-  public static final float[][] BLOSUM62 = {
-      { 4, -1, -2, -2, 0, -1, -1, 0, -2, -1, -1, -1, -1, -2, -1, 1, 0, -3,
-          -2, 0, -2, -1, 0, -4 },
-      { -1, 5, 0, -2, -3, 1, 0, -2, 0, -3, -2, 2, -1, -3, -2, -1, -1, -3,
-          -2, -3, -1, 0, -1, -4 },
-      { -2, 0, 6, 1, -3, 0, 0, 0, 1, -3, -3, 0, -2, -3, -2, 1, 0, -4, -2,
-          -3, 3, 0, -1, -4 },
-      { -2, -2, 1, 6, -3, 0, 2, -1, -1, -3, -4, -1, -3, -3, -1, 0, -1, -4,
-          -3, -3, 4, 1, -1, -4 },
-      { 0, 3, -3, -3, 9, -3, -4, -3, -3, -1, -1, -3, -1, -2, -3, -1, -1,
-          -2, -2, -1, -3, -3, -2, -4 },
-      { -1, 1, 0, 0, -3, 5, 2, -2, 0, -3, -2, 1, 0, -3, -1, 0, -1, -2, -1,
-          -2, 0, 3, -1, -4 },
-      { -1, 0, 0, 2, -4, 2, 5, -2, 0, -3, -3, 1, -2, -3, -1, 0, -1, -3, -2,
-          -2, 1, 4, -1, -4 },
-      { 0, -2, 0, -1, -3, -2, -2, 6, -2, -4, -4, -2, -3, -3, -2, 0, -2, -2,
-          -3, -3, -1, -2, -1, -4 },
-      { -2, 0, 1, -1, -3, 0, 0, -2, 8, -3, -3, -1, -2, -1, -2, -1, -2, -2,
-          2, -3, 0, 0, -1, -4 },
-      { -1, -3, -3, -3, -1, -3, -3, -4, -3, 4, 2, -3, 1, 0, -3, -2, -1, -3,
-          -1, 3, -3, -3, -1, -4 },
-      { -1, -2, -3, -4, -1, -2, -3, -4, -3, 2, 4, -2, 2, 0, -3, -2, -1, -2,
-          -1, 1, -4, -3, -1, -4 },
-      { -1, 2, 0, -1, -3, 1, 1, -2, -1, -3, -2, 5, -1, -3, -1, 0, -1, -3,
-          -2, -2, 0, 1, -1, -4 },
-      { -1, -1, -2, -3, -1, 0, -2, -3, -2, 1, 2, -1, 5, 0, -2, -1, -1, -1,
-          -1, 1, -3, -1, -1, -4 },
-      { -2, -3, -3, -3, -2, -3, -3, -3, -1, 0, 0, -3, 0, 6, -4, -2, -2, 1,
-          3, -1, -3, -3, -1, -4 },
-      { -1, -2, -2, -1, -3, -1, -1, -2, -2, -3, -3, -1, -2, -4, 7, -1, -1,
-          -4, -3, -2, -2, -1, -2, -4 },
-      { 1, -1, 1, 0, -1, 0, 0, 0, -1, -2, -2, 0, -1, -2, -1, 4, 1, -3, -2,
-          -2, 0, 0, 0, -4 },
-      { 0, -1, 0, -1, -1, -1, -1, -2, -2, -1, -1, -1, -1, -2, -1, 1, 5, -2,
-          -2, 0, -1, -1, 0, -4 },
-      { -3, -3, -4, -4, -2, -2, -3, -2, -2, -3, -2, -3, -1, 1, -4, -3, -2,
-          11, 2, -3, -4, -3, -2, -4 },
-      { -2, -2, -2, -3, -2, -1, -2, -3, 2, -1, -1, -2, -1, 3, -3, -2, -2,
-          2, 7, -1, -3, -2, -1, -4 },
-      { 0, -3, -3, -3, -1, -2, -2, -3, -3, 3, 1, -2, 1, -1, -2, -2, 0, -3,
-          -1, 4, -3, -2, -1, -4 },
-      { -2, -1, 3, 4, -3, 0, 1, -1, 0, -3, -4, 0, -3, -3, -2, 0, -1, -4,
-          -3, -3, 4, 1, -1, -4 },
-      { -1, 0, 0, 1, -3, 3, 4, -2, 0, -3, -3, 1, -1, -3, -1, 0, -1, -3, -2,
-          -2, 1, 4, -1, -4 },
-      { 0, -1, -1, -1, -2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -2, 0, 0,
-          -2, -1, -1, -1, -1, -1, -4 },
-      { -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4,
-          -4, -4, -4, -4, -4, -4, 1 }, };
 
   // not currently used
   // public static final Map<String, Color> ssHash = new Hashtable<String,
@@ -692,16 +646,16 @@ public class ResidueProperties
         }
         else
         {
-          System.err
-                  .println("Inconsistency in the IUBMB ambiguity code nomenclature table: collision for "
+          System.err.println(
+                  "Inconsistency in the IUBMB ambiguity code nomenclature table: collision for "
                           + acode.getKey() + " in residue " + r);
         }
       }
     }
     // and programmatically add in the ambiguity codes that yield the same amino
     // acid
-    String[] unambcodons = codonHash2.keySet().toArray(
-            new String[codonHash2.size()]);
+    String[] unambcodons = codonHash2.keySet()
+            .toArray(new String[codonHash2.size()]);
     for (String codon : unambcodons)
     {
       String residue = codonHash2.get(codon);
@@ -720,7 +674,8 @@ public class ResidueProperties
         }
       }
       // enumerate all combinations and test for veracity of translation
-      int tpos[] = new int[codon.length()], cpos[] = new int[codon.length()];
+      int tpos[] = new int[codon.length()],
+              cpos[] = new int[codon.length()];
       for (int i = 0; i < tpos.length; i++)
       {
         tpos[i] = -1;
@@ -973,7 +928,7 @@ public class ResidueProperties
     charged.put("Q", ZERO);
     charged.put("D", ONE);
     charged.put("N", ZERO); // Asparagine is polar but not
-                                          // charged.
+                            // charged.
     // Alternative would be charged and
     // negative (in basic form)?
     charged.put("S", ZERO);
@@ -1102,7 +1057,9 @@ public class ResidueProperties
   }
   static
   {
-    int[][] propMatrixF = new int[maxProteinIndex][maxProteinIndex], propMatrixPos = new int[maxProteinIndex][maxProteinIndex], propMatrixEpos = new int[maxProteinIndex][maxProteinIndex];
+    int[][] propMatrixF = new int[maxProteinIndex][maxProteinIndex],
+            propMatrixPos = new int[maxProteinIndex][maxProteinIndex],
+            propMatrixEpos = new int[maxProteinIndex][maxProteinIndex];
     for (int i = 0; i < maxProteinIndex; i++)
     {
       int maxF = 0, maxP = 0, maxEP = 0;
@@ -1187,11 +1144,6 @@ public class ResidueProperties
     return aa3Hash;
   }
 
-  public static float[][] getBLOSUM62()
-  {
-    return ResidueProperties.BLOSUM62;
-  }
-
   public static String codonTranslate(String lccodon)
   {
     String cdn = codonHash2.get(lccodon.toUpperCase());
@@ -2679,8 +2631,8 @@ public class ResidueProperties
     {
       return '0';
     }
-    Integer index = ResidueProperties.aa3Hash.get(threeLetterCode
-            .toUpperCase());
+    Integer index = ResidueProperties.aa3Hash
+            .get(threeLetterCode.toUpperCase());
     return index == null ? '0' : aa[index].charAt(0);
   }
 }