JAL-3313 don't double count mapped codons
authorgmungoc <g.m.carstairs@dundee.ac.uk>
Tue, 18 Jun 2019 17:06:08 +0000 (18:06 +0100)
committergmungoc <g.m.carstairs@dundee.ac.uk>
Tue, 18 Jun 2019 17:06:08 +0000 (18:06 +0100)
src/jalview/analysis/AAFrequency.java

index e4f2dfa..f1d5e79 100755 (executable)
@@ -531,7 +531,7 @@ public class AAFrequency
     for (int col = 0; col < cols; col++)
     {
       // todo would prefer a Java bean for consensus data
-      Hashtable<String, int[]> columnHash = new Hashtable<String, int[]>();
+      Hashtable<String, int[]> columnHash = new Hashtable<>();
       // #seqs, #ungapped seqs, counts indexed by (codon encoded + 1)
       int[] codonCounts = new int[66];
       codonCounts[0] = alignment.getSequences().size();
@@ -551,6 +551,7 @@ public class AAFrequency
           {
             codonCounts[codonEncoded + 2]++;
             ungappedCount++;
+            break;
           }
         }
       }