Related: SnakeMake rule with Python script, conda and cluster
I have been trying to set up my SnakeMake pipelines to run on SGE clusters (qsub). Using simple commands or tools that are installed directly to computational nodes, there is no problem. However, there is a problem when I try to set up SnakeMake to download tools through Conda on SGE nodes.
My testing Snakefile is:
rule bwa_sge_c_test:
conda:
"bwa.yaml"
shell:
"bwa > snaketest.txt"
"bwa.yaml" file is:
channels:
- bioconda
dependencies:
- bwa=0.7.17
I run SnakeMake with command:
snakemake -d "/home/<username>" --use-conda --cluster "qsub -cwd -q testing-nod08" --jobs 1
As a result, I get this error in SGE computational node:
/usr/bin/python3: No module named snakemake.__main__; 'snakemake' is a package and cannot be directly executed
touch: cannot touch '/home/krampl/.snakemake/tmp.7le8izvw/0.jobfailed': No such file or directory
I have tried to append "snakemake=5.2.2" to "bwa.yaml" (as a colleague suggested), but the error remains.
My questions are: What causes this error and how to fix this so I can run Conda enviroments from SnakeMake in SGE clusters?