X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fschemes%2FPIDColourScheme.java;h=66f180be4c72186c75934d0e2cb817a4dd865b8f;hb=4f01ddc72d2297c48c57d4f9c25af45b300df154;hp=8cea5071aa04572c3a7fb34f1d1a56137cc03c08;hpb=96786b7b949dc261a9556e13a17870166915d0e9;p=jalview.git diff --git a/src/jalview/schemes/PIDColourScheme.java b/src/jalview/schemes/PIDColourScheme.java index 8cea507..66f180b 100755 --- a/src/jalview/schemes/PIDColourScheme.java +++ b/src/jalview/schemes/PIDColourScheme.java @@ -37,12 +37,19 @@ public class PIDColourScheme public Color findColour(String s, int j) { + char res = s.charAt(0); + if ('a' <= res && res <= 'z') + { + s = String.valueOf(res -= ('a' - 'A')); + } + + if ( (threshold != 0) && !aboveThreshold(s, j)) { return Color.white; } - Color c = Color.white; + currentColour = Color.white; double sc = 0; @@ -51,13 +58,13 @@ public class PIDColourScheme { sc = ((Float)consensus[j].get(ignoreGaps)).floatValue(); - if (!jalview.util.Comparison.isGap( (s.charAt(0)))) + if (!jalview.util.Comparison.isGap( res )) { for (int i = 0; i < thresholds.length; i++) { if (sc > thresholds[i]) { - c = pidColours[i]; + currentColour = pidColours[i]; break; } @@ -65,6 +72,9 @@ public class PIDColourScheme } } - return c; + if(conservationColouring) + applyConservation(j); + + return currentColour; } }