Skip to content

Commit

Permalink
numpy explicit list fix
Browse files Browse the repository at this point in the history
  • Loading branch information
RobbinBouwmeester committed Jun 18, 2023
1 parent 7aa082d commit e7e6ca3
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 11 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to
[Semantic Versioning](https://semver.org/spec/v2.0.0.html).

# [2.2.1] - 2023-06-18

### Changed
- Fixed a bug where numpy no longer accepts dict_values, explicit list conversion

# [2.2.0] - 2023-06-14

### Changed
Expand Down
20 changes: 10 additions & 10 deletions deeplc/deeplc.py
Original file line number Diff line number Diff line change
Expand Up @@ -548,12 +548,12 @@ def make_preds_core(self,
#X = self.do_f_extraction_psm_list(psm_list)
X = self.do_f_extraction_psm_list_parallel(psm_list)

X_sum = np.stack(X["matrix_sum"].values())
X_global = np.concatenate((np.stack(X["matrix_all"].values()),
np.stack(X["pos_matrix"].values())),
X_sum = np.stack(list(X["matrix_sum"].values()))
X_global = np.concatenate((np.stack(list(X["matrix_all"].values())),
np.stack(list(X["pos_matrix"].values()))),
axis=1)
X_hc = np.stack(X["matrix_hc"].values())
X = np.stack(X["matrix"].values())
X_hc = np.stack(list(X["matrix_hc"].values()))
X = np.stack(list(X["matrix"].values()))
elif len(X) == 0 and len(psm_list) == 0:
return []

Expand Down Expand Up @@ -631,12 +631,12 @@ def make_preds(self,
logger.debug("Extracting features for the CNN model ...")

X = self.do_f_extraction_psm_list_parallel(psm_list)
X_sum = np.stack(X["matrix_sum"].values())
X_global = np.concatenate((np.stack(X["matrix_all"].values()),
np.stack(X["pos_matrix"].values())),
X_sum = np.stack(list(X["matrix_sum"].values()))
X_global = np.concatenate((np.stack(list(X["matrix_all"].values())),
np.stack(list(X["pos_matrix"].values()))),
axis=1)
X_hc = np.stack(X["matrix_hc"].values())
X = np.stack(X["matrix"].values())
X_hc = np.stack(list(X["matrix_hc"].values()))
X = np.stack(list(X["matrix"].values()))
else:
return []

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

setup(
name='deeplc',
version='2.2.0',
version='2.2.1',
license='apache-2.0',
description='DeepLC: Retention time prediction for (modified) peptides using Deep Learning.',
long_description=LONG_DESCRIPTION,
Expand Down

0 comments on commit e7e6ca3

Please sign in to comment.