X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fschemes%2FUserColourScheme.java;h=00f8f6f6bb1c597eb1af80cf05d222367bc12052;hb=c1e70ea0a01d2c916675aa8020970c6696d0dba5;hp=41fc6c9d66fb3cad17bced928d4986143cd5cd3c;hpb=b5d69834ef8b11df514d5b4c08c82945f15f8a2e;p=jalview.git diff --git a/src/jalview/schemes/UserColourScheme.java b/src/jalview/schemes/UserColourScheme.java index 41fc6c9..00f8f6f 100755 --- a/src/jalview/schemes/UserColourScheme.java +++ b/src/jalview/schemes/UserColourScheme.java @@ -147,12 +147,11 @@ public class UserColourScheme { token = st2.nextToken(); - int colIndex = - ( (Integer) ResidueProperties.aaHash. - get(token)).intValue(); + if (ResidueProperties.aaIndex[token.charAt(0)]==-1) + continue; + + int colIndex = ResidueProperties.aaIndex[token.charAt(0)]; - //AW - LOWER CASE DISABLED IN 2.1.01 bug fix release - /* if(token.equalsIgnoreCase("lowerCase")) { if (lowerCaseColours == null) @@ -172,7 +171,7 @@ public class UserColourScheme } lowerCaseColours[colIndex] = getColourFromString(colour); } - else*/ + else colors[colIndex] = getColourFromString(colour); } } @@ -187,16 +186,16 @@ public class UserColourScheme - public Color findColour(String s, int j) + public Color findColour(char c, int j) { - int index = ((Integer) (ResidueProperties.aaHash.get(s))).intValue(); + Color currentColour; + int index = ResidueProperties.aaIndex[c]; - if ((threshold == 0) || aboveThreshold(ResidueProperties.aa[index], j)) + if ((threshold == 0) || aboveThreshold(c, j)) { - //AW - LOWER CASE DISABLED IN 2.1.01 bug fix release - /* if(lowerCaseColours!=null && 'a' <= s.charAt(0) && s.charAt(0) <= 'z') + if(lowerCaseColours!=null && 'a' <= c && c <= 'z') currentColour = lowerCaseColours[index]; - else*/ + else currentColour = colors[index]; } else @@ -205,7 +204,7 @@ public class UserColourScheme } if(conservationColouring) - applyConservation(j); + currentColour = applyConservation(currentColour, j); return currentColour;