nf-core / nf-core/tools

Phantom param mismatch between nextflow.config and nextflow_schema.json

Open
#3,758 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Python
Stars
322
Forks
255
Avg merge
2d 3h
Merged PRs (30d)
5

Description

Description of the bug

Hey, I just stumbled across an annoying bug:

  1. I have a param vireo_cell_range well defined in both nextflow.config and ǹextflow_schema.json
  2. The param is used in modules.config like this
  3. When running nf-core pipelines lint I get schema_params: Param vireo_cell_range ! from nextflow config not found in nextflow_schema.json

Now after some debugging (with nf-core pipelines schema build) I realized that params.vireo_cell_range != "all" ? "--cellRange ${params.vireo_cell_range}" : "" is interpreted as a parameter definition, and everything before = goes into the param name and everything afterwards is the default value.

After fixing it with this commit, I still had the same issue. This was because apparantly changes to modules.config do not invalidate the cached representation of the parameters. I had to run rm -rf ~/.nextflow/nf-core additionally to make it work.

Command used and terminal output

System information

nf-core tools version: 3.3.2
nextflow version: 25.04.7.5955

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the report with nf-core pipelines schema build and nf-core pipelines lint, using the referenced nextflow.config, modules.config, and nextflow_schema.json. Trace how parameter definitions are parsed and cached, then verify that changing modules.config removes the phantom vireo_cell_range mismatch without manually deleting ~/.nextflow/nf-core.

Written by the indexing model from the issue text.

Assessment

Domain
cli, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.