Hello Kevin @kevinmicha ,
Thank you so much for your wonderrful work in predicting affinity of Ab-Ag, it is amazing!
Recently I attempt to predict the affinity of my Ab-Ag complex whose structure was predicted by alphafold2. But something wrong happens at the first step.
The error is:
TypeError Traceback (most recent call last)
Cell In[35], line 22
19 test_residues_path = 'list_of_residues/'
20 test_structure_path = 'structure/'
---> 22 preprocessed_data = Preprocessing(dccm_map_path=dccm_map_path, modes=modes, pathological=pathological, renew_maps=renew_maps, renew_residues=renew_residues, stage=stage, test_data_path=test_data_path, test_dccm_map_path=test_dccm_map_path, test_residues_path=test_residues_path, test_structure_path=test_structure_path, test_pdb_id=test_pdb)
23 input_shape = preprocessed_data.test_x.shape[-1]
25 print(input_shape)
File /public/software/anaconda3/envs/antipasti-env/lib/python3.13/site-packages/antipasti/preprocessing/preprocessing.py:142, in Preprocessing.init(self, data_path, scripts_path, structures_path, df, modes, chain_lengths_path, dccm_map_path, residues_path, file_type_input, selection, pathological, renew_maps, renew_residues, cmaps, cmaps_thr, ag_agnostic, affinity_entries_only, stage, test_data_path, test_dccm_map_path, test_residues_path, test_structure_path, test_pdb_id, alphafold, h_offset, l_offset, ag_residues)
140 self.test_structure_path = self.test_data_path + test_structure_path
141 self.test_pdb_id = test_pdb_id
--> 142 self.test_x = self.load_test_image()
File /public/software/anaconda3/envs/antipasti-env/lib/python3.13/site-packages/antipasti/preprocessing/preprocessing.py:612, in Preprocessing.load_test_image(self)
609 path = self.test_structure_path + file_name + self.file_type_input
610 new_path = self.test_dccm_map_path + pdb_id
--> 612 self.generate_fv_pdb(self.test_structure_path+pdb_id+self.file_type_input, lresidues=lresidues, hupsymchain=hupsymchain, lupsymchain=lupsymchain)
613 subprocess.call(['/public/software/anaconda3/envs/R4.4.1/bin/Rscript '+str(self.scripts_path)+'pdb_to_dccm.r '+str(path)+' '+str(new_path)+' '+str(self.modes)], shell=True, stdout=open(os.devnull, 'wb'))
614 if os.path.exists(path):
File /public/software/anaconda3/envs/antipasti-env/lib/python3.13/site-packages/antipasti/preprocessing/preprocessing.py:233, in Preprocessing.generate_fv_pdb(self, path, keepABC, lresidues, hupsymchain, lupsymchain)
231 antigen_chains = ['C', 'D', 'E']
232 idx_list = [0]
--> 233 h_range = range(1-self.h_offset, hupsymchain-self.h_offset)
234 l_range = range(1-self.l_offset, lupsymchain-self.l_offset)
235 h_pos = start_chain
TypeError: unsupported operand type(s) for -: 'NoneType' and 'int'
Could you please give me some instructions?
Looking forward to your reply.
Thanks and best regards,
Linqy
Hello Kevin @kevinmicha ,
Thank you so much for your wonderrful work in predicting affinity of Ab-Ag, it is amazing!
Recently I attempt to predict the affinity of my Ab-Ag complex whose structure was predicted by alphafold2. But something wrong happens at the first step.
The error is:
TypeError Traceback (most recent call last)
Cell In[35], line 22
19 test_residues_path = 'list_of_residues/'
20 test_structure_path = 'structure/'
---> 22 preprocessed_data = Preprocessing(dccm_map_path=dccm_map_path, modes=modes, pathological=pathological, renew_maps=renew_maps, renew_residues=renew_residues, stage=stage, test_data_path=test_data_path, test_dccm_map_path=test_dccm_map_path, test_residues_path=test_residues_path, test_structure_path=test_structure_path, test_pdb_id=test_pdb)
23 input_shape = preprocessed_data.test_x.shape[-1]
25 print(input_shape)
File /public/software/anaconda3/envs/antipasti-env/lib/python3.13/site-packages/antipasti/preprocessing/preprocessing.py:142, in Preprocessing.init(self, data_path, scripts_path, structures_path, df, modes, chain_lengths_path, dccm_map_path, residues_path, file_type_input, selection, pathological, renew_maps, renew_residues, cmaps, cmaps_thr, ag_agnostic, affinity_entries_only, stage, test_data_path, test_dccm_map_path, test_residues_path, test_structure_path, test_pdb_id, alphafold, h_offset, l_offset, ag_residues)
140 self.test_structure_path = self.test_data_path + test_structure_path
141 self.test_pdb_id = test_pdb_id
--> 142 self.test_x = self.load_test_image()
File /public/software/anaconda3/envs/antipasti-env/lib/python3.13/site-packages/antipasti/preprocessing/preprocessing.py:612, in Preprocessing.load_test_image(self)
609 path = self.test_structure_path + file_name + self.file_type_input
610 new_path = self.test_dccm_map_path + pdb_id
--> 612 self.generate_fv_pdb(self.test_structure_path+pdb_id+self.file_type_input, lresidues=lresidues, hupsymchain=hupsymchain, lupsymchain=lupsymchain)
613 subprocess.call(['/public/software/anaconda3/envs/R4.4.1/bin/Rscript '+str(self.scripts_path)+'pdb_to_dccm.r '+str(path)+' '+str(new_path)+' '+str(self.modes)], shell=True, stdout=open(os.devnull, 'wb'))
614 if os.path.exists(path):
File /public/software/anaconda3/envs/antipasti-env/lib/python3.13/site-packages/antipasti/preprocessing/preprocessing.py:233, in Preprocessing.generate_fv_pdb(self, path, keepABC, lresidues, hupsymchain, lupsymchain)
231 antigen_chains = ['C', 'D', 'E']
232 idx_list = [0]
--> 233 h_range = range(1-self.h_offset, hupsymchain-self.h_offset)
234 l_range = range(1-self.l_offset, lupsymchain-self.l_offset)
235 h_pos = start_chain
TypeError: unsupported operand type(s) for -: 'NoneType' and 'int'
Could you please give me some instructions?
Looking forward to your reply.
Thanks and best regards,
Linqy