我在Windows上使用Vagrant,VirtualBox和Ubuntu 18.04安装了snakemake。
在虚拟机上,我创建了一个conda环境来运行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
(安装过程here的记录)
在此环境中,我可以毫无问题地运行conda list
和conda install
。我也可以运行snakemake
。
当我尝试在其中一条规则中使用conda
指令时出现问题
rule create_index:
input: config['fasta']
output: directory("results/index")
conda: "envs/smk-bowtie2.yaml"
shell: "bowtie2-build {input} {output}/hg38"
使用envs / smk-bowtie2.yaml,如下所示
channels:
- bioconda
dependencies:
- bowtie2 =2.3.4.3
当我在本地计算机上运行时
snakemake -np --use-conda
我得到了错误
Building DAG of jobs...
CreateCondaEnvironmentException:
The 'conda' command is not available.
我不明白我在想什么...
[编辑]:简单测试:
rule all
shell: "conda --version
命令:
conda --version
# prompt
# conda 4.5.11
snakemake
# prompt
# /bin/bash: conda: command not found