Spaces:
Sleeping
Sleeping
Commit
·
52c40ac
1
Parent(s):
6bcd4c5
Update code/pdb_featureVector.py
Browse files- code/pdb_featureVector.py +13 -3
code/pdb_featureVector.py
CHANGED
@@ -245,7 +245,7 @@ def pdb(input_set, mode, impute):
|
|
245 |
existing_pdb = list(glob.glob(f"{path_pdb}/*"))
|
246 |
st.write('after download 2:', existing_pdb)
|
247 |
|
248 |
-
st.write('NEW
|
249 |
|
250 |
# Define the URL to retrieve the PDB file
|
251 |
url = f"https://files.rcsb.org/download/{search}.pdb"
|
@@ -275,16 +275,26 @@ def pdb(input_set, mode, impute):
|
|
275 |
repo_id="HUBioDataLab/ASCARIS",
|
276 |
repo_type="space")
|
277 |
st.write(f"PDB file {search}.pdb downloaded successfully.")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
278 |
else:
|
279 |
st.write('Here2')
|
280 |
st.write(f"Failed to retrieve PDB file for {search}.")
|
|
|
281 |
|
282 |
st.write('what')
|
283 |
existing_pdb = list(Path(path_to_output_files / 'pdb_structures').glob("*"))
|
284 |
st.write('existing_pdb3', existing_pdb)
|
285 |
|
286 |
-
|
287 |
-
|
288 |
resolution_method = parser.get_structure(search, file)
|
289 |
for record in SeqIO.parse(file, "pdb-seqres"):
|
290 |
if record.dbxrefs[0].split(':')[0] == 'UNP':
|
|
|
245 |
existing_pdb = list(glob.glob(f"{path_pdb}/*"))
|
246 |
st.write('after download 2:', existing_pdb)
|
247 |
|
248 |
+
st.write('NEW METHOD')
|
249 |
|
250 |
# Define the URL to retrieve the PDB file
|
251 |
url = f"https://files.rcsb.org/download/{search}.pdb"
|
|
|
275 |
repo_id="HUBioDataLab/ASCARIS",
|
276 |
repo_type="space")
|
277 |
st.write(f"PDB file {search}.pdb downloaded successfully.")
|
278 |
+
|
279 |
+
|
280 |
+
# Aug 23
|
281 |
+
content = response.content.decode("utf-8") # Decode the content if it's not already a string
|
282 |
+
parsed_records = list(SeqIO.parse(content, "fasta"))
|
283 |
+
for rec in parsed_records:
|
284 |
+
st.write(rec)
|
285 |
+
st.write(rec.id)
|
286 |
+
st.write(rec.pdbSequence)
|
287 |
else:
|
288 |
st.write('Here2')
|
289 |
st.write(f"Failed to retrieve PDB file for {search}.")
|
290 |
+
|
291 |
|
292 |
st.write('what')
|
293 |
existing_pdb = list(Path(path_to_output_files / 'pdb_structures').glob("*"))
|
294 |
st.write('existing_pdb3', existing_pdb)
|
295 |
|
296 |
+
|
297 |
+
|
298 |
resolution_method = parser.get_structure(search, file)
|
299 |
for record in SeqIO.parse(file, "pdb-seqres"):
|
300 |
if record.dbxrefs[0].split(':')[0] == 'UNP':
|