gemmi-protools 0.1.17__py3-none-any.whl → 1.0.1__py3-none-any.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 gemmi-protools might be problematic. Click here for more details.
- gemmi_protools/__init__.py +1 -4
- gemmi_protools/io/convert.py +0 -3
- gemmi_protools/io/reader.py +752 -309
- gemmi_protools/{utils → tools}/align.py +38 -54
- gemmi_protools/tools/dockq.py +128 -0
- gemmi_protools/tools/mesh.py +197 -0
- gemmi_protools/{utils → tools}/pdb_annot.py +21 -105
- {gemmi_protools-0.1.17.dist-info → gemmi_protools-1.0.1.dist-info}/METADATA +20 -12
- gemmi_protools-1.0.1.dist-info/RECORD +19 -0
- gemmi_protools/io/cif_opts.py +0 -173
- gemmi_protools/io/parse_pdb_header.py +0 -387
- gemmi_protools/io/parser.py +0 -292
- gemmi_protools/io/pdb_opts.py +0 -179
- gemmi_protools/io/peptide.py +0 -32
- gemmi_protools/io/struct_info.py +0 -91
- gemmi_protools/utils/dockq.py +0 -139
- gemmi_protools/utils/fixer.py +0 -274
- gemmi_protools/utils/immune_complex.py +0 -787
- gemmi_protools/utils/ppi.py +0 -74
- gemmi_protools-0.1.17.dist-info/RECORD +0 -27
- /gemmi_protools/{utils → tools}/__init__.py +0 -0
- {gemmi_protools-0.1.17.dist-info → gemmi_protools-1.0.1.dist-info}/WHEEL +0 -0
- {gemmi_protools-0.1.17.dist-info → gemmi_protools-1.0.1.dist-info}/licenses/LICENSE +0 -0
- {gemmi_protools-0.1.17.dist-info → gemmi_protools-1.0.1.dist-info}/top_level.txt +0 -0
gemmi_protools/utils/ppi.py
DELETED
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
"""
|
|
2
|
-
@Author: Luo Jiejian
|
|
3
|
-
"""
|
|
4
|
-
import pathlib
|
|
5
|
-
from typing import Union, List
|
|
6
|
-
|
|
7
|
-
import numpy as np
|
|
8
|
-
from scipy.spatial import cKDTree
|
|
9
|
-
|
|
10
|
-
from gemmi_protools.io.reader import StructureParser
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
def _ppi_atoms(struct, chains):
|
|
14
|
-
"""
|
|
15
|
-
Load atoms for N and O of backbone and N, O, P, S of side chains, only for PPI searching
|
|
16
|
-
:param struct:
|
|
17
|
-
:param chains:
|
|
18
|
-
:return:
|
|
19
|
-
"""
|
|
20
|
-
protein_atoms = ['N', 'ND1', 'ND2', 'NE', 'NE1', 'NE2', 'NH1', 'NH2', 'NZ',
|
|
21
|
-
'O', 'OD1', 'OD2', 'OE1', 'OE2', 'OG', 'OG1', 'OH',
|
|
22
|
-
'SD', 'SG']
|
|
23
|
-
xna_atoms = ['N1', 'N2', 'N3', 'N4', 'N6', 'N7', 'N9',
|
|
24
|
-
'O2', "O2'", "O3'", 'O4', "O4'", "O5'", 'O6',
|
|
25
|
-
'OP1', 'OP2', 'OP3', 'P']
|
|
26
|
-
pro_chs = []
|
|
27
|
-
xna_chs = []
|
|
28
|
-
for c in chains:
|
|
29
|
-
t = struct.chain_types.get(c, "")
|
|
30
|
-
if t == "protein":
|
|
31
|
-
pro_chs.append(c)
|
|
32
|
-
elif t in ["dna", "rna"]:
|
|
33
|
-
xna_chs.append(c)
|
|
34
|
-
|
|
35
|
-
pro_coord, pro_id = struct.get_atom_coords(pro_chs, protein_atoms)
|
|
36
|
-
xna_coord, xna_id = struct.get_atom_coords(xna_chs, xna_atoms)
|
|
37
|
-
return np.concatenate([pro_coord, xna_coord], axis=0), np.concatenate([pro_id, xna_id], axis=0)
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
def ppi_interface_residues(in_file: Union[str, pathlib.Path],
|
|
41
|
-
chains_x: List[str],
|
|
42
|
-
chains_y: List[str],
|
|
43
|
-
threshold: float = 4.0):
|
|
44
|
-
"""
|
|
45
|
-
identify PPI among protein, DNA, RNA
|
|
46
|
-
:param in_file:
|
|
47
|
-
:param chains_x:
|
|
48
|
-
:param chains_y:
|
|
49
|
-
:param threshold:
|
|
50
|
-
:return:
|
|
51
|
-
PPI residues of chains_x, PPI residues of chains_y
|
|
52
|
-
"""
|
|
53
|
-
|
|
54
|
-
st = StructureParser()
|
|
55
|
-
st.load_from_file(in_file)
|
|
56
|
-
st.set_default_model()
|
|
57
|
-
st.STRUCT.remove_alternative_conformations()
|
|
58
|
-
st.STRUCT.remove_ligands_and_waters()
|
|
59
|
-
st.STRUCT.remove_hydrogens()
|
|
60
|
-
st.STRUCT.remove_empty_chains()
|
|
61
|
-
st.update_entity()
|
|
62
|
-
|
|
63
|
-
x_coord, x_id = _ppi_atoms(st, chains_x)
|
|
64
|
-
y_coord, y_id = _ppi_atoms(st, chains_y)
|
|
65
|
-
|
|
66
|
-
kd_tree_x = cKDTree(x_coord)
|
|
67
|
-
kd_tree_y = cKDTree(y_coord)
|
|
68
|
-
|
|
69
|
-
pairs = kd_tree_x.sparse_distance_matrix(kd_tree_y, threshold, output_type='coo_matrix')
|
|
70
|
-
|
|
71
|
-
x_res = np.unique(x_id[pairs.row][["ch_name", 'res_num', 'res_icode', 'res_name']])
|
|
72
|
-
y_res = np.unique(y_id[pairs.col][["ch_name", 'res_num', 'res_icode', 'res_name']])
|
|
73
|
-
|
|
74
|
-
return x_res, y_res
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
gemmi_protools/__init__.py,sha256=hwUw-EieCG0kwzHjTjzHF9Bc3D-J5R_l6G8PCcFegkw,331
|
|
2
|
-
gemmi_protools/data/MHC/MHC_combined.hmm,sha256=w0_vzPiEWne_d_kYmqR0OiSsCOpQioItKy3Zq-JMsH4,159451
|
|
3
|
-
gemmi_protools/data/MHC/MHC_combined.hmm.h3f,sha256=QGG4l-v76RYtysJ5rybnz5v6VgJg2RjoQQHUVWL5jmg,45522
|
|
4
|
-
gemmi_protools/data/MHC/MHC_combined.hmm.h3i,sha256=yn-700hoBSJB39Tj8Ia8UhSZWpYiCZFNcbnYAFNjReI,300
|
|
5
|
-
gemmi_protools/data/MHC/MHC_combined.hmm.h3m,sha256=CvNMCsobQiX-wL7iB4CreNcbpnElE31NmmjmMR0iYVI,66174
|
|
6
|
-
gemmi_protools/data/MHC/MHC_combined.hmm.h3p,sha256=-mK278pRedG3-KL-DtuVAQy7La9DgXg5FcP89D6X3Ck,78325
|
|
7
|
-
gemmi_protools/io/__init__.py,sha256=F6e1xNT_7lZAWQgNIneH06o2qtWYrHNr_xPUPTwwx5E,29
|
|
8
|
-
gemmi_protools/io/cif_opts.py,sha256=cYEhubRP2rymbwSlB3ZQPGUFQiXGb2UQ0gdXdTd3c-I,6646
|
|
9
|
-
gemmi_protools/io/convert.py,sha256=780sQcwhslUD4Hj5UZMVlQdbicniJ6jNjncTl_7jaMk,3841
|
|
10
|
-
gemmi_protools/io/parse_pdb_header.py,sha256=UOGMsE3-d3APhO7zaAEE0NT31n-iqt55VpDh_RPOicI,14223
|
|
11
|
-
gemmi_protools/io/parser.py,sha256=HFc4Kovr6rxEpLAEDUtF_e-RnA5OsWMeMFjuVNm7UYY,9507
|
|
12
|
-
gemmi_protools/io/pdb_opts.py,sha256=laUqxlecOe6goax12q8EJGZuZbHyIGsXVucMV3gVrgg,5741
|
|
13
|
-
gemmi_protools/io/peptide.py,sha256=a2wiEutJmvhl6gDCIzzqRCbmyknk2mwgy2FZ53lXclU,750
|
|
14
|
-
gemmi_protools/io/reader.py,sha256=2AXg1JdYT2LxL6jWVsJkLHQREwAoYR7V-g-hQVgSgGg,16237
|
|
15
|
-
gemmi_protools/io/struct_info.py,sha256=9nBj1Zer03S8_Wks7L7uRlc9PlbfCKzoaT32pKR58X8,2769
|
|
16
|
-
gemmi_protools/utils/__init__.py,sha256=F6e1xNT_7lZAWQgNIneH06o2qtWYrHNr_xPUPTwwx5E,29
|
|
17
|
-
gemmi_protools/utils/align.py,sha256=wyJDawxW10kdYWEM1F_LUEc3Qo-3_I7P5hFk-r-yqgY,7432
|
|
18
|
-
gemmi_protools/utils/dockq.py,sha256=XmMwVEy-H4p6sH_HPcDWA3TP77OWdih0fE_BQJDr4pU,4189
|
|
19
|
-
gemmi_protools/utils/fixer.py,sha256=yP9pTJ67n7z56UFfe2-eEsS3jkJfG2lP4KAEpXxlrnE,10142
|
|
20
|
-
gemmi_protools/utils/immune_complex.py,sha256=0ni6j0JpcJrPGDLydlbK5ouF7LsQWvDke3UgTOgKEJM,32213
|
|
21
|
-
gemmi_protools/utils/pdb_annot.py,sha256=nnRlLpjczhCP1ojEgsO3FuVgfsyleDZ34QxqyI8-wr0,11143
|
|
22
|
-
gemmi_protools/utils/ppi.py,sha256=VWYsdxWwQoS1xwEYj5KB96Zz3F8r5Eyuw6NT3ReD-wc,2330
|
|
23
|
-
gemmi_protools-0.1.17.dist-info/licenses/LICENSE,sha256=JuQvKcgj6n11y5y6nXr9rABv3gJSswc4eTCd5WZBtSY,1062
|
|
24
|
-
gemmi_protools-0.1.17.dist-info/METADATA,sha256=sMzScJ0AFMKw9uMWCzxD9vYe6U3nATUX6BflEu6L1Ss,918
|
|
25
|
-
gemmi_protools-0.1.17.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
26
|
-
gemmi_protools-0.1.17.dist-info/top_level.txt,sha256=P12mYJi5O5EKIn5u-RFaWxuix431CgLacSRD7rBid_U,15
|
|
27
|
-
gemmi_protools-0.1.17.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|