JAl-4392 Hide secondary structure consensus with no data to display
authorRenia Correya <rcorreya001@dundee.ac.uk>
Tue, 18 Jun 2024 12:26:21 +0000 (13:26 +0100)
committerRenia Correya <rcorreya001@dundee.ac.uk>
Tue, 18 Jun 2024 12:26:21 +0000 (13:26 +0100)
src/jalview/analysis/AAFrequency.java

index 9c5ab5f..7278a80 100755 (executable)
@@ -31,11 +31,9 @@ import jalview.datamodel.ProfilesI;
 import jalview.datamodel.ResidueCount;
 import jalview.datamodel.ResidueCount.SymbolCounts;
 import jalview.datamodel.SecondaryStructureCount;
-import jalview.datamodel.SeqCigar;
 import jalview.datamodel.SequenceI;
 import jalview.ext.android.SparseIntArray;
 import jalview.util.Comparison;
-import jalview.util.Constants;
 import jalview.util.Format;
 import jalview.util.MappingUtils;
 import jalview.util.QuickSort;
@@ -449,6 +447,11 @@ public class AAFrequency
      ssConsensus.annotations[i] = new Annotation(modalSS, description,
              ' ', value);
    }
+   
+   //Hide consensus with no data to display
+   if(ssConsensus.getNoOfSequencesIncluded()<1)
+     ssConsensus.visible = false;
+
    // long elapsed = System.currentTimeMillis() - now;
    // jalview.bin.Console.outPrintln(-elapsed);
  }