1 package jalview.schemes;
\r
3 import jalview.datamodel.*;
\r
7 public class PIDColourScheme extends ResidueColourScheme {
\r
8 public Color[] pidColours;
\r
9 public float[] thresholds;
\r
11 SequenceGroup group;
\r
13 public PIDColourScheme() {
\r
14 this.pidColours = ResidueProperties.pidColours;
\r
15 this.thresholds = ResidueProperties.pidThresholds;
\r
20 public Color findColour(String s, int j) {
\r
22 if( threshold!=0 && !aboveThreshold(s,j))
\r
25 Color c = Color.white;
\r
26 Hashtable hash = (Hashtable)consensus.elementAt(j);
\r
29 if ( Integer.parseInt( hash.get("maxCount").toString() ) != -1 && hash.contains(s))
\r
31 sc = ( (Integer) hash.get(s)).intValue() * 100.0 / ((Integer)hash.get("size")).intValue() ;
\r
32 // MC Should be isGap
\r
33 if (!jalview.util.Comparison.isGap((s.charAt(0))))
\r
35 for (int i = 0; i < thresholds.length; i++)
\r
37 if (sc > thresholds[i])
\r