JAL-2629 add option to set HMM Logo letter height to info content
[jalview.git] / src / jalview / datamodel / SequenceGroup.java
index 6db870c..c1443ef 100755 (executable)
@@ -103,6 +103,8 @@ public class SequenceGroup implements AnnotatedCollectionI
 
   private boolean ignoreBelowBackground = true;
 
+  private boolean infoLetterHeight = false;
+
   /**
    * consensus calculation property
    */
@@ -222,6 +224,7 @@ public class SequenceGroup implements AnnotatedCollectionI
       width = seqsel.width;
       ignoreGapsInConsensus = seqsel.ignoreGapsInConsensus;
       ignoreBelowBackground = seqsel.ignoreBelowBackground;
+      infoLetterHeight = seqsel.infoLetterHeight;
       if (seqsel.conserve != null)
       {
         recalcConservation(); // safer than
@@ -581,7 +584,8 @@ public class SequenceGroup implements AnnotatedCollectionI
 
         ProfilesI info = AAFrequency.calculateHMMProfiles(hmm,
                 (endRes + 1) - startRes, startRes, endRes + 1,
-                showHMMSequenceLogo, ignoreBelowBackground);
+                showHMMSequenceLogo, ignoreBelowBackground,
+                infoLetterHeight);
         _updateInformationRow(info, sequences.size());
         upd = true;
       }
@@ -711,7 +715,7 @@ public class SequenceGroup implements AnnotatedCollectionI
                                                       // width
     information.calcId = "HMM";
     AAFrequency.completeInformation(information, cnsns, startRes,
-            endRes + 1, ignoreBelowBackground, showSequenceLogo, nseq); // TODO:
+            endRes + 1, nseq, 0f); // TODO:
                                                                         // setting
                                                             // container
     // for
@@ -1291,7 +1295,21 @@ public class SequenceGroup implements AnnotatedCollectionI
 
   public boolean getIgnoreBelowBackground()
   {
-    return true;
+    return ignoreBelowBackground;
+  }
+
+  public void setInfoLetterHeight(boolean state)
+  {
+    if (this.infoLetterHeight != state)
+    {
+      infoLetterHeight = state;
+    }
+    infoLetterHeight = state;
+  }
+
+  public boolean getInfoLetterHeight()
+  {
+    return infoLetterHeight;
   }
 
   /**