Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add option to select all clusters in seletopclusts #286

Merged
merged 4 commits into from
Jan 25, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions src/haddock/modules/analysis/seletopclusts/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,15 @@ def confirm_installation(cls):

def _run(self):
"""Execute the module's protocol."""

if self.params["top_models"] <= 0:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, fine for now but I need to find a better way around this. Also to make sure the right types are passed in the user config files.

_msg = "top_models must be either > 0 or nan."
self.finish_with_error(_msg)

if not isinstance(self.params["top_cluster"], list):
_msg = "top_cluster must be a list, it can be an empty one."
self.finish_with_error(_msg)

models_to_select = self.previous_io.retrieve_models()

# how many models should we output?
Expand Down