rnalysis.filtering.FoldChangeFilter.split_fold_change_direction

FoldChangeFilter.split_fold_change_direction() tuple

Splits the features in the FoldChangeFilter object into two non-overlapping FoldChangeFilter objects, based on the direction of their log2(fold change). The first object will contain only features with a positive log2(fold change), the second object will contain only features with a negative log2(fold change). Features with log2(fold change) = 0 will be ignored.

Return type:

Tuple[filtering.FoldChangeFilter, filtering.FoldChangeFilter]

Returns:

a tuple containing two FoldChangeFilter objects: the first has only features with positive log2 fold change, and the other has only features with negative log2 fold change.

Examples:
>>> from rnalysis import filtering
>>> f = filtering.FoldChangeFilter('tests/test_files/fc_1.csv','numerator name','denominator name')
>>> pos_log2fc, neg_log2fc = f.split_fold_change_direction()
Filtered 10 features, leaving 12 of the original 22 features. Filtering result saved to new object.
Filtered 14 features, leaving 8 of the original 22 features. Filtering result saved to new object.