nf-core / nf-core/tools

nf-core modules lint fails on patched modules with modified inputs/outputs

Open
#3,772 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

There is a problem with nf-core modules lint when working with patched modules that require different inputs or outputs compared to the original module.

Steps to reproduce:

  1. Change a module (e.g. artic/minion, cutadapt, multiqc) to use different inputs/outputs.
  2. Run nf-core modules lint --fix. This adds those new inputs/outputs to the meta.yml without description (fix the fields in the yml file)
  3. Run nf-core modules patch so that the meta.yml changes are reflected in the .diff file.
  4. Run nf-core modules lint

If I remove the additional inputs/outputs, the linting passes, but this defeats the purpose of the patch.
This seems to be a recurring issue across pipelines whenever there is a patch with modified inputs/outputs.

Command used and terminal output
$nf-core modules lint
╭─ [✗] 3 Module Tests Failed ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│                                ╷                                       ╷                                                                                                                                                                                                                                            │
│ Module name                    │ File path                             │ Test message                                                                                                                                                                                                                               │
│╶───────────────────────────────┼───────────────────────────────────────┼───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╴│
│ artic/minion                   │ modules/nf-core/artic/minion/meta.yml │ Module meta.yml does not match main.nf. Inputs should contain: [['meta', 'fastq'], 'fast5_dir', 'sequencing_summary', 'primer-schemes/${scheme}/V${scheme_version}/${scheme}.reference.fasta',                                             │
│                                │                                       │ 'primer-schemes/${scheme}/V${scheme_version}/${scheme}.scheme.bed', 'medaka_model_file', 'medaka_model_string', 'scheme', 'scheme_version'] Run nf-core modules lint --fix to update the meta.yml file.                                    │
│ cutadapt                       │ modules/nf-core/cutadapt/meta.yml     │ Module meta.yml does not match main.nf. Inputs should contain: [['meta', 'reads'], 'adapters'] Run nf-core modules lint --fix to update the meta.yml file.                                                                                 │
│ multiqc                        │ modules/nf-core/multiqc/meta.yml      │ Module meta.yml does not match main.nf. Outputs should contain: {'report': ['multiqc_report.html'], 'data': ['_data'], 'plots': ['_plots'], 'csv_reports': ['.csv'], 'versions': ['versions.yml']} Run nf-core modules lint --fix to       │
│                                │                                       │ update the meta.yml file.                                                                                                                                                                                                                  │
│                                ╵                                       ╵                                                                                                                                                                                                                                            │
╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
System information

N E X T F L O W versions 25.04.6 and 25.04.7
Hardware : HPC and Desktop
Executor: Slurm and local
OS: CentOS Stream release 8 and Ubuntu 22.04.5 LTS
Version of nf-core/tools: 3.3.2
Python version: 3.12.11

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 reproducing the failure with nf-core modules lint --fix, nf-core modules patch, and nf-core modules lint for the listed modules. Inspect the corresponding modules/nf-core/*/meta.yml files and their patched .diff files, then trace the lint comparison against each module's main.nf. Done means patched inputs and outputs are accepted while unpatched metadata validation still passes.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.