JAL-1370 detect any type of gap character in reference sequence when showing unconser...
authorJim Procter <jprocter@issues.jalview.org>
Thu, 10 Sep 2015 01:41:38 +0000 (02:41 +0100)
committerJim Procter <jprocter@issues.jalview.org>
Thu, 10 Sep 2015 01:43:37 +0000 (02:43 +0100)
src/jalview/appletgui/SequenceRenderer.java
src/jalview/gui/SequenceRenderer.java

index feb2705..e07fcb2 100755 (executable)
@@ -317,11 +317,11 @@ public class SequenceRenderer implements jalview.api.SequenceRenderer
   private char getDisplayChar(final boolean usesrep, int position,
           char s, char c)
   {
-    // TODO - use currentSequenceGroup rather than alignemnt 
+    // TODO - use currentSequenceGroup rather than alignment
     // currentSequenceGroup.getConsensus()
     char conschar = (usesrep) ? av.getAlignment().getSeqrep().getCharAt(position) : av.getAlignmentConsensusAnnotation().annotations[position].displayCharacter
             .charAt(0);
-    if (conschar != '-' && s == conschar)
+    if (!jalview.util.Comparison.isGap(conschar) && s == conschar)
     {
       s = c;
     }
index 21286ad..273bfd9 100755 (executable)
@@ -458,7 +458,7 @@ public class SequenceRenderer implements jalview.api.SequenceRenderer
                     .charAt(0)
                     : av.getAlignmentConsensusAnnotation().annotations[position].displayCharacter
                             .charAt(0);
-    if (conschar != '-'
+    if (!jalview.util.Comparison.isGap(conschar)
             && (sequenceChar == conschar || sequenceChar + CHAR_TO_UPPER == conschar))
     {
       sequenceChar = conservedChar;