A workflow tool similar to GNU Make, but with much more power with Python.
Rerun upon input changes
Snakemake doesn’t automatically rerun rules when input files are added. But the rerun can be triggered by
snakemake -n --forcerun $(snakemake --list-input-changes)
There are also
when used, it injects
snakemake variable. For instance, input files can be accessed via
snakemake.input. It is convenient, but it makes the script not technically correct and may make it harder to test.
Temporary & protected output files
You can use
protected() in output directive.
-p option prints the shell commands. It can be useful for debugging.
You can either include another snakefile or use another (complete) Snakefile as a sub-workflow.
See Parameter space exploration
There is a package called snakefmt that is derived from Black.
To remove the errors/warnings from flake8 about the variable
snakemake that snakemake injects into scripts, you can add to
builtins = snakemake to
~/.config/flake8 or run with the option