Skip to content

Commit

Permalink
Catch IndexError in Qvality when PEP cannot be calculated (see statis…
Browse files Browse the repository at this point in the history
  • Loading branch information
RalfG committed Aug 21, 2024
1 parent 37fa41a commit 03a7c24
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ms2rescore/report/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,8 @@ def get_confidence_estimates(
for when, scores in [("before", score_before), ("after", score_after)]:
try:
confidence[when] = lin_psm_dataset.assign_confidence(scores=scores)
except RuntimeError:
except (RuntimeError, IndexError):
confidence[when] = None
logger.warning("Could not assign confidence estimates for %s rescoring.", when)

return confidence["before"], confidence["after"]

0 comments on commit 03a7c24

Please sign in to comment.