Special output types - RomainFeron/workshop-snakemake-sibdays2020 GitHub Wiki

Snakemake has several built-in utilities to assign properties to outputs. These properties are listed in the table below:

Property Syntax Function
Temporary temp('path/to/file.txt') The file is deleted as soon as it is not required by any future jobs
Protected protected('path/to/file.txt') The file cannot be overwritten after the job ends (useful to prevent erasing a file by mistake)
Ancient ancient('path/to/file.txt') The file will not be re-created when running the pipeline (useful for files that require heavy computation and are not affected by previous inputs)
Directory directory('path/to/directory') The output is a directory instead of a file (use 'touch' instead if possible)
Touch touch('path/to/file.txt') Creates an empty file 'file.txt' regardless of the shell command (useful to create "flag files" when a command's output is complex)