Skip to content

Commit

Permalink
add error check for no samples being found
Browse files Browse the repository at this point in the history
  • Loading branch information
ViralVerity committed Sep 5, 2023
1 parent c213a60 commit 2197979
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions denv_pipeline/utils/set_up_scripts.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,10 @@ def get_sample_list(config):
if sample_dir not in non_sample_dirs and os.path.join(config["indir"], sample_dir) != config["tempdir"]:
config["sample_list"].append(sample_dir)

if len(config["sample_list"]) == 0:
sys.stderr.write(misc.green(f"Error: No samples found to analyse.\n"))
sys.exit(-1)

return config


Expand Down

0 comments on commit 2197979

Please sign in to comment.