X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fschemes%2FClustalxColourScheme.java;h=eaf2a5f96e10ce729406c13d848ff438439deac8;hb=8bb6d4ca134e9b72bfd44aff6a51c6b14185a69d;hp=ce30de8982d08899b978e42a1277a07cd855939f;hpb=3d941a02a998676a12f8ff43fa98d9e1f4c27142;p=jalview.git diff --git a/src/jalview/schemes/ClustalxColourScheme.java b/src/jalview/schemes/ClustalxColourScheme.java index ce30de8..eaf2a5f 100755 --- a/src/jalview/schemes/ClustalxColourScheme.java +++ b/src/jalview/schemes/ClustalxColourScheme.java @@ -70,23 +70,23 @@ public class ClustalxColourScheme int res; int i; int j = 0; - String seq; + char [] seq; while (j < seqs.size()) { seq = ( (SequenceI) seqs.elementAt(j)).getSequence(); - int end_j = seq.length() - 1; + int end_j = seq.length - 1; for (i = start; i <= end_j; i++) { - if ( (seq.length() - 1) < i) + if ( (seq.length - 1) < i) { res = 23; } else { - res = ResidueProperties.aaIndex[seq.charAt(i)]; + res = ResidueProperties.aaIndex[seq[i]]; } cons2[i][res]++; @@ -240,22 +240,22 @@ public class ClustalxColourScheme ResidueColour[19] = colours[0]; // V } - public Color findColour(String s) + public Color findColour(char c) { return Color.pink; } - public Color findColour(String s, int j) + public Color findColour(char c, int j) { Color currentColour; - if ( cons2.length<=j || (threshold != 0 && !aboveThreshold(s, j))) + if ( cons2.length<=j || (threshold != 0 && !aboveThreshold(c, j))) { return Color.white; } - int i = ResidueProperties.aaIndex[s.charAt(0)]; + int i = ResidueProperties.aaIndex[c]; currentColour = Color.white; @@ -281,7 +281,7 @@ public class ClustalxColourScheme } if(conservationColouring) - applyConservation(currentColour, j); + currentColour = applyConservation(currentColour, j); return currentColour; }