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

Commit

Permalink
Merge pull request #98 from DeepRank/log_learn
Browse files Browse the repository at this point in the history
Updates of learn on logging, warnings and exceptions
  • Loading branch information
NicoRenaud committed Sep 17, 2019
2 parents 82a93f3 + c0cb602 commit 5bc7968
Show file tree
Hide file tree
Showing 4 changed files with 541 additions and 519 deletions.
9 changes: 5 additions & 4 deletions deeprank/generate/DataGenerator.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,10 +111,11 @@ def __init__(self, pdb_select=None, pdb_source=None,
# handle pssm source
pssm_features = ('deeprank.features.FullPSSM',
'deeprank.features.PSSM_IC')
if config.PATH_PSSM_SOURCE is None and \
if self.compute_features and \
set.intersection(set(pssm_features), set(self.compute_features)):
raise ValueError(
'You must provide "pssm_source" to compaute PSSM features.')
if config.PATH_PSSM_SOURCE is None:
raise ValueError(
'You must provide "pssm_source" to compaute PSSM features.')


# get all the conformation path
Expand Down Expand Up @@ -186,7 +187,7 @@ def create_database(
>>> database.create_database(prog_bar=True)
"""
# check decoy pdb files
if len(self.pdb_path) == 0:
if not self.pdb_path:
raise ValueError(f"Decoy pdb files not found. Check class "
f"parameters 'pdb_source' and 'pdb_select'.")

Expand Down
Loading

0 comments on commit 5bc7968

Please sign in to comment.