viewport setting for displaying sequence logos
authorjprocter <Jim Procter>
Fri, 21 Aug 2009 11:15:51 +0000 (11:15 +0000)
committerjprocter <Jim Procter>
Fri, 21 Aug 2009 11:15:51 +0000 (11:15 +0000)
src/jalview/gui/AlignViewport.java

index 70ca6f2..f279910 100755 (executable)
@@ -422,6 +422,11 @@ public class AlignViewport implements SelectionSource
   private boolean shownpfeats;
 
   /**
+   * consensus annotation includes all percentage for all symbols in column
+   */
+  private boolean includeAllConsensusSymbols=true;
+
+  /**
    * trigger update of conservation annotation
    */
   public void updateConservation(final AlignmentPanel ap)
@@ -496,8 +501,8 @@ public class AlignViewport implements SelectionSource
 
         hconsensus = new Hashtable[aWidth];
         AAFrequency.calculate(alignment.getSequencesArray(), 0, alignment
-                .getWidth(), hconsensus);
-        AAFrequency.completeConsensus(consensus,hconsensus,0,aWidth,ignoreGapsInConsensusCalculation);
+                .getWidth(), hconsensus, includeAllConsensusSymbols);
+        AAFrequency.completeConsensus(consensus,hconsensus,0,aWidth,ignoreGapsInConsensusCalculation, includeAllConsensusSymbols);
         
         if (globalColourScheme != null)
         {
@@ -2077,7 +2082,7 @@ public class AlignViewport implements SelectionSource
    * should consensus rows be shown for groups
    */
   boolean showGroupConsensus = false;
-
+  
   /**
    * @return the showGroupConservation
    */
@@ -2106,5 +2111,19 @@ public class AlignViewport implements SelectionSource
   {
     this.showGroupConsensus = showGroupConsensus;
   }
+  /**
+   * @return the includeAllConsensusSymbols
+   */
+  public boolean isIncludeAllConsensusSymbols()
+  {
+    return includeAllConsensusSymbols;
+  }
+  /**
+   * @param includeAllConsensusSymbols the includeAllConsensusSymbols to set
+   */
+  public void setIncludeAllConsensusSymbols(boolean includeAllConsensusSymbols)
+  {
+    this.includeAllConsensusSymbols = includeAllConsensusSymbols;
+  }
   
 }