pyjess 0.5.2__pp310-pypy310_pp73-win_amd64.whl → 0.7.0__pp310-pypy310_pp73-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.
- pyjess/__main__.py +4 -0
- pyjess/_jess.pyi +53 -9
- pyjess/_jess.pypy310-pp73-win_amd64.pyd +0 -0
- pyjess/_jess.pyx +855 -105
- pyjess/cli.py +281 -0
- pyjess/tests/__init__.py +2 -0
- pyjess/tests/data/1AMY.cif +6259 -0
- pyjess/tests/data/1sur.qry +26 -0
- pyjess/tests/data/4.1.2.tpl +23 -0
- pyjess/tests/data/5ayx.EF.pdb +63 -0
- pyjess/tests/test_doctest.py +78 -0
- pyjess/tests/test_hit.py +26 -2
- pyjess/tests/test_jess.py +124 -3
- pyjess/tests/test_molecule.py +146 -0
- pyjess/tests/test_template.py +10 -1
- {pyjess-0.5.2.dist-info → pyjess-0.7.0.dist-info}/METADATA +76 -15
- pyjess-0.7.0.dist-info/RECORD +34 -0
- pyjess-0.7.0.dist-info/entry_points.txt +3 -0
- pyjess-0.5.2.dist-info/RECORD +0 -26
- {pyjess-0.5.2.dist-info → pyjess-0.7.0.dist-info}/WHEEL +0 -0
- {pyjess-0.5.2.dist-info → pyjess-0.7.0.dist-info}/licenses/COPYING +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.2
|
|
2
2
|
Name: pyjess
|
|
3
|
-
Version: 0.
|
|
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>
|
|
@@ -56,6 +56,8 @@ Project-URL: PiWheels, https://piwheels.org/project/pyjess/
|
|
|
56
56
|
Requires-Python: >=3.7
|
|
57
57
|
Provides-Extra: test
|
|
58
58
|
Requires-Dist: importlib-resources; python_version < "3.9" and extra == "test"
|
|
59
|
+
Provides-Extra: cif
|
|
60
|
+
Requires-Dist: gemmi~=0.7.0; extra == "cif"
|
|
59
61
|
Description-Content-Type: text/markdown
|
|
60
62
|
|
|
61
63
|
# 🐍🔍 PyJess [](https://github.com/althonos/pyjess/stargazers)
|
|
@@ -93,7 +95,9 @@ during his PhD in the [Thornton group](https://www.ebi.ac.uk/research/thornton/)
|
|
|
93
95
|
PyJess is a Python module that provides bindings to Jess using
|
|
94
96
|
[Cython](https://cython.org/). It allows creating templates, querying them
|
|
95
97
|
with protein structures, and retrieving the hits using a Python API without
|
|
96
|
-
performing any external I/O.
|
|
98
|
+
performing any external I/O. It's also more than 10x faster than Jess thanks to
|
|
99
|
+
[algorithmic optimizations](https://pyjess.readthedocs.io/en/latest/guide/optimizations.html)
|
|
100
|
+
added to improve the original Jess code while producing consistent results.
|
|
97
101
|
|
|
98
102
|
|
|
99
103
|
## 🔧 Installing
|
|
@@ -113,7 +117,7 @@ package:
|
|
|
113
117
|
$ conda install -c bioconda pyjess
|
|
114
118
|
```
|
|
115
119
|
|
|
116
|
-
Check the [*install* page](https://pyjess.readthedocs.io/en/stable/install.html)
|
|
120
|
+
Check the [*install* page](https://pyjess.readthedocs.io/en/stable/guide/install.html)
|
|
117
121
|
of the documentation for other ways to install PyJess on your machine.
|
|
118
122
|
|
|
119
123
|
|
|
@@ -127,7 +131,10 @@ Jess if you are using it in an academic work, for instance as:
|
|
|
127
131
|
|
|
128
132
|
## 💡 Example
|
|
129
133
|
|
|
130
|
-
|
|
134
|
+
#### Prepare templates
|
|
135
|
+
|
|
136
|
+
Load [`Template`](https://pyjess.readthedocs.io/en/latest/api/template.html#pyjess.Template)
|
|
137
|
+
objects to be used as references from different template files:
|
|
131
138
|
|
|
132
139
|
```python
|
|
133
140
|
import pathlib
|
|
@@ -135,19 +142,49 @@ import pyjess
|
|
|
135
142
|
|
|
136
143
|
templates = []
|
|
137
144
|
for path in sorted(pathlib.Path("vendor/jess/examples").glob("template_*.qry")):
|
|
138
|
-
|
|
139
|
-
templates.append(pyjess.Template.load(file, id=path.stem))
|
|
145
|
+
templates.append(pyjess.Template.load(path, id=path.stem))
|
|
140
146
|
```
|
|
141
147
|
|
|
142
|
-
|
|
143
|
-
|
|
148
|
+
#### Prepare query structures
|
|
149
|
+
|
|
150
|
+
Load a [`Molecule`](https://pyjess.readthedocs.io/en/latest/api/molecule.html#pyjess.Molecule)
|
|
151
|
+
(a PDB structure) from a PDB file, create one with the Python API, or
|
|
152
|
+
convert it from a [`Bio.Model`](https://biopython.org/docs/1.76/api/Bio.PDB.Model.html),
|
|
153
|
+
[`gemmi.Model`](https://gemmi.readthedocs.io/en/latest/mol.html#model),
|
|
154
|
+
or [`biotite.structure.AtomArray`](https://www.biotite-python.org/latest/apidoc/biotite.structure.AtomArray.html)
|
|
155
|
+
object:
|
|
144
156
|
|
|
145
157
|
```python
|
|
146
|
-
|
|
158
|
+
# load from PDB file or mmCIF file
|
|
147
159
|
mol = pyjess.Molecule.load("vendor/jess/examples/test_pdbs/pdb1a0p.ent")
|
|
160
|
+
|
|
161
|
+
# load with BioPython
|
|
162
|
+
parser = Bio.PDB.PDBParser()
|
|
163
|
+
structure = parser.get_structure('pdb1a0p', "vendor/jess/examples/test_pdbs/pdb1a0p.ent")
|
|
164
|
+
mol = Molecule.from_biopython(structure, id="1a0p")
|
|
165
|
+
|
|
166
|
+
# load with Gemmi
|
|
167
|
+
structure = gemmi.read_pdb_string("vendor/jess/examples/test_pdbs/pdb1a0p.ent")
|
|
168
|
+
mol = Molecule.from_gemmi(structure[0], id="1a0p")
|
|
169
|
+
|
|
170
|
+
# load with Biotite
|
|
171
|
+
pdb_file = biotite.structure.io.pdb.PDBFile.read(f)
|
|
172
|
+
structure = pdb_file.get_structure(altloc="all", extra_fields=["atom_id", "b_factor", "occupancy", "charge"])
|
|
173
|
+
mol = Molecule.from_biotite(structure[0])
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
### Match templates
|
|
177
|
+
|
|
178
|
+
Create a [`Jess`](https://pyjess.readthedocs.io/en/latest/api/jess.html#pyjess.Jess)
|
|
179
|
+
instance and use it to query a against the stored templates:
|
|
180
|
+
|
|
181
|
+
```python
|
|
182
|
+
jess = pyjess.Jess(templates)
|
|
148
183
|
query = jess.query(mol, rmsd_threshold=2.0, distance_cutoff=3.0, max_dynamic_distance=3.0)
|
|
149
184
|
```
|
|
150
185
|
|
|
186
|
+
### Process hits
|
|
187
|
+
|
|
151
188
|
The hits are computed iteratively, and the different output statistics are
|
|
152
189
|
computed on-the-fly when requested:
|
|
153
190
|
|
|
@@ -158,12 +195,20 @@ for hit in query:
|
|
|
158
195
|
print(atom.name, atom.x, atom.y, atom.z)
|
|
159
196
|
```
|
|
160
197
|
|
|
198
|
+
Hits can also be rendered in PDB format like in the original Jess output,
|
|
199
|
+
either by writing to a file directly, or to a Python string:
|
|
200
|
+
```python
|
|
201
|
+
for hit in query:
|
|
202
|
+
hit.dump(sys.stdout, format="pdb")
|
|
203
|
+
```
|
|
161
204
|
|
|
162
205
|
## 🧶 Thread-safety
|
|
163
206
|
|
|
164
|
-
Once a `Jess`
|
|
165
|
-
|
|
166
|
-
|
|
207
|
+
Once a [`Jess`](https://pyjess.readthedocs.io/en/latest/api/jess.html#pyjess.Jess)
|
|
208
|
+
instance has been created, the templates cannot be edited anymore,
|
|
209
|
+
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
|
|
210
|
+
several molecules against the same templates in parallel using e.g a
|
|
211
|
+
[`ThreadPool`](https://docs.python.org/3/library/multiprocessing.html#multiprocessing.pool.ThreadPool):
|
|
167
212
|
|
|
168
213
|
```python
|
|
169
214
|
molecules = []
|
|
@@ -177,8 +222,23 @@ with multiprocessing.ThreadPool() as pool:
|
|
|
177
222
|
*⚠️ Prior to PyJess `v0.2.1`, the Jess code was running some thread-unsafe operations which have now been patched.
|
|
178
223
|
If running Jess in parallel, make sure to use `v0.2.1` or later to use the code patched with re-entrant functions*.
|
|
179
224
|
|
|
180
|
-
|
|
225
|
+
## ⏱️ Benchmarks
|
|
226
|
+
|
|
227
|
+
The following table reports the runtime of PyJess to match N=132 protein
|
|
228
|
+
structures to the M=7607 templates of
|
|
229
|
+
[EnzyMM](https://github.com/RayHackett/enzymm), using J=12 threads to parallelize.
|
|
230
|
+
|
|
231
|
+
| Version | Runtime (s) | Match Speed (N * M / s * J) | Speedup |
|
|
232
|
+
| ----------- | ----------- | --------------------------- | ----------- |
|
|
233
|
+
| ``v0.4.2`` | 618.1 | 135.4 | N/A |
|
|
234
|
+
| ``v0.5.0`` | 586.3 | 142.7 | x1.05 |
|
|
235
|
+
| ``v0.5.1`` | 365.6 | 228.9 | x1.69 |
|
|
236
|
+
| ``v0.5.2`` | 327.2 | 255.7 | x1.88 |
|
|
237
|
+
| ``v0.6.0`` | 54.5 | 1535.4 | x11.34 |
|
|
238
|
+
| ``v0.7.0`` | 52.4 | 1597.5 | **x11.80** |
|
|
181
239
|
|
|
240
|
+
*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)
|
|
241
|
+
CPU running @4.70GHz with 10 physical cores / 12 logical cores.*
|
|
182
242
|
|
|
183
243
|
## 💭 Feedback
|
|
184
244
|
|
|
@@ -206,12 +266,13 @@ in the [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) format.
|
|
|
206
266
|
|
|
207
267
|
## ⚖️ License
|
|
208
268
|
|
|
209
|
-
This library is provided under the [MIT License](https://choosealicense.com/licenses/mit/).
|
|
269
|
+
This library is provided under the [MIT License](https://choosealicense.com/licenses/mit/).
|
|
270
|
+
The JESS code is distributed under the [MIT License](https://choosealicense.com/licenses/mit/) as well.
|
|
210
271
|
|
|
211
272
|
*This project is in no way not affiliated, sponsored, or otherwise endorsed
|
|
212
273
|
by the JESS authors. It was developed
|
|
213
274
|
by [Martin Larralde](https://github.com/althonos/) during his PhD project
|
|
214
|
-
at the [
|
|
275
|
+
at the [Leiden University Medical Center](https://www.lumc.nl/en/) in
|
|
215
276
|
the [Zeller team](https://github.com/zellerlab).*
|
|
216
277
|
|
|
217
278
|
|
|
@@ -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.pyi,sha256=jLNw73JPngD1fxSZeIUzf1kTEBLr89kncqoUilnZYXQ,8588
|
|
5
|
+
pyjess/_jess.pypy310-pp73-win_amd64.pyd,sha256=DgOHJeicZV6ZU1amDqoX4Vf71gidrAvqGJSTHe0RdMY,365056
|
|
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=5dzLVyfgSMsKIpC5os1TXVIGZIAw7yAKGLurBegAC3M,14276
|
|
31
|
+
pyjess-0.7.0.dist-info/WHEEL,sha256=AfXRXTgKbn27AZ4j44tUclULdEwMOMI_1kDS1bYoeWs,113
|
|
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,,
|
pyjess-0.5.2.dist-info/RECORD
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
pyjess/.gitignore,sha256=u14v4OOy8U50Kp9SUKU8DupCG-mQIuel47gdbNDmAwg,21
|
|
2
|
-
pyjess/__init__.py,sha256=Xe9GBQUBm9ik-ty5tcE3UQ9Ip1p-C_IGvTPuGULolng,766
|
|
3
|
-
pyjess/_jess.pyi,sha256=1U7KeCDydiOT0vGts0sidGz_gI2PycD1sBiUmcafd7c,7239
|
|
4
|
-
pyjess/_jess.pypy310-pp73-win_amd64.pyd,sha256=7Vsrzi6bui6fIXTf1AhcRB_vwyp82WgTQYovHG0e-QI,259072
|
|
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=tsCMCW4Qh7vkECoA8aybf9sb0I8QTcdifZ7P7SDm1oI,11248
|
|
24
|
-
pyjess-0.5.2.dist-info/WHEEL,sha256=AfXRXTgKbn27AZ4j44tUclULdEwMOMI_1kDS1bYoeWs,113
|
|
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
|
|
File without changes
|