Skip to content

Commit 56ff1e1

Browse files
Fix multiproc
1 parent ec0e3ed commit 56ff1e1

3 files changed

Lines changed: 52 additions & 30 deletions

File tree

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
55
and this project adheres to
66
[Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
# [2.2.25] - 2023-11-15
9+
10+
- Fixed multiprocessing
11+
812
# [2.2.24] - 2023-11-14
913

1014
- Pass flag CCS feature extract

deeplc/deeplc.py

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@
4545
from copy import deepcopy
4646
import random
4747
import math
48+
from collections import ChainMap
49+
from itertools import chain
4850

4951
# If CLI/GUI/frozen: disable Tensorflow info and warnings before importing
5052
IS_CLI_GUI = os.path.basename(sys.argv[0]) in ["deeplc", "deeplc-gui"]
@@ -488,7 +490,19 @@ def do_f_extraction_psm_list_parallel(self, psm_list):
488490
logger.debug("wait for feature extraction")
489491
all_feats_async.wait()
490492
logger.debug("get feature extraction results")
491-
all_feats = pd.concat(all_feats_async.get())
493+
res = all_feats_async.get()
494+
matrix_names = res[0].keys()
495+
all_feats = {
496+
matrix_name: dict(
497+
enumerate(
498+
chain.from_iterable((v[matrix_name].values() for v in res))
499+
)
500+
)
501+
for matrix_name in matrix_names
502+
}
503+
504+
# all_feats = pd.concat(all_feats_async.get())
505+
492506
logger.debug("got feature extraction results")
493507

494508
pool.close()

setup.py

Lines changed: 33 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -5,57 +5,61 @@
55

66

77
setup(
8-
name='deeplc',
9-
version='2.2.24',
10-
license='apache-2.0',
11-
description='DeepLC: Retention time prediction for (modified) peptides using Deep Learning.',
8+
name="deeplc",
9+
version="2.2.25",
10+
license="apache-2.0",
11+
description="DeepLC: Retention time prediction for (modified) peptides using Deep Learning.",
1212
long_description=LONG_DESCRIPTION,
1313
long_description_content_type="text/markdown",
14-
author='Robbin Bouwmeester, Niels Hulstaert, Arthur Declercq, Ralf Gabriels, Prof. Lennart Martens, Prof. Sven Degroeve',
15-
author_email='Robbin.Bouwmeester@UGent.be',
16-
url='http://compomics.github.io/projects/DeepLC',
14+
author="Robbin Bouwmeester, Niels Hulstaert, Arthur Declercq, Ralf Gabriels, Prof. Lennart Martens, Prof. Sven Degroeve",
15+
author_email="Robbin.Bouwmeester@UGent.be",
16+
url="http://compomics.github.io/projects/DeepLC",
1717
project_urls={
18-
'Documentation': 'http://compomics.github.io/projects/DeepLC',
19-
'Source': 'https://github.com/compomics/DeepLC',
20-
'Tracker': 'https://github.com/compomics/DeepLC/issues'
18+
"Documentation": "http://compomics.github.io/projects/DeepLC",
19+
"Source": "https://github.com/compomics/DeepLC",
20+
"Tracker": "https://github.com/compomics/DeepLC/issues",
2121
},
2222
packages=find_packages(),
2323
include_package_data=True,
2424
entry_points={
25-
'console_scripts': [
26-
'deeplc=deeplc.__main__:main',
27-
'deeplc-gui=deeplc.gui:start_gui',
25+
"console_scripts": [
26+
"deeplc=deeplc.__main__:main",
27+
"deeplc-gui=deeplc.gui:start_gui",
2828
]
2929
},
3030
keywords=[
31-
'DeepLC', 'Proteomics', 'deep learning', 'peptides', 'retention time',
32-
'prediction'
31+
"DeepLC",
32+
"Proteomics",
33+
"deep learning",
34+
"peptides",
35+
"retention time",
36+
"prediction",
3337
],
3438
classifiers=[
3539
"Intended Audience :: Science/Research",
3640
"License :: OSI Approved :: Apache Software License",
3741
"Operating System :: OS Independent",
3842
"Programming Language :: Python :: 3",
3943
"Topic :: Scientific/Engineering :: Bio-Informatics",
40-
"Development Status :: 4 - Beta"
44+
"Development Status :: 4 - Beta",
4145
],
4246
install_requires=[
43-
'setuptools>=42.0.1',
44-
'tensorflow>=2.2,<2.13.0',
45-
'scipy>=1.4.1,<2',
46-
'numpy>=1.17,<2',
47-
'pandas>=0.25,<2',
48-
'matplotlib>=3,<4',
49-
'h5py>=2.10.0,<4',
50-
'pygam>=0.8.0,<1',
51-
'scikit-learn>=0.24.0,<2',
52-
'deeplcretrainer>=0.1,<1',
53-
'psm_utils>=0.2.3,<1',
54-
'hdf5plugin>=4.1.1'
47+
"setuptools>=42.0.1",
48+
"tensorflow>=2.2,<2.13.0",
49+
"scipy>=1.4.1,<2",
50+
"numpy>=1.17,<2",
51+
"pandas>=0.25,<2",
52+
"matplotlib>=3,<4",
53+
"h5py>=2.10.0,<4",
54+
"pygam>=0.8.0,<1",
55+
"scikit-learn>=0.24.0,<2",
56+
"deeplcretrainer>=0.1,<1",
57+
"psm_utils>=0.2.3,<1",
58+
"hdf5plugin>=4.1.1",
5559
],
5660
extras_require={
5761
"gui": ["gooey>=1.0"],
5862
"plot": ["plotly>=5"],
5963
},
60-
python_requires='>=3.7',
64+
python_requires=">=3.7",
6165
)

0 commit comments

Comments
 (0)