<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"/>
<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" />
--- /dev/null
+<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 "Select" menu
+ <strong>→</strong> "Select by Annotation..." 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> </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 "Display Label" and "Description"
+ 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 "Select" and "Hide" 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 "Select" and this simply
+ enables column selection on the matching alignment column.</li>
+ <li>While the "Hide" option enables the matching columns to
+ be hidden automatically during the filtering process.</li>
+ <li>The "Ok" button applies the filter when clicked.</li>
+ <li>And finally, The "Cancel" button restores the alignment to its previous state before the filtering when clicked.
+ </ul></li>
+ </ul>
+
+</body>
+</html>
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
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
private BorderLayout borderLayout1 = new BorderLayout();
+ private BorderLayout gBorderLayout = new BorderLayout();
+
+ private BorderLayout ngBorderLayout = new BorderLayout();
+
private Choice threshold = new Choice();
private StructureFilterPanel gStructureFilterPanel;
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);
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,