From 331cf6c6db133ff63d426b8ab6ad6aed8f0e33c5 Mon Sep 17 00:00:00 2001 From: gmungoc Date: Wed, 20 Jul 2016 09:05:29 +0100 Subject: [PATCH] JAL-2023 JAL-1681 fixed bug in computing '+' for co-modal codons --- src/jalview/analysis/AAFrequency.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/jalview/analysis/AAFrequency.java b/src/jalview/analysis/AAFrequency.java index 3d61b11..fb49541 100755 --- a/src/jalview/analysis/AAFrequency.java +++ b/src/jalview/analysis/AAFrequency.java @@ -624,8 +624,11 @@ public class AAFrequency String modalCodon = String.valueOf(CodingUtils .decodeCodon(modalCodonEncoded)); if (sortedCodonCounts.length > 1 - && sortedCodonCounts[codons.length - 2] == modalCodonEncoded) + && sortedCodonCounts[codons.length - 2] == sortedCodonCounts[codons.length - 1]) { + /* + * two or more codons share the modal count + */ modalCodon = "+"; } float pid = sortedCodonCounts[sortedCodonCounts.length - 1] * 100 -- 1.7.10.2