Filter on Custom Criteria
Filter on Custom Criteria takes as input an element that contains items, for which data can be displayed as rows in a table view (
), and outputs the subset of those items that match a set of filter criteria.
To run the tool, go to:
Tools | Utility Tools (
) | Filtering (
) | Filter on Custom Criteria (
)
To see a list of element types that can be used as input, click on the (
) icon in the top right corner of the input selection wizard (figure 37.10).
Figure 37.10: Clicking on the info icon at the top right corner of the input selection wizard opens a window showing a list of element types that can be used as inputs, as well as whether the inputs can be annotated.
After selecting the input element, the criteria to filter on are defined. Each criterion consists of an attribute, an operator, and a value (figure 37.11).
Figure 37.11: Filter criteria to extract the mouse sequences containing at least 50 nucleotides. The drop down menu shows some of the attributes populated using the Load Attributes button.
To make defining criteria easier, the Load Attributes button can be used to populate a drop down list of the attributes (typically, the column names in the table view (
)) found in the element selected in the Template element field. By default, the tool's input is preselected. Use the browse (
) button (figure 37.11) to select a different element. We recommend selecting as template a small element containing all necessary attributes, as loading attributes from large elements can take a long time.
If a template element is not used for populating a drop down list, attributes can be entered by typing directly. Criteria that reference attributes not present in the input element are considered not satisfied, except when the operator is "=" and the value is blank.
Defining filter criteria and building more complex filter sets works the same as in advanced table filters:
- The same operators are available, subject to the same limitations.
- Click the Add button to add criteria.
- Click the (
) icon to remove a criterion.
- Click the Clear button to remove all defined criteria.
- Match all and Match any specify whether an item matches the configured filter criteria only if all criteria are satisfied, or if satisfying a single criterion is sufficient.
- Keep and Remove specify whether items that match the criteria are included or excluded.
Fusions in annotation tracks produced by Detect and Refine Fusion Genes or Detect Fusion Genes from DNA are represented by two annotations, one for the 5' breakpoint and one for the 3' breakpoint. To preserve the full fusion information, filtering is applied at the fusion level, i.e., both annotations are retained or discarded together. When filtering using:
- Keep: Both annotations are included if either one satisfies the filtering criteria.
- Remove: Both annotations are excluded if either one does not satisfy the filtering criteria.
- Criteria can be grouped using the right-click menu. Groups can have a description and can be inverted.
- Criteria can be rearranged using drag and drop.
- Filter sets can be saved and reused.
Refer to the advanced table filters for more details.
Apply filter criteria
The configured filter criteria can be applied in two ways:
- Filter removes the excluded items from the output, according to the Keep and Remove options.
- Annotate keeps all items in the output, but adds a "Filter" attribute to each item containing:
- PASS if the item is included, according to the Keep and Remove options.
- The criteria that are not satisfied, if Keep is selected.
- The criteria that are satisfied, if Remove is selected.
Annotate is similar to Add match status in advanced table filters: both indicate whether items meet the filter criteria. With Annotate, this information is stored as a "Filter" attribute in the output, while Add match status creates a temporary "Match status" column in the table view. The content of "Filter" is equivalent to "Match status", but without green/red color coding. Note that not all supported input element types can be annotated (figure 37.10).
When running Filter on Custom Criteria consecutively with Annotate, the annotations are updated consistently:
- If an item passes one of the runs, but not the other, the annotation contains the value from the run where it does not pass.
- If an item does not pass either run, the annotation contains the values from both runs.
Report
Filter on Custom Criteria can optionally produce a report containing the following sections (figure 37.12):
- Summary A table showing the total number of items, and how many passed and did not pass.
- Not passed details A table summarizing how many items did not pass for each set of criteria.
Figure 37.12: An example report produced by Filter on Custom Criteria.
