Spaces:
Sleeping
Sleeping
Commit
·
7d34aac
1
Parent(s):
36c22e2
Update code/pdb_featureVector.py
Browse files- code/pdb_featureVector.py +12 -3
code/pdb_featureVector.py
CHANGED
|
@@ -257,13 +257,22 @@ def pdb(input_set, mode, impute):
|
|
| 257 |
if response.status_code == 200:
|
| 258 |
st.write('here1')
|
| 259 |
# Save the PDB file to a local file
|
| 260 |
-
|
| 261 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 262 |
st.write(f"PDB file {search}.pdb downloaded successfully.")
|
| 263 |
else:
|
| 264 |
-
st.write('
|
| 265 |
st.write(f"Failed to retrieve PDB file for {search}.")
|
| 266 |
st.write('what')
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 267 |
|
| 268 |
resolution_method = parser.get_structure(search, file)
|
| 269 |
for record in SeqIO.parse(file, "pdb-seqres"):
|
|
|
|
| 257 |
if response.status_code == 200:
|
| 258 |
st.write('here1')
|
| 259 |
# Save the PDB file to a local file
|
| 260 |
+
try:
|
| 261 |
+
with open(Path(path_to_output_files / search/'.pdb'), "wb") as f:
|
| 262 |
+
st.write('WRITING TO FILE')
|
| 263 |
+
f.write(response.content)
|
| 264 |
+
except:
|
| 265 |
+
st.write('ERRor')
|
| 266 |
st.write(f"PDB file {search}.pdb downloaded successfully.")
|
| 267 |
else:
|
| 268 |
+
st.write('Here2')
|
| 269 |
st.write(f"Failed to retrieve PDB file for {search}.")
|
| 270 |
st.write('what')
|
| 271 |
+
existing_pdb = list(Path(path_to_output_files / 'pdb_structures').glob("*"))
|
| 272 |
+
st.write('existing_pdb3', existing_pdb)
|
| 273 |
+
|
| 274 |
+
|
| 275 |
+
|
| 276 |
|
| 277 |
resolution_method = parser.get_structure(search, file)
|
| 278 |
for record in SeqIO.parse(file, "pdb-seqres"):
|