fatmacankara commited on
Commit
f99c04a
·
1 Parent(s): bde8ba1

Update code/pdb_featureVector.py

Browse files
Files changed (1) hide show
  1. code/pdb_featureVector.py +6 -7
code/pdb_featureVector.py CHANGED
@@ -246,25 +246,24 @@ def pdb(input_set, mode, impute):
246
  st.write('after download 2:', existing_pdb)
247
 
248
  st.write('NEW MWTHID')
249
-
250
-
251
-
252
-
253
  # Define the URL to retrieve the PDB file
254
  url = f"https://files.rcsb.org/download/{search}.pdb"
255
-
256
  # Send an HTTP GET request to the PDB website to download the PDB file
257
  response = requests.get(url)
258
-
259
  # Check if the request was successful
260
  if response.status_code == 200:
 
261
  # Save the PDB file to a local file
262
  with open(f"path_pdb/{search}.pdb", "wb") as f:
263
  f.write(response.content)
264
  st.write(f"PDB file {search}.pdb downloaded successfully.")
265
  else:
 
266
  st.write(f"Failed to retrieve PDB file for {search}.")
267
-
268
 
269
  resolution_method = parser.get_structure(search, file)
270
  for record in SeqIO.parse(file, "pdb-seqres"):
 
246
  st.write('after download 2:', existing_pdb)
247
 
248
  st.write('NEW MWTHID')
249
+
 
 
 
250
  # Define the URL to retrieve the PDB file
251
  url = f"https://files.rcsb.org/download/{search}.pdb"
252
+ st.write('url', url)
253
  # Send an HTTP GET request to the PDB website to download the PDB file
254
  response = requests.get(url)
255
+ st.write('response', response)
256
  # Check if the request was successful
257
  if response.status_code == 200:
258
+ st.write('here1')
259
  # Save the PDB file to a local file
260
  with open(f"path_pdb/{search}.pdb", "wb") as f:
261
  f.write(response.content)
262
  st.write(f"PDB file {search}.pdb downloaded successfully.")
263
  else:
264
+ st.write('here2')
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"):