From 64e9fe452576749d247b6dca0fc231237c40f743 Mon Sep 17 00:00:00 2001 From: Jim Procter Date: Thu, 1 May 2014 14:24:07 +0100 Subject: [PATCH] make sure valid value for non-gapped calculation with zero symbol data --- src/jalview/analysis/AAFrequency.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/jalview/analysis/AAFrequency.java b/src/jalview/analysis/AAFrequency.java index ca4e71c..75a777f 100755 --- a/src/jalview/analysis/AAFrequency.java +++ b/src/jalview/analysis/AAFrequency.java @@ -183,9 +183,11 @@ public class AAFrequency residueHash.put(PID_GAPS, new Float(percentage)); if (nongap>0) { + // calculate for non-gapped too percentage = ((float) maxCount * 100) / nongap; - residueHash.put(PID_NOGAPS, new Float(percentage)); } + residueHash.put(PID_NOGAPS, new Float(percentage)); + result[i] = residueHash; } } -- 1.7.10.2