Skip to content
This repository has been archived by the owner on Nov 28, 2023. It is now read-only.

Commit

Permalink
fix the augmentation log info
Browse files Browse the repository at this point in the history
  • Loading branch information
CunliangGeng committed Jul 21, 2020
1 parent 0436f5e commit 76a14d6
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions deeprank/learn/DataSet.py
Original file line number Diff line number Diff line change
Expand Up @@ -290,12 +290,10 @@ def process_dataset(self):

logger.info('\n')
logger.info(" Data Set Info:")
logger.info(
f' Augmentation : {self.use_rotation} rotations')
logger.info(
f' Training set : {self.ntrain} conformations')
if self.data_augmentation is not None:
logger.info(
f' Augmentation : {self.data_augmentation} rotations')

logger.info(
f' Validation set : {self.nvalid} conformations')
logger.info(
Expand Down Expand Up @@ -498,9 +496,9 @@ def _select_pdb(self, mol_names):
list: list of selected complexes
"""

fnames_original = list(
filter(lambda x: not re.search(r'_r\d+$', x), mol_names))
if self.use_rotation is not None:
fnames_original = list(
filter(lambda x: not re.search(r'_r\d+$', x), mol_names))
fnames_augmented = []
# TODO if there is no augmentation data in dataaset,
# the fnames_augmented should be 0, should report it.
Expand All @@ -513,6 +511,10 @@ def _select_pdb(self, mol_names):
selected_mol_names = fnames_original
else:
selected_mol_names = mol_names
sample_id = fnames_original[0]
num_rotations = len(list((filter(lambda x:
re.search(sample_id + '_r', x), mol_names))))
self.use_rotation = num_rotations

return selected_mol_names

Expand Down

0 comments on commit 76a14d6

Please sign in to comment.