From 95763975830bba162ba04359f019eab216ebc0ae Mon Sep 17 00:00:00 2001 From: stvdsomp <53609680+stvdsomp@users.noreply.github.com> Date: Fri, 31 Jul 2026 10:06:13 +0200 Subject: [PATCH 1/6] add fna support for pbmm2 --- modules/nf-core/pbmm2/align/main.nf | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/modules/nf-core/pbmm2/align/main.nf b/modules/nf-core/pbmm2/align/main.nf index 3233b84df07f..69dc9787f5a3 100644 --- a/modules/nf-core/pbmm2/align/main.nf +++ b/modules/nf-core/pbmm2/align/main.nf @@ -23,10 +23,21 @@ process PBMM2_ALIGN { def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" """ + fasta="${fasta}" + if [[ \${fasta} == *.fna ]]; then + new_name=\${fasta%.fna}.fa + mv \${fasta} \${new_name} + fasta=\${new_name} + elif [[ \${fasta} == *.fna.gz ]]; then + new_name=\${fasta%.fna.gz}.fa.gz + mv \${fasta} \${new_name} + fasta=\${new_name} + fi + pbmm2 \\ align \\ $args \\ - $fasta \\ + \${fasta} \\ $bam \\ ${prefix}.bam \\ --num-threads ${task.cpus} From c4fb51766fe981cdb42a874910c3f5faa5e1990b Mon Sep 17 00:00:00 2001 From: stvdsomp <53609680+stvdsomp@users.noreply.github.com> Date: Thu, 6 Aug 2026 11:31:50 +0200 Subject: [PATCH 2/6] add .fna support for pbmm2/align + test --- modules/nf-core/pbmm2/align/tests/fna.nf.test | 67 +++++++++++++++++++ .../pbmm2/align/tests/fna.nf.test.snap | 54 +++++++++++++++ .../pbmm2/align/tests/main.nf.test.snap | 6 +- 3 files changed, 124 insertions(+), 3 deletions(-) create mode 100644 modules/nf-core/pbmm2/align/tests/fna.nf.test create mode 100644 modules/nf-core/pbmm2/align/tests/fna.nf.test.snap diff --git a/modules/nf-core/pbmm2/align/tests/fna.nf.test b/modules/nf-core/pbmm2/align/tests/fna.nf.test new file mode 100644 index 000000000000..1867219fec4e --- /dev/null +++ b/modules/nf-core/pbmm2/align/tests/fna.nf.test @@ -0,0 +1,67 @@ +nextflow_process { + + name "Test Process PBMM2_ALIGN" + script "../main.nf" + process "PBMM2_ALIGN" + + tag "modules" + tag "modules_nfcore" + tag "pbmm2" + tag "pbmm2/align" + + test("pbmm2 - bam - fna") { + when { + process { + """ + input[0] = [ + [ id:'test' ], // meta map + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/pacbio/bam/NA03697B2_downsampled.pbmm2.repeats.bam', checkIfExists: true), + ] + + input[1] = [ + [ id:'test' ], // meta map + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome3.fna', checkIfExists: true), + ] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(sanitizeOutput(process.out)).match() } + ) + } + + } + + test("pbmm2 - bam - fna - stub") { + + options "-stub" + + when { + process { + """ + input[0] = [ + [ id:'test' ], // meta map + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/pacbio/bam/NA03697B2_downsampled.pbmm2.repeats.bam', checkIfExists: true), + ] + + input[1] = [ + [ id:'test' ], // meta map + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome3.fna', checkIfExists: true), + ] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(sanitizeOutput(process.out)).match() } + ) + } + + } + +} diff --git a/modules/nf-core/pbmm2/align/tests/fna.nf.test.snap b/modules/nf-core/pbmm2/align/tests/fna.nf.test.snap new file mode 100644 index 000000000000..7df1b8b34817 --- /dev/null +++ b/modules/nf-core/pbmm2/align/tests/fna.nf.test.snap @@ -0,0 +1,54 @@ +{ + "pbmm2 - bam - fna": { + "content": [ + { + "bam": [ + [ + { + "id": "test" + }, + "test.bam:md5,f0f615a8a6172a739dfb81e6e08043f4" + ] + ], + "versions_pbmm2": [ + [ + "PBMM2_ALIGN", + "pbmm2", + "26.2.0" + ] + ] + } + ], + "timestamp": "2026-08-06T11:28:10.82763057", + "meta": { + "nf-test": "0.9.5", + "nextflow": "26.04.6" + } + }, + "pbmm2 - bam - fna - stub": { + "content": [ + { + "bam": [ + [ + { + "id": "test" + }, + "test.bam:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "versions_pbmm2": [ + [ + "PBMM2_ALIGN", + "pbmm2", + "26.2.0" + ] + ] + } + ], + "timestamp": "2026-08-06T11:28:15.998416537", + "meta": { + "nf-test": "0.9.5", + "nextflow": "26.04.6" + } + } +} \ No newline at end of file diff --git a/modules/nf-core/pbmm2/align/tests/main.nf.test.snap b/modules/nf-core/pbmm2/align/tests/main.nf.test.snap index 8250bd5826be..4ada87e2eb32 100644 --- a/modules/nf-core/pbmm2/align/tests/main.nf.test.snap +++ b/modules/nf-core/pbmm2/align/tests/main.nf.test.snap @@ -7,7 +7,7 @@ { "id": "test" }, - "test.bam:md5,f2be1fe20bbccf66afae237452e112cd" + "test.bam:md5,ccb989e67933259d6213ca6236b7971c" ] ], "versions_pbmm2": [ @@ -19,10 +19,10 @@ ] } ], - "timestamp": "2026-07-01T15:03:18.017362993", + "timestamp": "2026-07-31T11:02:25.18889907", "meta": { "nf-test": "0.9.5", - "nextflow": "26.03.4" + "nextflow": "26.04.6" } }, "pbmm2 - bam - stub": { From 36c4229ab5aa0f1dab4991093020862895902a06 Mon Sep 17 00:00:00 2001 From: stvdsomp <53609680+stvdsomp@users.noreply.github.com> Date: Thu, 6 Aug 2026 14:22:41 +0200 Subject: [PATCH 3/6] remove duplicate stub testing --- modules/nf-core/pbmm2/align/tests/fna.nf.test | 29 ------------------- .../pbmm2/align/tests/fna.nf.test.snap | 26 ----------------- 2 files changed, 55 deletions(-) diff --git a/modules/nf-core/pbmm2/align/tests/fna.nf.test b/modules/nf-core/pbmm2/align/tests/fna.nf.test index 1867219fec4e..3a81512116bd 100644 --- a/modules/nf-core/pbmm2/align/tests/fna.nf.test +++ b/modules/nf-core/pbmm2/align/tests/fna.nf.test @@ -35,33 +35,4 @@ nextflow_process { } - test("pbmm2 - bam - fna - stub") { - - options "-stub" - - when { - process { - """ - input[0] = [ - [ id:'test' ], // meta map - file(params.modules_testdata_base_path + 'genomics/homo_sapiens/pacbio/bam/NA03697B2_downsampled.pbmm2.repeats.bam', checkIfExists: true), - ] - - input[1] = [ - [ id:'test' ], // meta map - file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome3.fna', checkIfExists: true), - ] - """ - } - } - - then { - assertAll( - { assert process.success }, - { assert snapshot(sanitizeOutput(process.out)).match() } - ) - } - - } - } diff --git a/modules/nf-core/pbmm2/align/tests/fna.nf.test.snap b/modules/nf-core/pbmm2/align/tests/fna.nf.test.snap index 7df1b8b34817..c3c119baa59c 100644 --- a/modules/nf-core/pbmm2/align/tests/fna.nf.test.snap +++ b/modules/nf-core/pbmm2/align/tests/fna.nf.test.snap @@ -24,31 +24,5 @@ "nf-test": "0.9.5", "nextflow": "26.04.6" } - }, - "pbmm2 - bam - fna - stub": { - "content": [ - { - "bam": [ - [ - { - "id": "test" - }, - "test.bam:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "versions_pbmm2": [ - [ - "PBMM2_ALIGN", - "pbmm2", - "26.2.0" - ] - ] - } - ], - "timestamp": "2026-08-06T11:28:15.998416537", - "meta": { - "nf-test": "0.9.5", - "nextflow": "26.04.6" - } } } \ No newline at end of file From b1817eb4eb411bd2eb5ce49ff23945b5efd1219e Mon Sep 17 00:00:00 2001 From: stvdsomp <53609680+stvdsomp@users.noreply.github.com> Date: Wed, 26 Aug 2026 10:03:53 +0200 Subject: [PATCH 4/6] moved new test into main.nf.test file --- modules/nf-core/pbmm2/align/tests/fna.nf.test | 38 ------------------- .../pbmm2/align/tests/fna.nf.test.snap | 28 -------------- .../nf-core/pbmm2/align/tests/main.nf.test | 28 +++++++++++++- .../pbmm2/align/tests/main.nf.test.snap | 34 +++++++++++++++-- 4 files changed, 57 insertions(+), 71 deletions(-) delete mode 100644 modules/nf-core/pbmm2/align/tests/fna.nf.test delete mode 100644 modules/nf-core/pbmm2/align/tests/fna.nf.test.snap diff --git a/modules/nf-core/pbmm2/align/tests/fna.nf.test b/modules/nf-core/pbmm2/align/tests/fna.nf.test deleted file mode 100644 index 3a81512116bd..000000000000 --- a/modules/nf-core/pbmm2/align/tests/fna.nf.test +++ /dev/null @@ -1,38 +0,0 @@ -nextflow_process { - - name "Test Process PBMM2_ALIGN" - script "../main.nf" - process "PBMM2_ALIGN" - - tag "modules" - tag "modules_nfcore" - tag "pbmm2" - tag "pbmm2/align" - - test("pbmm2 - bam - fna") { - when { - process { - """ - input[0] = [ - [ id:'test' ], // meta map - file(params.modules_testdata_base_path + 'genomics/homo_sapiens/pacbio/bam/NA03697B2_downsampled.pbmm2.repeats.bam', checkIfExists: true), - ] - - input[1] = [ - [ id:'test' ], // meta map - file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome3.fna', checkIfExists: true), - ] - """ - } - } - - then { - assertAll( - { assert process.success }, - { assert snapshot(sanitizeOutput(process.out)).match() } - ) - } - - } - -} diff --git a/modules/nf-core/pbmm2/align/tests/fna.nf.test.snap b/modules/nf-core/pbmm2/align/tests/fna.nf.test.snap deleted file mode 100644 index c3c119baa59c..000000000000 --- a/modules/nf-core/pbmm2/align/tests/fna.nf.test.snap +++ /dev/null @@ -1,28 +0,0 @@ -{ - "pbmm2 - bam - fna": { - "content": [ - { - "bam": [ - [ - { - "id": "test" - }, - "test.bam:md5,f0f615a8a6172a739dfb81e6e08043f4" - ] - ], - "versions_pbmm2": [ - [ - "PBMM2_ALIGN", - "pbmm2", - "26.2.0" - ] - ] - } - ], - "timestamp": "2026-08-06T11:28:10.82763057", - "meta": { - "nf-test": "0.9.5", - "nextflow": "26.04.6" - } - } -} \ No newline at end of file diff --git a/modules/nf-core/pbmm2/align/tests/main.nf.test b/modules/nf-core/pbmm2/align/tests/main.nf.test index ba365d81af40..b00a64d11ee4 100644 --- a/modules/nf-core/pbmm2/align/tests/main.nf.test +++ b/modules/nf-core/pbmm2/align/tests/main.nf.test @@ -35,7 +35,33 @@ nextflow_process { } - test("pbmm2 - bam - stub") { + test("pbmm2 - bam - fna") { + when { + process { + """ + input[0] = [ + [ id:'test' ], // meta map + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/pacbio/bam/NA03697B2_downsampled.pbmm2.repeats.bam', checkIfExists: true), + ] + + input[1] = [ + [ id:'test' ], // meta map + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome3.fna', checkIfExists: true), + ] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(sanitizeOutput(process.out)).match() } + ) + } + + } + + test("pbmm2 - bam - stub") { options "-stub" diff --git a/modules/nf-core/pbmm2/align/tests/main.nf.test.snap b/modules/nf-core/pbmm2/align/tests/main.nf.test.snap index 4ada87e2eb32..55877ae9517e 100644 --- a/modules/nf-core/pbmm2/align/tests/main.nf.test.snap +++ b/modules/nf-core/pbmm2/align/tests/main.nf.test.snap @@ -19,13 +19,39 @@ ] } ], - "timestamp": "2026-07-31T11:02:25.18889907", + "timestamp": "2026-08-26T09:48:54.607506251", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.6" } }, - "pbmm2 - bam - stub": { + "pbmm2 - bam - fna": { + "content": [ + { + "bam": [ + [ + { + "id": "test" + }, + "test.bam:md5,f0f615a8a6172a739dfb81e6e08043f4" + ] + ], + "versions_pbmm2": [ + [ + "PBMM2_ALIGN", + "pbmm2", + "26.2.0" + ] + ] + } + ], + "timestamp": "2026-08-26T09:49:01.229592637", + "meta": { + "nf-test": "0.9.5", + "nextflow": "26.04.6" + } + }, + "pbmm2 - bam - stub": { "content": [ { "bam": [ @@ -45,10 +71,10 @@ ] } ], - "timestamp": "2026-07-01T15:03:21.711112389", + "timestamp": "2026-08-26T09:49:08.199180076", "meta": { "nf-test": "0.9.5", - "nextflow": "26.03.4" + "nextflow": "26.04.6" } } } \ No newline at end of file From d2f598d69eba9d4f4f83f01903597f80ccb78d30 Mon Sep 17 00:00:00 2001 From: stvdsomp <53609680+stvdsomp@users.noreply.github.com> Date: Wed, 26 Aug 2026 10:14:19 +0200 Subject: [PATCH 5/6] remove whitespace --- modules/nf-core/pbmm2/align/tests/main.nf.test | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/nf-core/pbmm2/align/tests/main.nf.test b/modules/nf-core/pbmm2/align/tests/main.nf.test index a6b57ce7ab53..5fac28d120dc 100644 --- a/modules/nf-core/pbmm2/align/tests/main.nf.test +++ b/modules/nf-core/pbmm2/align/tests/main.nf.test @@ -62,7 +62,7 @@ nextflow_process { } } - + test("pbmm2 - bam - stub") { options "-stub" From f8fc92ab5f00fb500d2ac9dc2fbf9e4a7612a934 Mon Sep 17 00:00:00 2001 From: stvdsomp <53609680+stvdsomp@users.noreply.github.com> Date: Wed, 26 Aug 2026 11:20:17 +0200 Subject: [PATCH 6/6] update pbmm2 tests --- .../pbmm2/align/tests/main.nf.test.snap | 24 +++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/modules/nf-core/pbmm2/align/tests/main.nf.test.snap b/modules/nf-core/pbmm2/align/tests/main.nf.test.snap index c7889cc5b9b0..4b465725fe36 100644 --- a/modules/nf-core/pbmm2/align/tests/main.nf.test.snap +++ b/modules/nf-core/pbmm2/align/tests/main.nf.test.snap @@ -7,7 +7,15 @@ { "id": "test" }, - "test.bam:md5,ccb989e67933259d6213ca6236b7971c" + "test.bam:md5,21fde9abeef32bf602d7e07521d6dd58" + ] + ], + "index": [ + [ + { + "id": "test" + }, + "test.bam.bai:md5,d19601b196d069d281c0280bbb6dda6f" ] ], "versions_pbmm2": [ @@ -19,7 +27,7 @@ ] } ], - "timestamp": "2026-08-26T09:48:54.607506251", + "timestamp": "2026-08-26T11:17:08.217985366", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.6" @@ -33,7 +41,15 @@ { "id": "test" }, - "test.bam:md5,f0f615a8a6172a739dfb81e6e08043f4" + "test.bam:md5,85fc597755dd2aca64e9141248fac2e0" + ] + ], + "index": [ + [ + { + "id": "test" + }, + "test.bam.bai:md5,d19601b196d069d281c0280bbb6dda6f" ] ], "versions_pbmm2": [ @@ -45,7 +61,7 @@ ] } ], - "timestamp": "2026-08-26T09:49:01.229592637", + "timestamp": "2026-08-26T11:17:26.093538311", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.6"