group autoannotation and consensus display settings
authorjprocter <Jim Procter>
Tue, 30 Mar 2010 17:48:15 +0000 (17:48 +0000)
committerjprocter <Jim Procter>
Tue, 30 Mar 2010 17:48:15 +0000 (17:48 +0000)
help/html/menus/alwview.html
src/jalview/bin/Cache.java
src/jalview/gui/AlignFrame.java
src/jalview/gui/AlignViewport.java
src/jalview/gui/AlignmentPanel.java
src/jalview/gui/AnnotationLabels.java
src/jalview/gui/Preferences.java
src/jalview/jbgui/GAlignFrame.java
src/jalview/jbgui/GPreferences.java

index 4cc5c15..10ab511 100755 (executable)
     </strong><em>If this is selected the &quot;Annotation Panel&quot; will be 
     displayed below the alignment. The default setting is to display the conservation 
     calculation, quality calculation and consensus values as bar charts. </em></li>
+    <li><strong>Autocalculated Annotation<br></strong>Settings for the display of autocalculated annotation.
+    <ul><li>
+       <strong>Apply to all groups<br></strong>
+       When ticked, any settings will be applied to all autocalculated annotation.
+       </li> 
+       <li>
+       <strong>Show Consensus Histogram<br></strong>
+       Enable or disable the display of the histogram above the consensus sequence.
+       </li>
+       <li>
+       <strong>Show Consensus Profile<br></strong>
+               Enable or disable the display of the sequence logo above the consensus sequence.
+       </li>
+       <li>
+       <strong>Group Conservation<br></strong>
+       When ticked, display a conservation row for all groups (only available for protein alignments).
+       </li>
+       <li>
+       <strong>Apply to all groups<br></strong>
+       When ticked, display a consensus row for all groups.
+       </li>
+       </ul>
+    </li>
   <li><strong>Automatic Scrolling<br>
     </strong><em>When selected, the view will automatically scroll to display the
     highlighted sequence position corresponding to the position under the mouse 
index 621ded0..d5c54b2 100755 (executable)
@@ -115,8 +115,12 @@ import org.biojava.dasobert.dasregistry.Das1Source;
  * <li>SORT_BY_TREE (false) sort the current alignment view according to the
  * order of a newly displayed tree</li>
  * <li>DBFETCH_USEPICR (false) use PICR to recover valid DB references from sequence ID strings before attempting retrieval from any datasource</li>
- * <li>
- * </li>
+ * <li>SHOW_GROUP_CONSENSUS (false) Show consensus annotation for groups in the alignment.</li>
+ * <li>SHOW_GROUP_CONSERVATION (false) Show conservation annotation for groups in the alignment.</li>
+ * <li>SHOW_CONSENSUS_HISTOGRAM (false) Show consensus annotation row's histogram.</li>
+ * <li>SHOW_CONSENSUS_PROFILE (false) Show consensus annotation row's sequence logo.</li>
+ * 
+ * <li></li>
  * 
  * <li></li>
  * 
index dcb4b21..1bccb66 100755 (executable)
@@ -610,7 +610,7 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener,
     showTranslation.setVisible(nucleotide);
     conservationMenuItem.setEnabled(!nucleotide);
     modifyConservation.setEnabled(!nucleotide);
-
+    showGroupConservation.setEnabled(!nucleotide);
     // Remember AlignFrame always starts as protein
     if (!nucleotide)
     {
@@ -655,6 +655,8 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener,
     showUnconservedMenuItem.setSelected(av.showUnconserved);
     showGroupConsensus.setSelected(av.showGroupConsensus);
     showGroupConservation.setSelected(av.showGroupConservation);
+    showConsensusHistogram.setSelected(av.showConsensusHistogram);
+    showConsensusProfile.setSelected(av.showConsensusProfile);
     setColourSelected(ColourSchemeProperty.getColourName(av
             .getGlobalColourScheme()));
 
@@ -4480,7 +4482,7 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener,
   protected void showGroupConsensus_actionPerformed(ActionEvent e)
   {
     viewport.setShowGroupConsensus(showGroupConsensus.getState());
-    alignPanel.updateAnnotation();
+    alignPanel.updateAnnotation(applyAutoAnnotationSettings.getState());
 
   }
 
@@ -4494,7 +4496,29 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener,
   protected void showGroupConservation_actionPerformed(ActionEvent e)
   {
     viewport.setShowGroupConservation(showGroupConservation.getState());
-    alignPanel.updateAnnotation();
+    alignPanel.updateAnnotation(applyAutoAnnotationSettings.getState());
+  }
+
+  /* (non-Javadoc)
+   * @see jalview.jbgui.GAlignFrame#showConsensusHistogram_actionPerformed(java.awt.event.ActionEvent)
+   */
+  protected void showConsensusHistogram_actionPerformed(ActionEvent e)
+  {
+    viewport.setShowConsensusHistogram(showConsensusHistogram.getState());
+    alignPanel.updateAnnotation(applyAutoAnnotationSettings.getState());
+  }
+
+  /* (non-Javadoc)
+   * @see jalview.jbgui.GAlignFrame#showConsensusProfile_actionPerformed(java.awt.event.ActionEvent)
+   */
+  protected void showConsensusProfile_actionPerformed(ActionEvent e)
+  {
+    viewport.setShowConsensusProfile(showConsensusProfile.getState());
+    alignPanel.updateAnnotation(applyAutoAnnotationSettings.getState());
+  }
+  protected void applyAutoAnnotationSettings_actionPerformed(ActionEvent e)
+  {
+    alignPanel.updateAnnotation(applyAutoAnnotationSettings.getState());
   }
 
   /*
index 289fab7..159acb1 100755 (executable)
@@ -349,7 +349,15 @@ public class AlignViewport implements SelectionSource
 
           alignment.addAnnotation(quality);
         }
+        showGroupConservation = Cache.getDefault("SHOW_GROUP_CONSERVATION", false);
+        
+        {
+          
+        }
       }
+      showConsensusHistogram = Cache.getDefault("SHOW_CONSENSUS_HISTOGRAM", true);
+      showConsensusProfile = Cache.getDefault("SHOW_CONSENSUS_PROFILE", false);
+      showGroupConsensus = Cache.getDefault("SHOW_GROUP_CONSENSUS", false);
       // TODO: add menu option action that nulls or creates consensus object depending on if the user wants to see the annotation or not in a specific alignment
       consensus = new AlignmentAnnotation("Consensus", "PID",
               new Annotation[1], 0f, 100f, AlignmentAnnotation.BAR_GRAPH);
@@ -2086,6 +2094,35 @@ public class AlignViewport implements SelectionSource
    * should consensus rows be shown for groups
    */
   boolean showGroupConsensus = false;
+  /**
+   * should consensus profile be rendered by default
+   */
+  public boolean showConsensusProfile = false;
+  /**
+   * should consensus histograms be rendered by default
+   */
+  public boolean showConsensusHistogram = true;
+  /**
+   * @return the showConsensusProfile
+   */
+  public boolean isShowConsensusProfile()
+  {
+    return showConsensusProfile;
+  }
+  /**
+   * @param showConsensusProfile the showConsensusProfile to set
+   */
+  public void setShowConsensusProfile(boolean showConsensusProfile)
+  {
+    this.showConsensusProfile = showConsensusProfile;
+  }
+  /**
+   * @param showConsensusHistogram the showConsensusHistogram to set
+   */
+  public void setShowConsensusHistogram(boolean showConsensusHistogram)
+  {
+    this.showConsensusHistogram = showConsensusHistogram;
+  }
   
   /**
    * @return the showGroupConservation
@@ -2130,4 +2167,13 @@ public class AlignViewport implements SelectionSource
     this.includeAllConsensusSymbols = includeAllConsensusSymbols;
   }
   
+  /**
+   * 
+   * @return flag to indicate if the consensus histogram should be rendered by default
+   */
+  public boolean isShowConsensusHistogram()
+  {
+    return this.showConsensusHistogram;
+  }
+  
 }
index 4e3db27..99c7c72 100755 (executable)
@@ -20,6 +20,7 @@ package jalview.gui;
 
 import java.beans.*;
 import java.io.*;
+import java.util.Hashtable;
 import java.util.Vector;
 
 import java.awt.*;
@@ -1321,9 +1322,16 @@ public class AlignmentPanel extends GAlignmentPanel implements
    */
   public void updateAnnotation()
   {
+    updateAnnotation(false);
+  }
+  public void updateAnnotation(boolean applyGlobalSettings)
+  {
     boolean updateCalcs = false;
     boolean conv = av.isShowGroupConservation();
     boolean cons = av.isShowGroupConsensus();
+    boolean showprf = av.isShowConsensusProfile();
+    boolean showConsHist = av.isShowConsensusHistogram();
+    
     boolean sortg = true;
 
     // remove old automatic annotation
@@ -1333,10 +1341,12 @@ public class AlignmentPanel extends GAlignmentPanel implements
     // intersect alignment annotation with alignment groups
 
     AlignmentAnnotation[] aan = av.alignment.getAlignmentAnnotation();
+    Hashtable oldrfs = new Hashtable();
     for (int an = 0; an < aan.length; an++)
     {
       if (aan[an].autoCalculated && aan[an].groupRef != null)
       {
+        oldrfs.put(aan[an].groupRef, aan[an].groupRef);
         av.alignment.deleteAnnotation(aan[an]);
         aan[an] = null;
       }
@@ -1346,7 +1356,12 @@ public class AlignmentPanel extends GAlignmentPanel implements
     {
       updateCalcs = false;
       sg = (SequenceGroup) gr.elementAt(g);
-
+      if (applyGlobalSettings || !oldrfs.containsKey(sg))
+      {
+        // set defaults for this group's conservation/consensus
+        sg.setIncludeAllConsSymbols(showprf);
+        sg.setShowConsensusHistogram(showConsHist);
+      }
       if (conv)
       {
         updateCalcs = true;
@@ -1363,6 +1378,7 @@ public class AlignmentPanel extends GAlignmentPanel implements
         sg.recalcConservation();
       }
     }
+    oldrfs.clear();
     adjustAnnotationHeight();
   }
 }
index 3bf915a..61b9c31 100755 (executable)
@@ -432,12 +432,15 @@ public class AnnotationLabels extends JPanel implements MouseListener,
         {
         if (aa[selectedRow].groupRef!=null)
         {
-          ap.seqPanel.ap.idPanel.highlightSearchResults(aa[selectedRow].groupRef.getSequences(null));
           if (evt.getClickCount()>=2)
           {
             // todo: make the ap scroll to the selection
-            ap.av.setSelectionGroup(new SequenceGroup(aa[selectedRow].groupRef));
+            ap.seqPanel.ap.idPanel.highlightSearchResults(null);
+            ap.av.setSelectionGroup(//new SequenceGroup(
+                    aa[selectedRow].groupRef); // );
             ap.paintAlignment(false);
+          } else {
+            ap.seqPanel.ap.idPanel.highlightSearchResults(aa[selectedRow].groupRef.getSequences(null));
           }
           return;
         } else 
@@ -541,8 +544,27 @@ public class AnnotationLabels extends JPanel implements MouseListener,
         // av and sequencegroup need to implement same interface for
         if (aaa.groupRef != null)
         {
+          final JCheckBoxMenuItem chist = new JCheckBoxMenuItem(
+                  "Show Group Histogram", aa[selectedRow].groupRef
+                          .isShowConsensusHistogram());
+          chist.addActionListener(new ActionListener()
+          {
+            public void actionPerformed(ActionEvent e)
+            {
+              // TODO: pass on reference
+              // to ap
+              // so the
+              // view
+              // can be
+              // updated.
+              aaa.groupRef.setShowConsensusHistogram(chist.getState());
+              ap.repaint();
+              // ap.annotationPanel.paint(ap.annotationPanel.getGraphics());
+            }
+          });
+          pop.add(chist);
           final JCheckBoxMenuItem cprof = new JCheckBoxMenuItem(
-                  "Show Full Profile", aa[selectedRow].groupRef
+                  "Show Group Logo", aa[selectedRow].groupRef
                           .isIncludeAllConsSymbols());
           cprof.addActionListener(new ActionListener()
           {
@@ -561,9 +583,26 @@ public class AnnotationLabels extends JPanel implements MouseListener,
           });
           pop.add(cprof);
         } else {
-/*          final JCheckBoxMenuItem cprof = new JCheckBoxMenuItem(
-                  "Show Full Profile", aa[selectedRow].groupRef
-                          .isIncludeAllConsSymbols());
+          final JCheckBoxMenuItem chist = new JCheckBoxMenuItem(
+                  "Show Histogram", av.isShowConsensusHistogram());
+          chist.addActionListener(new ActionListener()
+          {
+            public void actionPerformed(ActionEvent e)
+            {
+              // TODO: pass on reference
+              // to ap
+              // so the
+              // view
+              // can be
+              // updated.
+              av.setShowConsensusHistogram(chist.getState());
+              ap.repaint();
+              // ap.annotationPanel.paint(ap.annotationPanel.getGraphics());
+            }
+          });
+          pop.add(chist);
+          final JCheckBoxMenuItem cprof = new JCheckBoxMenuItem(
+                  "Show Logo", av.isShowConsensusProfile());
           cprof.addActionListener(new ActionListener()
           {
             public void actionPerformed(ActionEvent e)
@@ -574,12 +613,12 @@ public class AnnotationLabels extends JPanel implements MouseListener,
               // view
               // can be
               // updated.
-              aaa.groupRef.setIncludeAllConsSymbols(cprof.getState());
+              av.setShowConsensusProfile(cprof.getState());
               ap.repaint();
               // ap.annotationPanel.paint(ap.annotationPanel.getGraphics());
             }
           });
-          pop.add(cprof);       */   
+          pop.add(cprof);   
         }
         final JMenuItem consclipbrd = new JMenuItem(COPYCONS_SEQ);
         consclipbrd.addActionListener(this);
index 6d94687..6273fbc 100755 (executable)
@@ -84,9 +84,8 @@ public class Preferences extends GPreferences
      */
     
     groupURLLinks = new Vector();
-    groupURLLinks.addElement("UNIPROT|EnVision2|http://www.ebi.ac.uk/enfin-srv/envision2/pages/linkin.jsf?workflow=Default&datasetName=JalviewIDs$DATASETID$&input=$SEQUENCEIDS$&inputType=0|,");
-    // TODO: make sequence Group URL links more efficiently generated so popup menu does not take so long. 
-    // groupURLLinks.addElement("Seqs|EnVision2|http://www.ebi.ac.uk/enfin-srv/envision2/pages/linkin.jsf?workflow=Default&datasetName=JalviewSeqs$DATASETID$&input=$SEQUENCES=/([A-Za-z]+)+/=$&inputType=1|,");
+    groupURLLinks.addElement("UNIPROT|EnVision2|http://www.ebi.ac.uk/enfin-srv/envision2/pages/linkin.jsf?tool=Jalview&workflow=Default&datasetName=JalviewIDs$DATASETID$&input=$SEQUENCEIDS$&inputType=0|,");
+    groupURLLinks.addElement("Seqs|EnVision2|http://www.ebi.ac.uk/enfin-srv/envision2/pages/linkin.jsf?tool=Jalview&workflow=Default&datasetName=JalviewSeqs$DATASETID$&input=$SEQUENCES=/([A-Za-z]+)+/=$&inputType=1|,");
     
   }
 
@@ -122,10 +121,6 @@ public class Preferences extends GPreferences
     fullScreen.setSelected(Cache.getDefault("SHOW_FULLSCREEN", false));
     annotations.setSelected(Cache.getDefault("SHOW_ANNOTATIONS", true));
 
-    conservation.setEnabled(Cache.getDefault("SHOW_ANNOTATIONS", true));
-    quality.setEnabled(Cache.getDefault("SHOW_ANNOTATIONS", true));
-    identity.setEnabled(Cache.getDefault("SHOW_ANNOTATIONS", true));
-
     conservation.setSelected(Cache.getDefault("SHOW_CONSERVATION", true));
     quality.setSelected(Cache.getDefault("SHOW_QUALITY", true));
     identity.setSelected(Cache.getDefault("SHOW_IDENTITY", true));
@@ -202,6 +197,11 @@ public class Preferences extends GPreferences
 
     autoCalculateConsCheck.setSelected(Cache.getDefault(
             "AUTO_CALC_CONSENSUS", true));
+    showGroupConsensus.setSelected(Cache.getDefault("SHOW_GROUP_CONSENSUS",false));
+    showGroupConservation.setSelected(Cache.getDefault("SHOW_GROUP_CONSERVATION", false));
+    showConsensHistogram.setSelected(Cache.getDefault("SHOW_CONSENSUS_HISTOGRAM",true));
+    showConsensProfile.setSelected(Cache.getDefault("SHOW_CONSENSUS_PROFILE",false));
+    
     padGaps.setSelected(Cache.getDefault("PAD_GAPS", false));
 
     /***************************************************************************
@@ -229,7 +229,7 @@ public class Preferences extends GPreferences
     usagestats.setSelected(Cache.getDefault("USAGESTATS", false));
     questionnaire.setSelected(Cache.getProperty("NOQUESTIONNAIRES")==null); // note antisense here
     versioncheck.setSelected(Cache.getDefault("VERSION_CHECK", true)); // default is true
-
+    annotations_actionPerformed(null); // update the display of the annotation settings
     try
     {
       jbInit();
@@ -281,6 +281,10 @@ public class Preferences extends GPreferences
     Cache.applicationProperties.setProperty("ID_ITALICS", Boolean
             .toString(idItalics.isSelected()));
     Cache.applicationProperties.setProperty("SHOW_UNCONSERVED",Boolean.toString(showUnconserved.isSelected()));
+    Cache.applicationProperties.setProperty("SHOW_GROUP_CONSENSUS",Boolean.toString(showGroupConsensus.isSelected()));
+    Cache.applicationProperties.setProperty("SHOW_GROUP_CONSERVATION",Boolean.toString(showGroupConservation.isSelected()));
+    Cache.applicationProperties.setProperty("SHOW_CONSENSUS_HISTOGRAM",Boolean.toString(showConsensHistogram.isSelected()));
+    Cache.applicationProperties.setProperty("SHOW_CONSENSUS_PROFILE",Boolean.toString(showConsensProfile.isSelected()));
     Cache.applicationProperties.setProperty("ANTI_ALIAS", Boolean
             .toString(smoothFont.isSelected()));
 
@@ -471,6 +475,10 @@ public class Preferences extends GPreferences
     conservation.setEnabled(annotations.isSelected());
     quality.setEnabled(annotations.isSelected());
     identity.setEnabled(annotations.isSelected());
+    showConsensHistogram.setEnabled(annotations.isSelected());
+    showConsensProfile.setEnabled(annotations.isSelected());
+    showGroupConsensus.setEnabled(annotations.isSelected());
+    showGroupConservation.setEnabled(annotations.isSelected());
   }
 
   public void newLink_actionPerformed(ActionEvent e)
index 020e617..a89228e 100755 (executable)
@@ -284,9 +284,13 @@ public class GAlignFrame extends JInternalFrame
   private JMenuItem justifyLeftMenuItem=new JMenuItem();
 
   private JMenuItem justifyRightMenuItem=new JMenuItem();
-  
+
+  JMenu autoAnnMenu = new JMenu();
   protected JCheckBoxMenuItem showGroupConsensus=new JCheckBoxMenuItem();
   protected JCheckBoxMenuItem showGroupConservation=new JCheckBoxMenuItem();
+  protected JCheckBoxMenuItem showConsensusHistogram=new JCheckBoxMenuItem();
+  protected JCheckBoxMenuItem showConsensusProfile=new JCheckBoxMenuItem();
+  protected JCheckBoxMenuItem applyAutoAnnotationSettings=new JCheckBoxMenuItem();
 
   private JMenuItem grpsFromSelection = new JMenuItem();
   public GAlignFrame()
@@ -1025,6 +1029,38 @@ public class GAlignFrame extends JInternalFrame
       }
       
     });
+    showConsensusHistogram.setText("Show Consensus Histogram");
+    showConsensusHistogram.addActionListener(new ActionListener()
+    {
+
+      public void actionPerformed(ActionEvent e)
+      {
+        showConsensusHistogram_actionPerformed(e);
+      }
+      
+    });
+    showConsensusProfile.setText("Show Consensus Logo");
+    showConsensusProfile.addActionListener(new ActionListener()
+    {
+
+      public void actionPerformed(ActionEvent e)
+      {
+        showConsensusProfile_actionPerformed(e);
+      }
+      
+    });
+    applyAutoAnnotationSettings.setText("Apply to all groups");
+    applyAutoAnnotationSettings.setState(false);
+    applyAutoAnnotationSettings.setVisible(true);
+    applyAutoAnnotationSettings.addActionListener(new ActionListener()
+    {
+
+      public void actionPerformed(ActionEvent e)
+      {
+        applyAutoAnnotationSettings_actionPerformed(e);
+      }
+      
+    });
 
     nucleotideColour.setText("Nucleotide");
     nucleotideColour.addActionListener(new java.awt.event.ActionListener()
@@ -1560,6 +1596,7 @@ public class GAlignFrame extends JInternalFrame
       }
     });
     tooltipSettingsMenu.setText("Sequence ID Tooltip");
+    autoAnnMenu.setText("Autocalculated Annotation");
     alignFrameMenuBar.add(fileMenu);
     alignFrameMenuBar.add(editMenu);
     alignFrameMenuBar.add(selectMenu);
@@ -1613,8 +1650,13 @@ public class GAlignFrame extends JInternalFrame
     viewMenu.addSeparator();
     viewMenu.add(followHighlightMenuItem);
     viewMenu.add(annotationPanelMenuItem);
-    viewMenu.add(showGroupConservation);
-    viewMenu.add(showGroupConsensus);
+    autoAnnMenu.add(applyAutoAnnotationSettings);
+    autoAnnMenu.add(showConsensusHistogram);
+    autoAnnMenu.add(showConsensusProfile);
+    autoAnnMenu.addSeparator();
+    autoAnnMenu.add(showGroupConservation);
+    autoAnnMenu.add(showGroupConsensus);
+    viewMenu.add(autoAnnMenu);
     viewMenu.addSeparator();
     viewMenu.add(showSeqFeatures);
     //viewMenu.add(showSeqFeaturesHeight);
@@ -1711,6 +1753,24 @@ public class GAlignFrame extends JInternalFrame
     selectMenu.add(grpsFromSelection);
   }
 
+  protected void applyAutoAnnotationSettings_actionPerformed(ActionEvent e)
+  {
+    // TODO Auto-generated method stub
+    
+  }
+
+  protected void showConsensusHistogram_actionPerformed(ActionEvent e)
+  {
+    // TODO Auto-generated method stub
+    
+  }
+
+  protected void showConsensusProfile_actionPerformed(ActionEvent e)
+  {
+    // TODO Auto-generated method stub
+    
+  }
+
   protected void makeGrpsFromSelection_actionPerformed(ActionEvent e)
   {
     // TODO Auto-generated method stub
index 7b2e5c4..6b2c0f4 100755 (executable)
@@ -138,6 +138,10 @@ public class GPreferences extends JPanel
 
   JPanel jPanel3 = new JPanel();
 
+  JPanel autoAnnotSettings1 = new JPanel();
+
+  JPanel autoAnnotSettings2 = new JPanel();
+
   JPanel exportTab = new JPanel();
 
   JLabel epsLabel = new JLabel();
@@ -196,6 +200,12 @@ public class GPreferences extends JPanel
   protected JCheckBox usagestats = new JCheckBox(); 
   protected JCheckBox questionnaire = new JCheckBox();
   protected JCheckBox versioncheck = new JCheckBox();
+  protected JLabel showGroupbits = new JLabel();
+  protected JLabel showConsensbits = new JLabel();
+  protected JCheckBox showConsensProfile = new JCheckBox();
+  protected JCheckBox showConsensHistogram = new JCheckBox();
+  protected JCheckBox showGroupConsensus = new JCheckBox();
+  protected JCheckBox showGroupConservation = new JCheckBox();
 
   /**
    * Creates a new GPreferences object.
@@ -260,6 +270,38 @@ public class GPreferences extends JPanel
     identity.setHorizontalTextPosition(SwingConstants.LEFT);
     identity.setSelected(true);
     identity.setText("Consensus");
+    showGroupbits.setFont(verdana11);
+    showGroupbits.setHorizontalAlignment(SwingConstants.RIGHT);
+    showGroupbits.setHorizontalTextPosition(SwingConstants.LEFT);
+    showGroupbits.setText("Group:");
+    showConsensbits.setFont(verdana11);
+    showConsensbits.setHorizontalAlignment(SwingConstants.RIGHT);
+    showConsensbits.setHorizontalTextPosition(SwingConstants.LEFT);
+    showConsensbits.setText("Consensus:");
+    showConsensHistogram.setEnabled(false);
+    showConsensHistogram.setFont(verdana11);
+    showConsensHistogram.setHorizontalAlignment(SwingConstants.RIGHT);
+    showConsensHistogram.setHorizontalTextPosition(SwingConstants.LEFT);
+    showConsensHistogram.setSelected(true);
+    showConsensHistogram.setText("Histogram");
+    showConsensProfile.setEnabled(false);
+    showConsensProfile.setFont(verdana11);
+    showConsensProfile.setHorizontalAlignment(SwingConstants.RIGHT);
+    showConsensProfile.setHorizontalTextPosition(SwingConstants.LEFT);
+    showConsensProfile.setSelected(true);
+    showConsensProfile.setText("Profile");
+    showGroupConsensus.setEnabled(false);
+    showGroupConsensus.setFont(verdana11);
+    showGroupConsensus.setHorizontalAlignment(SwingConstants.RIGHT);
+    showGroupConsensus.setHorizontalTextPosition(SwingConstants.LEFT);
+    showGroupConsensus.setSelected(true);
+    showGroupConsensus.setText("Consensus");
+    showGroupConservation.setEnabled(false);
+    showGroupConservation.setFont(verdana11);
+    showGroupConservation.setHorizontalAlignment(SwingConstants.RIGHT);
+    showGroupConservation.setHorizontalTextPosition(SwingConstants.LEFT);
+    showGroupConservation.setSelected(true);
+    showGroupConservation.setText("Conservation");
     annotations.setFont(verdana11);
     annotations.setHorizontalAlignment(SwingConstants.RIGHT);
     annotations.setHorizontalTextPosition(SwingConstants.LEFT);
@@ -435,6 +477,8 @@ public class GPreferences extends JPanel
     jPanel2.setLayout(gridLayout2);
     gridLayout2.setRows(13);
     jPanel3.setBounds(new Rectangle(173, 35, 274, 26));
+    autoAnnotSettings1.setBounds(new Rectangle(173,53,274,26));// new Rectangle(173, 116, 274, 78));
+    autoAnnotSettings2.setBounds(new Rectangle(173,72,274,26));
     exportTab.setLayout(null);
     epsLabel.setFont(verdana11);
     epsLabel.setHorizontalAlignment(SwingConstants.RIGHT);
@@ -533,9 +577,19 @@ public class GPreferences extends JPanel
     visualTab.add(fontNameCB);
     visualTab.add(fontSizeCB);
     visualTab.add(fontStyleCB);
+    visualTab.add(autoAnnotSettings1);
+    visualTab.add(autoAnnotSettings2);
     jPanel3.add(conservation);
     jPanel3.add(identity);
     jPanel3.add(quality);
+    autoAnnotSettings1.setLayout(new FlowLayout());
+    autoAnnotSettings2.setLayout(new FlowLayout());
+    autoAnnotSettings1.add(showConsensbits);
+    autoAnnotSettings1.add(showConsensHistogram);
+    autoAnnotSettings1.add(showConsensProfile);
+    autoAnnotSettings2.add(showGroupbits);
+    autoAnnotSettings2.add(showGroupConsensus);
+    autoAnnotSettings2.add(showGroupConservation);
     visualTab.add(jPanel2);
 
     linkPanel.add(editLinkButtons, BorderLayout.EAST);