Formatting
[jalview.git] / src / jalview / schemes / ClustalxColourScheme.java
index eaf2a5f..8dd8994 100755 (executable)
@@ -1,6 +1,6 @@
 /*\r
  * Jalview - A Sequence Alignment Editor and Viewer\r
- * Copyright (C) 2006 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle\r
+ * Copyright (C) 2007 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle\r
  *\r
  * This program is free software; you can redistribute it and/or\r
  * modify it under the terms of the GNU General Public License\r
@@ -70,7 +70,7 @@ public class ClustalxColourScheme
     int res;\r
     int i;\r
     int j = 0;\r
-    char [] seq;\r
+    char[] seq;\r
 \r
     while (j < seqs.size())\r
     {\r
@@ -86,7 +86,7 @@ public class ClustalxColourScheme
         }\r
         else\r
         {\r
-          res =  ResidueProperties.aaIndex[seq[i]];\r
+          res = ResidueProperties.aaIndex[seq[i]];\r
         }\r
 \r
         cons2[i][res]++;\r
@@ -249,8 +249,7 @@ public class ClustalxColourScheme
   {\r
     Color currentColour;\r
 \r
-\r
-    if ( cons2.length<=j || (threshold != 0 && !aboveThreshold(c, j)))\r
+    if (cons2.length <= j || (threshold != 0 && !aboveThreshold(c, j)))\r
     {\r
       return Color.white;\r
     }\r
@@ -264,13 +263,13 @@ public class ClustalxColourScheme
       return currentColour;\r
     }\r
 \r
-  for (int k = 0; k < ResidueColour[i].conses.length; k++)\r
-  {\r
-    if (ResidueColour[i].conses[k].isConserved(cons2, j, size))\r
+    for (int k = 0; k < ResidueColour[i].conses.length; k++)\r
     {\r
-      currentColour = ResidueColour[i].c;\r
+      if (ResidueColour[i].conses[k].isConserved(cons2, j, size))\r
+      {\r
+        currentColour = ResidueColour[i].c;\r
+      }\r
     }\r
-  }\r
 \r
     if (i == 4)\r
     {\r
@@ -280,8 +279,10 @@ public class ClustalxColourScheme
       }\r
     }\r
 \r
-    if(conservationColouring)\r
+    if (conservationColouring)\r
+    {\r
       currentColour = applyConservation(currentColour, j);\r
+    }\r
 \r
     return currentColour;\r
   }\r