tidyms.filter.DilutionFilter¶
- class DilutionFilter(min_corr: float = 0.8, plim: float = 0.1, mode: str = 'ols', verbose: bool = False)¶
Filter features based on the correlation with a dilution factor.
In order to use this filter, the dilution column must be specified in the sample_metadata of the DataContainer. Also, the QCs used for the analysis must be specified under the dqc key in the DataContainer mapping.
- Parameters:
- min_corrnumber between 0 and 1
Lower bound for the correlation coefficient.
- plimnumber between 0 and 1
p-value limit for the Jarque-Bera test. Used only when mode is ols.
- mode{“ols”, “spearman”}
ols computes the ordinary least squares linear regression.The r squared from the fit and the p-value from the Jarque-Bera test are used to evaluate the linearity of the signal with the dilution. Features with correlation values lower than min_corr or p-values lower than plim are removed. spearman compares the correlation threshold with the spearman rank correlation coefficient.
- verbose: bool
If True, prints a message
Notes
Correlation with the dilution is a measure of the linearity of the response of the feature in the experimental conditions [2].
References
Constructor of the DilutionFilter.