From ccaa79d427cd7ceeb7c367f3da00e3fcfe055498 Mon Sep 17 00:00:00 2001 From: Jim Procter Date: Thu, 10 Sep 2015 02:41:38 +0100 Subject: [PATCH] JAL-1370 detect any type of gap character in reference sequence when showing unconserved residues --- src/jalview/appletgui/SequenceRenderer.java | 4 ++-- src/jalview/gui/SequenceRenderer.java | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) 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; -- 1.7.10.2