0

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
Maxime Hebrard
  • 163
  • 1
  • 10
  • It is not a duplicate, as I get the error when running in local (will edit the question) – Maxime Hebrard Jan 03 '19 at 10:37
  • Ok, thank you for the clarification. – Hagbard Jan 03 '19 at 10:43
  • What operating system are you using? This might help you on Windows: https://stackoverflow.com/questions/44597662/conda-command-is-not-recognized-on-windows-10 – Hagbard Jan 03 '19 at 11:04
  • I edit the question with some detail about the installation. I am on windows, but I run snakemake using vagrant to communicate by ssh with a virtual machine Ubuntu 18.04 ... so at the end I am on Linux for runing conda and snakemake... conda list and conda install works fine from the terminal... only problem is "within" snakemake – Maxime Hebrard Jan 04 '19 at 01:45

0 Answers0