8000 Add check if parameters are specified via `.config` file to pipeline template · Issue #2184 · nf-core/tools · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Add check if parameters are specified via .config file to pipeline template #2184
Open
@grst

Description

@grst

Description of feature

Specifying parameters via -c custom.config can make problems with DSL2 workflows. The corresponding documentation was added in #2173.

I'm afraid there's still a considerable number of users following this practice, and in the worst case this may lead to incorrect results because parameters are silently ignored. Having a loud warning (or even error) when a workflow with a custom config file is started would be great!

I prototyped this snipped, and it seems to work in principle. However, it would need some tuning that it doesn't raise an error for the config file that defines the default parameters.

def check_config_files(workflow) {
    for (config_file in workflow.configFiles) {
        if (file(config_file).text.contains("parameters")) {
            println "WARNING: Do not specify parameters via a .config file."
        }
    }
}

workflow {
    check_config_files(workflow)
}

Maybe someone can take this on at the hackathon?

CC @jfy133

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0