Skip to content

Commit dbac0f9

Browse files
committed
Match produced filenames with input filenames using their PDB codes
1 parent edd23fd commit dbac0f9

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

project/utils/deepinteract_utils.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -736,7 +736,8 @@ def convert_input_pdb_files_to_pair(left_pdb_filepath: str, right_pdb_filepath:
736736
pruned_pairs_dir = os.path.join(input_dataset_dir, 'interim', 'pairs')
737737
output_dir = os.path.join(input_dataset_dir, 'final', 'raw')
738738
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]
739+
produced_keys = [db.get_pdb_name(x) for x in produced_filenames
740+
if db.get_pdb_code(x) in db.get_pdb_code(left_pdb_filepath)]
740741
pdb_filename = [os.path.join(pruned_pairs_dir, db.get_pdb_code(key)[1:3], key)
741742
for key in produced_keys][0]
742743
sub_dir = output_dir + '/' + db.get_pdb_code(pdb_filename)[1:3]

0 commit comments

Comments
 (0)