Select filter
From Piki
The select filter is a SQL inspired sample selection tool. You can use it to select samples for removal, or select which samples to keep.
| Select | |
| Name | Select |
| Deployable | Yes |
| Static | Yes |
| Sample modifier | Yes |
| Feature modifier | No |
Contents |
Usage
The select filter features a SQL resembling query language that is used to to write Boolean expressions. the expression is evaluated for each row and to determine if the row is selected or not. An extra virtual feature 'Row' is added to simplify index based selection.
Language
| Operator | Operation |
|---|---|
| AND | logical and |
| OR | logical or |
| < | less then |
| > | greater then |
| <= | less or equal to |
| >= | greater or equal to |
| <> | not equal to |
| = | equal to |
| + | plus |
| - | minus |
| * | product |
| / | division |
| >= | greater or equal to |
| % | modulus |
| Operator | Operation |
|---|---|
| Sum() | sum |
| Avg() | average |
| Min() | minimum |
| Max() | maximum |
| Count() | number of rows |
| StDev() | standard deviation |
| Var() | variance |
| IIF(expr, if true, if false) | much like ? : in c |
The following characters must be escaped with [] in column names:
~, (, ), #, \, /, =, <, >, +, -, *, %, &, |, ^, ', ", [, ].
Examples
Selection
| Operation | Effect |
|---|---|
| SELECT: " Column1 > Avg(Column3) AND Column5 < 1500 " | Select all samples where Column1 values are larger than the average of column 3 and where Column5 < 1500. |
| SELECT: " Row % 4 = 0 " | Select every forth row. |
Sorting
It is possible to sort the data set in either ascending or descending mode.
| Operation | Effect |
|---|---|
| SORT: " Column3 desc " | Sort samples according to Column3 in descending order. |
Settings
The settings can be modified using the settings browser.
| Select filter settings |
|---|
|
|
See also
- Filter - Article covering general filter principles.
- List of Filter components - List of all available filters.
- Data unit - Article explaining data units in detail.
- Data - Article explaining essential data concepts.
