Spaces:
Runtime error
Runtime error
Commit
·
87d2088
1
Parent(s):
f00454f
Update app.py
Browse files
app.py
CHANGED
|
@@ -323,7 +323,10 @@ def preprocess_mol(pdb_code="", filepath=""):
|
|
| 323 |
print(os.listdir())
|
| 324 |
print(os.system(f"head -n20 {pdb_code}.pdb"))
|
| 325 |
mol = Molecule(f"{pdb_code}.pdb")
|
| 326 |
-
|
|
|
|
|
|
|
|
|
|
| 327 |
mol.write(tf_original.name)
|
| 328 |
# clean messy files and only include protein itself
|
| 329 |
mol.filter("protein")
|
|
@@ -337,9 +340,10 @@ def preprocess_mol(pdb_code="", filepath=""):
|
|
| 337 |
indexes.append(j)
|
| 338 |
j += 1
|
| 339 |
df["proteinMPNN_index"] = indexes
|
| 340 |
-
tf_cleaned = tempfile.NamedTemporaryFile(delete=False)
|
| 341 |
-
|
| 342 |
mol.write(tf_cleaned.name)
|
|
|
|
| 343 |
return tf_cleaned.name, df
|
| 344 |
|
| 345 |
|
|
@@ -440,6 +444,7 @@ def update(
|
|
| 440 |
|
| 441 |
pdb_path, mol_index = preprocess_mol(pdb_code=inp,filepath=file)
|
| 442 |
|
|
|
|
| 443 |
if pdb_path == None:
|
| 444 |
return "Error processing PDB"
|
| 445 |
|
|
|
|
| 323 |
print(os.listdir())
|
| 324 |
print(os.system(f"head -n20 {pdb_code}.pdb"))
|
| 325 |
mol = Molecule(f"{pdb_code}.pdb")
|
| 326 |
+
|
| 327 |
+
print("print molecule loaded")
|
| 328 |
+
tf_original = tempfile.NamedTemporaryFile(delete=False, suffix=".pdb")
|
| 329 |
+
print(tf_original)
|
| 330 |
mol.write(tf_original.name)
|
| 331 |
# clean messy files and only include protein itself
|
| 332 |
mol.filter("protein")
|
|
|
|
| 340 |
indexes.append(j)
|
| 341 |
j += 1
|
| 342 |
df["proteinMPNN_index"] = indexes
|
| 343 |
+
tf_cleaned = tempfile.NamedTemporaryFile(delete=False, suffix=".pdb")
|
| 344 |
+
print("cleaned", tf_cleaned)
|
| 345 |
mol.write(tf_cleaned.name)
|
| 346 |
+
print(os.listdir())
|
| 347 |
return tf_cleaned.name, df
|
| 348 |
|
| 349 |
|
|
|
|
| 444 |
|
| 445 |
pdb_path, mol_index = preprocess_mol(pdb_code=inp,filepath=file)
|
| 446 |
|
| 447 |
+
print("done processing mol")
|
| 448 |
if pdb_path == None:
|
| 449 |
return "Error processing PDB"
|
| 450 |
|