Skip to content

Commit

Permalink
remove normaliztion check warning from filter_by_data() (#276)
Browse files Browse the repository at this point in the history
Since we filter (for min_reads) prior to normalization, you get this warning every time you load an experiment (for example using read_amplicon). It is confusing to the user.

In general, sometimes you want to filter by data even without normalization (for example when looking at metabolomics, which is absolute abundance and therefore no need to normalize), so this warning is not needed.

Also, since you must specify the normalization, the user is aware of the fact if his data is normalized or not
  • Loading branch information
amnona committed Jul 26, 2022
1 parent 381fefe commit 24390af
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Expand Up @@ -11,6 +11,7 @@ Bug Fixes:
* Fix join_experiments() to make field parameter optional, enable joining when field already exists in the experiment, and update the doc
* Fix join_experiments_featurewise() to make field parameter optional, enable joining when field already exists in the experiment, and update the doc
* Fix join_metadata() to use axis='s' by default
* Remove normalization check from filter_by_data()
* Fix heatmap() to copy the colormap to avoid matplotlib depracation warning (modifying the state of a globally registered colormap)
* Fix experiment read functions to show by default only the summary and first 5 samples without data/without metadata

Expand Down
2 changes: 0 additions & 2 deletions calour/filtering.py
Expand Up @@ -248,8 +248,6 @@ def filter_by_data(exp: Experiment, predicate, axis=1, field=None,
filter_prevalence
'''
if exp.normalized <= 0:
logger.warning('Do you forget to normalize your data? It is required before running this function')
logger.debug('filter_by_data using function %r' % predicate)

if axis == 0:
Expand Down

0 comments on commit 24390af

Please sign in to comment.