snakemake / snakemake

This is the development home of the workflow management system Snakemake. For general information, see
https://snakemake.github.io
MIT License
2.26k stars 549 forks source link

workflow.source_path does not work as expected #2331

Open chrarnold opened 1 year ago

chrarnold commented 1 year ago

Snakemake version 7.24

Describe the bug In params, I have the following line to specify that the config file for multiqc is in the following location (which is specified relative to where the Snakefile is located): config = workflow.source_path("tools/multiqc_config.yaml")

However, workflow.source_path does not work as expected, an error is thrown (see below)

Logs Error: Invalid value for '-c' / '--config': Path '/home/bla/.cache/snakemake/snakemake/source-cache/runtime-cache/tmpoe2bb5nk/file/{full_path}/tools/multiqc_config.yaml' does not exist.

Here, I replaced the beginning of the full path with {full_path}.

Does it work differently than what I expected and understood from the documentation?

ftabaro commented 6 months ago

I think there should be a switch to tell Snakemake whether to cache or not the given path.

ftabaro commented 6 months ago

Here is a possible workaround: https://github.com/snakemake/snakemake/issues/1805#issuecomment-1851506675