copy_config: copy actual snakemake.config
This commit is contained in:
parent
d4a82a2a41
commit
c54b4f9920
@ -1,5 +1,6 @@
|
|||||||
|
|
||||||
from shutil import copy
|
from shutil import copy
|
||||||
|
import yaml
|
||||||
|
|
||||||
files = {
|
files = {
|
||||||
"config.yaml": "config.yaml",
|
"config.yaml": "config.yaml",
|
||||||
@ -14,5 +15,16 @@ if __name__ == '__main__':
|
|||||||
from helper import mock_snakemake
|
from helper import mock_snakemake
|
||||||
snakemake = mock_snakemake('copy_config')
|
snakemake = mock_snakemake('copy_config')
|
||||||
|
|
||||||
|
basepath = snakemake.config['summary_dir'] + '/' + snakemake.config['run'] + '/configs/'
|
||||||
|
|
||||||
for f, name in files.items():
|
for f, name in files.items():
|
||||||
copy(f,snakemake.config['summary_dir'] + '/' + snakemake.config['run'] + '/configs/' + name)
|
copy(f, basepath + name)
|
||||||
|
|
||||||
|
with open(basepath + 'config.snakemake.yaml', 'w') as yaml_file:
|
||||||
|
yaml.dump(
|
||||||
|
snakemake.config,
|
||||||
|
yaml_file,
|
||||||
|
default_flow_style=False,
|
||||||
|
allow_unicode=True,
|
||||||
|
sort_keys=False
|
||||||
|
)
|
Loading…
Reference in New Issue
Block a user