Search code examples
symlinksnakemake

set location of .snakemake directory


Is there a way to define where snakemake creates the .snakemake folder. I could change the whole working dic with --directory, however this also changes the storage location of every relative path.

I thought --shadow-prefix is what I was hoping for, but .snakemake/scripts for example is still created in the working dic.

The reasons is, that I am working on an shared CIFS/SMB drive (which I have no control over). In theory I have read/write access but for some actions snakemake performs in the .snakefile folder it refuses to give permission (don't know why). So my hope is that i could place .snakemake on a small local drive, but the data of the workflow is still written to the CIFS/SMB.


Solution

  • No, this is not possible, at least with the latest version available today. The workaround for this is to create a symlink to the path that works best for you:

    ln -s MY_PATH .snakemake
    

    where MY_PATH is the location you would like to use to store the .snakemake-related files.