My team needed to adapt a published Nextflow workflow. We wanted to add a few steps before and a few steps after the pipeline, and swap one of the existing tools for a newer one. Nextflow is supposed to make this easy, because it lets one workflow include another.
It ended up being a huge scope of work.
What happened
First we had to clone the entire pipeline repository, because that's what a published Nextflow pipeline usually is: a repository, not a file. We then discovered the workflow was written to be run on its own, not imported into another pipeline, so we wrote some scripts that called the existing pipeline from inside of ours. We also needed to change a couple of things upstream, which meant we were now maintaining our own copy of someone else's pipeline in parallel.
The project got messier, managing multiple repos and pipelines. Our team has mixed levels of computational experience and collaborating became increasingly difficult as any changes, even with the use of AI, required an understanding of unfamiliar programming languages. We ended up giving up and reimplementing the entire pipeline from scratch. That's multiple developers and more than a week, for what should have been a small change.
Nextflow is incredibly powerful, and has many advantages over traditional bioinformatic tooling, but it also has limitations.
The same job in Adagio
The same process in Adagio would have been obtaining the .adg file, or importing directly from community pipelines, then loading the pipeline in the editor, connecting the upstream steps, connecting the downstream steps, and swapping an existing tool for another. Even if some functionality didn't currently exist in Adagio, we would have written an action for that function in Python. Because the input and output types are known, this could happen with no knowledge of the larger pipeline.
Nextflow: what happened
- Clone the whole repository
- Find the workflow isn't written to be imported
- Write hacky code to call it from our pipeline
- Change things upstream and maintain our own copy
- Give up and rewrite it from scratch
Multiple developers, more than a week
Adagio: our estimate
- Open the pipeline file in the editor
- Add our upstream and downstream steps
- Swap one tool for another
- Save it and run it
One person, about half a day
A pipeline should be one file
A huge benefit of Adagio is that pipelines are contained in single files. The plugin code exists outside of the pipeline, but the description is self-contained and references the plugins it needs. An Adagio pipeline is a single file that you can share. You send it to someone and they can open it in the editor or run it from the command line. They need Adagio and the environments the steps run in, but the pipeline itself is that one file. Needing an entire repository to share a small pipeline is overkill, and it's part of the reason our small change turned into a project.
Steps you can swap
Swapping one tool for another should be easy. In Adagio every step declares the types of its inputs and outputs, so I can take one step out, drop in another that produces the same type, and connect it. The editor won't let me connect steps that don't fit together.
That's also what makes plugins actually reusable. Once a tool is wrapped as a plugin, it works in any pipeline where the types match, so we aren't writing a new wrapper every time.