Up: Component summary Component


Filters out rows from a matrix where the standard deviation is below (or above) a threshold. Also rows with less than two non-NA values are filtered as the standard deviation can not be computed. The filter can be used to, for example, remove rows from an expression matrix where the variation between samples is low.

Version 1.1
Bundle tools
Categories Filter
Specialties generic
Authors Kristian Ovaska (kristian.ovaska@helsinki.fi)
Issue tracker View/Report issues
Requires R
Source files component.xml VariationFilter.r
Usage Example with default values

Type parameters (generics)


Name Type Mandatory Description
in T (generic) Mandatory Input matrix.


Name Type Description
out T (generic) Filtered matrix.


Name Type Default Description
columns string "*" Names of columns that are included in standard deviation computation. However, all columns are always present in the output matrix. The special value * means all columns exept the first one having the rownames.
filterSmallVariation boolean true If true, rows with standard deviation BELOW the threshold are filtered out (normal operation). If false, rows with standard deviation ABOVE the threshold are filtered out.
fraction boolean true If true, the standard deviation threshold is a fraction of the mean of each row. Otherwise, the threshold is the nominal standard deviation.
threshold float 0.1 Standard deviation threshold as a percentage value of the mean of each row (if fraction=true) or as the absolute standard deviation (if fraction=false). For example, assume that fraction=true, the threshold is 0.1 and two rows have means 5 and 3; and standard deviations 0.2 and 0.4. The first row is removed since 0.2 is less than 0.1*5. The second row is kept since 0.4 is greater than 0.1*3.

Test cases

Test case Parameters IN
case1 (missing) in out
case2 properties in out


case3 properties in out


Generated 2018-12-18 07:42:33 by Anduril 2.0.0