Add filtering of invalid intensity values in log transformation, add message to warn user #557
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
fixes #41
log(0) is infinite, which is not the desired outcome for such a value. Therefore, they need to be filtered and dropped from the data, while notifying the users about the dropped values and urging them to change their pre-processing pipeline.
Changes
Add filtering, dropping and message in
transformation.py
Adjust and add tests in
test_transformation.py
Testing
Create a run with both protein and peptide import. Then manually change some intensity values to be 0 or negative in the run's dataframe folder. Then do the log transformation with the "dirty" data.
You should see a message about the dropped data.
PR checklist
Development
Mergeability
black
Code review