Class RowLevelFilter<R,C>
- All Implemented Interfaces:
Filter<DoubleMatrix<R,C>, R, C, Double>
There are a number of decisions/caveats to consider:
Cutpoint determination
There are multiple ways of determining cutpoints. Some possibilities are the maximum value, the minimum value, the mean value, or the median value. The range and coefficient of variation are also included.
Note that if you want to use different methods for high-level filtering than for low-level filtering (e.g., using max for the low-level, and min for the high-level, you have to filter twice. This could cause problems if you are using fractional filtering and there are negative values (see below).
Filtering ratiometric data
For data that are normalized or ratios, it does not make sense to use this method on the raw data. In that situation,
you should filter the data based on the raw data, and then use a RowNameFilterto select the rows from the
ratio data.
Negative values
For microarray expression data based on the Affymetrix MAS4.0 protocol (and possibly others), negative values can occur. In some cases all the values can be negative. As these values are generally viewed as nonsensical, one might decide that data rows that are all negative should be filtered.
Behavior at extremes
If you request removal/inclusion of 1.0 of the data, you might not get the result you expect because the filtering is inclusive.
- Author:
- Paul Pavlidis
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intUse the coefficient of variation as the criterionstatic final intUse the maximum of the row as the criterion.static final intUse the mean as the criterion.static final intUse the median as the criterion.static final intUse the minimum of the row as the criterion.static final intUse the range as the criterionFields inherited from class ubic.basecode.datafilter.AbstractLevelFilter
highCut, lowCut, useHighAsFraction, useLowAsFractionFields inherited from class ubic.basecode.datafilter.AbstractFilter
log -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfilter(DoubleMatrix<R, C> data) Filter the datavoidsetMethod(int method) Choose the method that will be used for filtering.voidsetRemoveAllNegative(boolean t) Set the filter to remove all rows that have only negative values.Methods inherited from class ubic.basecode.datafilter.AbstractLevelFilter
setHighCut, setHighCut, setLowCut, setLowCut, setUseAsFraction, setUseHighCutAsFraction, setUseLowCutAsFractionMethods inherited from class ubic.basecode.datafilter.AbstractFilter
getOutputMatrix
-
Field Details
-
CV
public static final int CVUse the coefficient of variation as the criterion- See Also:
-
MAX
public static final int MAXUse the maximum of the row as the criterion.- See Also:
-
MEAN
public static final int MEANUse the mean as the criterion.- See Also:
-
MEDIAN
public static final int MEDIANUse the median as the criterion.- See Also:
-
MIN
public static final int MINUse the minimum of the row as the criterion.- See Also:
-
RANGE
public static final int RANGEUse the range as the criterion- See Also:
-
-
Constructor Details
-
RowLevelFilter
public RowLevelFilter()
-
-
Method Details
-
filter
Description copied from interface:FilterFilter the data- Parameters:
data-- Returns:
-
setMethod
public void setMethod(int method) Choose the method that will be used for filtering. Default is 'MAX'. Those rows with the lowest values are removed during 'low' filtering.- Parameters:
method- one of the filtering method constants.
-
setRemoveAllNegative
public void setRemoveAllNegative(boolean t) Set the filter to remove all rows that have only negative values. This is applied BEFORE applying fraction-based criteria. In other words, if you request filtering 0.5 of the values, and 0.5 have all negative values, you will get 0.25 of the data back. Default = false.- Parameters:
t- boolean
-