Check if groupWidth is greater than sequence width
[jalview.git] / src / jalview / analysis / AAFrequency.java
index f409f8c..5b9a2a4 100755 (executable)
@@ -53,6 +53,11 @@ public class AAFrequency
 \r
      Hashtable [] reply = new Hashtable[width];\r
 \r
+     if(end>=width)\r
+     {\r
+       end = width-1;\r
+     }\r
+\r
      calculate(seqs, start, end, reply);\r
 \r
      return reply;\r