papyrus-scripts 2.1.1__tar.gz → 2.1.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (32) hide show
  1. {papyrus_scripts-2.1.1/src/papyrus_scripts.egg-info → papyrus_scripts-2.1.2}/PKG-INFO +8 -7
  2. {papyrus_scripts-2.1.1 → papyrus_scripts-2.1.2}/README.md +4 -4
  3. {papyrus_scripts-2.1.1 → papyrus_scripts-2.1.2}/setup.cfg +1 -1
  4. {papyrus_scripts-2.1.1 → papyrus_scripts-2.1.2}/src/papyrus_scripts/__init__.py +1 -1
  5. {papyrus_scripts-2.1.1 → papyrus_scripts-2.1.2}/src/papyrus_scripts/oop.py +31 -4
  6. {papyrus_scripts-2.1.1 → papyrus_scripts-2.1.2}/src/papyrus_scripts/preprocess.py +7 -7
  7. {papyrus_scripts-2.1.1 → papyrus_scripts-2.1.2/src/papyrus_scripts.egg-info}/PKG-INFO +8 -7
  8. {papyrus_scripts-2.1.1 → papyrus_scripts-2.1.2}/src/papyrus_scripts.egg-info/SOURCES.txt +0 -2
  9. {papyrus_scripts-2.1.1 → papyrus_scripts-2.1.2}/src/papyrus_scripts.egg-info/requires.txt +1 -1
  10. {papyrus_scripts-2.1.1 → papyrus_scripts-2.1.2}/tests/test_oop.py +2 -2
  11. papyrus_scripts-2.1.1/src/papyrus_scripts/utils/links2.json +0 -408
  12. papyrus_scripts-2.1.1/tests/test.py +0 -31
  13. {papyrus_scripts-2.1.1 → papyrus_scripts-2.1.2}/LICENSE +0 -0
  14. {papyrus_scripts-2.1.1 → papyrus_scripts-2.1.2}/setup.py +0 -0
  15. {papyrus_scripts-2.1.1 → papyrus_scripts-2.1.2}/src/papyrus_scripts/__main__.py +0 -0
  16. {papyrus_scripts-2.1.1 → papyrus_scripts-2.1.2}/src/papyrus_scripts/cli.py +0 -0
  17. {papyrus_scripts-2.1.1 → papyrus_scripts-2.1.2}/src/papyrus_scripts/download.py +0 -0
  18. {papyrus_scripts-2.1.1 → papyrus_scripts-2.1.2}/src/papyrus_scripts/fingerprint.py +0 -0
  19. {papyrus_scripts-2.1.1 → papyrus_scripts-2.1.2}/src/papyrus_scripts/matchRCSB.py +0 -0
  20. {papyrus_scripts-2.1.1 → papyrus_scripts-2.1.2}/src/papyrus_scripts/modelling.py +0 -0
  21. {papyrus_scripts-2.1.1 → papyrus_scripts-2.1.2}/src/papyrus_scripts/neuralnet.py +0 -0
  22. {papyrus_scripts-2.1.1 → papyrus_scripts-2.1.2}/src/papyrus_scripts/reader.py +0 -0
  23. {papyrus_scripts-2.1.1 → papyrus_scripts-2.1.2}/src/papyrus_scripts/subsim_search.py +0 -0
  24. {papyrus_scripts-2.1.1 → papyrus_scripts-2.1.2}/src/papyrus_scripts/utils/IO.py +0 -0
  25. {papyrus_scripts-2.1.1 → papyrus_scripts-2.1.2}/src/papyrus_scripts/utils/UniprotMatch.py +0 -0
  26. {papyrus_scripts-2.1.1 → papyrus_scripts-2.1.2}/src/papyrus_scripts/utils/__init__.py +0 -0
  27. {papyrus_scripts-2.1.1 → papyrus_scripts-2.1.2}/src/papyrus_scripts/utils/aliases.json +0 -0
  28. {papyrus_scripts-2.1.1 → papyrus_scripts-2.1.2}/src/papyrus_scripts/utils/links.json +0 -0
  29. {papyrus_scripts-2.1.1 → papyrus_scripts-2.1.2}/src/papyrus_scripts/utils/mol_reader.py +0 -0
  30. {papyrus_scripts-2.1.1 → papyrus_scripts-2.1.2}/src/papyrus_scripts.egg-info/dependency_links.txt +0 -0
  31. {papyrus_scripts-2.1.1 → papyrus_scripts-2.1.2}/src/papyrus_scripts.egg-info/entry_points.txt +0 -0
  32. {papyrus_scripts-2.1.1 → papyrus_scripts-2.1.2}/src/papyrus_scripts.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.4
2
2
  Name: papyrus_scripts
3
- Version: 2.1.1
3
+ Version: 2.1.2
4
4
  Summary: A collection of scripts to handle the Papyrus bioactivity dataset
5
5
  Home-page: https://github.com/OlivierBeq/Papyrus-scripts
6
6
  Author: Olivier J. M. Béquignon - Brandon J. Bongers - Willem Jespers
@@ -17,7 +17,7 @@ Classifier: Programming Language :: Python :: 3.7
17
17
  Classifier: Programming Language :: Python :: 3.6
18
18
  Description-Content-Type: text/markdown
19
19
  License-File: LICENSE
20
- Requires-Dist: numpy
20
+ Requires-Dist: numpy>=2.0.0
21
21
  Requires-Dist: pandas
22
22
  Requires-Dist: rdkit
23
23
  Requires-Dist: requests
@@ -36,6 +36,7 @@ Requires-Dist: sphinx-autodoc-typehints; extra == "docs"
36
36
  Provides-Extra: testing
37
37
  Requires-Dist: pytest; extra == "testing"
38
38
  Requires-Dist: parameterized; extra == "testing"
39
+ Dynamic: license-file
39
40
 
40
41
  # Papyrus-scripts
41
42
 
@@ -168,10 +169,10 @@ Different online servers host the Papyrus data based on release and ChEMBL versi
168
169
 
169
170
  | Papyrus version | ChEMBL version | Zenodo | 4TU |
170
171
  |:---------------:|:--------------:|:---------------------------------------------------------:|:---------------------------------------------------------:|
171
- | 05.4 | 29 | [:heavy_check_mark:](https://zenodo.org/records/10944245) | [:heavy_check_mark:](https://doi.org/10.4121/16896406.v2) |
172
- | 05.5 | 30 | [:heavy_check_mark:](https://zenodo.org/records/10943207) | :x: |
173
- | 05.6 | 31 | [:heavy_check_mark:](https://zenodo.org/records/7821775) | :x: |
174
- | 05.7 | 34 | [:heavy_check_mark:](https://zenodo.org/records/13787634) | :x: |
172
+ | 05.4 | 29 | [:heavy_check_mark:](https://zenodo.org/records/10943992) | [:heavy_check_mark:](https://doi.org/10.4121/16896406.v2) |
173
+ | 05.5 | 30 | [:heavy_check_mark:](https://zenodo.org/records/7019873) | :x: |
174
+ | 05.6 | 31 | [:heavy_check_mark:](https://zenodo.org/records/7373213) | :x: |
175
+ | 05.7 | 34 | [:heavy_check_mark:](https://zenodo.org/records/13787633) | :x: |
175
176
 
176
177
  Precomputed molecular and protein descriptors along with molecular structures (2D for default set and 3D for low quality set with stereochemistry) are not available for version 05.4 from 4TU but are from Google Drive.
177
178
 
@@ -129,10 +129,10 @@ Different online servers host the Papyrus data based on release and ChEMBL versi
129
129
 
130
130
  | Papyrus version | ChEMBL version | Zenodo | 4TU |
131
131
  |:---------------:|:--------------:|:---------------------------------------------------------:|:---------------------------------------------------------:|
132
- | 05.4 | 29 | [:heavy_check_mark:](https://zenodo.org/records/10944245) | [:heavy_check_mark:](https://doi.org/10.4121/16896406.v2) |
133
- | 05.5 | 30 | [:heavy_check_mark:](https://zenodo.org/records/10943207) | :x: |
134
- | 05.6 | 31 | [:heavy_check_mark:](https://zenodo.org/records/7821775) | :x: |
135
- | 05.7 | 34 | [:heavy_check_mark:](https://zenodo.org/records/13787634) | :x: |
132
+ | 05.4 | 29 | [:heavy_check_mark:](https://zenodo.org/records/10943992) | [:heavy_check_mark:](https://doi.org/10.4121/16896406.v2) |
133
+ | 05.5 | 30 | [:heavy_check_mark:](https://zenodo.org/records/7019873) | :x: |
134
+ | 05.6 | 31 | [:heavy_check_mark:](https://zenodo.org/records/7373213) | :x: |
135
+ | 05.7 | 34 | [:heavy_check_mark:](https://zenodo.org/records/13787633) | :x: |
136
136
 
137
137
  Precomputed molecular and protein descriptors along with molecular structures (2D for default set and 3D for low quality set with stereochemistry) are not available for version 05.4 from 4TU but are from Google Drive.
138
138
 
@@ -32,7 +32,7 @@ packages = find:
32
32
  package_dir =
33
33
  = src
34
34
  install_requires =
35
- numpy
35
+ numpy>=2.0.0
36
36
  pandas
37
37
  rdkit
38
38
  requests
@@ -20,4 +20,4 @@ from .utils.IO import PapyrusVersion
20
20
 
21
21
  from .oop import PapyrusDataset
22
22
 
23
- __version__ = '2.1.1'
23
+ __version__ = '2.1.2'
@@ -58,7 +58,8 @@ class PapyrusDataset:
58
58
  is3d: bool, version: str,
59
59
  plusplus: bool = True,
60
60
  source_path: Optional[str] = None,
61
- download_progress: bool = False
61
+ download_progress: bool = False,
62
+ chunksize: int = None
62
63
  ) -> PapyrusDataset:
63
64
  """Create a PapyrusDataset from a pandas DataFrame.
64
65
 
@@ -74,7 +75,7 @@ class PapyrusDataset:
74
75
  dataset.papyrus_bioactivity_data = df
75
76
  dataset.papyrus_protein_data = reader.read_protein_set(source_path=source_path, version=version)
76
77
  dataset.papyrus_params = dict(is3d=is3d, version=version, plusplus=plusplus,
77
- chunksize=len(df), source_path=source_path, num_rows=len(df),
78
+ chunksize=chunksize, source_path=source_path, num_rows=len(df),
78
79
  download_progress=download_progress)
79
80
  dataset._can_reset = False
80
81
  return dataset
@@ -357,6 +358,32 @@ class PapyrusDataset:
357
358
  version_root=remove_version_root, papyrus_root=remove_papyrus_root,
358
359
  force=force, progress=progress)
359
360
 
361
+ def molecular_descriptors(self, desc_type: str, progress: bool = False) -> pd.DataFrame | Iterator[pd.DataFrame]:
362
+ """Obtain the molecular descriptors of the molecules in the current PapyrusMoleculeSet.
363
+
364
+ :param desc_type: type of descriptor to be obtained. One of {'mold2', 'mordred', 'cddd', 'fingerprint', 'moe', 'all'}
365
+ :param progress: should aggregation progress be shown
366
+ :return: a pandas DataFrame of the molecular descriptors.
367
+ """
368
+ ids = self.aggregate(progress)['connectivity' if not self.papyrus_params['is3d'] else 'InChIKey'].unique()
369
+ # Handle descriptors not yet downloaded
370
+ try:
371
+ return reader.read_molecular_descriptors(desc_type=desc_type,
372
+ is3d=self.papyrus_params['is3d'],
373
+ version=self.papyrus_params['version'],
374
+ chunksize=self.papyrus_params['chunksize'],
375
+ source_path=self.papyrus_params['source_path'],
376
+ ids=ids,
377
+ verbose=progress)
378
+ except FileNotFoundError:
379
+ download.download_papyrus(outdir=self.papyrus_params['source_path'],
380
+ version=self.papyrus_params['version'],
381
+ nostereo=not self.papyrus_params['is3d'], stereo=self.papyrus_params['is3d'],
382
+ only_pp=self.papyrus_params['plusplus'], structures=False,
383
+ descriptors=desc_type, progress=self.papyrus_params['download_progress'],
384
+ disk_margin=0.0)
385
+ return self.molecular_descriptors(desc_type, progress)
386
+
360
387
  class PapyrusDataFilter:
361
388
  """Collection of filters to be applied on a PapyrusDataset instance."""
362
389
 
@@ -584,14 +611,14 @@ class PapyrusMoleculeSet:
584
611
  return f'{type(self).__name__}<iterator of molecules>'
585
612
  return f'{type(self).__name__}<{len(self.data)} molecules>'
586
613
 
587
- def molecular_descriptors(self, desc_type: str, progress: bool = False) -> pd.DataFrame:
614
+ def molecular_descriptors(self, desc_type: str, progress: bool = False) -> pd.DataFrame | Iterator[pd.DataFrame]:
588
615
  """Obtain the molecular descriptors of the molecules in the current PapyrusMoleculeSet.
589
616
 
590
617
  :param desc_type: type of descriptor to be obtained. One of {'mold2', 'mordred', 'cddd', 'fingerprint', 'moe', 'all'}
591
618
  :param progress: should aggregation progress be shown
592
619
  :return: a pandas DataFrame of the molecular descriptors.
593
620
  """
594
- ids = self.aggregate(progress)['connectivity' if self.papyrus_params['is3d'] else 'InChIKey'].unique()
621
+ ids = self.aggregate(progress)['connectivity' if not self.papyrus_params['is3d'] else 'InChIKey'].unique()
595
622
  # Handle descriptors not yet downloaded
596
623
  try:
597
624
  return reader.read_molecular_descriptors(desc_type=desc_type,
@@ -94,11 +94,11 @@ def process_group(group, additional_columns: Optional[List[str]] = None):
94
94
  """Aggregate data from one group accordingly"""
95
95
  if (group.values[0] == group.values).all(): # If all values are equal, return first record
96
96
  group['pchembl_value_Mean'] = group['pchembl_value']
97
- group['pchembl_value_StdDev'] = np.NaN
98
- group['pchembl_value_SEM'] = np.NaN
97
+ group['pchembl_value_StdDev'] = np.nan
98
+ group['pchembl_value_SEM'] = np.nan
99
99
  group['pchembl_value_N'] = 1
100
100
  group['pchembl_value_Median'] = group['pchembl_value']
101
- group['pchembl_value_MAD'] = np.NaN
101
+ group['pchembl_value_MAD'] = np.nan
102
102
  return group.iloc[:1, :]
103
103
  # Lambda: Return one value if all are the same
104
104
  listvals = lambda x: ';'.join(set(str(y) for y in x)) if (x.values[0] == x.values).all() else ';'.join(
@@ -174,8 +174,8 @@ def keep_source(data: Union[pd.DataFrame, PandasTextFileReader, Iterator], sourc
174
174
  # Allow processing of Papyrus++
175
175
  papyruspp = 'Activity_class' not in data.columns
176
176
  if papyruspp:
177
- data['Activity_class'] = np.NaN
178
- data['type_other'] = np.NaN
177
+ data['Activity_class'] = np.nan
178
+ data['type_other'] = np.nan
179
179
  # Keep trace of order of columns
180
180
  ordered_columns = data.columns.tolist()
181
181
  # Keep binary data associated to source
@@ -307,8 +307,8 @@ def keep_type(data: Union[pd.DataFrame, PandasTextFileReader, Iterator], activit
307
307
  # Allow processing of Papyrus++
308
308
  papyruspp = 'Activity_class' not in data.columns
309
309
  if papyruspp:
310
- data['Activity_class'] = np.NaN
311
- data['type_other'] = np.NaN
310
+ data['Activity_class'] = np.nan
311
+ data['type_other'] = np.nan
312
312
  # Transform activity_types to column names
313
313
  activity_types = [f"type_{types[i]}" for i in range(len(types)) if types_[i] in activity_types]
314
314
  # Columns with optional multiple values
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.4
2
2
  Name: papyrus_scripts
3
- Version: 2.1.1
3
+ Version: 2.1.2
4
4
  Summary: A collection of scripts to handle the Papyrus bioactivity dataset
5
5
  Home-page: https://github.com/OlivierBeq/Papyrus-scripts
6
6
  Author: Olivier J. M. Béquignon - Brandon J. Bongers - Willem Jespers
@@ -17,7 +17,7 @@ Classifier: Programming Language :: Python :: 3.7
17
17
  Classifier: Programming Language :: Python :: 3.6
18
18
  Description-Content-Type: text/markdown
19
19
  License-File: LICENSE
20
- Requires-Dist: numpy
20
+ Requires-Dist: numpy>=2.0.0
21
21
  Requires-Dist: pandas
22
22
  Requires-Dist: rdkit
23
23
  Requires-Dist: requests
@@ -36,6 +36,7 @@ Requires-Dist: sphinx-autodoc-typehints; extra == "docs"
36
36
  Provides-Extra: testing
37
37
  Requires-Dist: pytest; extra == "testing"
38
38
  Requires-Dist: parameterized; extra == "testing"
39
+ Dynamic: license-file
39
40
 
40
41
  # Papyrus-scripts
41
42
 
@@ -168,10 +169,10 @@ Different online servers host the Papyrus data based on release and ChEMBL versi
168
169
 
169
170
  | Papyrus version | ChEMBL version | Zenodo | 4TU |
170
171
  |:---------------:|:--------------:|:---------------------------------------------------------:|:---------------------------------------------------------:|
171
- | 05.4 | 29 | [:heavy_check_mark:](https://zenodo.org/records/10944245) | [:heavy_check_mark:](https://doi.org/10.4121/16896406.v2) |
172
- | 05.5 | 30 | [:heavy_check_mark:](https://zenodo.org/records/10943207) | :x: |
173
- | 05.6 | 31 | [:heavy_check_mark:](https://zenodo.org/records/7821775) | :x: |
174
- | 05.7 | 34 | [:heavy_check_mark:](https://zenodo.org/records/13787634) | :x: |
172
+ | 05.4 | 29 | [:heavy_check_mark:](https://zenodo.org/records/10943992) | [:heavy_check_mark:](https://doi.org/10.4121/16896406.v2) |
173
+ | 05.5 | 30 | [:heavy_check_mark:](https://zenodo.org/records/7019873) | :x: |
174
+ | 05.6 | 31 | [:heavy_check_mark:](https://zenodo.org/records/7373213) | :x: |
175
+ | 05.7 | 34 | [:heavy_check_mark:](https://zenodo.org/records/13787633) | :x: |
175
176
 
176
177
  Precomputed molecular and protein descriptors along with molecular structures (2D for default set and 3D for low quality set with stereochemistry) are not available for version 05.4 from 4TU but are from Google Drive.
177
178
 
@@ -25,7 +25,5 @@ src/papyrus_scripts/utils/UniprotMatch.py
25
25
  src/papyrus_scripts/utils/__init__.py
26
26
  src/papyrus_scripts/utils/aliases.json
27
27
  src/papyrus_scripts/utils/links.json
28
- src/papyrus_scripts/utils/links2.json
29
28
  src/papyrus_scripts/utils/mol_reader.py
30
- tests/test.py
31
29
  tests/test_oop.py
@@ -1,4 +1,4 @@
1
- numpy
1
+ numpy>=2.0.0
2
2
  pandas
3
3
  rdkit
4
4
  requests
@@ -181,8 +181,8 @@ class TestPapyrusDataset(unittest.TestCase):
181
181
  self.assertTrue(oop_data_agg.source.unique().item().lower().startswith('chembl'))
182
182
  self.assertTrue(oop_data_agg.type_IC50.dropna().astype(int).unique().item() == 0)
183
183
  self.assertTrue(oop_data_agg.type_EC50.dropna().astype(int).unique().item() == 0)
184
- self.assertTrue(oop_data_agg.type_other.replace({'NA': np.NaN, 'NaN': np.NaN, 'nan': np.NaN})
185
- .dropna().empty or (oop_data_agg.type_other.replace({'NA': np.NaN, 'NaN': np.NaN, 'nan': np.NaN})
184
+ self.assertTrue(oop_data_agg.type_other.replace({'NA': np.nan, 'NaN': np.nan, 'nan': np.nan})
185
+ .dropna().empty or (oop_data_agg.type_other.replace({'NA': np.nan, 'NaN': np.nan, 'nan': np.nan})
186
186
  .dropna().astype(int).unique().item() == 0))
187
187
  self.assertEqual((oop_data_agg[['type_KD', 'type_Ki']]
188
188
  .astype(int).
@@ -1,408 +0,0 @@
1
- {
2
- "05.4": {
3
- "readme": {
4
- "name": "README.txt",
5
- "url": "https://zenodo.org/records/10944245/files/README.txt?download=1",
6
- "size": 8743,
7
- "sha256": "f552ae0b58121b20c9aefcce0737e5f31240d72676dc9ec559f97585aceb33ad"
8
- },
9
- "requirements": [
10
- {
11
- "name": "LICENSE.txt",
12
- "url": "https://zenodo.org/records/10944245/files/LICENSE.txt?download=1",
13
- "size": 20138,
14
- "sha256": "3b2890eacd851373001c4a14623458e3adaf1b1967939aa9c38a318e28d61c00"
15
- },
16
- {
17
- "name": "data_types.json",
18
- "url": "https://zenodo.org/records/10944245/files/data_types.json?download=1",
19
- "size": 450559,
20
- "sha256": "d80a5810d99b62680ee1a214df5d5a30f505ec335a0c221194efb91d1c23913e"
21
- },
22
- {
23
- "name": "data_size.json",
24
- "url": "https://zenodo.org/records/10944245/files/data_size.json?download=1",
25
- "size": 324,
26
- "sha256": "decbe66e14eaeccf5e0f657bb33065600b503e2902503aa59f5ffa81b7126775"
27
- }
28
- ],
29
- "papyrus++": {
30
- "name": "05.4++_combined_set_without_stereochemistry.tsv.xz",
31
- "url": "https://zenodo.org/records/10944245/files/05.4++_combined_set_without_stereochemistry.tsv.xz?download=1",
32
- "size": 40278204,
33
- "sha256": "42dcbe76b33ad541f6c54673eccffa15af64785cf844938c0f73518dfdf4404b"
34
- },
35
- "2D_papyrus": {
36
- "name": "05.4_combined_set_without_stereochemistry.tsv.xz",
37
- "url": "https://zenodo.org/records/10944245/files/05.4_combined_set_without_stereochemistry.tsv.xz?download=1",
38
- "size": 742110788,
39
- "sha256": "1a1c946917f77d9a250a181c8ef19bea4d04871915e9e75a615893a2c514684e"
40
- },
41
- "2D_structures": {
42
- "name": "05.4_combined_2D_set_without_stereochemistry.sd.xz",
43
- "url": "https://zenodo.org/records/10944245/files/05.4_combined_2D_set_without_stereochemistry.sd.xz?download=1",
44
- "size": 416640448,
45
- "sha256": "4595f726daf12a784049f20e9f9464ed0287af3a22a27f2a919399c535f633fc"
46
- },
47
- "3D_papyrus": {
48
- "name": "05.4_combined_set_with_stereochemistry.tsv.xz",
49
- "url": "https://zenodo.org/records/10944245/files/05.4_combined_set_with_stereochemistry.tsv.xz?download=1",
50
- "size": 777395668,
51
- "sha256": "56cf389030246d4525bb31cd3dfc9e5ab3afa9613535d1540c71f0f7426c778f"
52
- },
53
- "3D_structures": {
54
- "name": "05.4_combined_3D_set_with_stereochemistry.sd.xz",
55
- "url": "https://zenodo.org/records/10944245/files/05.4_combined_3D_set_with_stereochemistry.sd.xz?download=1",
56
- "size": 446702556,
57
- "sha256": "b0f04e066b7ac6b1e1f2a868ff0258b13bd8d3433023ff59c3af58317bfeb3e9"
58
- },
59
- "2D_fingerprint": {
60
- "name": "05.4_combined_2D_moldescs_ECFP6.tsv.xz",
61
- "url": "https://zenodo.org/records/10944245/files/05.4_combined_2D_moldescs_ECFP6.tsv.xz?download=1",
62
- "size": 141318356,
63
- "sha256": "4ab781cc238107f7c48f1d866eea0e2114068b6512acf74932a5b21958c9ffe0"
64
- },
65
- "3D_fingerprint": {
66
- "name": "05.4_combined_3D_moldescs_E3FP.tsv.xz",
67
- "url": "https://zenodo.org/records/10944245/files/05.4_combined_3D_moldescs_E3FP.tsv.xz?download=1",
68
- "size": 146751352,
69
- "sha256": "2b89027dad8f4e59f007dd082664a7d2a491f4f79d112fb29f14565acedfe4d0"
70
- },
71
- "2D_mordred": {
72
- "name": "05.4_combined_2D_moldescs_mordred2D.tsv.xz",
73
- "url": "https://zenodo.org/records/10944245/files/05.4_combined_2D_moldescs_mordred2D.tsv.xz?download=1",
74
- "size": 3085232504,
75
- "sha256": "d15bca59f542a6c46528e4f131cb44d8bd6b21440ab139f4175f4327c15c39c6"
76
- },
77
- "3D_mordred": {
78
- "name": "05.4_combined_3D_moldescs_mordred3D.tsv.xz",
79
- "url": "https://zenodo.org/records/10944245/files/05.4_combined_3D_moldescs_mordred3D.tsv.xz?download=1",
80
- "size": 2996851908,
81
- "sha256": "80fc4f9b2d0b89e68c289c44e9f4df78f4c08e5867cd414d6169a4e1344aead8"
82
- },
83
- "2D_cddd": {
84
- "name": "05.4_combined_2D_moldescs_CDDDs.tsv.xz",
85
- "url": "https://zenodo.org/records/10944245/files/05.4_combined_2D_moldescs_CDDDs.tsv.xz?download=1",
86
- "size": 3770082588,
87
- "sha256": "9bb0d9adba1b812aa05b6391ecbc3f0148f6ed37972a004b13772d08790a9bda"
88
- },
89
- "2D_mold2": {
90
- "name": "05.4_combined_2D_moldescs_mold2.tsv.xz",
91
- "url": "https://zenodo.org/records/10944245/files/05.4_combined_2D_moldescs_mold2.tsv.xz?download=1",
92
- "size": 1552425452,
93
- "sha256": "bdfb0cbb6e9a3d1b62065808fa0e6ce238e04760df62e34ce4f15046810efd82"
94
- },
95
- "proteins": {
96
- "name": "05.4_combined_set_protein_targets.tsv.xz",
97
- "url": "https://zenodo.org/records/10944245/files/05.4_combined_set_protein_targets.tsv.xz?download=1",
98
- "size": 1701316,
99
- "sha256": "5f49030509ce188a119910f16054558e1cdd1c70a22d2a1458ec4189f5d1a08e"
100
- },
101
- "proteins_unirep": {
102
- "name": "05.4_combined_prot_embeddings_unirep.tsv.xz",
103
- "url": "https://zenodo.org/records/10944245/files/05.4_combined_prot_embeddings_unirep.tsv.xz?download=1",
104
- "size": 138392528,
105
- "sha256": "19aa0562c3b695883c5aa8c05ad0934c4b9b851a26550345940d92ed17f36b93"
106
- }
107
- },
108
- "05.5": {
109
- "readme": {
110
- "name": "README.txt",
111
- "url": "https://zenodo.org/record/7019874/files/README.txt?download=1",
112
- "size": 11092,
113
- "sha256": "0af036c1d02b150f6402a53960a6e995611e66ee7724b61a21f58d3366ec8eda"
114
- },
115
- "requirements": [{
116
- "name": "LICENSE.txt",
117
- "url": "https://zenodo.org/records/10943207/files/LICENSE.txt?download=1",
118
- "size": 20138,
119
- "sha256": "3b2890eacd851373001c4a14623458e3adaf1b1967939aa9c38a318e28d61c00"
120
- },
121
- {
122
- "name": "data_types.json",
123
- "url": "https://zenodo.org/records/10943207/files/data_types.json?download=1",
124
- "size": 450678,
125
- "sha256": "d38f0b6b53f0450c5530b5bf44d8a7d0bb85417f22b7c818237e3346fe68149c"
126
- },
127
- {
128
- "name": "data_size.json",
129
- "url": "https://zenodo.org/records/10943207/files/data_size.json?download=1",
130
- "size": 324,
131
- "sha256": "513307863c4acc779789340e900821ff8f38c845865aa078edc649caa1559dcc"
132
- }],
133
- "papyrus++": {
134
- "name": "05.5++_combined_set_without_stereochemistry.tsv.xz",
135
- "url": "https://zenodo.org/records/10943207/files/05.5++_combined_set_without_stereochemistry.tsv.xz?download=1",
136
- "size": 41357608,
137
- "sha256": "8ecaea9533f3c475dca6d335f30dd1b4abb259fa77b7441548dd15879e1afa58"
138
- },
139
- "2D_papyrus": {
140
- "name": "05.5_combined_set_without_stereochemistry.tsv.xz",
141
- "url": "https://zenodo.org/record/7019874/files/05.5_combined_set_without_stereochemistry.tsv.xz?download=1",
142
- "size": 718601992,
143
- "sha256": "04ecaea97c09d02dbde809ad99ea2127fc3997a4e3b200b56dee85c30801890a"
144
- },
145
- "2D_structures": {
146
- "name": "05.5_combined_2D_set_without_stereochemistry.sd.xz",
147
- "url": "https://zenodo.org/record/7019874/files/05.5_combined_2D_set_without_stereochemistry.sd.xz?download=1",
148
- "size": 399767580,
149
- "sha256": "2e088ca662c5c33c5fc018c42c9c21e918ec167f1129a0a11fbf9c72888e8be6"
150
- },
151
- "3D_papyrus": {
152
- "name": "05.5_combined_set_with_stereochemistry.tsv.xz",
153
- "url": "https://zenodo.org/record/7019874/files/05.5_combined_set_with_stereochemistry.tsv.xz?download=1",
154
- "size": 690498416,
155
- "sha256": "822aca70ccf4c19879ae45dfa16de5fc29c3ee08b25739e7a087899652af7dd9"
156
- },
157
- "3D_structures": {
158
- "name": "05.5_combined_3D_set_with_stereochemistry.sd.xz",
159
- "url": "https://zenodo.org/record/7019874/files/05.5_combined_3D_set_with_stereochemistry.sd.xz?download=1",
160
- "size": 492426264,
161
- "sha256": "a4a5355ffc56de8d914c2ad281d10c227171c27e4d6c250daad14a16280cf136"
162
- },
163
- "2D_fingerprint": {
164
- "name": "05.5_combined_2D_moldescs_ECFP6.tsv.xz",
165
- "url": "https://zenodo.org/record/7019874/files/05.5_combined_2D_moldescs_ECFP6.tsv.xz?download=1",
166
- "size": 97818228,
167
- "sha256": "3d626b4295cfbe73877157d8eea84b911a3cb60bf9571165d88c00cc0b0880d2"
168
- },
169
- "3D_fingerprint": {
170
- "name": "05.5_combined_3D_moldescs_E3FP.tsv.xz",
171
- "url": "https://zenodo.org/record/7019874/files/05.5_combined_3D_moldescs_E3FP.tsv.xz?download=1",
172
- "size": 114052016,
173
- "sha256": "446fe36d50487f29a2d7402a53cc661097e884dc0df8ffd278646dba6708cb65"
174
- },
175
- "2D_mordred": {
176
- "name": "05.5_combined_2D_moldescs_mordred2D.tsv.xz",
177
- "url": "https://zenodo.org/record/7019874/files/05.5_combined_2D_moldescs_mordred2D.tsv.xz?download=1",
178
- "size": 2936434876,
179
- "sha256": "bcef94b1c04a1e7d8f9da11ad87e598e19932548a8ea4f00029c2f3a89672ff4"
180
- },
181
- "3D_mordred": {
182
- "name": "05.5_combined_3D_moldescs_mordred3D.tsv.xz",
183
- "url": "https://zenodo.org/record/7019874/files/05.5_combined_3D_moldescs_mordred3D.tsv.xz?download=1",
184
- "size": 3206020732,
185
- "sha256": "e6ffd0858f85217b57c4a88619e5f41d7f6bae16a9948612872162e54d3231dc"
186
- },
187
- "2D_cddd": {
188
- "name": "05.5_combined_2D_moldescs_CDDDs.tsv.xz",
189
- "url": "https://zenodo.org/record/7019874/files/05.5_combined_2D_moldescs_CDDDs.tsv.xz?download=1",
190
- "size": 3775676256,
191
- "sha256": "8421d973b4eb119f0739506a0b20ba9508356df97d4673e1c170e871cd134983"
192
- },
193
- "2D_mold2": {
194
- "name": "05.5_combined_2D_moldescs_mold2.tsv.xz",
195
- "url": "https://zenodo.org/record/7019874/files/05.5_combined_2D_moldescs_mold2.tsv.xz?download=1",
196
- "size": 1553510028,
197
- "sha256": "0fd1c2b3869c5fa749c21ddd70c5dff621974eccafb8e04fd6f95f3b37242058"
198
- },
199
- "proteins": {
200
- "name": "05.5_combined_set_protein_targets.tsv.xz",
201
- "url": "https://zenodo.org/record/7019874/files/05.5_combined_set_protein_targets.tsv.xz?download=1",
202
- "size": 1710756,
203
- "sha256": "d8f2cbee8b9849f7c3664fe7e8165c5abf785d374c36a8f151a6ec38fd582d80"
204
- },
205
- "proteins_unirep": {
206
- "name": "05.5_combined_prot_embeddings_unirep.tsv.xz",
207
- "url": "https://zenodo.org/record/7019874/files/05.5_combined_prot_embeddings_unirep.tsv.xz?download=1",
208
- "size": 128869632,
209
- "sha256": "9f1fce00e77563481eafc44405f9dc8188d5669ed93cafaee256c0208ca135b8"
210
- }
211
- },
212
- "05.6": {
213
- "readme": {
214
- "name": "README.txt",
215
- "url": "https://zenodo.org/record/7377161/files/README.txt?download=1",
216
- "size": 12170,
217
- "sha256": "b6a1977aed99e84c4ab560a04006a86264c9ff83ca67ed14e395e855c2543613"
218
- },
219
- "requirements": {
220
- "name": "05.6_additional_files.zip",
221
- "url": "https://zenodo.org/record/7377161/files/05.6_additional_files.zip?download=1",
222
- "size": 51310,
223
- "sha256": "c1d8df814ba54e17619f3740ff82577898a85a07acd220822403874159e26d8a"
224
- },
225
- "papyrus++": {
226
- "name": "05.6++_combined_set_without_stereochemistry.tsv.xz",
227
- "url": "https://zenodo.org/records/7821775/files/05.6++_combined_set_without_stereochemistry.tsv.xz?download=1",
228
- "size": 31085780,
229
- "sha256": "7518019c3ba287cd4cd0ff29425fe9da8a4760d891d22ed1abb33da4920cf96a"
230
- },
231
- "2D_papyrus": {
232
- "name": "05.6_combined_set_without_stereochemistry.tsv.xz",
233
- "url": "https://zenodo.org/record/7377161/files/05.6_combined_set_without_stereochemistry.tsv.xz?download=1",
234
- "size": 744449364,
235
- "sha256": "82a36ed7bb2f80846bb46e4c3e38905895bd1a2cfddd471d32091cb59dcf9437"
236
- },
237
- "2D_structures": {
238
- "name": "05.6_combined_2D_set_without_stereochemistry.sd.xz",
239
- "url": "https://zenodo.org/record/7377161/files/05.6_combined_2D_set_without_stereochemistry.sd.xz?download=1",
240
- "size": 439758444,
241
- "sha256": "1ec001964aca301494ea05fc24529120f01bc6952dcf4276dcd03625dfec460d"
242
- },
243
- "3D_papyrus": {
244
- "name": "05.6_combined_set_with_stereochemistry.tsv.xz",
245
- "url": "https://zenodo.org/record/7377161/files/05.6_combined_set_with_stereochemistry.tsv.xz?download=1",
246
- "size": 711529352,
247
- "sha256": "62068d500986b78fc90fe82b9e224555f8ca85319cd19f9df8bc73549e8a3e31"
248
- },
249
- "3D_structures": {
250
- "name": "05.6_combined_3D_set_with_stereochemistry.sd.xz",
251
- "url": "https://zenodo.org/record/7377161/files/05.6_combined_3D_set_with_stereochemistry.sd.xz?download=1",
252
- "size": 500108592,
253
- "sha256": "38e39963cd79845b4adca9dea871ffba18576ea742677471fc46a73a7dabbf38"
254
- },
255
- "2D_fingerprint": {
256
- "name": "05.6_combined_2D_moldescs_ECFP6.tsv.xz",
257
- "url": "https://zenodo.org/record/7377161/files/05.6_combined_2D_moldescs_ECFP6.tsv.xz?download=1",
258
- "size": 96612972,
259
- "sha256": "01c7366ee2ca7353d3a9f76601702b6d2eb312e71f02ea8ef48e2f90870c266c"
260
- },
261
- "3D_fingerprint": {
262
- "name": "05.6_combined_3D_moldescs_E3FP.tsv.xz",
263
- "url": "https://zenodo.org/record/7377161/files/05.6_combined_3D_moldescs_E3FP.tsv.xz?download=1",
264
- "size": 117065432,
265
- "sha256": "0d15baa4a9425daf63a0066511e9e96cbd5d7dab223bdaf48803536ab2484dc2"
266
- },
267
- "2D_mordred": {
268
- "name": "05.6_combined_2D_moldescs_mordred2D.tsv.xz",
269
- "url": "https://zenodo.org/record/7377161/files/05.6_combined_2D_moldescs_mordred2D.tsv.xz?download=1",
270
- "size": 3055443236,
271
- "sha256": "c497db85e97542f59b5252e2b1d3bdd93604e5c4d2ea131088a87d79ea6954c3"
272
- },
273
- "3D_mordred": {
274
- "name": "05.6_combined_3D_moldescs_mordred3D.tsv.xz",
275
- "url": "https://zenodo.org/record/7377161/files/05.6_combined_3D_moldescs_mordred3D.tsv.xz?download=1",
276
- "size": 3324119256,
277
- "sha256": "6b022acb6a0bec8bfc1ae7585014ae0b812a12ddcbed7be4ac7ec073c662192f"
278
- },
279
- "2D_cddd": {
280
- "name": "05.6_combined_2D_moldescs_CDDDs.tsv.xz",
281
- "url": "https://zenodo.org/record/7377161/files/05.6_combined_2D_moldescs_CDDDs.tsv.xz?download=1",
282
- "size": 2103289016,
283
- "sha256": "fbb54e5ca9a28ff022dc5baddf87cb6601169a2d86f3b55db4d183fd3885642a"
284
- },
285
- "2D_mold2": {
286
- "name": "05.6_combined_2D_moldescs_mold2.tsv.xz",
287
- "url": "https://zenodo.org/record/7377161/files/05.6_combined_2D_moldescs_mold2.tsv.xz?download=1",
288
- "size": 1487710808,
289
- "sha256": "cd46ce9841a1f956840b4fe7c56310eaa32c5e957a6ffaca62fbc55f820aad99"
290
- },
291
- "proteins": {
292
- "name": "05.6_combined_set_protein_targets.tsv.xz",
293
- "url": "https://zenodo.org/record/7377161/files/05.6_combined_set_protein_targets.tsv.xz?download=1",
294
- "size": 1850764,
295
- "sha256": "f443a2f8c74b8eb3f2c9d1bd7bfbddc86cbcc3fd5e8e505b7057b78a4ad17ee1"
296
- },
297
- "proteins_unirep": {
298
- "name": "05.6_combined_protdescs_unirep.tsv.xz",
299
- "url": "https://zenodo.org/record/7377161/files/05.6_combined_protdescs_unirep.tsv.xz?download=1",
300
- "size": 207122632,
301
- "sha256": "47f37c1f1efcb9d6f002d5a096853975c27ddcc767d7903a8af12bac0439181c"
302
- },
303
- "proteins_prodec": {
304
- "name": "05.6_combined_protdescs_ProDEC.tsv.xz",
305
- "url": "https://zenodo.org/record/7377161/files/05.6_combined_protdescs_ProDEC.tsv.xz?download=1",
306
- "size": 447818916,
307
- "sha256": "3211a62f18ccb7ccc13f885374c1462efeb83ab0e98ed62d2645723f7dc9f1a1"
308
- }
309
- },
310
- "05.7": {
311
- "readme": {
312
- "name": "README.txt",
313
- "url": "https://drive.google.com/uc?id=16ak1O1v70O72_UzFldGzZY_b6Ntd0eZm&confirm=t",
314
- "size": 0,
315
- "sha256": ""
316
- },
317
- "requirements": {
318
- "name": "05.7_additional_files.zip",
319
- "url": "https://drive.google.com/uc?id=18IGeQ4tTW6b7VO8nb7EYJqGSLNdXHEgD&confirm=t",
320
- "size": 114037,
321
- "sha256": "e8a0b5f65bd79c21b979b69d2b19fe6f51611fbc5a988ff3c0caa738ab0bca73"
322
- },
323
- "papyrus++": {
324
- "name": "05.7++_combined_set_without_stereochemistry.tsv.xz",
325
- "url": "https://drive.google.com/uc?id=1lI_B8MKehKOcstQYpS_IQRTkbsaXovNf&confirm=t",
326
- "size": 57295028,
327
- "sha256": "a4819cd45f10b973a7bde75e5de58dff47980fc1347f2e552a1ac39f520b780f"
328
- },
329
- "2D_papyrus": {
330
- "name": "05.7_combined_set_without_stereochemistry.tsv.xz",
331
- "url": "https://drive.google.com/uc?id=1Jc1Zj43aORhOiLOZX4CE5tYlUPc5zoBK&confirm=t",
332
- "size": 749503448,
333
- "sha256": "42c1d175e617909701f5baf8175fee18b6be986274c628ef209612a8240368f7"
334
- },
335
- "2D_structures": {
336
- "name": "05.7_combined_2D_set_without_stereochemistry.sd.xz",
337
- "url": "https://drive.google.com/uc?id=1yTSKlTyT2rud8_6J0TgiVAnSnswaeL09&confirm=t",
338
- "size": 457158128,
339
- "sha256": "5ea668a099ff2422accccadb378a50ae570044881d20c017742f53dc8f421680"
340
- },
341
- "3D_papyrus": {
342
- "name": "05.7_combined_set_with_stereochemistry.tsv.xz",
343
- "url": "https://drive.google.com/uc?id=14tsxNwjqpKjeJSRyZy5kG_i7Pg0gQPS_&confirm=t",
344
- "size": 715818916,
345
- "sha256": "0ee09ceace168ec25b0619349b7b41d754a7ad75a4cb82c2d887ab11d7ceb03c"
346
- },
347
- "3D_structures": {
348
- "name": "05.7_combined_3D_set_with_stereochemistry.sd.xz",
349
- "url": "https://drive.google.com/uc?id=1rkOz5QxWVMiQUWsNX0fzfb94doGy-FSI&confirm=t",
350
- "size": 519810936,
351
- "sha256": "fc5a9fd3ca68dba3f1f9b3217d85ecbb31bebb07798ea008d70b5e92caea2c1d"
352
- },
353
- "2D_fingerprint": {
354
- "name": "05.7_combined_2D_moldescs_ECFP6.tsv.xz",
355
- "url": "https://drive.google.com/uc?id=1TtJ2iUKVoo-_32cdFbFACSclv6CyeYNI&confirm=t",
356
- "size": 100340752,
357
- "sha256": "491a8dbc93364718de87b6c1ef3779b9ecdd3ec5af4dadc4dbddaf261a9d254f"
358
- },
359
- "3D_fingerprint": {
360
- "name": "05.7_combined_3D_moldescs_E3FP.tsv.xz",
361
- "url": "https://drive.google.com/uc?id=1KKOujpCm31za_i12SKhjxbwg4ywwDbjU&confirm=t",
362
- "size": 121328636,
363
- "sha256": "4e08240587757adbf6ca481b3998751b09c48fc1cb58068609f54b1a76275c11"
364
- },
365
- "2D_mordred": {
366
- "name": "05.7_combined_2D_moldescs_mordred2D.tsv.xz",
367
- "url": "https://drive.google.com/uc?id=1cTJLBz82VShJYrMMcQLOYiCS4IFmiOjk&confirm=t",
368
- "size": 3166511800,
369
- "sha256": "e9f841c7233f21c7db406f973cb89ec90db9caa7e99a6618dea94ad1fc72cdac"
370
- },
371
- "3D_mordred": {
372
- "name": "05.7_combined_3D_moldescs_mordred3D.tsv.xz",
373
- "url": "https://drive.google.com/uc?id=1w-SwQohL60_QsOoqVmlxwz3LLbxC50YX&confirm=t",
374
- "size": 3443038656,
375
- "sha256": "1e480c48c8eb86c57def26331ea2447e43f60d6fd73a2c33e76a6338abd5d132"
376
- },
377
- "2D_cddd": {
378
- "name": "05.7_combined_2D_moldescs_CDDDs.tsv.xz",
379
- "url": "https://drive.google.com/uc?id=18ERbYiqLg7WkXpZ3DyjNCHLr495_stik&confirm=t",
380
- "size": 2179141716,
381
- "sha256": "c227b3b8e4ea0ff53cb358a765ff89ffdfc7f83b2f3e71142e31fca74be28e3b"
382
- },
383
- "2D_mold2": {
384
- "name": "05.7_combined_2D_moldescs_mold2.tsv.xz",
385
- "url": "https://drive.google.com/uc?id=1VJJHcCkfQeRNCL8gYpQ5pToUFfP87ZaA&confirm=t",
386
- "size": 1548906976,
387
- "sha256": "95be36ae2e883053b8b275f26238fe292c34133e3cb527a40fe9bfaece057d49"
388
- },
389
- "proteins": {
390
- "name": "05.7_combined_set_protein_targets.tsv.xz",
391
- "url": "https://drive.google.com/uc?id=1mZYpQm5gMGw1Z8xdq-seqYE4diD81dc-&confirm=t",
392
- "size": 1779284,
393
- "sha256": "1226453794df7552aa56375d3ec0a045008586f5ab6612cb3a06942dfac4dbac"
394
- },
395
- "proteins_unirep": {
396
- "name": "05.7_combined_protdescs_unirep.tsv.xz",
397
- "url": "https://drive.google.com/uc?id=1cFbo402ofPP5YP_JpUKHZle3XjVARc6S&confirm=t",
398
- "size": 209760216,
399
- "sha256": "cfd8b9e3ea9b95713bd23c69b2db7ae7dfd0c019b5f610912e7d557537c4305c"
400
- },
401
- "proteins_prodec": {
402
- "name": "05.7_combined_protdescs_ProDEC.tsv.xz",
403
- "url": "https://drive.google.com/uc?id=1FX7vVUmvtVd4fVk22n4yGRTR0kM_XTQt&confirm=t",
404
- "size": 434668804,
405
- "sha256": "9011ff21dcb3acb73af40b37d2a587c0aa0060d803b9cee165f8131a2933f80d"
406
- }
407
- }
408
- }
@@ -1,31 +0,0 @@
1
- from papyrus_scripts import PapyrusDataset, preprocess, reader
2
-
3
- # data2 = (PapyrusDataset(is3d=False, version='latest', plusplus=False, chunksize=int(1e6))
4
- # .keep_organism('Mus musculus (Mouse)')
5
- # .keep_source('chembl')
6
- # .keep_protein_class({'l5': 'CC chemokine receptor'})
7
- # .not_isin('accession', ['P13500', 'P13501'])
8
- # .keep_activity_type(['ki', 'kd'])
9
- # .aggregate(progress=True))
10
- #
11
- # #print(data2.organism.value_counts())
12
- # print(data2.source.value_counts())
13
- # print(data2.Classification.value_counts())
14
- # print(data2.accession.value_counts())
15
- # print(data2[['type_IC50', 'type_EC50', 'type_KD', 'type_Ki', 'type_other']].value_counts())
16
-
17
-
18
- fn_data = reader.read_papyrus(is3d=False, version='latest', plusplus=True, chunksize=int(1e6))
19
- fn_protein_data = reader.read_protein_set(version='latest')
20
- fn_filter1 = preprocess.keep_organism(fn_data, fn_protein_data, organism='Homo sapiens (Human)')
21
- fn_filter2 = preprocess.keep_protein_class(fn_filter1, fn_protein_data, classes={'l5': 'Adenosine receptor'})
22
- fn_filter3 = preprocess.keep_type(fn_filter2, activity_types='ic50')
23
- fn_data_agg = preprocess.consume_chunks(fn_filter3, progress=True)
24
- oop_data_agg = (PapyrusDataset(is3d=False, version='latest', plusplus=True, chunksize=int(1e6))
25
- .keep_organism('Homo sapiens (Human)')
26
- .keep_protein_class({'l5': 'Adenosine receptor'})
27
- .keep_activity_type('ic50')
28
- .aggregate(progress=True))
29
-
30
- print(fn_data_agg)
31
- print(oop_data_agg)
File without changes