When I merge the 3.1.0 template in the pairgenomea...
# pipeline-maintainers
c
When I merge the 3.1.0 template in the pairgenomealign pipeline's
dev
branch, the tests fail because
ext.args
are not passed anymore. I have no idea why; can somebedy help me? In pairgenomealign the symptom of this problem is that the pipeline fails because the input and output files become the same. https://github.com/nf-core/pairgenomealign/actions/runs/12311020270/job/34360516211?pr=24 I have reproduced the problem offline and confirmed from
.command.sh
files in the work directory that
ext.args
are also not passed to other modules. For instance for the process `CUTN_TARGET`:
Copy code
$ diff -u 97/b1cf5b3cf2dc31d23273ddca85dbfd/.command.sh 41/45455b2cd5bfda6cc162eff422947f/.command.sh
--- 97/b1cf5b3cf2dc31d23273ddca85dbfd/.command.sh	2024-12-13 16:24:13.000000000 +0900
+++ 41/45455b2cd5bfda6cc162eff422947f/.command.sh	2024-12-13 16:20:36.000000000 +0900
@@ -7,7 +7,7 @@
 
 seqtk \
     cutN \
-     \
+    -n 10 \
     -g genome.fasta \
     > targetGenome.bed
Copy code
$ grep -A2 CUTN_TARGET conf/modules.config 
    withName: CUTN_TARGET {
        ext.args = { "-n 10" }
    }
Copy code
$ grep -C2 args modules/nf-core/seqtk/cutn/main.nf 

    script:
    def args = task.ext.args ?: ''
    def prefix = task.ext.prefix ?: "${meta.id}"

--
    seqtk \\
        cutN \\
        $args \\
        -g $fasta \\
        > ${prefix}.bed
💥 1
m
c
Bingo 🎉 if I add the include back the tests pass:
Copy code
diff --git a/nextflow.config b/nextflow.config
index f8051ce..35e43a5 100644
--- a/nextflow.config
+++ b/nextflow.config
@@ -303,3 +303,4 @@ validation {
         afterText = validation.help.afterText
     }
 }
+includeConfig 'conf/modules.config'
Shall I add it back?
m
How about the solution @Mahesh Binzer-Panchal proposes in the issue?
m
Try going through your
modules.config
and adding
{ }
around any values using
params.*
in them, i.e. assignments to
ext.args
,
ext.prefix
, etc. Be careful with
publishDir
, as only the
path
part and I think
saveAs
accept a closure.
c
I'd be happy to go that way to future-proof the file, but I do not see what else could be wrapped in closures in the current version, where everything is already in the form of
ext.args = { "something" }
. Can you give me an example?