From: gmungoc Date: Wed, 26 Oct 2016 15:11:17 +0000 (+0100) Subject: JAL-2286 modal residue check + commenting X-Git-Tag: Release_2_10_1^2~22^2~3^2 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=08fa75428822ee384d35eb67b1e23e33e83d8d9d;p=jalview.git JAL-2286 modal residue check + commenting --- diff --git a/src/jalview/schemes/Blosum62ColourScheme.java b/src/jalview/schemes/Blosum62ColourScheme.java index 8cb6ff0..37c31f9 100755 --- a/src/jalview/schemes/Blosum62ColourScheme.java +++ b/src/jalview/schemes/Blosum62ColourScheme.java @@ -57,6 +57,9 @@ public class Blosum62ColourScheme extends ResidueColourScheme if (!Comparison.isGap(res)) { + /* + * test if this is the consensus (or joint consensus) residue + */ String max = consensus[j].getModalResidue(); if (max.indexOf(res) > -1) diff --git a/src/jalview/schemes/PIDColourScheme.java b/src/jalview/schemes/PIDColourScheme.java index 5f63ca9..ccc69c2 100755 --- a/src/jalview/schemes/PIDColourScheme.java +++ b/src/jalview/schemes/PIDColourScheme.java @@ -22,6 +22,7 @@ package jalview.schemes; import jalview.datamodel.SequenceGroup; import jalview.datamodel.SequenceI; +import jalview.util.Comparison; import java.awt.Color; @@ -66,19 +67,22 @@ public class PIDColourScheme extends ResidueColourScheme return Color.white; } - if (consensus[j].getMaxCount() > 0) //!= -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 = 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; } }