'How to define key=var arguments in a snakemake profile yaml file
Some of the snakemake arguments follow the key=value pattern. I would like to add them to the snakemake profile yaml file.
for example, the command line arguments should be stored in the snakemake profile.
--default-resources mem=50 time=5
I tried the two following options but it didn't work:
default-resources: "mem=50 time=5"
default-resources:
mem: 50
time: 5
Problem continues for snakemake > 6.3 https://github.com/snakemake/snakemake/issues/1186
Solution 1:[1]
I haven't tested this, but since I believe it is a yaml file, I guess you should add a dash per line:
default-resources:
- mem: 50
- time: 5
Solution 2:[2]
What worked for me is the following syntax which is a bit at odds with the yaml definition.
default-resources:
- mem=50
- time=5
Where the resources definitions are interpreted as strings.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | Maarten-vd-Sande |
Solution 2 | KieserS |