JAL-98 ProfilesI container for profiles for columns
[jalview.git] / src / jalview / schemes / Blosum62ColourScheme.java
index 8cb6ff0..c47f171 100755 (executable)
@@ -47,7 +47,7 @@ public class Blosum62ColourScheme extends ResidueColourScheme
       res -= ('a' - 'A');
     }
 
-    if (consensus == null || j >= consensus.length || consensus[j] == null
+    if (consensus == null || consensus.get(j) == null
             || (threshold != 0 && !aboveThreshold(res, j)))
     {
       return Color.white;
@@ -57,7 +57,10 @@ public class Blosum62ColourScheme extends ResidueColourScheme
 
     if (!Comparison.isGap(res))
     {
-      String max = consensus[j].getModalResidue();
+      /*
+       * test if this is the consensus (or joint consensus) residue
+       */
+      String max = consensus.get(j).getModalResidue();
 
       if (max.indexOf(res) > -1)
       {