From 416f6e172aa77e3b0f2c2bd2b7a5655a6194d936 Mon Sep 17 00:00:00 2001 From: Jim Procter Date: Wed, 16 Oct 2013 17:40:16 +0100 Subject: [PATCH] JAL-1395 do not calculate non-gap consensus when no symbols present in column (regression on JAL-1373 --- src/jalview/analysis/AAFrequency.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/jalview/analysis/AAFrequency.java b/src/jalview/analysis/AAFrequency.java index df5ca8d..08a3f52 100755 --- a/src/jalview/analysis/AAFrequency.java +++ b/src/jalview/analysis/AAFrequency.java @@ -181,8 +181,10 @@ public class AAFrequency percentage = ((float) maxCount * 100) / jSize; residueHash.put(PID_GAPS, new Float(percentage)); - percentage = ((float) maxCount * 100) / nongap; - residueHash.put(PID_NOGAPS, new Float(percentage)); + if (nongap>0) { + percentage = ((float) maxCount * 100) / nongap; + residueHash.put(PID_NOGAPS, new Float(percentage)); + } result[i] = residueHash; } } -- 1.7.10.2