pyjess 0.5.2__cp37-cp37m-win_amd64.whl → 0.7.0__cp37-cp37m-win_amd64.whl

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.

Potentially problematic release.


This version of pyjess might be problematic. Click here for more details.

@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pyjess
3
- Version: 0.5.2
3
+ Version: 0.7.0
4
4
  Summary: Cython bindings and Python interface to JESS, a 3D template matching software.
5
5
  Keywords: bioinformatics,structure,template,matching
6
6
  Author-Email: Martin Larralde <martin.larralde@embl.de>
@@ -54,7 +54,9 @@ Project-URL: Pypi, https://pypi.org/project/pyjess
54
54
  Project-URL: Piwheels, https://piwheels.org/project/pyjess/
55
55
  Requires-Python: >=3.7
56
56
  Provides-Extra: test
57
+ Provides-Extra: cif
57
58
  Requires-Dist: importlib-resources; python_version < "3.9" and extra == "test"
59
+ Requires-Dist: gemmi~=0.7.0; extra == "cif"
58
60
  Description-Content-Type: text/markdown
59
61
 
60
62
  # 🐍🔍 PyJess [![Stars](https://img.shields.io/github/stars/althonos/pyjess.svg?style=social&maxAge=3600&label=Star)](https://github.com/althonos/pyjess/stargazers)
@@ -92,7 +94,9 @@ during his PhD in the [Thornton group](https://www.ebi.ac.uk/research/thornton/)
92
94
  PyJess is a Python module that provides bindings to Jess using
93
95
  [Cython](https://cython.org/). It allows creating templates, querying them
94
96
  with protein structures, and retrieving the hits using a Python API without
95
- performing any external I/O.
97
+ performing any external I/O. It's also more than 10x faster than Jess thanks to
98
+ [algorithmic optimizations](https://pyjess.readthedocs.io/en/latest/guide/optimizations.html)
99
+ added to improve the original Jess code while producing consistent results.
96
100
 
97
101
 
98
102
  ## 🔧 Installing
@@ -112,7 +116,7 @@ package:
112
116
  $ conda install -c bioconda pyjess
113
117
  ```
114
118
 
115
- Check the [*install* page](https://pyjess.readthedocs.io/en/stable/install.html)
119
+ Check the [*install* page](https://pyjess.readthedocs.io/en/stable/guide/install.html)
116
120
  of the documentation for other ways to install PyJess on your machine.
117
121
 
118
122
 
@@ -126,7 +130,10 @@ Jess if you are using it in an academic work, for instance as:
126
130
 
127
131
  ## 💡 Example
128
132
 
129
- Load templates to be used as references from different template files:
133
+ #### Prepare templates
134
+
135
+ Load [`Template`](https://pyjess.readthedocs.io/en/latest/api/template.html#pyjess.Template)
136
+ objects to be used as references from different template files:
130
137
 
131
138
  ```python
132
139
  import pathlib
@@ -134,19 +141,49 @@ import pyjess
134
141
 
135
142
  templates = []
136
143
  for path in sorted(pathlib.Path("vendor/jess/examples").glob("template_*.qry")):
137
- with path.open() as file:
138
- templates.append(pyjess.Template.load(file, id=path.stem))
144
+ templates.append(pyjess.Template.load(path, id=path.stem))
139
145
  ```
140
146
 
141
- Create a `Jess` instance and use it to query a molecule (a PDB structure)
142
- against the stored templates:
147
+ #### Prepare query structures
148
+
149
+ Load a [`Molecule`](https://pyjess.readthedocs.io/en/latest/api/molecule.html#pyjess.Molecule)
150
+ (a PDB structure) from a PDB file, create one with the Python API, or
151
+ convert it from a [`Bio.Model`](https://biopython.org/docs/1.76/api/Bio.PDB.Model.html),
152
+ [`gemmi.Model`](https://gemmi.readthedocs.io/en/latest/mol.html#model),
153
+ or [`biotite.structure.AtomArray`](https://www.biotite-python.org/latest/apidoc/biotite.structure.AtomArray.html)
154
+ object:
143
155
 
144
156
  ```python
145
- jess = pyjess.Jess(templates)
157
+ # load from PDB file or mmCIF file
146
158
  mol = pyjess.Molecule.load("vendor/jess/examples/test_pdbs/pdb1a0p.ent")
159
+
160
+ # load with BioPython
161
+ parser = Bio.PDB.PDBParser()
162
+ structure = parser.get_structure('pdb1a0p', "vendor/jess/examples/test_pdbs/pdb1a0p.ent")
163
+ mol = Molecule.from_biopython(structure, id="1a0p")
164
+
165
+ # load with Gemmi
166
+ structure = gemmi.read_pdb_string("vendor/jess/examples/test_pdbs/pdb1a0p.ent")
167
+ mol = Molecule.from_gemmi(structure[0], id="1a0p")
168
+
169
+ # load with Biotite
170
+ pdb_file = biotite.structure.io.pdb.PDBFile.read(f)
171
+ structure = pdb_file.get_structure(altloc="all", extra_fields=["atom_id", "b_factor", "occupancy", "charge"])
172
+ mol = Molecule.from_biotite(structure[0])
173
+ ```
174
+
175
+ ### Match templates
176
+
177
+ Create a [`Jess`](https://pyjess.readthedocs.io/en/latest/api/jess.html#pyjess.Jess)
178
+ instance and use it to query a against the stored templates:
179
+
180
+ ```python
181
+ jess = pyjess.Jess(templates)
147
182
  query = jess.query(mol, rmsd_threshold=2.0, distance_cutoff=3.0, max_dynamic_distance=3.0)
148
183
  ```
149
184
 
185
+ ### Process hits
186
+
150
187
  The hits are computed iteratively, and the different output statistics are
151
188
  computed on-the-fly when requested:
152
189
 
@@ -157,12 +194,20 @@ for hit in query:
157
194
  print(atom.name, atom.x, atom.y, atom.z)
158
195
  ```
159
196
 
197
+ Hits can also be rendered in PDB format like in the original Jess output,
198
+ either by writing to a file directly, or to a Python string:
199
+ ```python
200
+ for hit in query:
201
+ hit.dump(sys.stdout, format="pdb")
202
+ ```
160
203
 
161
204
  ## 🧶 Thread-safety
162
205
 
163
- Once a `Jess` instance has been created, the templates cannot be edited anymore,
164
- making the `Jess.query` method re-entrant. This allows querying several
165
- molecules against the same templates in parallel using a thread pool:
206
+ Once a [`Jess`](https://pyjess.readthedocs.io/en/latest/api/jess.html#pyjess.Jess)
207
+ instance has been created, the templates cannot be edited anymore,
208
+ making the [`Jess.query`](https://pyjess.readthedocs.io/en/latest/api/jess.html#pyjess.Jess.query) method re-entrant and thread-safe. This allows querying
209
+ several molecules against the same templates in parallel using e.g a
210
+ [`ThreadPool`](https://docs.python.org/3/library/multiprocessing.html#multiprocessing.pool.ThreadPool):
166
211
 
167
212
  ```python
168
213
  molecules = []
@@ -176,8 +221,23 @@ with multiprocessing.ThreadPool() as pool:
176
221
  *⚠️ Prior to PyJess `v0.2.1`, the Jess code was running some thread-unsafe operations which have now been patched.
177
222
  If running Jess in parallel, make sure to use `v0.2.1` or later to use the code patched with re-entrant functions*.
178
223
 
179
- <!-- ## ⏱️ Benchmarks -->
224
+ ## ⏱️ Benchmarks
225
+
226
+ The following table reports the runtime of PyJess to match N=132 protein
227
+ structures to the M=7607 templates of
228
+ [EnzyMM](https://github.com/RayHackett/enzymm), using J=12 threads to parallelize.
229
+
230
+ | Version | Runtime (s) | Match Speed (N * M / s * J) | Speedup |
231
+ | ----------- | ----------- | --------------------------- | ----------- |
232
+ | ``v0.4.2`` | 618.1 | 135.4 | N/A |
233
+ | ``v0.5.0`` | 586.3 | 142.7 | x1.05 |
234
+ | ``v0.5.1`` | 365.6 | 228.9 | x1.69 |
235
+ | ``v0.5.2`` | 327.2 | 255.7 | x1.88 |
236
+ | ``v0.6.0`` | 54.5 | 1535.4 | x11.34 |
237
+ | ``v0.7.0`` | 52.4 | 1597.5 | **x11.80** |
180
238
 
239
+ *Benchmarks were run on a quiet [i7-1255U](https://www.intel.com/content/www/us/en/products/sku/226259/intel-core-i71255u-processor-12m-cache-up-to-4-70-ghz/specifications.html)
240
+ CPU running @4.70GHz with 10 physical cores / 12 logical cores.*
181
241
 
182
242
  ## 💭 Feedback
183
243
 
@@ -205,12 +265,13 @@ in the [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) format.
205
265
 
206
266
  ## ⚖️ License
207
267
 
208
- This library is provided under the [MIT License](https://choosealicense.com/licenses/mit/). The JESS code is distributed under the [MIT License](https://choosealicense.com/licenses/mit/) as well.
268
+ This library is provided under the [MIT License](https://choosealicense.com/licenses/mit/).
269
+ The JESS code is distributed under the [MIT License](https://choosealicense.com/licenses/mit/) as well.
209
270
 
210
271
  *This project is in no way not affiliated, sponsored, or otherwise endorsed
211
272
  by the JESS authors. It was developed
212
273
  by [Martin Larralde](https://github.com/althonos/) during his PhD project
213
- at the [European Molecular Biology Laboratory](https://www.embl.de/) in
274
+ at the [Leiden University Medical Center](https://www.lumc.nl/en/) in
214
275
  the [Zeller team](https://github.com/zellerlab).*
215
276
 
216
277
 
@@ -0,0 +1,34 @@
1
+ pyjess/.gitignore,sha256=u14v4OOy8U50Kp9SUKU8DupCG-mQIuel47gdbNDmAwg,21
2
+ pyjess/__init__.py,sha256=Xe9GBQUBm9ik-ty5tcE3UQ9Ip1p-C_IGvTPuGULolng,766
3
+ pyjess/__main__.py,sha256=Kc823UjDqgAMU6YJdDwfNlEPWjpX_94QXgCBlLMnUMo,53
4
+ pyjess/_jess.pyd,sha256=ZAiQBr05FySGIyeyN4rAc-rC4QZ3uJOBvNwXkA_Dj00,453120
5
+ pyjess/_jess.pyi,sha256=jLNw73JPngD1fxSZeIUzf1kTEBLr89kncqoUilnZYXQ,8588
6
+ pyjess/_jess.pyx,sha256=XprzJKRlaEjtXCW7dODOYRjPy5DELKd-TB1DluNfKXM,82944
7
+ pyjess/cli.py,sha256=82qa2vDMWVqmAScPYxGS3-5bEFuqBDAmuQ6M-9WQsLA,9211
8
+ pyjess/CMakeLists.txt,sha256=H9eXbrFcGF2OLP8muQctb4cOb27Qp2uZj5KRjoDAROg,36
9
+ pyjess/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
10
+ pyjess/tests/__init__.py,sha256=skiwVtim1nISOYY4xkYAGI7rPaDnLORczkT1q-Fh6zI,698
11
+ pyjess/tests/data/1.3.3.tpl,sha256=gleyiSSHAVJbRJaK8Nlh9setsj6EI38Sr1XU5OEduQE,1011
12
+ pyjess/tests/data/1AMY+1.3.3.txt,sha256=Wyq9Eh9QVaOPH_jsZ6iF9WYhFdTGESqOzjfX14-0gAo,105456
13
+ pyjess/tests/data/1AMY.cif,sha256=tMIth9gw8l4OV8QfAvDKEcG2MyPEjN8NAegX0r-3G8M,399887
14
+ pyjess/tests/data/1AMY.pdb,sha256=fIbowuYS46hQh82xBtVaIPC50o7U08CnHNcnq4nM944,323162
15
+ pyjess/tests/data/1sur.qry,sha256=zMXtVv3Ja2CbYJ91sWFmZfs_BFaqpTcoOszbWuqNzIE,1184
16
+ pyjess/tests/data/4.1.2.tpl,sha256=Gl6DiCuAItfslhezN06tghrdE7-t4f4Ck87yVfpFoIE,1077
17
+ pyjess/tests/data/5ayx.EF.pdb,sha256=jNRuux9oX3Cy-hIGPqDigjP9he9n0fm50DcZkhG9YQU,5222
18
+ pyjess/tests/data/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
19
+ pyjess/tests/data/pdb1lnb.pdb,sha256=F8A6OdRly5c-pxsDw1LjTFINI75r1HaKaYB_eXv1QuM,273388
20
+ pyjess/tests/data/template_01.qry,sha256=izCIhUUTEk-IvQowhSVLiJaCAhpPbyvrfyoR4Q6-Pm0,616
21
+ pyjess/tests/data/template_02.qry,sha256=5IYRTqsvO_roB2INLwfFDEaWJW9VRcXdbK4oe8VKMxE,618
22
+ pyjess/tests/test_atom.py,sha256=clLN9IVuivadztGtagDhdPBDGoMkUgs41lEWuTCCmFA,4741
23
+ pyjess/tests/test_doctest.py,sha256=Z46WI6d2rvRoShOGQFZM_9zAzzgBqPlOaozpFu8bvDM,2632
24
+ pyjess/tests/test_hit.py,sha256=3z1JgGI87w_77Rdk_zrG2zA9M1n8u9L-XtTU3HtpSaY,2468
25
+ pyjess/tests/test_jess.py,sha256=E6j27Y3N9Da19YL30QFVCwREUO9fID2HH75zWMn2V5Y,17669
26
+ pyjess/tests/test_molecule.py,sha256=vn2539meiT1khDRp-_pDUAute9C7alrQ9SOqFLpb3Js,12833
27
+ pyjess/tests/test_template.py,sha256=jnFTegP6_llNvp8f965yXt_v55JSrIh6-tNpE6UbHe8,5026
28
+ pyjess/tests/test_template_atom.py,sha256=oK8cfKe4_k3Pm1PqoTTxTzAoeUVLiCFsg6QmiTQ-RCQ,3496
29
+ pyjess/tests/utils.py,sha256=Z7rUPC-D8dZlRfHAnLaXHUg6M10D3zFvNiwDvvHA3xc,202
30
+ pyjess-0.7.0.dist-info/METADATA,sha256=6YUDAD0gqDcJJc-7os2LFgL3HqDBnOSe6i2R7ySvJXI,14246
31
+ pyjess-0.7.0.dist-info/WHEEL,sha256=8Qrcszc_EgBzpzwCEIk4xbGhO_Cx6KXMNjPGW68ZaBc,105
32
+ pyjess-0.7.0.dist-info/entry_points.txt,sha256=5dgYfglg8P5hPTIyrKAnOBmYqs2GRR0kb6x0BncaHbA,44
33
+ pyjess-0.7.0.dist-info/licenses/COPYING,sha256=Iyx2bRDPnLgoEzW2KVanb61cjhW8lnhJNU-mjS-KhIY,1124
34
+ pyjess-0.7.0.dist-info/RECORD,,
@@ -0,0 +1,3 @@
1
+ [console_scripts]
2
+ pyjess = pyjess.cli:main
3
+
@@ -1,26 +0,0 @@
1
- pyjess/.gitignore,sha256=u14v4OOy8U50Kp9SUKU8DupCG-mQIuel47gdbNDmAwg,21
2
- pyjess/__init__.py,sha256=Xe9GBQUBm9ik-ty5tcE3UQ9Ip1p-C_IGvTPuGULolng,766
3
- pyjess/_jess.pyd,sha256=KQRgHIP7xNDTSPwXauzHxsGWnoLug2s_hlULuIhD19s,317440
4
- pyjess/_jess.pyi,sha256=1U7KeCDydiOT0vGts0sidGz_gI2PycD1sBiUmcafd7c,7239
5
- pyjess/_jess.pyx,sha256=tyAyYZaYYm8-dAMDMrH6WrpV5hM8hnn9DYHh4idoAOA,53500
6
- pyjess/CMakeLists.txt,sha256=H9eXbrFcGF2OLP8muQctb4cOb27Qp2uZj5KRjoDAROg,36
7
- pyjess/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
8
- pyjess/tests/__init__.py,sha256=J7rYASCuQsCu5gktf5XqjNxJoBkBqxbREAiaSOta5xE,617
9
- pyjess/tests/data/1.3.3.tpl,sha256=gleyiSSHAVJbRJaK8Nlh9setsj6EI38Sr1XU5OEduQE,1011
10
- pyjess/tests/data/1AMY+1.3.3.txt,sha256=Wyq9Eh9QVaOPH_jsZ6iF9WYhFdTGESqOzjfX14-0gAo,105456
11
- pyjess/tests/data/1AMY.pdb,sha256=fIbowuYS46hQh82xBtVaIPC50o7U08CnHNcnq4nM944,323162
12
- pyjess/tests/data/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
13
- pyjess/tests/data/pdb1lnb.pdb,sha256=F8A6OdRly5c-pxsDw1LjTFINI75r1HaKaYB_eXv1QuM,273388
14
- pyjess/tests/data/template_01.qry,sha256=izCIhUUTEk-IvQowhSVLiJaCAhpPbyvrfyoR4Q6-Pm0,616
15
- pyjess/tests/data/template_02.qry,sha256=5IYRTqsvO_roB2INLwfFDEaWJW9VRcXdbK4oe8VKMxE,618
16
- pyjess/tests/test_atom.py,sha256=clLN9IVuivadztGtagDhdPBDGoMkUgs41lEWuTCCmFA,4741
17
- pyjess/tests/test_hit.py,sha256=3p7MkvZL84e-tSbVlMSXHbO1yCZkaLIMD2e09occw1A,1244
18
- pyjess/tests/test_jess.py,sha256=Hp12b3xkRX0U8RFcejwDPFTEX8JzpOQTF6_zMXYAWDM,11616
19
- pyjess/tests/test_molecule.py,sha256=9k6uiTeOWc5NiO7epyxY9lm_GgksPb7-o-ZcNFNxutw,5452
20
- pyjess/tests/test_template.py,sha256=AIN-ba5-YTnGdT9SGPU4q45AZ03QnPE769WyItSpoPs,4657
21
- pyjess/tests/test_template_atom.py,sha256=oK8cfKe4_k3Pm1PqoTTxTzAoeUVLiCFsg6QmiTQ-RCQ,3496
22
- pyjess/tests/utils.py,sha256=Z7rUPC-D8dZlRfHAnLaXHUg6M10D3zFvNiwDvvHA3xc,202
23
- pyjess-0.5.2.dist-info/METADATA,sha256=mzv50eM3MPlmmNJzhs18ibYOnyTywH3DPJJlTG99SFI,11218
24
- pyjess-0.5.2.dist-info/WHEEL,sha256=8Qrcszc_EgBzpzwCEIk4xbGhO_Cx6KXMNjPGW68ZaBc,105
25
- pyjess-0.5.2.dist-info/licenses/COPYING,sha256=Iyx2bRDPnLgoEzW2KVanb61cjhW8lnhJNU-mjS-KhIY,1124
26
- pyjess-0.5.2.dist-info/RECORD,,
File without changes