We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 1029829 + 149216b commit 9008eb7Copy full SHA for 9008eb7
ms2rescore/report/charts.py
@@ -81,12 +81,16 @@ def score_histogram(psms: Union[PSMList, pd.DataFrame]) -> go.Figure:
81
82
# Get score thresholds
83
if all(psm_df["qvalue"]):
84
- score_threshold = (
85
- psm_df[psm_df["qvalue"] <= 0.01]
86
- .sort_values("qvalue", ascending=False)["qvalue"]
87
- .iloc[0]
88
- )
89
- fig.add_vline(x=score_threshold, line_dash="dash", line_color="black")
+ try:
+ score_threshold = (
+ psm_df[psm_df["qvalue"] <= 0.01]
+ .sort_values("qvalue", ascending=False)["qvalue"]
+ .iloc[0]
+ )
90
+ except IndexError: # No PSMs below threshold
91
+ pass
92
+ else:
93
+ fig.add_vline(x=score_threshold, line_dash="dash", line_color="black")
94
95
return fig
96
0 commit comments