nf-core / nf-core/tools

Lint has a problem with reading file extensions containing env

Open
#3,513 2 comments 0 reactions 1 assignee View on GitHub

@toniher is already working on this.

Since Apr 10, 2025.

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

Description

Description of the bug

I was trying to run lint with a new module I created, and I got an error saying that I incorrectly described two outputs in the meta.yaml.

According to the lint output, the two outputs should have three elements

'eigenvec': ['meta', '.eigenvec', 'ec'], 'eigenval': ['meta', '.eigenval', 'al']

However, the output in my main.nf looks like this

    output:
    tuple val(meta), path("*.eigenvec")  , emit: eigenvec
    tuple val(meta), path("*.eigenval")  , emit: eigenval
    tuple val(meta), path("*.bed")  , emit: bed, optional: true
    tuple val(meta), path("*.bim")  , emit: bim, optional: true
    tuple val(meta), path("*.fam")  , emit: fam, optional: true
    tuple val(meta), path("*.pgen") , emit: pgen, optional: true
    tuple val(meta), path("*.pvar") , emit: pvar, optional: true
    tuple val(meta), path("*.psam") , emit: psam, optional: true
    path "versions.yml"           , emit: versions

As I understand, this error occurs because both extensions have "env".

I've attached the module so it will be easy to replicate the issue

pca.tar.gz

Command used and terminal output
nf-core modules lint plink2/pca


                                          ,--./,-.
          ___     __   __   __   ___     /,-._.--~\ 
    |\ | |__  __ /  ` /  \ |__) |__         }  {
    | \| |       \__, \__/ |  \ |___     \`-._,-`-,
                                          `._,._,'

    nf-core/tools version 3.3.0.dev0 - https://nf-co.re


INFO     Linting modules repo: '.'                                                                                                                                                                                
INFO     Linting module: 'plink2/pca'                                                                                                                                                                             

╭─ [✗] 1 Module Test Failed ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│              ╷                                     ╷                                                                                                                                                           │
│ Module name  │ File path                           │ Test message                                                                                                                                              │
│╶─────────────┼─────────────────────────────────────┼──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╴│
│ plink2/pca   │ modules/nf-core/plink2/pca/meta.yml │ Module meta.yml does not match main.nf. Outputs should contain: {'eigenvec': ['meta', '.eigenvec', 'ec'], 'eigenval': ['meta', '.eigenval', 'al'], 'bed': │
│              │                                     │ ['meta', '.bed'], 'bim': ['meta', '.bim'], 'fam': ['meta', '.fam'], 'pgen': ['meta', '.pgen'], 'pvar': ['meta', '.pvar'], 'psam': ['meta', '.psam'],      │
│              │                                     │ 'versions': ['versions.yml']} Run nf-core modules lint --fix to update the meta.yml file.                                                                 │
│              ╵                                     ╵                                                                                                                                                           │
╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
╭───────────────────────╮
│ LINT RESULTS SUMMARY  │
├───────────────────────┤
│ [✔]  45 Tests Passed  │
│ [!]   0 Test Warnings │
│ [✗]   1 Test Failed   │
╰───────────────────────╯
System information

Nextflow version: 24.10.4
Hardware: HPC
Executor: slurm
OS: Linux
Version of nf-core/tools: 3.3.0.dev0

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.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.