Spaces:
Sleeping
Sleeping
fatmacankara
commited on
Commit
•
d894d06
1
Parent(s):
2aae16b
Update code/add_structure.py
Browse files- 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 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
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:
|