X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Fjalview%2Fschemes%2FPIDColourScheme.java;h=ccc69c286b29259be84f278ddac2fd1bbab00b61;hb=fc9aecdad8fb4d6ac38e504b094b29cf2223b32b;hp=18d7b21fa91d829b9b7f96bdae35f6273a319d37;hpb=c19d2a91ca05e052e3408bf5852d88eb5d0608f1;p=jalview.git diff --git a/src/jalview/schemes/PIDColourScheme.java b/src/jalview/schemes/PIDColourScheme.java index 18d7b21..ccc69c2 100755 --- a/src/jalview/schemes/PIDColourScheme.java +++ b/src/jalview/schemes/PIDColourScheme.java @@ -1,6 +1,6 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Version 2.9.0b2) - * Copyright (C) 2015 The Jalview Authors + * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$) + * Copyright (C) $$Year-Rel$$ The Jalview Authors * * This file is part of Jalview. * @@ -20,9 +20,9 @@ */ package jalview.schemes; -import jalview.analysis.AAFrequency; import jalview.datamodel.SequenceGroup; import jalview.datamodel.SequenceI; +import jalview.util.Comparison; import java.awt.Color; @@ -67,20 +67,22 @@ public class PIDColourScheme extends ResidueColourScheme 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; } }