X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fanalysis%2FAAFrequency.java;h=ee16f9455665b7c698c84664941896ad2d1e8473;hb=8537d486848be3e97578248dae6bede12e343fe1;hp=0e055e450a3ae6983946062d4e28bf56c39ab551;hpb=679e63aab1a22d128bf429a07514eb15f8b288e1;p=jalview.git diff --git a/src/jalview/analysis/AAFrequency.java b/src/jalview/analysis/AAFrequency.java index 0e055e4..ee16f94 100755 --- a/src/jalview/analysis/AAFrequency.java +++ b/src/jalview/analysis/AAFrequency.java @@ -291,7 +291,7 @@ public class AAFrequency /** * Derive the gap count annotation row. * - * @param consensus + * @param gaprow * the annotation row to add annotations to * @param profiles * the source consensus data @@ -300,11 +300,11 @@ public class AAFrequency * @param endCol * end column (exclusive) */ - public static void completeGapAnnot(AlignmentAnnotation consensus, + public static void completeGapAnnot(AlignmentAnnotation gaprow, ProfilesI profiles, int startCol, int endCol, long nseq) { - if (consensus == null || consensus.annotations == null - || consensus.annotations.length < endCol) + if (gaprow == null || gaprow.annotations == null + || gaprow.annotations.length < endCol) { /* * called with a bad alignment annotation row @@ -313,8 +313,8 @@ public class AAFrequency return; } // always set ranges again - consensus.graphMax = nseq; - consensus.graphMin = 0; + gaprow.graphMax = nseq; + gaprow.graphMin = 0; for (int i = startCol; i < endCol; i++) { ProfileI profile = profiles.get(i); @@ -324,15 +324,16 @@ public class AAFrequency * happens if sequences calculated over were * shorter than alignment width */ - consensus.annotations[i] = null; + gaprow.annotations[i] = null; return; } - final int gapped = profile.getGapped(); + final int gapped = profile.getNonGapped(); String description = String.valueOf(gapped); - consensus.annotations[i] = new Annotation("", description, '0', + gaprow.annotations[i] = new Annotation(description, description, + '\0', gapped); } }