Skip to content

Commit

Permalink
Merge pull request #182 from compomics/fix/catch-pep-qvality-indexerror
Browse files Browse the repository at this point in the history
Catch IndexError in Qvality when PEP cannot be calculated
  • Loading branch information
RalfG authored Aug 21, 2024
2 parents 37fa41a + 03a7c24 commit e66bc86
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 e66bc86

Please sign in to comment.