Filters values from numeric matrices that are below or above
quantile limits. Filtered values are set to NA or, if
removeMissing is true, rows with all missing values are removed
from the output. Quantile limits are between 0 and 1.
For example, lowQuantile=0.05 and highQuantile=0.95 would
set to NA all values that are below 5'th percentile or above
95'th percentile. By default filtering is done for each column
independently (see parameter colsIndependently
).
There can be one or two input matrices. If there are two matrices, they must have identical dimensions. A value is filtered if it is outside quantile limits in both matrices.
Version | 1.0 |
---|---|
Bundle | tools |
Categories | Filter |
Specialties | generic |
Authors | Kristian Ovaska (kristian.ovaska@helsinki.fi) |
Issue tracker | View/Report issues |
Requires | R |
Source files | component.xml QuantileFilter.r |
Usage | Example with default values |
Name | Type | Mandatory | Description |
---|---|---|---|
in1 | T1 (generic) | Mandatory | Input matrix 1. |
in2 | T2 (generic) | Optional | Input matrix 2. |
Name | Type | Description |
---|---|---|
out1 | T1 (generic) | Output matrix 1 where filtered cells have been replaced with NA, or possibly removed if removeMissing is true. |
out2 | T2 (generic) | Output matrix 2 where filtered cells have been replaced with NA, or possibly removed if removeMissing is true. |
Name | Type | Default | Description |
---|---|---|---|
colsIndependently | boolean | true | If true, filtering is done for each column independently. If
false, filtering is done based on all columns in a matrix: a row is
set to NA values if all the values are above
highQuantile limit or all the values are below
lowQuantile limit. |
highQuantile | float | 1 | High threshold, between 0 and 1 inclusive. Set to 1 to disable high threshold filtering. |
lowQuantile | float | 0 | Low threshold, between 0 and 1 inclusive. Set to 0 to disable low threshold filtering. |
removeMissing | boolean | true | If true, do not include rows that have only missing values in the output. If false, include the rows but print NA's for all columns. |
Test case | Parameters▼ | IN in1 |
IN in2 |
OUT out1 |
OUT out2 |
|
---|---|---|---|---|---|---|
case1_LL | properties | in1 | in2 | out1 | out2 | |
lowQuantile=0.51, |
||||||
case2_LH | properties | in1 | in2 | out1 | out2 | |
lowQuantile=0.51, |
||||||
case3_one | properties | in1 | (missing) | out1 | out2 | |
lowQuantile=0.26, |
||||||
case4_by_row | properties | in1 | in2 | out1 | out2 | |
lowQuantile=0.51, |