Skip to content

Commit

Permalink
tidy which samples get added to the sample list
Browse files Browse the repository at this point in the history
  • Loading branch information
ViralVerity committed Aug 30, 2023
1 parent e7ce897 commit e005e67
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 0 additions & 1 deletion denv_pipeline/utils/error_checks.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,6 @@ def check_env_activated():
if pkgutil.find_loader('snakemake') is None or pkgutil.find_loader('Bio') is None:
sys.stderr.write(green(f"Error: installation not correct. Ensure that environment is activated and you have run 'pip install .'\n"))
sys.exit(-1)


def check_ct_file(config):

Expand Down
4 changes: 3 additions & 1 deletion denv_pipeline/utils/set_up_scripts.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,10 +121,12 @@ def symlink_setup(config, cwd):

def get_sample_list(config):

non_sample_dirs = ["results", "log_files", "downloads"]

config["sample_list"] = []
for sample_dir in os.listdir(config["indir"]):
if os.path.isdir(os.path.join(config["indir"], sample_dir)):
if sample_dir != "results" and os.path.join(config["indir"], sample_dir) != config["tempdir"] and sample_dir != "log_files":
if sample_dir not in non_sample_dirs and os.path.join(config["indir"], sample_dir) != config["tempdir"]:
config["sample_list"].append(sample_dir)

return config
Expand Down

0 comments on commit e005e67

Please sign in to comment.