Skip to content

Commit 35bb983

Browse files
author
Dien Nguyen
committed
Fix styling issues
1 parent a7ad94e commit 35bb983

File tree

1 file changed

+8
-17
lines changed

1 file changed

+8
-17
lines changed

api/utils/docking_utils.py

Lines changed: 8 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -613,19 +613,19 @@ def create_docking(receptor_name: str, ligand_name: str, docking_pdb_path: str):
613613
receptor_name = receptor_name[:receptor_name.index('.')]
614614
command = ['ls ' + 'AF2_' + receptor_name + '*.pdb']
615615
completed_process = subprocess.run(command,
616-
shell = True,
617-
cwd = receptor_folder,
618-
stdout = subprocess.PIPE,
619-
stderr = subprocess.PIPE,
620-
text = True)
616+
shell=True,
617+
cwd=receptor_folder,
618+
stdout=subprocess.PIPE,
619+
stderr=subprocess.PIPE,
620+
text=True)
621621
if completed_process.returncode != 0:
622622
print("Receptor file not found")
623623
# return "Receptor file not found"
624624
receptor_file = completed_process.stdout[:-1]
625-
625+
626626
receptor_file_path = receptor_folder + receptor_file
627627
receptor_name = receptor_file[4:(receptor_file.index('.') + 2)]
628-
628+
629629
results_path = docking_pdb_path + receptor_name + '_' + ligand_name + '/'
630630
print(results_path)
631631

@@ -635,12 +635,6 @@ def create_docking(receptor_name: str, ligand_name: str, docking_pdb_path: str):
635635
return [None, results_path]
636636
receptor = Docker.create_receptor(receptor_name, receptor_file_path)
637637

638-
# for receptor_file in os.listdir(receptor_folder):
639-
# if receptor_file[0] != '.' and receptor_file[-4:] == '.pdb' and \
640-
# (receptor_name in receptor_file):
641-
# receptor_file_path = receptor_folder + receptor_file
642-
# receptor = Docker.create_receptor(receptor_name, receptor_file_path)
643-
644638
# find ligand file and create ligand object
645639
ligand_folder = '/DATA/HEX_API/HEX_SELECTED_LIGANDS/'
646640
ligand_file_found = False
@@ -652,7 +646,7 @@ def create_docking(receptor_name: str, ligand_name: str, docking_pdb_path: str):
652646
ligand_file_found = True
653647
ligand_file_path = ligand_folder + '/' + ligand_file
654648
ligand = Ligand(ligand_name, ligand_file_path)
655-
649+
656650
if not ligand_file_found:
657651
return "Ligand file not found"
658652

@@ -736,6 +730,3 @@ def create_mapping_unfiltered(self, folder_path: str, results_path: str):
736730
with open(json_file, 'w') as file:
737731
file.write(json.dumps(mapped_sdf))
738732
return mapped_sdf
739-
740-
# if __name__ == "__main__":
741-
# Docker.start("AT3G22150", "801_Auxin", "/DATA/HEX_API/RESULTS/")

0 commit comments

Comments
 (0)