Skip to content

Commit e078b7c

Browse files
committed
temporarily support older peptdeep again
1 parent 745fcbb commit e078b7c

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

alphadia/transferlearning/train.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,13 @@ def __init__(
241241
if set(self.charged_frag_types) != set(
242242
self.ms2_model.model.supported_charged_frag_types
243243
):
244-
self.reinitialize_ms2_model(charged_frag_types=self.charged_frag_types)
244+
try:
245+
self.reinitialize_ms2_model(charged_frag_types=self.charged_frag_types)
246+
except AttributeError:
247+
# TODO this is just a patch for the E2E tests, remove after peptdeep version bump
248+
logger.warning(
249+
"Found custom charged frag types, but the MS2 model does not support them. This functionality requires peptdeep>=1.5.0"
250+
)
245251
self.load_installed_models()
246252

247253
def _reset_frag_idx(self, df):

requirements/requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
alpharaw>=0.3.1
55
alphatims>=1.0.8
66
alphabase>=1.5.0
7-
peptdeep>=1.3.0
7+
peptdeep>=1.3.0 # TODO: remove try-execept in transferlearning/train.py:244 after bump to 1.5.0
88
directlfq>=0.2.19
99
# others
1010
argparse

0 commit comments

Comments
 (0)