Skip to content

Commit 3403dee

Browse files
committed
Merge branch 'develop' of https://github.com/BioinfoMachineLearning/DeepInteract into develop
2 parents a639d24 + 2b531e8 commit 3403dee

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

project/utils/deepinteract_utils.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -736,14 +736,12 @@ def convert_input_pdb_files_to_pair(left_pdb_filepath: str, right_pdb_filepath:
736736
pair_filepath = pair_filepaths[0]
737737
else:
738738
# Manually construct the already-postprocessed input pair's filepath since no pairs needed postprocessing
739-
pruned_pairs_dir = os.path.join(input_dataset_dir, 'interim', 'pairs')
740739
output_dir = os.path.join(input_dataset_dir, 'final', 'raw')
741740
produced_filenames = db.get_structures_filenames(output_dir, extension='.dill')
742-
produced_keys = [db.get_pdb_name(x) for x in produced_filenames if db.get_pdb_name(x) in left_pdb_filepath]
743-
pdb_filename = [os.path.join(pruned_pairs_dir, db.get_pdb_code(key)[1:3], key)
744-
for key in produced_keys][0]
745-
sub_dir = output_dir + '/' + db.get_pdb_code(pdb_filename)[1:3]
746-
pair_filepath = sub_dir + '/' + db.get_pdb_name(pdb_filename)
741+
produced_keys = [db.get_pdb_name(x) for x in produced_filenames
742+
if db.get_pdb_code(x).upper() in db.get_pdb_code(left_pdb_filepath).upper()]
743+
pair_filepath = [os.path.join(output_dir, db.get_pdb_code(key)[1:3], key)
744+
for key in produced_keys][0]
747745
# Impute any missing feature values in the postprocessed input pairs
748746
impute_missing_feature_values(output_dir=os.path.join(input_dataset_dir, 'final', 'raw'))
749747
# Load preprocessed pair

0 commit comments

Comments
 (0)