From 9d31636d87ba5d3243625a1e1b77db45d4fc9584 Mon Sep 17 00:00:00 2001 From: jprocter Date: Thu, 2 Sep 2010 15:59:26 +0000 Subject: [PATCH] fix occasional arrayIndexOutOfBounds when sequences in subgroup are shorter than alignment width --- src/jalview/analysis/AAFrequency.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/jalview/analysis/AAFrequency.java b/src/jalview/analysis/AAFrequency.java index 46264d6..8fd60c4 100755 --- a/src/jalview/analysis/AAFrequency.java +++ b/src/jalview/analysis/AAFrequency.java @@ -211,6 +211,11 @@ public class AAFrequency } for (int i = iStart; i < width; i++) { + if (i>=hconsensus.length) { + // happens if sequences calculated over were shorter than alignment width + consensus.annotations[i]=null; + continue; + } value = 0; if (ignoreGapsInConsensusCalculation) { -- 1.7.10.2