I have a workflow with modules that uses conda
and singularity
.
When I try to run the workflow with snakemake -c 8 --use-conda --use-singularity
(Snakemake 7.32.4), I get the following error:
WorkflowError in file /home/user/src/project/workflow/Snakefile, line 33:
Failed to open source file /home/user/src/project/workflow/ workflows/ extract / Snakefile
FileNotFoundError: [Errno 2] No such file or directory: '/home/user/src/project/workflow/ workflows/ extract / Snakefile '
File "/home/user/src/project/workflow/Snakefile", line 33, in <module>
Why do I get this error, when
extract
module are correct, and../workflow/workflows/extract/Snakefile
does actually exist?I run the whole affair from within a Miniforge3 conda env on Ubuntu 22.04.3 LTS within WSL2.
name: project
channels:
- bioconda
- conda-forge
dependencies:
- snakemake=7.32.4
- singularityce
The Snakefile
in ../workflow/
includes the following relevant snippets:
MODULES_ROOT = "workflows/"
EXTRACT = "extract"
MODULE_EXTRACT = f"{MODULES_ROOT}{EXTRACT}/"
module extract:
snakefile:
f"{MODULE_EXTRACT}Snakefile"
config: config[EXTRACT]
use rule * from extract as extract_*
ls
d and cat
d the Snakefiles and checked correctness of spellingI think it is related to the fstring! Once I remove all the f string it works.
These are the environments I am using
(base) [hsher@tscc-11-15 oligoCLIP]$ python --version
Python 3.12.0
(base) [hsher@tscc-11-15 oligoCLIP]$ snakemake --version
7.32.4