Skip to content

Inconsistent behaviour with aliased process names and aliased workflows in process selectors #6682

@awgymer

Description

@awgymer

Bug report

Expected behavior and actual behavior

Aliased processes are able to be selected in config using their "true" (base? original?) name. This is very useful when trying to set config that should be the same across all aliased processes of given process.

However this does not work if anything other than the process name is used (i.e. fully qualified name) in the selector.

And it does not work for aliased subworkflows.

The working case

Consider the following workflow:

module.nf

process A_A { 

    output:
    val("${task.ext.args}"), emit: val

    script:
    """
    echo ${task.ext.args}
    """
}

main.nf

include { A_A; A_A as A_B } from './module.nf'

workflow PARENT {
    A_A()
    A_A.out.val.view{ it -> "A: ${it}" }
    A_B()
    A_B.out.val.view{ it -> "B: ${it}" }

}

workflow {
    PARENT()
}

Given the following config:

process {

    withName: "A_B" {
        ext.args = 'b'
    }


    withName: "A_A" {
        ext.args = 'a'
    }

}

OUTPUT

B: b
A: a

Given:

process {

    withName: "A_A" {
        ext.args = 'a'
    }

}

OUTPUT

B: a
A: a

Aliased Process with subworkflow selector

Given:

process {

    withName: "PARENT:A_B" {
        ext.args = 'b'
    }


    withName: "PARENT:A_A" {
        ext.args = 'a'
    }

}

OUTPUT

B: b
A: a

But given:

process {

    withName: "PARENT:A_A" {
        ext.args = 'a'
    }

}

OUTPUT

B: null
A: a

Aliased subworkflow

main.nf

include { PARENT; PARENT as PARENT2 } from './subwf.nf'

workflow {
    PARENT()
    PARENT2()
}

Given:

process {

    withName: "A_B" {
        ext.args = 'b'
    }


    withName: "A_A" {
        ext.args = 'a'
    }

}

OUTPUT

B: b
B: b
A: a
A: a

Given:

process {

    withName: "PARENT:A_B" {
        ext.args = 'b'
    }


    withName: "PARENT:A_A" {
        ext.args = 'a'
    }

}

OUTPUT

A: a
B: null
A: null
B: b

Environment

  • Nextflow version: 25.10.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions