Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 8 additions & 6 deletions online/pages/1_PSM_file_statistics.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,16 +91,18 @@ def _input_form(self):
self.state["reverse"] = row[0].radio(
"Score type: order",
options=[True, False],
format_func=lambda x: "Higher score is better"
if x
else "Lower score is better",
format_func=lambda x: (
"Higher score is better" if x else "Lower score is better"
),
)
self.state["log_scale"] = row[1].radio(
"Score type: scale",
options=[False, True],
format_func=lambda x: "Logarithmic scale (e.g., e-value)"
if x
else "Linear scale (e.g., Andromeda score)",
format_func=lambda x: (
"Logarithmic scale (e.g., e-value)"
if x
else "Linear scale (e.g., Andromeda score)"
),
help=(
"""
Some search engine scores, mostly e-value-like scores, require a
Expand Down
2 changes: 1 addition & 1 deletion psm_utils/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"""Common utilities for parsing and handling PSMs, and search engine results."""

__version__ = "1.5.1"
__version__ = "1.5.2"
__all__ = ["Peptidoform", "PSM", "PSMList"]

from warnings import filterwarnings
Expand Down
2 changes: 2 additions & 0 deletions psm_utils/io/pepxml.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,8 @@ def _infer_score_name(self) -> str | None:
# Get scores from first PSM
with pepxml.read(str(self.filename)) as reader:
for spectrum_query in reader:
if "search_hit" not in spectrum_query:
continue
score_keys = spectrum_query["search_hit"][0]["search_score"].keys()
break
else:
Expand Down