Skip to content

BUG: PTM Bar plot fails if no modifications are present #458

Description

@hendraet

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions