Louis BECQUEY

Fix: Multiple representatives in no-homology mode

Former-commit-id: 8b29824e
......@@ -32,6 +32,8 @@ BUG CORRECTIONS
TECHNICAL CHANGES
- Switched to DSSR Pro.
- Switched to esl-alimerge instead of cmalign --merge to merge alignments.
- Tested successfully with Python 3.9.6 + BioPython 1.79.
However, the production server still runs with Python 3.8.1 + BioPython 1.78.
############################################################################################
v 1.5 beta, April 2021
......
......@@ -1327,6 +1327,7 @@ class Pipeline:
conn.execute('pragma journal_mode=wal')
for eq_class, representative, codelist in tqdm(full_structures_list, desc="Eq. classes"):
codes = codelist.replace('+', ',').split(',')
representatives = representative.replace('+', ',').split(',')
# Simply convert the list of codes to Chain() objects
if self.REDUNDANT:
......@@ -1344,7 +1345,8 @@ class Pipeline:
if not len(res) or self.REUSE_ALL: # the chain is NOT yet in the database, or this is a known issue
self.update.append(Chain(pdb_id, pdb_model, pdb_chain_id, chain_label, eq_class))
else:
nr = representative.split('|')
for rep in representatives:
nr = rep.split('|')
pdb_id = nr[0].lower()
pdb_model = int(nr[1])
pdb_chain_id = nr[2].upper()
......@@ -2292,7 +2294,7 @@ def execute_joblist(fulljoblist):
p.join()
except KeyboardInterrupt as e:
warn("KeyboardInterrupt, killing workers (SIGKILL).", error=True)
p.kill()
p.terminate()
p.join()
raise e
......@@ -2327,7 +2329,7 @@ def work_infer_mappings(update_only, allmappings, fullinference, redundant, code
# Split the comma-separated list of chain codes into chain codes:
eq_class = codelist[0]
codes = codelist[2].replace('+', ',').split(',')
representative=codelist[1].replace('+', ',').split(',')[0]
representative = codelist[1].replace('+', ',').split(',')[0]
# Search for mappings that apply to an element of this PDB chains list:
for c in codes:
# search for Rfam mappings with this chain c:
......
......@@ -21,6 +21,6 @@ docker build -t rnanet:latest ..
rm x3dna-dssr
# to run, use something like:
# 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 ]
# 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 ]
# 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.
......