is there a clean way to run a nextflow (dsl2 based) sub-workflow on a single node?

i have a pipeline defined in a sub-workflow:

workflow pipeline{


that gets called by the main-workflow for different inputs:

workflow{ = "$baseDir/input"

    input_ch = Channel.fromPath( + "/*.*")


its easy to add a label to process to define its resources. what i want to do is add such a label to my (whole) subworkflow. they label is supposed to force the subworkflow to execute as a if it was a single process (meaning that it does not invoke a new slurm call for all processes but only per subworkflow) like:

                - pipeline for input 1 on node 1 as one slurmjob
                - pipeline for input 2 on node 2 as one slurmjob
- main:                                                                 - collect all the outputs

                - pipeline for input n on node n as one slurmjob

i did as above by calling nextflow inside of nextflow:

process nextflowofnextflows {
    label 'use_whatever_is_needed'

    file input1

    path("$out/*.*", emit: output)

    nextflow run --in=${input1}


... - but this is super unclean and i´d like to to it in a clean way.

whats the best practice to achieve the described behavior?

best, t.

How many English words
do you know?
Test your English vocabulary size, and measure
how many words do you know
Online Test
Powered by Examplum