3 ms·
I develop bioinformatics pipelines for a living and am very opinionated on the topic. Having enough experience with snakemake as well as nextflow in production
by suslik 3y ago
I develop bioinformatics pipelines for a living and am very opinionated on the topic.
Having enough experience with snakemake as well as nextflow in production for many years now, I would always opt out for snakemake for anything but extremely large DAgs (which is quite rare for for bioinformatics pipelines). The fact that nextflow still doesn't allow deleting temporary files during execution or re-rerunning the workflow from a set of intermediary files is an insane deal breaker (not mentioning other strange things like an arbitrary limit of 1000 parallel jobs etc.). AWS runners that once were nextflow's selling point is not an advantage anymore give Amazon Genomics Cli.
Subjectively, writing pipelines that incorporate conditional logic is much nicer in python+snakemake than groovy+nextflow, but maybe there is someone out there who prefers groovy.
Is a proper dry run possible in nextflow already btw?
- mbreese 3y agoI do too.. and have similar opinions. I wrote my own tool years back for pipelines because it was always frustrating (started roughly around the same time as Nextflow). Allowing for files to be marked as transient (temp) and re-running from arbitrary time points are definitely one of the things I support... as is conditional logic within the pipeline for job definition and resource usage. For me though, one of the biggest things is that I like having composable pipelines, so each part of the larger workflow can be developed independently. They can interact with each other (DAG) and use existing dependencies, but they don't have to exist in the same document/script. I work on large WGS datasets, so 1000's of jobs per patient isn't uncommon. Happy to talk more if you're interested. https://github.com/compgen-io/cgpipe https://github.com/compgen-io/cgpipe And yes, you can dry run the entire thing. It will write out a bash script if you want to see exactly what is going to run without submitting jobs. It's a full language for pipelines, but heavily inspired by Makefiles (with conditional logic).
- suslik 3y agoInteresting, thanks for sharing. I'll definitely take a look, although at this point I am so comfortable with Snakemake, it is a bit hard to imagine what would convince me to move to another tool. But I like the idea of composable pipelines: I am building a tool (too early to share) that would allow to lay Snakemake pipelines on top of each other using semi-automatic data annotations similar to how it is done in kedro (https://github.com/kedro-org/kedro https://github.com/kedro-org/kedro).
- mribeirodantas 3y agoIt's been a while since you can rerun/resume Nextflow pipelines, and yes, you can have dry runs in Nextflow. I have no idea what you're referring to with the 'arbitrary limit of 1000 parallel jobs' though. As for deleting temporary files, there are features that allow you to do a few things related to that, and other features being implemented.
- suslik 3y ago> It's been a while since you can rerun/resume Nextflow pipelines Yes, you can resume, but you need your whole upstream DAG to be present. Snakemake can rerun a job when only the dependencies of that job are present, which allows to neatly manage the disk usage, or archive an intermediate state of a project and rerun things from there. > and yes, you can have dry runs in Nextflow You have stubs, which really isn't the same thing. > I have no idea what you're referring to with the 'arbitrary limit of 1000 parallel jobs' though I was referring to this issue: https://github.com/nextflow-io/nextflow/issues/1871 https://github.com/nextflow-io/nextflow/issues/1871. Except, the discussion doesn't give the issue a full justice. Nextflow spans each job in a separate thread, and when it tries to span 1000+ condor jobs it die with a cryptic error message. The option of -Dnxf.pool.type=sync and -Dnxf.pool.maxThreads=N prevents the ability to resume and attempts to rerun the pipeline. > As for deleting temporary files, there are features that allow you to do a few things related to that, and other features being implemented. There are some hacks for this - but nothing I would feel safe to integrate into a production tool. They are implementing something - you're right - and it's been the case for several years now, so we'll see. Snakemake has all that out of the box.
- biophysboy 3y agoYou can resume. But the caching is very finicky, especially when processing groups of files. I often have to sort tuples or set caching to “deep” to get resume to actually do its job. The fact that they have a whole blog post called “demystifying nextflow resume” suggests it isnt intuitive for most.