I install snakemake on Windows, using Vagrant, VirtualBox and Ubuntu 18.04.
On the virtual machine, I create a conda environment to run snakemake:
conda create --name snake -c bioconda -c conda-forge snakemake-minimal graphviz pandas
# python v3.7.2
# conda v4.5.11
# snakemake v5.3.1
(Record of the installation procedure here)
From this environment, I can run conda list
and conda install
without issue. I can also run snakemake
.
Problem rise when I try to use conda
directive in one of my rule
rule create_index:
input: config['fasta']
output: directory("results/index")
conda: "envs/smk-bowtie2.yaml"
shell: "bowtie2-build {input} {output}/hg38"
with envs/smk-bowtie2.yaml as follow
channels:
- bioconda
dependencies:
- bowtie2 =2.3.4.3
When I run (on my local machine)
snakemake -np --use-conda
I get the error
Building DAG of jobs...
CreateCondaEnvironmentException:
The 'conda' command is not available.
I don't understand what I am missing...
[EDIT]: simple test:
rule all
shell: "conda --version
commands:
conda --version
# prompt
# conda 4.5.11
snakemake
# prompt
# /bin/bash: conda: command not found