I'm tearing my hair out here, hopefully someone can help me.
Running snakemake 4.8.0
I have a snakemake pipeline, which I run with two conda envs and --use-conda and it works fine when run as a standalone pipeline.
However, when I run on our cluster, I get the error:
"The 'conda' command is not available in $PATH."
Now. Anaconda is installed on our cluster, but we need to activate it on nodes with:
module load anaconda
Also, module is defined as a function, so I have source a couple of things first. Therefore, at the top of my snakefile, I have:
shell.prefix("source $HOME/.bashrc; source /etc/profile; module load anaconda; )
This doesn't solve the problem.
I even put module load anaconda
in my .bashrc
, and that still doesn't work. Only on cluster execution, I get the error about conda not being found.
Other changes to my .bashrc
are picked up and are picked up by snakemake, so I have no idea why it is having problems with conda.
I even created a conda env, loaded snakemake and conda into that env, activate the env in the submission script and in the Snakefile:
shell.prefix("source $HOME/.bashrc; source /etc/profile; module load anaconda; source activate MAGpy-3.5; ")
And it still says "The 'conda' command is not available in $PATH."
Literally tearing my hair out.
As an aside, I submit using qsub -S /bin/bash
and also use shell.executable("/bin/bash")
but the temp shell scripts created in .snakemake
are run by /bin/sh
- is that expected?
Please help me!