fatmacankara commited on
Commit
d894d06
1 Parent(s): 2aae16b

Update code/add_structure.py

Browse files
Files changed (1) hide show
  1. code/add_structure.py +5 -5
code/add_structure.py CHANGED
@@ -156,11 +156,11 @@ def get_pdb_ids(protein_id):
156
  try:
157
  request = IdMappingClient.submit(
158
  source="UniProtKB_AC-ID", dest="PDB", ids={protein_id})
159
- pdb_list = list(request.each_result())
160
- return [i['to'] for i in pdb_list]
161
- except IdMappingError:
162
- print('HERE')
163
- get_pdb_ids_2(protein_id)
164
  except requests.exceptions.HTTPError:
165
  get_pdb_ids_2(protein_id)
166
  except KeyError:
 
156
  try:
157
  request = IdMappingClient.submit(
158
  source="UniProtKB_AC-ID", dest="PDB", ids={protein_id})
159
+ try:
160
+ pdb_list = list(request.each_result())
161
+ return [i['to'] for i in pdb_list]
162
+ except:
163
+ get_pdb_ids_2(protein_id)
164
  except requests.exceptions.HTTPError:
165
  get_pdb_ids_2(protein_id)
166
  except KeyError: