Skip to content

Commit b7c4b37

Browse files
authored
Merge pull request #34 from mmzdouc/dev_mmz
v0.3.3
2 parents 663150c + 93f1e50 commit b7c4b37

File tree

3 files changed

+17
-3
lines changed

3 files changed

+17
-3
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,12 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
1010

1111
N/A
1212

13+
## [0.3.3] 06-06-2024
14+
15+
### Fixed
16+
17+
- Added exception for fail of Sample Scores calculation in case of lack of spectral similarity networking data (e.g. no MS/MS data provided)
18+
1319
## [0.3.2] 05-06-2024
1420

1521
### Fixed

fermo_core/data_analysis/score_assigner/class_score_assigner.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ def collect_sample_spec_networks(self: Self):
9696
RuntimeError: no networks detected
9797
"""
9898
if self.stats.networks is None or len(self.stats.networks) == 0:
99-
RuntimeError(
99+
raise RuntimeError(
100100
"'ScoreAssigner': no networks detected - cannot assign Sample "
101101
"scores - SKIP"
102102
)
@@ -124,7 +124,15 @@ def collect_sample_spec_networks(self: Self):
124124

125125
def assign_sample_scores(self: Self):
126126
"""Assign scores to sample objects"""
127-
self.collect_sample_spec_networks()
127+
try:
128+
self.collect_sample_spec_networks()
129+
except Exception as e:
130+
logger.warning(str(e))
131+
logger.warning(
132+
"'ScoreAssigner': Could not assign sample score, possibly due "
133+
"lack of spectral networking information - SKIP"
134+
)
135+
return
128136

129137
for s_id in self.stats.samples:
130138
sample = self.samples.get(s_id)

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "fermo_core"
3-
version = "0.3.2"
3+
version = "0.3.3"
44
description = "Data processing/analysis functionality of metabolomics dashboard FERMO"
55
readme = "README.md"
66
requires-python = ">=3.11,<3.12"

0 commit comments

Comments
 (0)