Percentage precalculated in aafrequency
[jalview.git] / src / jalview / schemes / PIDColourScheme.java
index cfc9f94..8cea507 100755 (executable)
@@ -18,8 +18,6 @@
  */\r
 package jalview.schemes;\r
 \r
-import java.util.*;\r
-\r
 import java.awt.*;\r
 \r
 import jalview.datamodel.*;\r
@@ -45,18 +43,14 @@ public class PIDColourScheme
     }\r
 \r
     Color c = Color.white;\r
-    Hashtable hash = (Hashtable) consensus.elementAt(j);\r
 \r
     double sc = 0;\r
 \r
-    if ( (Integer.parseInt(hash.get("maxCount").toString()) != -1) &&\r
-        hash.contains(s))\r
+    if ( (Integer.parseInt(consensus[j].get("maxCount").toString()) != -1) &&\r
+        consensus[j].contains(s))\r
     {\r
-      sc = ( ( (Integer) hash.get(s)).intValue() * 100.0) /\r
-          ( (Integer) hash.get(\r
-              "size")).intValue();\r
+      sc = ((Float)consensus[j].get(ignoreGaps)).floatValue();\r
 \r
-      // MC Should be isGap\r
       if (!jalview.util.Comparison.isGap( (s.charAt(0))))\r
       {\r
         for (int i = 0; i < thresholds.length; i++)\r