Filter table (analysis)
- Analysis title
- File:Filter-table-analysis-icon.png Filter table
- Provider
- Institute of Systems Biology
- Plugin
- ru.biosoft.analysis (Common methods of data analysis plug-in)
Description
This analysis allows you to filter table (that is, to remove rows which don't fulfill given condition). It doesn't modify original table. The analysis is functionally equivalent to 'Filters' tab you can find under the opened table document.
Parameters:
- Input table – Table to filter
- Filtering expression – Expression in JavaScript like 'ColumnName1 > 5 && ColumnName2 < 0'
- Filtering mode – Which rows to select
- Rows count – Number of rows in result
- Output table – Path to the filtered table
Expression must be written in JavaScript language to sort out filtered and non-filtered rows. Inside it you may use column names and various operations supported by JavaScript. Note that non-alphanumeric symbols in column names should be replaced with underscores ('_'). To determine exactly how to refer to columns in your table, you may open the table as the document, select 'Filters' tab below and check 'Columns' list. Alternatively you may use $ object to access columns by original name. For example, if you have the column named "Fold change", you may refer to it either as Fold_change or as $["Fold change"]. Some of useful JavaScript operations are listed below:
- == – check equality (don't mix with single '=').
- != – check inequality.
- >; <; >=; <=; greater than, lesser than, greater or equal, lesser or equal.
- +; −; *; / – standard math operations.
- &&; || – logical 'and' and 'or' operations.
- Math.sqrt(x); Math.sin(x); Math.pow(x,y); etc. – math functions.
- Math.min(x,y); Math.max(x,y) – minimal and maximal value of two arguments.
Simple condition example (select all rows where value in column Log(Fold Change) is greater than 2):
Log_Fold_Change_ > 2
Complex condition example (select all rows where either Score1 or Score2 has absolute value more than 10 and non-empty GeneSymbol):
Math.max(Math.abs(Score1),Math.abs(Score2)) > 10 && GeneSymbol != ""