Merge pull request #894 from koen-vg/copy-config-module

Make copying default config file compatible with snakemake module
This commit is contained in:
Fabian Neumann 2024-01-24 16:58:49 +01:00 committed by GitHub
commit a536762ae8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -13,9 +13,10 @@ from snakemake.utils import min_version
min_version("7.7")
if not exists("config/config.yaml") and exists("config/config.default.yaml"):
copyfile("config/config.default.yaml", "config/config.yaml")
conf_file = os.path.join(workflow.current_basedir, "config/config.yaml")
conf_default_file = os.path.join(workflow.current_basedir, "config/config.default.yaml")
if not exists(conf_file) and exists(conf_default_file):
copyfile(conf_default_file, conf_file)
configfile: "config/config.yaml"