From: gmungoc Date: Wed, 20 Jul 2016 08:05:29 +0000 (+0100) Subject: JAL-2023 JAL-1681 fixed bug in computing '+' for co-modal codons X-Git-Tag: Release_2_10_0~125^2~12 X-Git-Url: http://source.jalview.org/gitweb/?p=jalview.git;a=commitdiff_plain;h=331cf6c6db133ff63d426b8ab6ad6aed8f0e33c5 JAL-2023 JAL-1681 fixed bug in computing '+' for co-modal codons --- 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