rnalysis.filtering.DESeqFilter.filter_significant

DESeqFilter.filter_significant(alpha: Fraction = 0.1, opposite: bool = False, inplace: bool = True)

Removes all features which did not change significantly, according to the provided alpha.

Parameters:
  • alpha – the significance threshold to determine which genes will be filtered. between 0 and 1.

  • opposite (bool) – 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.

  • inplace (bool (default=True)) – If True (default), filtering will be applied to the current DESeqFilter object. If False, the function will return a new DESeqFilter instance and the current instance will not be affected.

Returns:

If β€˜inplace’ is False, returns a new instance of DESeqFilter.

Examples:
>>> from rnalysis import filtering
>>> d = filtering.DESeqFilter('tests/test_files/sample_deseq.csv')
>>> d.filter_significant(0.1) # keep only rows whose adjusted p-value is <=0.1
Filtered 4 features, leaving 25 of the original 29 features. Filtered inplace.
>>> d = filtering.DESeqFilter('tests/test_files/sample_deseq.csv')
>>> d.filter_significant(0.1, opposite=True) # keep only rows whose adjusted p-value is >0.1
Filtered 25 features, leaving 4 of the original 29 features. Filtered inplace.