nf-core / nf-core/tools

Using strict syntax causes template to raise an error when setting boolean options on CLI

Open
#4,100 9 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

When using strict syntax to run a pipeline created by the nf-core/tools template, if a boolean option is defined in the schema with default as false and is then supplied on the CLI, the following error is encountered:

ERROR ~ Validation of pipeline parameters failed!

 -- Check '.nextflow.log' file for details
The following invalid input values have been detected:

* --my_boolean_option (true): Value is [string] but should be [boolean]

This error only occurs when using Nextflow 25.10.4 with strict syntax enabled or Nextflow 26.02.0-edge (where strict syntax is enabled by default). No error occurs when running via Nextflow 25.10.4 with strict syntax is disabled.

Please see scwatts/nf-core-template-boolean-option-strict-syntax-error for a simple reproducible example.

Also possibly relevant is the nf-core Slack thread


Nextflow version: 25.10.4 / 26.02.0-edge
Hardware: MacBook Pro
Executor: local
OS: macOS
nf-core/tools version: 3.5.2 / dev (56f3910)
Python version: 3.11.4

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

Start by running the linked minimal reproducible example with the listed Nextflow and nf-core/tools versions, comparing strict syntax enabled and disabled. Trace the template's schema and CLI parameter validation path; done means a schema boolean with default false can be supplied on the CLI under strict syntax, with a regression test covering the behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.