X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fdatamodel%2FAlignmentAnnotation.java;h=7f6b08acbf38406195da64fb85a973a76b089a28;hb=a853fae4d9d4dbc80e877741c017fca7ee80c59e;hp=d75683c60e6833ee58dd22613b2a96b099593619;hpb=133454102814512287d6bb5b1f4e5c2601eea863;p=jalview.git diff --git a/src/jalview/datamodel/AlignmentAnnotation.java b/src/jalview/datamodel/AlignmentAnnotation.java index d75683c..7f6b08a 100755 --- a/src/jalview/datamodel/AlignmentAnnotation.java +++ b/src/jalview/datamodel/AlignmentAnnotation.java @@ -139,6 +139,8 @@ public class AlignmentAnnotation this.annotations = annotations; graph = graphType; + boolean drawValues = true; + if (min == max) { min = 999999999; @@ -149,6 +151,11 @@ public class AlignmentAnnotation continue; } + if(drawValues && annotations[i].displayCharacter.length() > 1 ) + { + drawValues = false; + } + if (annotations[i].value > max) { max = annotations[i].value; @@ -161,6 +168,15 @@ public class AlignmentAnnotation } } + if(!drawValues) + { + for (int i = 0; i < annotations.length; i++) + { + if (annotations[i] != null) + annotations[i].displayCharacter = ""; + } + } + graphMin = min; graphMax = max; @@ -254,7 +270,7 @@ public class AlignmentAnnotation if(startRes < sequenceRef.getStart()) startRes = sequenceRef.getStart(); - int seqPos, seqIndex; + int seqPos; int fileOffset = 0; if(startRes > sequenceRef.getStart()) @@ -264,16 +280,13 @@ public class AlignmentAnnotation for(int i = 0; i < annotations.length; i++) { - seqPos = sequenceRef.findPosition(i - fileOffset)-1; + seqPos = sequenceRef.findPosition(i + fileOffset); if(seqPos=startRes) - sequenceMapping.put(new Integer(seqIndex), - annotations[seqPos]); + sequenceMapping.put(new Integer(seqPos), + annotations[i]); } } }