aLbAc
aLbAc

Reputation: 397

Best way to combine Nextflow pipelines within Nextflow

I'm new to NextFlow and I wonder which is the best way to call NextFlow pipelines within my new pipeline? I know I can call processes individually, but I'm interested in calling the overall pipeline so I can combine multiple nf scripts.

Upvotes: 4

Views: 1253

Answers (2)

George Carvalho
George Carvalho

Reputation: 97

Another way is using the 'Daisy-chaining workflows: the nf-cascade concept'. This method allows you to specify pipelines and extract specific files from a workflow output, which you can use as an input channel to the next process/workflow.

Upvotes: 0

mribeirodantas
mribeirodantas

Reputation: 489

That's what we call subworkflows. In DSL2, the default DSL for Nextflow currently, you can have numerous workflow entries in your .nf workflow file. With that, you can not only call these subworkflows (named workflow entries) from the main workflow (unnamed), but also from the CLI with -entry workflow-name.

You can also import workflows from other .nf files to your current one, the same way you do with modules. This way, your default unnamed workflow can also run the workflow block of other .nf files.

Let's say you have a pipeline that does A (with many processes within it), another pipeline B (with many processes within it) and you have a pipeline C in which you'd like to call these two from within it. Import the processes/workflows from A and B and call them from your unnamed workflow block in C.

Upvotes: 5

Related Questions