Linting of patched module fails
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 322
- Forks
- 255
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 5
Description
Description of the bug
Adding an additional input to deeptools/bamcoverage (in meta.yml and main.nf) and running nf-core modules patch breaks linting.
My hunch is that the patch is not applied correctly, because if I remove the .diff file, linting is only complaining about the differences to the remote file, not any missing inputs.
Command used and terminal output
-core modules lint deeptools/bamcoverage
]
,--./,-.
___ __ __ __ ___ /,-._.--~\
|\ | |__ __ / ` / \ |__) |__ } {
| \| | \__, \__/ | \ |___ \`-._,-`-,
`._,._,'
nf-core/tools version 3.3.0.dev0 - https://nf-co.re
INFO Linting pipeline: '.'
INFO Linting module: 'deeptools/bamcoverage'
╭─ [!] 2 Module Test Warnings ──────────────────────────────────────────────────────────────────────────────────╮
│ ╷ ╷ │
│ Module name │ File path │ Test message │
│╶───────────────────────┼──────────────────────────────────────────┼──────────────────────────────────────────╴│
│ deeptools/bamcoverage │ modules/nf-core/deeptools/bamcoverage/m… │ Conda update: bioconda::deeptools 3.5.5 │
│ │ │ -> 3.5.6 │
│ deeptools/bamcoverage │ modules/nf-core/deeptools/bamcoverage/m… │ Conda update: bioconda::samtools 1.20 -> │
│ │ │ 1.21 │
│ ╵ ╵ │
╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
╭─ [✗] 2 Module Tests Failed ───────────────────────────────────────────────────────────────────────────────────╮
│ ╷ ╷ │
│ Module name │ File path │ Test message │
│╶───────────────────────┼──────────────────────────────────────────┼──────────────────────────────────────────╴│
│ deeptools/bamcoverage │ modules/nf-core/deeptools/bamcoverage/m… │ Local copy of module does not match │
│ │ │ remote │
│ deeptools/bamcoverage │ modules/nf-core/deeptools/bamcoverage/m… │ Module meta.yml does not match main.nf. │
│ │ │ Inputs should contain: [['meta', 'input', │
│ │ │ 'input_index'], ['fasta'], ['fasta_fai'], │
│ │ │ ['blacklist']] Run nf-core modules lint │
│ │ │ --fix to update the meta.yml file. │
│ ╵ ╵ │
╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
╭───────────────────────╮
with the following diff file:
Changes in component 'nf-core/deeptools/bamcoverage'
'modules/nf-core/deeptools/bamcoverage/environment.yml' is unchanged
Changes in 'deeptools/bamcoverage/meta.yml':
--- modules/nf-core/deeptools/bamcoverage/meta.yml
+++ modules/nf-core/deeptools/bamcoverage/meta.yml
@@ -38,6 +38,9 @@
type: file
description: Index of the reference file (optional, but recommended)
pattern: "*.{fai}"
+ - - blacklist:
+ type: file
+ description: Blacklist file
output:
- bigwig:
- meta:
Changes in 'deeptools/bamcoverage/main.nf':
--- modules/nf-core/deeptools/bamcoverage/main.nf
+++ modules/nf-core/deeptools/bamcoverage/main.nf
@@ -1,6 +1,6 @@
process DEEPTOOLS_BAMCOVERAGE {
tag "$meta.id"
- label 'process_low'
+ label 'process_medium'
conda "${moduleDir}/environment.yml"
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
@@ -11,6 +11,7 @@
tuple val(meta), path(input), path(input_index)
path(fasta)
path(fasta_fai)
+ path(blacklist)
output:
tuple val(meta), path("*.bigWig") , emit: bigwig, optional: true
@@ -24,6 +25,7 @@
def args = task.ext.args ?: ''
def prefix = task.ext.prefix ?: "${meta.id}"
def extension = args.contains("--outFileFormat bedgraph") || args.contains("-of bedgraph") ? "bedgraph" : "bigWig"
+ def blacklist_params = blacklist ? "--blackListFileName st}" : ""
// cram_input is currently not working with deeptools
// therefore it's required to convert cram to bam first
@@ -39,6 +41,7 @@
bamCoverage \\
--bam $input_out \\
$args \\
+ $blacklist_params \\
--numberOfProcessors ${task.cpus} \\
--outFileName ${prefix}.${extension}
@@ -54,6 +57,7 @@
bamCoverage \\
--bam $input_out \\
$args \\
+ $blacklist_params \\
--numberOfProcessors ${task.cpus} \\
--outFileName ${prefix}.${extension}
'modules/nf-core/deeptools/bamcoverage/tests/main.nf.test.snap' is unchanged
'modules/nf-core/deeptools/bamcoverage/tests/main.nf.test' is unchanged
************************************************************
System information
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the nf-core modules patch and nf-core modules lint entry points, using the deeptools/bamcoverage meta.yml, main.nf, and .diff shown in the report. Reproduce the commands, trace how the diff is applied, and confirm that linting recognizes the added blacklist input without reporting a local-copy mismatch.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- devtools, testing-qa
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100