Annotations move when full alignment edited
[jalview.git] / src / jalview / analysis / AAFrequency.java
index 5b9a2a4..3d91080 100755 (executable)
@@ -55,7 +55,7 @@ public class AAFrequency
 \r
      if(end>=width)\r
      {\r
-       end = width-1;\r
+       end = width;\r
      }\r
 \r
      calculate(seqs, start, end, reply);\r
@@ -75,7 +75,7 @@ public static final void calculate(SequenceI[] sequences,
 \r
   int[] values = new int[132];\r
 \r
-  String seq;\r
+  char [] seq;\r
 \r
   for (i = start; i < end; i++)\r
   {\r
@@ -88,9 +88,9 @@ public static final void calculate(SequenceI[] sequences,
     for (j = 0; j < jSize; j++)\r
     {\r
       seq = sequences[j].getSequence();\r
-      if (seq.length() > i)\r
+      if (seq.length > i)\r
       {\r
-        c = seq.charAt(i);\r
+        c = seq[i];\r
 \r
         if(c == '.' || c==' ')\r
           c = '-';\r