Re:Snakemake – A framework for reproducible data analysis
by c0l0 on Sunday July 16, 2023 @10:20AM
(#36747310)
This looks like... an unconstrained amalgamation of YAML, python, and zsh/bash. Knowing all these building blocks quite well, I cannot say I find this attractive at all. Seems like it is bound to incur all the problems that having everything in YAML cursed configuration management and deployment orchestration with in ansible.
Let's say you want to count the number of lines in each file for a list of samples, and report a table of counts for each sample. Define a rule to process each input file, and a rule to collect the results.
I find this much less complex than an equivalent bash workflow. Additionally, these rules can be easily containerized, the workflow can be parallelized (snakemake has largely replaced gnu parallel for me), and the workflow is robust to interruption and the addition of new samples. Snakemake manages checking for existing files and running rules as necessary to create missing files, logic that is much more finicky to implement by hand in bash.