warn(f"Missing residues regarding index_chain: {[1+i for i in sorted(diff)]}")
iflen(diff)andself.mappingisnotNone:
# warn(f"Missing residues in chain numbering: {[1+i for i in sorted(diff)]}")
foriinsorted(diff):
# check if a nucleotide numbered +1000 exists in the nts object
# check if a nucleotide with the correct index_chain exists in the nts object
found=None
forntinnts:# nts is the object from the loaded JSON and contains all nts
ifnt['chain_name']!=self.pdb_chain_id:
continue
ifnt['index_chain']==i+1:
ifnt['index_chain']==i+1+self.mapping.st:
found=nt
break
iffound:
self.mapping.log(f"Residue {i+1+self.mapping.st}-{self.mapping.st} = {i+1} has been saved and renumbered {df.iloc[i,1]} instead of {found['nt_id'].replace(found['chain_name']+ '.' + found['nt_name'], '').replace('^','')}")
print("See RNANet.py --help for more information.")
...
...
@@ -1420,14 +1375,15 @@ class Pipeline:
conn=sqlite3.connect(runDir+"/results/RNANet.db")
pd.read_sql_query("SELECT rfam_acc, description, idty_percent, nb_homologs, nb_3d_chains, nb_total_homol, max_len, comput_time, comput_peak_mem from family ORDER BY nb_3d_chains DESC;",
families=[f.split('.')[1]forfinfiles]# The RFAM families this chain has been mapped onto
# Delete the chain from the database, and the associated nucleotides and re_mappings, using foreign keys
forfaminfamilies:
command=["sqlite3","results/RNANet.db",f"PRAGMA foreign_keys=ON; delete from chain where structure_id=\"{structure}\" and chain_name=\"{chain}\" and rfam_acc=\"{fam}\";"]