I have read this question (Running Snakemake in one single conda env) but still have some doubt.
I am using the '--conda-prefix /some/dir' option and I have a rule in my snakemake file with the directive:
rule xxx:
...
conda:
"envs/some.yaml"
...
The first call of that rule will create the conda environment according to the yaml file in /some/dir/envs with some random name (in my case 'bf55a79e'). If I run the workflow in a different directory, the same conda environment (/some/dir/envs/bf55a79e) gets activated directly instead of being built again. So this is what I expected.
My question is:
- is there some way of skipping the building and specifying that rule xxx should use an already existing conda environment somewhere?
- does anyone know where the mapping between rule and directory gets stored?
.snakemakein the output directory, so it's possible that it uses that path somewhere. – Devon Ryan Sep 11 '19 at 14:37condadirectives in all rules, so that the virtual env was created (relative path to Snakefile is../outSnakemake_ngs_bngs05b/.snakemake/conda/a87f68b4). In order to suppress the creation of another (identical) environment I commented all thecondadirectives and calledsnakemake -p -s Snakefile_v4_ngs_bngs05b --cluster "qsub -q researshq" -j 5 --use-conda --conda-prefix ../outSnakemake_ngs_bngs05b/.snakemake/conda/a87f68b4, though the jobs failed. Is this the expected behaviour i.e. can I suppress thecondadirectives by specifying the env? – BCArg Apr 08 '20 at 09:57