Overview
Snakemake is Make reborn for science with Python syntax: you declare rules (inputs → outputs → command), and it builds the dependency graph, runs only outdated steps, and parallelises automatically. The same Snakefile runs on your laptop and submits to SLURM.
Why researchers use it
- Incremental runs — change one input, recompute only its descendants
- Cluster-ready — –profile slurm turns the pipeline into batch jobs unchanged
- Self-documenting — the Snakefile is the methods section of your analysis
Getting started
- pip/uv install snakemake; write a first rule that turns data/raw.csv into results/clean.csv.
- Add rules until ‘snakemake –cores 4’ rebuilds everything from raw data to figures.
- Add conda: or container: directives per rule for full environment capture.
The honest review
Strengths. Huge academic adoption (especially bioinformatics), per-rule environment isolation, and the discipline it imposes — explicit inputs and outputs — is itself a reproducibility upgrade.
Limitations. Debugging failures mid-DAG has a learning curve; wildcard patterns get subtle; very dynamic workflows (steps decided at runtime) fight the model.