admin管理员组文章数量:1389805
I am using a workflow profile saved in profiles/default/config.yaml
to define default values for my snakemake command line arguments. I use conda to manage my environments, and so my snakemake calls usually include
snakemake --use-conda --conda-prefix='path.to.conda.envs'
In my config.yaml
I can define the --conda-prefix
parameter, but the --use-conda
parameter is just a flag with no value. How does one define that in the YAML? The YAML takes key:value
inputs and translates those into --key=value
. I have not been able to find a way to input key
and have it return just --key
. For example, in my config.yaml
:
# `--conda-prefix` works, since this is a traditional key:value pair
conda-prefix: 'path.to.conda.envs'
# None of these variations work to define `--use-conda`
use-conda: TRUE ##Does not work because `--use-conda=TRUE` is not valid
use-conda: ~ ##This does not produce an error, but it does not pass `--use-conda` correctly and conda is not used
use-conda ##Is not valid YAML syntax
Is there a way to do this, or do I just have to always specify --use-conda
in the command line?
I am using a workflow profile saved in profiles/default/config.yaml
to define default values for my snakemake command line arguments. I use conda to manage my environments, and so my snakemake calls usually include
snakemake --use-conda --conda-prefix='path.to.conda.envs'
In my config.yaml
I can define the --conda-prefix
parameter, but the --use-conda
parameter is just a flag with no value. How does one define that in the YAML? The YAML takes key:value
inputs and translates those into --key=value
. I have not been able to find a way to input key
and have it return just --key
. For example, in my config.yaml
:
# `--conda-prefix` works, since this is a traditional key:value pair
conda-prefix: 'path.to.conda.envs'
# None of these variations work to define `--use-conda`
use-conda: TRUE ##Does not work because `--use-conda=TRUE` is not valid
use-conda: ~ ##This does not produce an error, but it does not pass `--use-conda` correctly and conda is not used
use-conda ##Is not valid YAML syntax
Is there a way to do this, or do I just have to always specify --use-conda
in the command line?
1 Answer
Reset to default 1You want:
use-conda: true
It has to be lower case. You might think it would be use-conda: True
because we have to use True
and False
in Python code, but in YAML it's all lowercase. Any other variant like TRUE
is treated as a string.
本文标签: In Snakemakecan I include the useconda flag in a workflow profileStack Overflow
版权声明:本文标题:In Snakemake, can I include the `--use-conda` flag in a workflow profile? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744735269a2622288.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论