What is the issue?
Creating a PTM vis. bar plot fails when the protein that should be plotted has no modifications present in the psm_df. It will result in a ZeroDivisionError because the groups have no modifications and height/width calculation divides by the number of relevant modifications.
How to reproduce the issue?
Here is a run file and the used data to reproduce the issue.
Run
Data
What is the expected behavior?
The error should be caught earlier. The preprocessing already produces malformed output files that do not contain any real values. Ideally, this should be checked first and a more descriptive error thrown. Alternatively, one could just plot the "protein box" without any additional information (as the overview plot would do in this case) and throw a warning.
What is the issue?
Creating a PTM vis. bar plot fails when the protein that should be plotted has no modifications present in the psm_df. It will result in a
ZeroDivisionErrorbecause the groups have no modifications and height/width calculation divides by the number of relevant modifications.How to reproduce the issue?
Here is a run file and the used data to reproduce the issue.
Run
Data
What is the expected behavior?
The error should be caught earlier. The preprocessing already produces malformed output files that do not contain any real values. Ideally, this should be checked first and a more descriptive error thrown. Alternatively, one could just plot the "protein box" without any additional information (as the overview plot would do in this case) and throw a warning.