X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fanalysis%2FAAFrequency.java;h=75a777fd7af1e4e285d0bdabc8d5fa08e0817a77;hb=64e9fe452576749d247b6dca0fc231237c40f743;hp=df5ca8da8131ed49e70b089da9c9674e4b96fe8d;hpb=14ffa72a74309f6d8e7a36d73c78bb4500fc32a2;p=jalview.git diff --git a/src/jalview/analysis/AAFrequency.java b/src/jalview/analysis/AAFrequency.java index df5ca8d..75a777f 100755 --- a/src/jalview/analysis/AAFrequency.java +++ b/src/jalview/analysis/AAFrequency.java @@ -1,6 +1,6 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8) - * Copyright (C) 2012 J Procter, AM Waterhouse, LM Lui, J Engelhardt, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.0b1) + * Copyright (C) 2014 The Jalview Authors * * This file is part of Jalview. * @@ -14,6 +14,7 @@ * PURPOSE. See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along with Jalview. If not, see . + * The Jalview Authors are detailed in the 'AUTHORS' file. */ package jalview.analysis; @@ -181,8 +182,12 @@ public class AAFrequency percentage = ((float) maxCount * 100) / jSize; residueHash.put(PID_GAPS, new Float(percentage)); - percentage = ((float) maxCount * 100) / nongap; + if (nongap>0) { + // calculate for non-gapped too + percentage = ((float) maxCount * 100) / nongap; + } residueHash.put(PID_NOGAPS, new Float(percentage)); + result[i] = residueHash; } }