Skip to content

Commit edd23fd

Browse files
committed
Scan directory of postprocessed pairs to determine how to construct input pair filepaths
1 parent e62b87a commit edd23fd

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

project/utils/deepinteract_utils.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -735,10 +735,10 @@ def convert_input_pdb_files_to_pair(left_pdb_filepath: str, right_pdb_filepath:
735735
# Manually construct the already-postprocessed input pair's filepath since no pairs needed postprocessing
736736
pruned_pairs_dir = os.path.join(input_dataset_dir, 'interim', 'pairs')
737737
output_dir = os.path.join(input_dataset_dir, 'final', 'raw')
738-
requested_filenames = db.get_structures_filenames(pruned_pairs_dir, extension='.dill')
739-
work_keys = [db.get_pdb_name(x) for x in requested_filenames]
740-
pdb_filename = [os.path.join(pruned_pairs_dir, db.get_pdb_code(work_key)[1:3], work_key)
741-
for work_key in work_keys][0]
738+
produced_filenames = db.get_structures_filenames(output_dir, extension='.dill')
739+
produced_keys = [db.get_pdb_name(x) for x in produced_filenames if db.get_pdb_name(x) in left_pdb_filepath]
740+
pdb_filename = [os.path.join(pruned_pairs_dir, db.get_pdb_code(key)[1:3], key)
741+
for key in produced_keys][0]
742742
sub_dir = output_dir + '/' + db.get_pdb_code(pdb_filename)[1:3]
743743
pair_filepath = sub_dir + '/' + db.get_pdb_name(pdb_filename)
744744
# Impute any missing feature values in the postprocessed input pairs

0 commit comments

Comments
 (0)