biobb-structure-checking 3.13.4__tar.gz → 3.13.5__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.
- {biobb_structure_checking-3.13.4 → biobb_structure_checking-3.13.5}/PKG-INFO +2 -2
- {biobb_structure_checking-3.13.4 → biobb_structure_checking-3.13.5}/README.md +1 -1
- {biobb_structure_checking-3.13.4 → biobb_structure_checking-3.13.5}/biobb_structure_checking/commands/backbone.py +2 -2
- {biobb_structure_checking-3.13.4 → biobb_structure_checking-3.13.5}/biobb_structure_checking/constants.py +16 -8
- {biobb_structure_checking-3.13.4 → biobb_structure_checking-3.13.5}/biobb_structure_checking/io/mmb_server.py +2 -3
- {biobb_structure_checking-3.13.4 → biobb_structure_checking-3.13.5}/biobb_structure_checking/libs/residue_lib_manager.py +1 -1
- {biobb_structure_checking-3.13.4 → biobb_structure_checking-3.13.5}/biobb_structure_checking/modeller_manager.py +12 -8
- {biobb_structure_checking-3.13.4 → biobb_structure_checking-3.13.5}/biobb_structure_checking/modelling/sequencedata.py +3 -3
- {biobb_structure_checking-3.13.4 → biobb_structure_checking-3.13.5}/biobb_structure_checking/structure_checking.py +4 -1
- {biobb_structure_checking-3.13.4 → biobb_structure_checking-3.13.5}/biobb_structure_checking/structure_manager.py +53 -33
- {biobb_structure_checking-3.13.4 → biobb_structure_checking-3.13.5}/biobb_structure_checking.egg-info/PKG-INFO +2 -2
- {biobb_structure_checking-3.13.4 → biobb_structure_checking-3.13.5}/setup.py +1 -1
- {biobb_structure_checking-3.13.4 → biobb_structure_checking-3.13.5}/LICENSE +0 -0
- {biobb_structure_checking-3.13.4 → biobb_structure_checking-3.13.5}/MANIFEST.in +0 -0
- {biobb_structure_checking-3.13.4 → biobb_structure_checking-3.13.5}/biobb_structure_checking/__init__.py +0 -0
- {biobb_structure_checking-3.13.4 → biobb_structure_checking-3.13.5}/biobb_structure_checking/check_structure.py +0 -0
- {biobb_structure_checking-3.13.4 → biobb_structure_checking-3.13.5}/biobb_structure_checking/commands/__init__.py +0 -0
- {biobb_structure_checking-3.13.4 → biobb_structure_checking-3.13.5}/biobb_structure_checking/commands/add_hydrogen.py +0 -0
- {biobb_structure_checking-3.13.4 → biobb_structure_checking-3.13.5}/biobb_structure_checking/commands/altloc.py +0 -0
- {biobb_structure_checking-3.13.4 → biobb_structure_checking-3.13.5}/biobb_structure_checking/commands/amide.py +0 -0
- {biobb_structure_checking-3.13.4 → biobb_structure_checking-3.13.5}/biobb_structure_checking/commands/chains.py +0 -0
- {biobb_structure_checking-3.13.4 → biobb_structure_checking-3.13.5}/biobb_structure_checking/commands/chiral.py +0 -0
- {biobb_structure_checking-3.13.4 → biobb_structure_checking-3.13.5}/biobb_structure_checking/commands/chiral_bck.py +0 -0
- {biobb_structure_checking-3.13.4 → biobb_structure_checking-3.13.5}/biobb_structure_checking/commands/cistransbck.py +0 -0
- {biobb_structure_checking-3.13.4 → biobb_structure_checking-3.13.5}/biobb_structure_checking/commands/clashes.py +0 -0
- {biobb_structure_checking-3.13.4 → biobb_structure_checking-3.13.5}/biobb_structure_checking/commands/fixside.py +0 -0
- {biobb_structure_checking-3.13.4 → biobb_structure_checking-3.13.5}/biobb_structure_checking/commands/getss.py +0 -0
- {biobb_structure_checking-3.13.4 → biobb_structure_checking-3.13.5}/biobb_structure_checking/commands/inscodes.py +0 -0
- {biobb_structure_checking-3.13.4 → biobb_structure_checking-3.13.5}/biobb_structure_checking/commands/ligands.py +0 -0
- {biobb_structure_checking-3.13.4 → biobb_structure_checking-3.13.5}/biobb_structure_checking/commands/metals.py +0 -0
- {biobb_structure_checking-3.13.4 → biobb_structure_checking-3.13.5}/biobb_structure_checking/commands/models.py +0 -0
- {biobb_structure_checking-3.13.4 → biobb_structure_checking-3.13.5}/biobb_structure_checking/commands/mutateside.py +0 -0
- {biobb_structure_checking-3.13.4 → biobb_structure_checking-3.13.5}/biobb_structure_checking/commands/rem_hydrogen.py +0 -0
- {biobb_structure_checking-3.13.4 → biobb_structure_checking-3.13.5}/biobb_structure_checking/commands/sequences.py +0 -0
- {biobb_structure_checking-3.13.4 → biobb_structure_checking-3.13.5}/biobb_structure_checking/commands/water.py +0 -0
- {biobb_structure_checking-3.13.4 → biobb_structure_checking-3.13.5}/biobb_structure_checking/dat/ADT_prm.json +0 -0
- {biobb_structure_checking-3.13.4 → biobb_structure_checking-3.13.5}/biobb_structure_checking/dat/CMIP_prm.json +0 -0
- {biobb_structure_checking-3.13.4 → biobb_structure_checking-3.13.5}/biobb_structure_checking/dat/all_residues.in +0 -0
- {biobb_structure_checking-3.13.4 → biobb_structure_checking-3.13.5}/biobb_structure_checking/dat/commands.hlp +0 -0
- {biobb_structure_checking-3.13.4 → biobb_structure_checking-3.13.5}/biobb_structure_checking/dat/data_lib.json +0 -0
- {biobb_structure_checking-3.13.4 → biobb_structure_checking-3.13.5}/biobb_structure_checking/io/PDBIO_extended.py +0 -0
- {biobb_structure_checking-3.13.4 → biobb_structure_checking-3.13.5}/biobb_structure_checking/io/__init__.py +0 -0
- {biobb_structure_checking-3.13.4 → biobb_structure_checking-3.13.5}/biobb_structure_checking/io/bare_builder.py +0 -0
- {biobb_structure_checking-3.13.4 → biobb_structure_checking-3.13.5}/biobb_structure_checking/io/json_writer.py +0 -0
- {biobb_structure_checking-3.13.4 → biobb_structure_checking-3.13.5}/biobb_structure_checking/io/param_input.py +0 -0
- {biobb_structure_checking-3.13.4 → biobb_structure_checking-3.13.5}/biobb_structure_checking/libs/__init__.py +0 -0
- {biobb_structure_checking-3.13.4 → biobb_structure_checking-3.13.5}/biobb_structure_checking/libs/data_lib_manager.py +0 -0
- {biobb_structure_checking-3.13.4 → biobb_structure_checking-3.13.5}/biobb_structure_checking/modelling/__init__.py +0 -0
- {biobb_structure_checking-3.13.4 → biobb_structure_checking-3.13.5}/biobb_structure_checking/modelling/chainsdata.py +0 -0
- {biobb_structure_checking-3.13.4 → biobb_structure_checking-3.13.5}/biobb_structure_checking/modelling/modelsdata.py +0 -0
- {biobb_structure_checking-3.13.4 → biobb_structure_checking-3.13.5}/biobb_structure_checking/modelling/residue_set.py +0 -0
- {biobb_structure_checking-3.13.4 → biobb_structure_checking-3.13.5}/biobb_structure_checking/modelling/structuredata.py +0 -0
- {biobb_structure_checking-3.13.4 → biobb_structure_checking-3.13.5}/biobb_structure_checking/modelling/utils.py +0 -0
- {biobb_structure_checking-3.13.4 → biobb_structure_checking-3.13.5}/biobb_structure_checking/mutation_manager.py +0 -0
- {biobb_structure_checking-3.13.4 → biobb_structure_checking-3.13.5}/biobb_structure_checking.egg-info/SOURCES.txt +0 -0
- {biobb_structure_checking-3.13.4 → biobb_structure_checking-3.13.5}/biobb_structure_checking.egg-info/dependency_links.txt +0 -0
- {biobb_structure_checking-3.13.4 → biobb_structure_checking-3.13.5}/biobb_structure_checking.egg-info/entry_points.txt +0 -0
- {biobb_structure_checking-3.13.4 → biobb_structure_checking-3.13.5}/biobb_structure_checking.egg-info/requires.txt +0 -0
- {biobb_structure_checking-3.13.4 → biobb_structure_checking-3.13.5}/biobb_structure_checking.egg-info/top_level.txt +0 -0
- {biobb_structure_checking-3.13.4 → biobb_structure_checking-3.13.5}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: biobb_structure_checking
|
|
3
|
-
Version: 3.13.
|
|
3
|
+
Version: 3.13.5
|
|
4
4
|
Summary: BioBB_structure_checking performs MDWeb structure checking tool set as a command line utility.
|
|
5
5
|
Home-page: https://github.com/bioexcel/biobb_structure_checking
|
|
6
6
|
Author: Biobb developers
|
|
@@ -29,7 +29,7 @@ The latest documentation of this package can be found in our readthedocs site:
|
|
|
29
29
|
[latest package documentation](http://biobb_structure_checking.readthedocs.io/en/latest/).
|
|
30
30
|
|
|
31
31
|
### Version
|
|
32
|
-
v3.13.
|
|
32
|
+
v3.13.5 September 2024
|
|
33
33
|
|
|
34
34
|
### Requirements
|
|
35
35
|
|
|
@@ -10,7 +10,7 @@ The latest documentation of this package can be found in our readthedocs site:
|
|
|
10
10
|
[latest package documentation](http://biobb_structure_checking.readthedocs.io/en/latest/).
|
|
11
11
|
|
|
12
12
|
### Version
|
|
13
|
-
v3.13.
|
|
13
|
+
v3.13.5 September 2024
|
|
14
14
|
|
|
15
15
|
### Requirements
|
|
16
16
|
|
|
@@ -205,7 +205,7 @@ def _backbone_fix_main_chain(strcheck, fix_main_bck, breaks_list, modeller_key,
|
|
|
205
205
|
return []
|
|
206
206
|
|
|
207
207
|
# Checking for canonical sequence
|
|
208
|
-
if not strcheck.strucm.sequence_data.has_canonical:
|
|
208
|
+
if not strcheck.strucm.sequence_data.has_canonical[0]:
|
|
209
209
|
read_ok = False
|
|
210
210
|
while not read_ok:
|
|
211
211
|
input_line = ParamInput(
|
|
@@ -231,7 +231,7 @@ def _backbone_fix_main_chain(strcheck, fix_main_bck, breaks_list, modeller_key,
|
|
|
231
231
|
strcheck.strucm,
|
|
232
232
|
False
|
|
233
233
|
)
|
|
234
|
-
strcheck.strucm.sequence_data.match_sequence_numbering()
|
|
234
|
+
strcheck.strucm.sequence_data.match_sequence_numbering(strcheck.strucm)
|
|
235
235
|
|
|
236
236
|
to_fix = [
|
|
237
237
|
rpair
|
|
@@ -9,7 +9,7 @@ from os.path import join as opj
|
|
|
9
9
|
|
|
10
10
|
from biobb_structure_checking.io.param_input import Dialog
|
|
11
11
|
|
|
12
|
-
VERSION = '3.13.
|
|
12
|
+
VERSION = '3.13.5'
|
|
13
13
|
|
|
14
14
|
# Default locations and settings
|
|
15
15
|
DATA_DIR_DEFAULT_PATH = 'dat'
|
|
@@ -17,13 +17,13 @@ RES_LIBRARY_DEFAULT_PATH = 'all_residues.in'
|
|
|
17
17
|
DATA_LIBRARY_DEFAULT_PATH = 'data_lib.json'
|
|
18
18
|
CACHE_DIR_DEFAULT_PATH = 'tmpPDB'
|
|
19
19
|
COMMANDS_HELP_PATH = 'commands.hlp'
|
|
20
|
-
PDB_DOWNLOAD_PREFIX = '
|
|
20
|
+
PDB_DOWNLOAD_PREFIX = 'ftp://ftp.wwpdb.org'
|
|
21
21
|
FASTA_DOWNLOAD_PREFIX = 'https://www.rcsb.org/fasta/entry'
|
|
22
22
|
ATOM_LIMIT = 1000000
|
|
23
23
|
TIME_LIMIT = 3600
|
|
24
24
|
|
|
25
25
|
ALT_SERVERS = {
|
|
26
|
-
'mmb': '
|
|
26
|
+
'mmb': 'https://mmb.irbbarcelona.org/api/pdb',
|
|
27
27
|
'bsc': 'http://mdb-login.bsc.es/api/pdb'
|
|
28
28
|
}
|
|
29
29
|
|
|
@@ -41,7 +41,14 @@ DEFAULTS = {
|
|
|
41
41
|
'verbose': False,
|
|
42
42
|
'debug': False,
|
|
43
43
|
'options': '',
|
|
44
|
-
'modeller_key': None
|
|
44
|
+
'modeller_key': None,
|
|
45
|
+
'time_limit': ATOM_LIMIT,
|
|
46
|
+
'nocache': False,
|
|
47
|
+
'copy_input': None,
|
|
48
|
+
'build_warnings': False,
|
|
49
|
+
'coords_only': False,
|
|
50
|
+
'overwrite_cache': False,
|
|
51
|
+
'overwrite': False
|
|
45
52
|
}
|
|
46
53
|
|
|
47
54
|
|
|
@@ -96,8 +103,9 @@ CMD_LINE.add_argument(
|
|
|
96
103
|
dest='input_structure_path',
|
|
97
104
|
help='Input structure. '
|
|
98
105
|
'1) Fetch from remote pdb:{pdbid}[.format] '
|
|
99
|
-
'2)
|
|
100
|
-
'
|
|
106
|
+
'2) Direct fetch from custom URL '
|
|
107
|
+
'3) Local file: Formats pdb(qt)|pqr|cif. '
|
|
108
|
+
'For 2) and 3) Format assumed from extension.'
|
|
101
109
|
)
|
|
102
110
|
|
|
103
111
|
CMD_LINE.add_argument(
|
|
@@ -126,7 +134,7 @@ CMD_LINE.add_argument(
|
|
|
126
134
|
CMD_LINE.add_argument(
|
|
127
135
|
'--pdb_server',
|
|
128
136
|
dest='pdb_server',
|
|
129
|
-
help='Server for retrieving structures (default(wwPDB)|MMB|BSC)
|
|
137
|
+
help='Server for retrieving structures (default(ftp at wwPDB)|MMB|BSC), use alternate server for http(s) download'
|
|
130
138
|
)
|
|
131
139
|
|
|
132
140
|
CMD_LINE.add_argument(
|
|
@@ -139,7 +147,7 @@ CMD_LINE.add_argument(
|
|
|
139
147
|
'--nocache',
|
|
140
148
|
dest='nocache',
|
|
141
149
|
action='store_true',
|
|
142
|
-
help='Do not cache
|
|
150
|
+
help='Do not cache downloaded structures'
|
|
143
151
|
)
|
|
144
152
|
|
|
145
153
|
CMD_LINE.add_argument(
|
|
@@ -81,8 +81,7 @@ class MMBPDBList(PDBList):
|
|
|
81
81
|
# url = f'{ALT_SERVERS[self.pdb_server]}/{code}_bn{biounit}.pdb'
|
|
82
82
|
# Where does the final PDB file get saved?
|
|
83
83
|
|
|
84
|
-
url = f'{ALT_SERVERS[self.pdb_server]}/{code}.{file_format}'
|
|
85
|
-
|
|
84
|
+
url = f'{ALT_SERVERS[self.pdb_server.lower()]}/{code}.{file_format}'
|
|
86
85
|
if pdir is None:
|
|
87
86
|
path = self.local_pdb if not obsolete else self.obsolete_pdb
|
|
88
87
|
if not self.flat_tree: # Put in PDB-style directory tree
|
|
@@ -131,7 +130,7 @@ class MMBPDBList(PDBList):
|
|
|
131
130
|
# )
|
|
132
131
|
# else:
|
|
133
132
|
# print(f"Downloading PDB structure '{pdb_code}' from {self.pdb_server} ...")
|
|
134
|
-
print(f"Downloading structure '{pdb_code}' from {
|
|
133
|
+
print(f"Downloading structure '{pdb_code}' from {url} ...")
|
|
135
134
|
try:
|
|
136
135
|
urlcleanup()
|
|
137
136
|
urlretrieve(url, final_file)
|
|
@@ -74,7 +74,7 @@ class ResidueLib():
|
|
|
74
74
|
""" Gets an atom definition given residue and atom names."""
|
|
75
75
|
resid_def = self.residues[res_id]
|
|
76
76
|
i = 1
|
|
77
|
-
while resid_def.ats[i].id != at_id and i < len(resid_def.ats):
|
|
77
|
+
while resid_def.ats[i].id != at_id and i < len(resid_def.ats) - 1:
|
|
78
78
|
i = i + 1
|
|
79
79
|
if resid_def.ats[i].id == at_id:
|
|
80
80
|
return resid_def.ats[i]
|
|
@@ -11,7 +11,7 @@ import uuid
|
|
|
11
11
|
import shutil
|
|
12
12
|
|
|
13
13
|
import Bio
|
|
14
|
-
OLD_ALIGN = Bio.__version__
|
|
14
|
+
OLD_ALIGN = Bio.__version__ < '1.79'
|
|
15
15
|
from Bio import SeqIO
|
|
16
16
|
if OLD_ALIGN:
|
|
17
17
|
from Bio import pairwise2
|
|
@@ -39,16 +39,19 @@ class ModellerManager():
|
|
|
39
39
|
| modeller_manager ModellerManager
|
|
40
40
|
| Class to handle Modeller calculations """
|
|
41
41
|
def __init__(self):
|
|
42
|
-
self.tmpdir = opj(TMP_BASE_DIR, "mod" + str(uuid.uuid4()))
|
|
43
|
-
# self.tmpdir = "/tmp/modtest"
|
|
44
|
-
# print("Using temporary working dir " + self.tmpdir)
|
|
45
42
|
self.ch_id = ''
|
|
46
43
|
self.sequences = None
|
|
47
44
|
self.templ_file = 'templ.pdb'
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
45
|
+
if not DEBUG:
|
|
46
|
+
self.tmpdir = opj(TMP_BASE_DIR, "mod" + str(uuid.uuid4()))
|
|
47
|
+
try:
|
|
48
|
+
os.mkdir(self.tmpdir)
|
|
49
|
+
except IOError as err:
|
|
50
|
+
sys.exit(err)
|
|
51
|
+
else:
|
|
52
|
+
self.tmpdir = "/tmp/modtest"
|
|
53
|
+
print("Using temporary working dir " + self.tmpdir)
|
|
54
|
+
|
|
52
55
|
self.env = Environ()
|
|
53
56
|
|
|
54
57
|
self.env.io.atom_files_directory = [self.tmpdir]
|
|
@@ -76,6 +79,7 @@ class ModellerManager():
|
|
|
76
79
|
nt_pos = max(tgt_seq.find(pdb_seq) - extra_NTerm_res, 0)
|
|
77
80
|
tgt_seq = tgt_seq[nt_pos:]
|
|
78
81
|
|
|
82
|
+
|
|
79
83
|
# TODO trim trailing residues in tgt_seq
|
|
80
84
|
|
|
81
85
|
templs = []
|
|
@@ -176,8 +176,9 @@ class SequenceData():
|
|
|
176
176
|
if cif_warn:
|
|
177
177
|
print("Warning: sequence data unavailable on cif data")
|
|
178
178
|
return True
|
|
179
|
+
|
|
179
180
|
for mod in strucm.st:
|
|
180
|
-
if mod not in self.data:
|
|
181
|
+
if mod.id not in self.data:
|
|
181
182
|
self.data[mod.id] = {}
|
|
182
183
|
for index, chid in enumerate(chids):
|
|
183
184
|
for ch_id in chid.split(','):
|
|
@@ -205,7 +206,6 @@ class SequenceData():
|
|
|
205
206
|
self.data[mod.id][ch_id]['can'].features.append(
|
|
206
207
|
SeqFeature(FeatureLocation(1, len(seqs[index])))
|
|
207
208
|
)
|
|
208
|
-
|
|
209
209
|
# for chn in chids[i].split(','):
|
|
210
210
|
# if chn in strucm.chain_ids:
|
|
211
211
|
# self.data[ch_id]['chains'].append(chn)
|
|
@@ -219,7 +219,6 @@ class SequenceData():
|
|
|
219
219
|
if match[2] > IDENT_THRES * max_score:
|
|
220
220
|
self.data[mod.id][ch_id]['chains'].append(match[1])
|
|
221
221
|
|
|
222
|
-
print(f"Canonical sequence for model {mod.id}:")
|
|
223
222
|
self.has_canonical[mod.id] = {}
|
|
224
223
|
for ch_id in strucm.chains_data.chain_ids[mod.id]:
|
|
225
224
|
self.has_canonical[mod.id][ch_id] = (ch_id in self.data[mod.id]) and\
|
|
@@ -413,6 +412,7 @@ class SequenceData():
|
|
|
413
412
|
self.data[mod.id][ch_id]['chains'].append(ch_id)
|
|
414
413
|
self.has_canonical[mod.id][ch_id] = True
|
|
415
414
|
|
|
415
|
+
|
|
416
416
|
def get_canonical(self):
|
|
417
417
|
""" SequenceData.get_canonical
|
|
418
418
|
Prepares a FASTA string with the canonical sequence
|
|
@@ -316,7 +316,10 @@ class StructureChecking():
|
|
|
316
316
|
for k in defaults:
|
|
317
317
|
if k not in opts:
|
|
318
318
|
opts[k] = defaults[k]
|
|
319
|
-
|
|
319
|
+
try:
|
|
320
|
+
error_status = f_fix(self, opts, data_to_fix)
|
|
321
|
+
except Exception as e:
|
|
322
|
+
error_status = [e.message]
|
|
320
323
|
|
|
321
324
|
if error_status:
|
|
322
325
|
if isinstance(error_status, tuple):
|
|
@@ -335,7 +335,10 @@ class StructureManager:
|
|
|
335
335
|
oxt_ok = rcode[0] != 'C' or len(rcode) != 4
|
|
336
336
|
res_chr = 0.
|
|
337
337
|
for atm in res.get_atoms():
|
|
338
|
-
|
|
338
|
+
atm_def = self.res_library.get_atom_def(rcode, atm.id)
|
|
339
|
+
if atm_def is None:
|
|
340
|
+
raise UnknownAtomforResidueError(mu.residue_id(res), atm.id)
|
|
341
|
+
atm.pqr_charge = atm_def.chrg
|
|
339
342
|
if atm.id in ff_data['residue_data'][can_rcode3]:
|
|
340
343
|
atm.xtra['atom_type'] = ff_data['residue_data'][can_rcode3][atm.id]
|
|
341
344
|
elif atm.id in ff_data['residue_data']['*'][ch_type_label]:
|
|
@@ -1127,7 +1130,7 @@ class StructureManager:
|
|
|
1127
1130
|
*modeller_key* (str): Modeller license key (optional). If not used Modeller installation license will be used.
|
|
1128
1131
|
*extra_gap* (int): Additional residues to be taked either side of the gap. Use when obtained model have too long peptide distances (optional, default:0)
|
|
1129
1132
|
*extra_NTerm* (int): Additional residues to be modelled on the N Terminus
|
|
1130
|
-
*
|
|
1133
|
+
*sequence_Data* (SequenceData): SequenceData object containing canonical and structure sequences
|
|
1131
1134
|
*templates* (list(structures)): Structures to be used as additional templates.
|
|
1132
1135
|
"""
|
|
1133
1136
|
if modeller_key:
|
|
@@ -1143,6 +1146,7 @@ class StructureManager:
|
|
|
1143
1146
|
sys.exit("Error importing modeller")
|
|
1144
1147
|
|
|
1145
1148
|
mod_mgr = ModellerManager()
|
|
1149
|
+
|
|
1146
1150
|
if not sequence_data:
|
|
1147
1151
|
sequence_data = self.sequence_data
|
|
1148
1152
|
|
|
@@ -1520,18 +1524,25 @@ class StructureManager:
|
|
|
1520
1524
|
modeller_key: str = ''
|
|
1521
1525
|
) -> Residue:
|
|
1522
1526
|
""" Perform mutations Rebuilding side chain"""
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
|
|
1527
|
+
|
|
1528
|
+
mutated_sequence_data = SequenceData()
|
|
1529
|
+
mutated_sequence_data.fake_canonical_sequence(self, mutations)
|
|
1530
|
+
mutated_res = []
|
|
1531
|
+
|
|
1532
|
+
|
|
1526
1533
|
for mod in self.st.get_models():
|
|
1527
|
-
|
|
1528
|
-
|
|
1534
|
+
if mod.id > 0:
|
|
1535
|
+
print("ERROR: Only one model per structure is supported for mutateside --rebuild")
|
|
1536
|
+
break
|
|
1537
|
+
num_fix = 0
|
|
1538
|
+
ch_to_fix = set()
|
|
1539
|
+
brk_list = []
|
|
1529
1540
|
for mut_set in mutations.mutation_list:
|
|
1530
1541
|
for mut in mut_set.mutations:
|
|
1531
1542
|
# Checking if protein on model 0
|
|
1532
1543
|
if self.chains_data.chain_ids[mod.id][mut['chain']] > 1:
|
|
1533
1544
|
continue
|
|
1534
|
-
ch_to_fix
|
|
1545
|
+
ch_to_fix.add(mut['chain'])
|
|
1535
1546
|
start_res = mut['resobj']
|
|
1536
1547
|
if start_res in self.st_data.prev_residue:
|
|
1537
1548
|
start_res = self.st_data.prev_residue[start_res]
|
|
@@ -1539,31 +1550,28 @@ class StructureManager:
|
|
|
1539
1550
|
if end_res in self.st_data.next_residue:
|
|
1540
1551
|
end_res = self.st_data.next_residue[end_res]
|
|
1541
1552
|
brk = [start_res, end_res]
|
|
1542
|
-
brk_list
|
|
1543
|
-
|
|
1553
|
+
brk_list.append(brk)
|
|
1554
|
+
mu.remove_residue(mut['resobj'])
|
|
1544
1555
|
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
return []
|
|
1556
|
+
mutated_sequence_data.read_structure_seqs(self)
|
|
1557
|
+
mutated_sequence_data.match_sequence_numbering(self)
|
|
1548
1558
|
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
|
|
1558
|
-
|
|
1559
|
-
|
|
1560
|
-
|
|
1561
|
-
|
|
1562
|
-
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
mutated_sequence_data
|
|
1566
|
-
)
|
|
1559
|
+
num_fix += len(ch_to_fix)
|
|
1560
|
+
|
|
1561
|
+
if not num_fix:
|
|
1562
|
+
print(f"No mutations left on model {mod.id}, skipping")
|
|
1563
|
+
continue
|
|
1564
|
+
|
|
1565
|
+
# TODO Not tested, to be used on changes in the NTerm residue
|
|
1566
|
+
extra_NTerm = 0
|
|
1567
|
+
mutated_res = self.run_modeller(
|
|
1568
|
+
ch_to_fix,
|
|
1569
|
+
brk_list,
|
|
1570
|
+
modeller_key,
|
|
1571
|
+
0,
|
|
1572
|
+
extra_NTerm,
|
|
1573
|
+
mutated_sequence_data
|
|
1574
|
+
)
|
|
1567
1575
|
|
|
1568
1576
|
self.update_internals()
|
|
1569
1577
|
return mutated_res
|
|
@@ -1747,10 +1755,11 @@ def _guess_modeller_env():
|
|
|
1747
1755
|
""" Guessing Modeller version from conda installation if available """
|
|
1748
1756
|
import subprocess
|
|
1749
1757
|
conda_info = subprocess.run(['conda', 'list', 'modeller'], stdout=subprocess.PIPE)
|
|
1758
|
+
info = []
|
|
1750
1759
|
for line in conda_info.stdout.decode('ASCII').split('\n'):
|
|
1751
1760
|
if 'modeller' in line:
|
|
1752
1761
|
info = line.split()
|
|
1753
|
-
if info[1]:
|
|
1762
|
+
if len(info) >= 2 and info[1]:
|
|
1754
1763
|
print(f"Modeller v{info[1]} detected")
|
|
1755
1764
|
ver1, ver2 = info[1].split('.')
|
|
1756
1765
|
return f"KEY_MODELLER{ver1}v{ver2}", f"MODINSTALL{ver1}v{ver2}", f"{os.environ.get('CONDA_PREFIX','')}/lib/modeller-{ver1}.{ver2}"
|
|
@@ -1759,18 +1768,23 @@ def _guess_modeller_env():
|
|
|
1759
1768
|
return 'KEY_MODELLER', 'MODINSTALL', 'modeller'
|
|
1760
1769
|
# ===============================================================================
|
|
1761
1770
|
|
|
1771
|
+
|
|
1762
1772
|
class WrongServerError(Exception):
|
|
1763
1773
|
def __init__(self):
|
|
1764
1774
|
self.message = 'ERROR: Biounits supported only on MMB server'
|
|
1775
|
+
|
|
1765
1776
|
class UnknownFileTypeError(Exception):
|
|
1766
1777
|
def __init__(self, typ):
|
|
1767
1778
|
self.message = f'ERROR: unknown filetype ({typ})'
|
|
1779
|
+
|
|
1768
1780
|
class OutputPathNotProvidedError(Exception):
|
|
1769
1781
|
def __init__(self):
|
|
1770
1782
|
self.message = 'ERROR: output PDB path not provided'
|
|
1783
|
+
|
|
1771
1784
|
class NotAValidResidueError(Exception):
|
|
1772
1785
|
def __init__(self, res):
|
|
1773
1786
|
self.message = f'Warning: {res} is not a valid residue in this context'
|
|
1787
|
+
|
|
1774
1788
|
class NotEnoughAtomsError(Exception):
|
|
1775
1789
|
def __init__(self):
|
|
1776
1790
|
self.message = 'Warning: not enough backbone to build missing atoms'
|
|
@@ -1778,9 +1792,15 @@ class NotEnoughAtomsError(Exception):
|
|
|
1778
1792
|
class ParseError(Exception):
|
|
1779
1793
|
def __init__(self, err_id, err_txt):
|
|
1780
1794
|
self.message = f'{err_id} ({err_txt}) found when parsing input structure'
|
|
1795
|
+
|
|
1781
1796
|
class UnknownFFError(Exception):
|
|
1782
1797
|
def __init__(self, ff):
|
|
1783
|
-
self.message = f'{ff} is not a valid ff for assigning atom types'
|
|
1798
|
+
self.message = f'{ff} is not a valid ff for assigning atom types and charges'
|
|
1799
|
+
|
|
1784
1800
|
class SequencesDoNotMatch(Exception):
|
|
1785
1801
|
def __init__(self):
|
|
1786
1802
|
self.message = "Sequence lengths do not match"
|
|
1803
|
+
|
|
1804
|
+
class UnknownAtomforResidueError(Exception):
|
|
1805
|
+
def __init__(self, res_id, atm_id):
|
|
1806
|
+
self.message = f"Non valid atom {atm_id} for residue {res_id}"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: biobb-structure-checking
|
|
3
|
-
Version: 3.13.
|
|
3
|
+
Version: 3.13.5
|
|
4
4
|
Summary: BioBB_structure_checking performs MDWeb structure checking tool set as a command line utility.
|
|
5
5
|
Home-page: https://github.com/bioexcel/biobb_structure_checking
|
|
6
6
|
Author: Biobb developers
|
|
@@ -29,7 +29,7 @@ The latest documentation of this package can be found in our readthedocs site:
|
|
|
29
29
|
[latest package documentation](http://biobb_structure_checking.readthedocs.io/en/latest/).
|
|
30
30
|
|
|
31
31
|
### Version
|
|
32
|
-
v3.13.
|
|
32
|
+
v3.13.5 September 2024
|
|
33
33
|
|
|
34
34
|
### Requirements
|
|
35
35
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|