Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -57,21 +57,21 @@ def pyuul(folder,n_clusters):
|
|
57 |
|
58 |
pairs = zip(pdbname, y)
|
59 |
result_dict = {key: value for key, value in pairs}
|
60 |
-
|
61 |
|
62 |
sheet = []
|
63 |
for key, value in result_dict.items():
|
64 |
-
if value ==
|
65 |
sheet.append(key)
|
66 |
return sheet
|
67 |
|
68 |
-
def kmeans(
|
69 |
azip = zipfile.ZipFile("peptides.zip")
|
70 |
azip.extractall()
|
71 |
peptide_folder_path = pathlib.Path(__file__).parent.joinpath("peptides" )
|
72 |
pdb_folder = pathlib.Path(__file__).parent.joinpath("temp")
|
73 |
-
|
74 |
-
shutil.copy(
|
75 |
n_num = int(n_num)
|
76 |
n_clusters = int(n_clusters)
|
77 |
for i in range(1,n_num+1):
|
|
|
57 |
|
58 |
pairs = zip(pdbname, y)
|
59 |
result_dict = {key: value for key, value in pairs}
|
60 |
+
ligand_class = result_dict['ligand.pdb']
|
61 |
|
62 |
sheet = []
|
63 |
for key, value in result_dict.items():
|
64 |
+
if value == ligand_class:
|
65 |
sheet.append(key)
|
66 |
return sheet
|
67 |
|
68 |
+
def kmeans(ligand,n_clusters,n_num):
|
69 |
azip = zipfile.ZipFile("peptides.zip")
|
70 |
azip.extractall()
|
71 |
peptide_folder_path = pathlib.Path(__file__).parent.joinpath("peptides" )
|
72 |
pdb_folder = pathlib.Path(__file__).parent.joinpath("temp")
|
73 |
+
ligand_path = ligend.name
|
74 |
+
shutil.copy(ligand_path,pdb_folder)
|
75 |
n_num = int(n_num)
|
76 |
n_clusters = int(n_clusters)
|
77 |
for i in range(1,n_num+1):
|