X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fschemes%2FBlosum62ColourScheme.java;h=2c0836de99c6d7dec867547d7579e9c3cd4c30e2;hb=d187567c926fed31f9cd9bda0dc112bc4d1b1261;hp=4b1bf153473cafc2f45ab0bc9c8d7180b5f48d6e;hpb=503ebba0021fa583fa7af58f9406f9234274fd7c;p=jalview.git diff --git a/src/jalview/schemes/Blosum62ColourScheme.java b/src/jalview/schemes/Blosum62ColourScheme.java index 4b1bf15..2c0836d 100755 --- a/src/jalview/schemes/Blosum62ColourScheme.java +++ b/src/jalview/schemes/Blosum62ColourScheme.java @@ -34,11 +34,12 @@ public class Blosum62ColourScheme char res = s.charAt(0); if ('a' <= res && res <= 'z' ) { - s = Character.toString( res -= ('a' - 'A') ); + // TO UPPERCASE !!! + s = String.valueOf( res -= ('a' - 'A') ); } - if ( (threshold != 0) && !aboveThreshold(s, j)) + if ( j>=consensus.length || (threshold != 0 && !aboveThreshold(s, j) )) { return Color.white; } @@ -49,7 +50,7 @@ public class Blosum62ColourScheme if (max.indexOf(s) > -1) { - return new Color(154, 154, 255); + currentColour = new Color(154, 154, 255); } else { @@ -66,17 +67,22 @@ public class Blosum62ColourScheme if (c > 0) { - return new Color(204, 204, 255); + currentColour = new Color(204, 204, 255); } else { - return Color.white; + currentColour = Color.white; } } + + if(conservationColouring) + applyConservation(j); } else { return Color.white; } + + return currentColour; } }