From 503ebba0021fa583fa7af58f9406f9234274fd7c Mon Sep 17 00:00:00 2001 From: amwaterhouse Date: Thu, 18 Aug 2005 09:47:32 +0000 Subject: [PATCH] Proceed with upperCase residue --- src/jalview/schemes/Blosum62ColourScheme.java | 10 ++++++++-- src/jalview/schemes/PIDColourScheme.java | 11 ++++++++++- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/src/jalview/schemes/Blosum62ColourScheme.java b/src/jalview/schemes/Blosum62ColourScheme.java index 356e3fe..4b1bf15 100755 --- a/src/jalview/schemes/Blosum62ColourScheme.java +++ b/src/jalview/schemes/Blosum62ColourScheme.java @@ -31,13 +31,19 @@ public class Blosum62ColourScheme public Color findColour(String s, int j) { + char res = s.charAt(0); + if ('a' <= res && res <= 'z' ) + { + s = Character.toString( res -= ('a' - 'A') ); + } + + if ( (threshold != 0) && !aboveThreshold(s, j)) { return Color.white; } - - if (!jalview.util.Comparison.isGap( (s.charAt(0)))) + if (!jalview.util.Comparison.isGap( res )) { String max = (String) consensus[j].get("maxResidue"); diff --git a/src/jalview/schemes/PIDColourScheme.java b/src/jalview/schemes/PIDColourScheme.java index 8cea507..9dc4c66 100755 --- a/src/jalview/schemes/PIDColourScheme.java +++ b/src/jalview/schemes/PIDColourScheme.java @@ -37,11 +37,20 @@ public class PIDColourScheme public Color findColour(String s, int j) { + char res = s.charAt(0); + if ('a' <= res && res <= 'z') + { + s = Character.toString(res -= ('a' - 'A')); + } + + if ( (threshold != 0) && !aboveThreshold(s, j)) { return Color.white; } + + Color c = Color.white; double sc = 0; @@ -51,7 +60,7 @@ 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++) { -- 1.7.10.2