*/
package jalview.schemes;
-import jalview.analysis.AAFrequency;
import jalview.datamodel.SequenceGroup;
import jalview.datamodel.SequenceI;
+import jalview.util.Comparison;
import java.awt.Color;
return Color.white;
}
- if ((Integer
- .parseInt(consensus[j].get(AAFrequency.MAXCOUNT).toString()) != -1)
- && consensus[j].contains(String.valueOf(c)))
+ /*
+ * test whether this is the consensus (or joint consensus) residue
+ */
+ boolean matchesConsensus = consensus[j].getModalResidue().contains(
+ String.valueOf(c));
+ if (matchesConsensus)
{
- sc = ((Float) consensus[j].get(ignoreGaps)).floatValue();
+ sc = consensus[j].getPercentageIdentity(ignoreGaps);
- if (!jalview.util.Comparison.isGap(c))
+ if (!Comparison.isGap(c))
{
for (int i = 0; i < thresholds.length; i++)
{
if (sc > thresholds[i])
{
currentColour = pidColours[i];
-
break;
}
}