JAL-1553 added help documentation and updated AnnotationColumnChooser to exclude... features/JAL-1553_improvement-select-column-by-annotation-row-query-interface
authorCharles Ofoegbu <tcnofoegbu@dundee.ac.uk>
Fri, 23 Jan 2015 16:47:20 +0000 (16:47 +0000)
committerCharles Ofoegbu <tcnofoegbu@dundee.ac.uk>
Fri, 23 Jan 2015 16:47:20 +0000 (16:47 +0000)
help/help.jhm
help/helpTOC.xml
help/html/calculations/AnnotationColumnSelectionWithSM.gif [new file with mode: 0644]
help/html/calculations/AnnotationColumnSelectionWithoutSM.gif [new file with mode: 0644]
help/html/calculations/columnFilterByAnnotation.html [new file with mode: 0644]
resources/lang/Messages.properties
src/jalview/appletgui/AnnotationColumnChooser.java

index af010a4..eafcc68 100755 (executable)
    <mapID target="calcs.alquality" url="html/calculations/quality.html"/>   
    <mapID target="calcs.alconserv" url="html/calculations/conservation.html"/>
    <mapID target="calcs.alstrconsensus" url="html/calculations/structureconsensus.html"/>  
-   <mapID target="calcs.consensus" url="html/calculations/consensus.html"/>
+   <mapID target="calcs.consensus" url="html/calculations/consensus.html"/>   
+   <mapID target="calcs.annotation" url="html/calculations/columnFilterByAnnotation.html"/>
    
    <mapID target="nucleicAcids" url="html/na/index.html"/>
    
index b67eb6f..9cfd17e 100755 (executable)
@@ -90,6 +90,7 @@
                        <tocitem text="Tree/PCA Input Data" target="recoverInputdata" />
                        <tocitem text="Pairwise Alignments" target="pairwise" />
                        <tocitem text="Remove Redundancy" target="redundancy" />
+                       <tocitem text="Select Column by Annotation" target="calcs.annotation" />
                </tocitem>
                <tocitem text="Sequence Annotations" target="seqannots" expand="true">
                        <tocitem text="Annotation from Structure" target="xsspannotation" expand="false" />
diff --git a/help/html/calculations/AnnotationColumnSelectionWithSM.gif b/help/html/calculations/AnnotationColumnSelectionWithSM.gif
new file mode 100644 (file)
index 0000000..4373493
Binary files /dev/null and b/help/html/calculations/AnnotationColumnSelectionWithSM.gif differ
diff --git a/help/html/calculations/AnnotationColumnSelectionWithoutSM.gif b/help/html/calculations/AnnotationColumnSelectionWithoutSM.gif
new file mode 100644 (file)
index 0000000..921f028
Binary files /dev/null and b/help/html/calculations/AnnotationColumnSelectionWithoutSM.gif differ
diff --git a/help/html/calculations/columnFilterByAnnotation.html b/help/html/calculations/columnFilterByAnnotation.html
new file mode 100644 (file)
index 0000000..62bfcf1
--- /dev/null
@@ -0,0 +1,95 @@
+<html>
+<!--
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.2)
+ * Copyright (C) 2014 The Jalview Authors
+ * 
+ * This file is part of Jalview.
+ * 
+ * Jalview is free software: you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License 
+ * as published by the Free Software Foundation, either version 3
+ * of the License, or (at your option) any later version.
+ *  
+ * Jalview is distributed in the hope that it will be useful, but 
+ * WITHOUT ANY WARRANTY; without even the implied warranty 
+ * of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ * PURPOSE.  See the GNU General Public License for more details.
+ * 
+ * You should have received a copy of the GNU General Public License
+ * along with Jalview.  If not, see <http://www.gnu.org/licenses/>.
+ * The Jalview Authors are detailed in the 'AUTHORS' file.
+ -->
+<head>
+<title>Filter Columns by Annotation</title>
+</head>
+
+<body>
+       <p>
+               <strong> Filter Columns by Annotation </strong>
+       </p>
+       <p>Jalview allows the columns of an alignment to be filtered using
+               any annotation rows added to that alignment.</p>
+       From &quot;Select&quot; menu
+       <strong>&#8594;</strong> &quot;Select by Annotation...&quot; to bring
+       up the Select by Annotation window. The filter options vary depending
+       on the type of annotation selected. If an annotation that has a numeric
+       values is selected, the threshold filter option is activated as seen in the
+       figure on the right below.
+       <br>
+       <br> 
+
+       <div style="width: 48%; float: left; margin-left: 4%">
+               <img src="annotationColumnSelectionWithoutSM.gif">
+       </div>
+       <div style="width: 48%; float: right">
+               <img src="annotationColumnSelectionWithSM.gif">
+       </div>
+       <div>&nbsp</div>
+
+       <ul>
+               <li>Select which annotation to base the filtering on using the
+                       top-most selection box.</li>
+
+               <li><strong>Search Filter</strong>
+                       <ul>
+                               <li>When a text is entered in the textfield on the search
+                                       filter section, the &quot;Display Label&quot; and &quot;Description&quot;
+                                       checkboxes becomes selectable.</li>
+                               <li>On selecting any of the checkboxes, a regular expresion
+                                       search (RegEx) is executed on the specified field of the current
+                                       annotation row selected, and the matching columns will be highlighted
+                                       in the alignment.</li>
+                       </ul>
+               <li><strong>Structure Filter</strong>
+                       <ul>
+                               <li>Alignment columns can also be filtered by the type of
+                                       secondary structure present in a choosen annotation row.</li>
+                               <li>This can be achieved by ticking the type of structure you
+                                       wish to filter by under the structures filter section.</li>
+                       </ul>
+               <li><strong>Threshold Filter</strong>
+                       <ul>
+                               <li>This filter is only activated for annotation which contain
+                                       numeric values</li>
+                               <li>Select whether to Filter the alignment above or below an
+                                       adjustable threshold with the selection box within the threshold
+                                       filter section.</li>
+                               <li>Change the threshold value with the slider, or enter the
+                                       exact value in the text box.</li>
+                       </ul>
+               <li><strong>Actions</strong>
+                       <ul>
+                               <li>The &quot;Select&quot; and &quot;Hide&quot; radio buttons
+                                       determines the action that will be carried out on the matching
+                                       columns in the alignment during the filtering process.</li>
+                               <li>The default option is &quot;Select&quot; and this simply
+                                       enables column selection on the matching alignment column.</li>
+                               <li>While the &quot;Hide&quot; option enables the matching columns to
+                                       be hidden automatically during the filtering process.</li>
+                               <li>The &quot;Ok&quot; button applies the filter when clicked.</li>
+                               <li>And finally, The &quot;Cancel&quot; button restores the alignment to its previous state before the filtering when clicked. 
+                       </ul></li>
+       </ul>
+
+</body>
+</html>
index 5c1de0b..aafb445 100644 (file)
@@ -1177,7 +1177,7 @@ label.normalise_logo = Normalise Logo
 label.no_colour_selection_in_scheme = Please, make a colour selection before to apply colour scheme
 label.no_colour_selection_warn = Error saving colour scheme
 label.select_by_annotation = Select By Annotation
-action.select_by_annotation = Select by annotation...
+action.select_by_annotation = Select by Annotation...
 label.threshold_filter =  Threshold Filter
 action.hide = Hide
 action.select = Select
index 496d4a4..e25ff8f 100644 (file)
@@ -30,7 +30,9 @@ import java.awt.event.TextListener;
 import java.util.Iterator;
 import java.util.Vector;
 
-import net.miginfocom.swing.MigLayout;
+import javax.swing.JPanel;
+
+//import net.miginfocom.swing.MigLayout;
 
 public class AnnotationColumnChooser extends AnnotationRowFilter implements
         ActionListener, AdjustmentListener, ItemListener, MouseListener
@@ -55,6 +57,10 @@ public class AnnotationColumnChooser extends AnnotationRowFilter implements
 
   private BorderLayout borderLayout1 = new BorderLayout();
 
+  private BorderLayout gBorderLayout = new BorderLayout();
+
+  private BorderLayout ngBorderLayout = new BorderLayout();
+
   private Choice threshold = new Choice();
 
   private StructureFilterPanel gStructureFilterPanel;
@@ -187,15 +193,15 @@ public class AnnotationColumnChooser extends AnnotationRowFilter implements
 
     thresholdPanel.setBackground(Color.white);
     thresholdPanel.setFont(JvSwingUtils.getLabelFont());
-    thresholdPanel.setLayout(new MigLayout("", "[left][right]", "[][]"));
+    // thresholdPanel.setLayout(new MigLayout("", "[left][right]", "[][]"));
 
     actionPanel.setBackground(Color.white);
     actionPanel.setFont(JvSwingUtils.getLabelFont());
 
-    graphFilterView.setLayout(new MigLayout("", "[left][right]", "[][]"));
+    graphFilterView.setLayout(gBorderLayout);
     graphFilterView.setBackground(Color.white);
 
-    noGraphFilterView.setLayout(new MigLayout("", "[left][right]", "[][]"));
+    noGraphFilterView.setLayout(ngBorderLayout);
     noGraphFilterView.setBackground(Color.white);
 
     annotationComboBoxPanel.setBackground(Color.white);
@@ -209,21 +215,29 @@ public class AnnotationColumnChooser extends AnnotationRowFilter implements
     ngStructureFilterPanel = new StructureFilterPanel(this);
 
     thresholdPanel.setTitle("Threshold Filter");
-    thresholdPanel.add(getThreshold(), "grow");
-    thresholdPanel.add(thresholdValue, "grow, wrap");
-    thresholdPanel.add(slider, "grow, span, wrap");
+    thresholdPanel.add(getThreshold());
+    thresholdPanel.add(slider);
+    thresholdPanel.add(thresholdValue);
 
     actionPanel.add(ok);
     actionPanel.add(cancel);
 
-    graphFilterView.add(gSearchPanel, "grow, span, wrap");
-    graphFilterView.add(gStructureFilterPanel, "grow, span, wrap");
-    graphFilterView.add(thresholdPanel, "grow, span, wrap");
-    graphFilterView.add(gFurtherActionPanel);
+    JPanel staticPanel = new JPanel();
+    staticPanel.setLayout(new BorderLayout());
+    staticPanel.setBackground(Color.white);
+
+    staticPanel.add(gSearchPanel, java.awt.BorderLayout.NORTH);
+    staticPanel.add(gStructureFilterPanel, java.awt.BorderLayout.SOUTH);
+
+    graphFilterView.add(staticPanel, java.awt.BorderLayout.NORTH);
+    graphFilterView.add(thresholdPanel, java.awt.BorderLayout.CENTER);
+    graphFilterView.add(gFurtherActionPanel, java.awt.BorderLayout.SOUTH);
 
-    noGraphFilterView.add(ngSearchPanel, "grow, span, wrap");
-    noGraphFilterView.add(ngStructureFilterPanel, "grow, span, wrap");
-    noGraphFilterView.add(ngFurtherActionPanel);
+    noGraphFilterView.add(ngSearchPanel, java.awt.BorderLayout.PAGE_START);
+    noGraphFilterView.add(ngStructureFilterPanel,
+            java.awt.BorderLayout.CENTER);
+    noGraphFilterView.add(ngFurtherActionPanel,
+            java.awt.BorderLayout.CENTER);
 
     annotationComboBoxPanel.add(getAnnotations());
     switchableViewsPanel.add(noGraphFilterView,