Louis BECQUEY

Fix: Multiple representatives in no-homology mode

...@@ -32,6 +32,8 @@ BUG CORRECTIONS ...@@ -32,6 +32,8 @@ BUG CORRECTIONS
32 TECHNICAL CHANGES 32 TECHNICAL CHANGES
33 - Switched to DSSR Pro. 33 - Switched to DSSR Pro.
34 - Switched to esl-alimerge instead of cmalign --merge to merge alignments. 34 - Switched to esl-alimerge instead of cmalign --merge to merge alignments.
35 + - Tested successfully with Python 3.9.6 + BioPython 1.79.
36 + However, the production server still runs with Python 3.8.1 + BioPython 1.78.
35 37
36 ############################################################################################ 38 ############################################################################################
37 v 1.5 beta, April 2021 39 v 1.5 beta, April 2021
......
...@@ -1327,6 +1327,7 @@ class Pipeline: ...@@ -1327,6 +1327,7 @@ class Pipeline:
1327 conn.execute('pragma journal_mode=wal') 1327 conn.execute('pragma journal_mode=wal')
1328 for eq_class, representative, codelist in tqdm(full_structures_list, desc="Eq. classes"): 1328 for eq_class, representative, codelist in tqdm(full_structures_list, desc="Eq. classes"):
1329 codes = codelist.replace('+', ',').split(',') 1329 codes = codelist.replace('+', ',').split(',')
1330 + representatives = representative.replace('+', ',').split(',')
1330 1331
1331 # Simply convert the list of codes to Chain() objects 1332 # Simply convert the list of codes to Chain() objects
1332 if self.REDUNDANT: 1333 if self.REDUNDANT:
...@@ -1344,7 +1345,8 @@ class Pipeline: ...@@ -1344,7 +1345,8 @@ class Pipeline:
1344 if not len(res) or self.REUSE_ALL: # the chain is NOT yet in the database, or this is a known issue 1345 if not len(res) or self.REUSE_ALL: # the chain is NOT yet in the database, or this is a known issue
1345 self.update.append(Chain(pdb_id, pdb_model, pdb_chain_id, chain_label, eq_class)) 1346 self.update.append(Chain(pdb_id, pdb_model, pdb_chain_id, chain_label, eq_class))
1346 else: 1347 else:
1347 - nr = representative.split('|') 1348 + for rep in representatives:
1349 + nr = rep.split('|')
1348 pdb_id = nr[0].lower() 1350 pdb_id = nr[0].lower()
1349 pdb_model = int(nr[1]) 1351 pdb_model = int(nr[1])
1350 pdb_chain_id = nr[2].upper() 1352 pdb_chain_id = nr[2].upper()
...@@ -2292,7 +2294,7 @@ def execute_joblist(fulljoblist): ...@@ -2292,7 +2294,7 @@ def execute_joblist(fulljoblist):
2292 p.join() 2294 p.join()
2293 except KeyboardInterrupt as e: 2295 except KeyboardInterrupt as e:
2294 warn("KeyboardInterrupt, killing workers (SIGKILL).", error=True) 2296 warn("KeyboardInterrupt, killing workers (SIGKILL).", error=True)
2295 - p.kill() 2297 + p.terminate()
2296 p.join() 2298 p.join()
2297 raise e 2299 raise e
2298 2300
...@@ -2327,7 +2329,7 @@ def work_infer_mappings(update_only, allmappings, fullinference, redundant, code ...@@ -2327,7 +2329,7 @@ def work_infer_mappings(update_only, allmappings, fullinference, redundant, code
2327 # Split the comma-separated list of chain codes into chain codes: 2329 # Split the comma-separated list of chain codes into chain codes:
2328 eq_class = codelist[0] 2330 eq_class = codelist[0]
2329 codes = codelist[2].replace('+', ',').split(',') 2331 codes = codelist[2].replace('+', ',').split(',')
2330 - representative=codelist[1].replace('+', ',').split(',')[0] 2332 + representative = codelist[1].replace('+', ',').split(',')[0]
2331 # Search for mappings that apply to an element of this PDB chains list: 2333 # Search for mappings that apply to an element of this PDB chains list:
2332 for c in codes: 2334 for c in codes:
2333 # search for Rfam mappings with this chain c: 2335 # search for Rfam mappings with this chain c:
......
...@@ -21,6 +21,6 @@ docker build -t rnanet:latest .. ...@@ -21,6 +21,6 @@ docker build -t rnanet:latest ..
21 rm x3dna-dssr 21 rm x3dna-dssr
22 22
23 # to run, use something like: 23 # to run, use something like:
24 -# docker run -v /home/persalteas/Data/RNA/3D/:/3D -v /home/persalteas/Data/RNA/sequences/:/sequences -v /home/persalteas/labo/:/runDir persalteas/rnanet [ additional options here ] 24 +# docker run -v /home/lbecquey/Data/RNA/3D/:/3D -v /home/lbecquey/Data/RNA/sequences/:/sequences -v /home/lbecquey/labo/:/runDir rnanet [ additional options here ]
25 # Without additional options, this runs a standard pass with known issues support, log output, and no statistics. The default resolution threshold is 4.0 Angstroms. 25 # Without additional options, this runs a standard pass with known issues support, log output, and no statistics. The default resolution threshold is 4.0 Angstroms.
26 26
......