Spaces:
Sleeping
Sleeping
Commit
·
2aae16b
1
Parent(s):
d14545c
Update code/add_structure.py
Browse files- code/add_structure.py +3 -2
code/add_structure.py
CHANGED
|
@@ -156,10 +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 |
-
|
| 160 |
-
time.sleep(2.0)
|
| 161 |
pdb_list = list(request.each_result())
|
| 162 |
return [i['to'] for i in pdb_list]
|
|
|
|
|
|
|
|
|
|
| 163 |
except requests.exceptions.HTTPError:
|
| 164 |
get_pdb_ids_2(protein_id)
|
| 165 |
except KeyError:
|
|
|
|
| 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:
|