From: Jim Procter Date: Tue, 31 May 2016 14:17:30 +0000 (+0100) Subject: JAL-2065 check position lies within group before getting consensus char X-Git-Tag: Release_2_10_0~161^2~10^2~5 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=205bbecbedfa28a3f4b3b4909c4f8be2a96b6579;p=jalview.git JAL-2065 check position lies within group before getting consensus char --- diff --git a/src/jalview/gui/SequenceRenderer.java b/src/jalview/gui/SequenceRenderer.java index 258a229..aec61b5 100755 --- a/src/jalview/gui/SequenceRenderer.java +++ b/src/jalview/gui/SequenceRenderer.java @@ -447,13 +447,16 @@ public class SequenceRenderer implements jalview.api.SequenceRenderer { // TODO - use currentSequenceGroup rather than alignment // currentSequenceGroup.getConsensus() - char conschar = (usesrep) ? (currentGroup == null ? av.getAlignment() + char conschar = (usesrep) ? (currentGroup == null + || position < currentGroup.getStartRes() + || position > currentGroup.getEndRes() ? av.getAlignment() .getSeqrep().getCharAt(position) : (currentGroup.getSeqrep() != null ? currentGroup.getSeqrep() .getCharAt(position) : av.getAlignment().getSeqrep() .getCharAt(position))) - : (currentGroup != null && currentGroup.getConsensus() != null) ? currentGroup - .getConsensus().annotations[position].displayCharacter + : (currentGroup != null && currentGroup.getConsensus() != null + && position >= currentGroup.getStartRes() && position <= currentGroup + .getEndRes()) ? currentGroup.getConsensus().annotations[position].displayCharacter .charAt(0) : av.getAlignmentConsensusAnnotation().annotations[position].displayCharacter .charAt(0);