From: Jim Procter Date: Thu, 10 Sep 2015 01:41:38 +0000 (+0100) Subject: JAL-1370 detect any type of gap character in reference sequence when showing unconser... X-Git-Tag: Release_2_10_0~445 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=ccaa79d427cd7ceeb7c367f3da00e3fcfe055498;p=jalview.git JAL-1370 detect any type of gap character in reference sequence when showing unconserved residues --- diff --git a/src/jalview/appletgui/SequenceRenderer.java b/src/jalview/appletgui/SequenceRenderer.java index feb2705..e07fcb2 100755 --- a/src/jalview/appletgui/SequenceRenderer.java +++ b/src/jalview/appletgui/SequenceRenderer.java @@ -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; } diff --git a/src/jalview/gui/SequenceRenderer.java b/src/jalview/gui/SequenceRenderer.java index 21286ad..273bfd9 100755 --- a/src/jalview/gui/SequenceRenderer.java +++ b/src/jalview/gui/SequenceRenderer.java @@ -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;