rnalysis.filtering.DESeqFilter.filter_missing_values

DESeqFilter.filter_missing_values(columns: ColumnNames | Literal['all'] = 'all', opposite: bool = False, inplace: bool = True)

Remove all rows whose values in the specified columns are missing (NaN).

:param columns:name/names of the columns to check for missing values. :type opposite: bool :param opposite: If True, the output of the filtering will be the OPPOSITE of the specified (instead of filtering out X, the function will filter out anything BUT X). If False (default), the function will filter as expected. :type inplace: bool (default=True) :param inplace: If True (default), filtering will be applied to the current Filter object. If False, the function will return a new Filter instance and the current instance will not be affected. :return: If β€˜inplace’ is False, returns a new instance of the Filter object.

Examples:
>>> from rnalysis import filtering
>>> filt = filtering.Filter('tests/test_files/test_deseq_with_nan.csv')
>>> filt_no_nan = filt.filter_missing_values(inplace=False)
Filtered 3 features, leaving 25 of the original 28 features. Filtering result saved to new object.
>>> filt_no_nan_basemean = filt.filter_missing_values(columns='baseMean', inplace=False)
Filtered 1 features, leaving 27 of the original 28 features. Filtering result saved to new object.
>>> filt_no_nan_basemean_pval = filt.filter_missing_values(columns=['baseMean','pvalue'], inplace=False)
Filtered 2 features, leaving 26 of the original 28 features. Filtering result saved to new object.