rnalysis.filtering.DESeqFilter.split_by_percentile
- DESeqFilter.split_by_percentile(percentile: Fraction, column: ColumnName, interpolate: 'nearest', 'higher', 'lower', 'midpoint', 'linear' = 'linear') tuple
Splits the features in the Filter object into two non-overlapping Filter objects: one containing features below the specified percentile in the specfieid column, and the other containing features about the specified percentile in the specified column.
- Parameters:
percentile (float between 0 and 1) – The percentile that all features above it will be filtered out.
column (str) – Name of the DataFrame column according to which the filtering will be performed.
- Return type:
Tuple[filtering.Filter, filtering.Filter]
- Returns:
a tuple of two Filter objects: the first contains all of the features below the specified percentile, and the second contains all of the features above and equal to the specified percentile.
- Examples:
>>> from rnalysis import filtering >>> d = filtering.Filter("tests/test_files/test_deseq.csv") >>> below, above = d.split_by_percentile(0.75,'log2FoldChange') Filtered 7 features, leaving 21 of the original 28 features. Filtering result saved to new object. Filtered 21 features, leaving 7 of the original 28 features. Filtering result saved to new object.