diff --git a/modules/nf-core/porechop/abi/main.nf b/modules/nf-core/porechop/abi/main.nf index b80c9ce101e3..367f5579a401 100644 --- a/modules/nf-core/porechop/abi/main.nf +++ b/modules/nf-core/porechop/abi/main.nf @@ -13,8 +13,8 @@ process PORECHOP_ABI { output: tuple val(meta), path("*.fastq.gz"), emit: reads - tuple val(meta), path("*.log"), emit: log - path "versions.yml", emit: versions + tuple val(meta), path("*.log") , emit: log + tuple val("${task.process}"), val('porechop_abi'), eval("porechop_abi --version"), topic: versions, emit: versions_porechop_abi when: task.ext.when == null || task.ext.when @@ -34,10 +34,6 @@ process PORECHOP_ABI { ${args} \\ --output ${prefix}.fastq.gz \\ | tee ${prefix}.log - cat <<-END_VERSIONS > versions.yml - "${task.process}": - porechop_abi: \$( porechop_abi --version ) - END_VERSIONS """ stub: @@ -45,10 +41,5 @@ process PORECHOP_ABI { """ echo "" | gzip > ${prefix}.fastq.gz touch ${prefix}.log - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - porechop_abi: \$( porechop_abi --version ) - END_VERSIONS """ } diff --git a/modules/nf-core/porechop/abi/meta.yml b/modules/nf-core/porechop/abi/meta.yml index 276000ee73cf..cabee5b59464 100644 --- a/modules/nf-core/porechop/abi/meta.yml +++ b/modules/nf-core/porechop/abi/meta.yml @@ -1,19 +1,18 @@ name: "porechop_abi" -description: Extension of Porechop whose purpose is to process adapter sequences in - ONT reads. +description: Extension of Porechop whose purpose is to process adapter sequences in ONT reads. keywords: - porechop_abi - adapter - nanopore tools: - "porechop_abi": - description: Extension of Porechop whose purpose is to process adapter sequences - in ONT reads. + description: Extension of Porechop whose purpose is to process adapter sequences in ONT reads. homepage: "https://github.com/bonsai-team/Porechop_ABI" documentation: "https://github.com/bonsai-team/Porechop_ABI" tool_dev_url: "https://github.com/bonsai-team/Porechop_ABI" doi: "10.1101/2022.07.07.499093" - licence: ["MIT"] + licence: + - "MIT" identifier: "" input: - - meta: @@ -56,13 +55,29 @@ output: description: Log file containing stdout information pattern: "*.log" ontologies: [] + versions_porechop_abi: + - - ${task.process}: + type: string + description: The name of the process + - porechop_abi: + type: string + description: The name of the tool + - porechop_abi --version: + type: eval + description: The expression to obtain the version of the tool + +topics: versions: - - versions.yml: - type: file - description: File containing software versions - pattern: "versions.yml" - ontologies: - - edam: http://edamontology.org/format_3750 # YAML + - - ${task.process}: + type: string + description: The name of the process + - porechop_abi: + type: string + description: The name of the tool + - porechop_abi --version: + type: eval + description: The expression to obtain the version of the tool + authors: - "@sofstam" - "LilyAnderssonLee" diff --git a/modules/nf-core/porechop/abi/tests/main.nf.test b/modules/nf-core/porechop/abi/tests/main.nf.test index 23e34d7de4a0..f3486c393272 100644 --- a/modules/nf-core/porechop/abi/tests/main.nf.test +++ b/modules/nf-core/porechop/abi/tests/main.nf.test @@ -14,10 +14,10 @@ nextflow_process { process { """ input[0] = [ - [ id:'test'], // meta map + [ id:'test'], file(params.modules_testdata_base_path + 'genomics/sarscov2/nanopore/fastq/test.fastq.gz', checkIfExists: true) ] - input[1] = [] + input[1] = [] """ } } @@ -25,28 +25,22 @@ nextflow_process { then { assertAll( { assert process.success }, - { assert snapshot( - process.out.reads, - file(process.out.log.get(0).get(1)).readLines()[20..40], - process.out.versions).match() - } + { assert snapshot(sanitizeOutput(process.out, unstableKeys:["log"])).match() } ) } } test("sarscov2-nanopore - stub") { - options "-stub" - when { process { """ input[0] = [ - [ id:'test'], // meta map + [ id:'test'], file(params.modules_testdata_base_path + 'genomics/sarscov2/nanopore/fastq/test.fastq.gz', checkIfExists: true) ] - input[1] = [] + input[1] = [] """ } } @@ -54,7 +48,7 @@ nextflow_process { then { assertAll( { assert process.success }, - { assert snapshot(process.out).match() } + { assert snapshot(sanitizeOutput(process.out)).match() } ) } } diff --git a/modules/nf-core/porechop/abi/tests/main.nf.test.snap b/modules/nf-core/porechop/abi/tests/main.nf.test.snap index 5fc4d0603df3..f2941a1be3d7 100644 --- a/modules/nf-core/porechop/abi/tests/main.nf.test.snap +++ b/modules/nf-core/porechop/abi/tests/main.nf.test.snap @@ -1,69 +1,41 @@ { "sarscov2-nanopore": { - "content": [ - [ - [ - { - "id": "test" - }, - "test.porechop_abi.fastq.gz:md5,886fdb859fb50e0dddd35007bcff043e" - ] - ], - [ - " Best \u001b[0m", - " read Best \u001b[0m", - " start read end\u001b[0m", - " \u001b[4mSet %ID %ID \u001b[0m", - " \u001b[32mSQK-NSK007 100.0 73.1\u001b[0m", - " Rapid 40.4 0.0", - " RBK004_upstream 77.5 0.0", - " SQK-MAP006 75.8 72.7", - " SQK-MAP006 short 65.5 66.7", - " PCR adapters 1 73.9 69.6", - " PCR adapters 2 80.0 72.7", - " PCR adapters 3 70.8 69.6", - " 1D^2 part 1 71.4 70.0", - " 1D^2 part 2 84.8 75.8", - " cDNA SSP 63.0 61.7", - " \u001b[32mBarcode 1 (reverse) 100.0 100.0\u001b[0m", - " Barcode 2 (reverse) 70.8 69.2", - " Barcode 3 (reverse) 76.0 70.4", - " Barcode 4 (reverse) 74.1 71.4", - " Barcode 5 (reverse) 77.8 80.8", - " Barcode 6 (reverse) 73.1 70.8" - ], - [ - "versions.yml:md5,0e9e5e0d35a68ff8e6490c949b257f98" - ] - ], - "meta": { - "nf-test": "0.9.2", - "nextflow": "24.10.5" - }, - "timestamp": "2025-04-10T10:27:24.536642628" - }, - "sarscov2-nanopore - stub": { "content": [ { - "0": [ + "log": [ [ { "id": "test" }, - "test.porechop_abi.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + "test.porechop_abi.log" ] ], - "1": [ + "reads": [ [ { "id": "test" }, - "test.porechop_abi.log:md5,d41d8cd98f00b204e9800998ecf8427e" + "test.porechop_abi.fastq.gz:md5,886fdb859fb50e0dddd35007bcff043e" ] ], - "2": [ - "versions.yml:md5,0e9e5e0d35a68ff8e6490c949b257f98" - ], + "versions_porechop_abi": [ + [ + "PORECHOP_ABI", + "porechop_abi", + "0.5.0" + ] + ] + } + ], + "timestamp": "2026-08-06T17:59:25.403246301", + "meta": { + "nf-test": "0.9.5", + "nextflow": "26.04.6" + } + }, + "sarscov2-nanopore - stub": { + "content": [ + { "log": [ [ { @@ -80,15 +52,19 @@ "test.porechop_abi.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" ] ], - "versions": [ - "versions.yml:md5,0e9e5e0d35a68ff8e6490c949b257f98" + "versions_porechop_abi": [ + [ + "PORECHOP_ABI", + "porechop_abi", + "0.5.0" + ] ] } ], + "timestamp": "2026-08-06T17:59:32.504538143", "meta": { - "nf-test": "0.9.2", - "nextflow": "24.10.5" - }, - "timestamp": "2025-04-10T10:27:30.502715737" + "nf-test": "0.9.5", + "nextflow": "26.04.6" + } } } \ No newline at end of file diff --git a/modules/nf-core/porechop/porechop/main.nf b/modules/nf-core/porechop/porechop/main.nf index bf035602f997..fe9fabd7c17e 100644 --- a/modules/nf-core/porechop/porechop/main.nf +++ b/modules/nf-core/porechop/porechop/main.nf @@ -7,14 +7,13 @@ process PORECHOP_PORECHOP { 'https://community-cr-prod.seqera.io/docker/registry/v2/blobs/sha256/2b/2bce1f10c51906a66c4c4d3a7485394f67e304177192ad1cce6cf586a3a18bae/data' : 'community.wave.seqera.io/library/porechop_pigz:d1655e5b5bad786c' }" - input: tuple val(meta), path(reads) output: tuple val(meta), path("*.fastq.gz"), emit: reads tuple val(meta), path("*.log") , emit: log - path "versions.yml" , emit: versions + tuple val("${task.process}"), val('porechop'), eval("porechop --version"), topic: versions, emit: versions_porechop when: task.ext.when == null || task.ext.when @@ -24,15 +23,11 @@ process PORECHOP_PORECHOP { def prefix = task.ext.prefix ?: "${meta.id}" """ porechop \\ - -i $reads \\ - -t $task.cpus \\ - $args \\ + -i ${reads} \\ + -t ${task.cpus} \\ + ${args} \\ -o ${prefix}.fastq.gz \\ > ${prefix}.log - cat <<-END_VERSIONS > versions.yml - "${task.process}": - porechop: \$( porechop --version ) - END_VERSIONS """ stub: @@ -41,9 +36,5 @@ process PORECHOP_PORECHOP { touch ${prefix}.fastq gzip ${prefix}.fastq touch ${prefix}.log - cat <<-END_VERSIONS > versions.yml - "${task.process}": - porechop: \$( porechop --version ) - END_VERSIONS """ } diff --git a/modules/nf-core/porechop/porechop/meta.yml b/modules/nf-core/porechop/porechop/meta.yml index 01f50a7e73f0..b91388f9ae1e 100644 --- a/modules/nf-core/porechop/porechop/meta.yml +++ b/modules/nf-core/porechop/porechop/meta.yml @@ -11,7 +11,8 @@ tools: documentation: "https://github.com/rrwick/Porechop" tool_dev_url: "https://github.com/rrwick/Porechop" doi: "10.1099/mgen.0.000132" - licence: ["GPL v3"] + licence: + - "GPL v3" identifier: "" input: - - meta: @@ -48,13 +49,29 @@ output: description: Log file containing stdout information pattern: "*.log" ontologies: [] + versions_porechop: + - - ${task.process}: + type: string + description: The name of the process + - porechop: + type: string + description: The name of the tool + - porechop --version: + type: eval + description: The expression to obtain the version of the tool + +topics: versions: - - versions.yml: - type: file - description: File containing software versions - pattern: "versions.yml" - ontologies: - - edam: http://edamontology.org/format_3750 # YAML + - - ${task.process}: + type: string + description: The name of the process + - porechop: + type: string + description: The name of the tool + - porechop --version: + type: eval + description: The expression to obtain the version of the tool + authors: - "@ggabernet" - "@jasmezz" diff --git a/modules/nf-core/porechop/porechop/tests/main.nf.test b/modules/nf-core/porechop/porechop/tests/main.nf.test index ed3f69865b0a..8a2b1b25adaa 100644 --- a/modules/nf-core/porechop/porechop/tests/main.nf.test +++ b/modules/nf-core/porechop/porechop/tests/main.nf.test @@ -16,7 +16,7 @@ nextflow_process { process { """ input[0] = [ - [ id:'test', single_end:true ], + [ id:'test' ], file(params.modules_testdata_base_path + 'genomics/sarscov2/nanopore/fastq/test.fastq.gz', checkIfExists: true) ] """ @@ -26,24 +26,19 @@ nextflow_process { then { assertAll( { assert process.success }, - { assert snapshot(process.out.reads).match("reads") }, - { assert snapshot(process.out.versions).match("versions") }, - // complete log is not stable. These first lines should be stable - { assert snapshot(path(process.out.log.get(0).get(1)).readLines()[0..7]).match("log")} + { assert snapshot(sanitizeOutput(process.out, unstableKeys:["log"])).match() } ) } - } - - test("stub") { + test("sarscov2 - nanopore - fastq -- stub") { options "-stub" - when { process { """ - input[0] = [ [ id:'test', single_end:true ], - [] + input[0] = [ + [ id:'test' ], + file(params.modules_testdata_base_path + 'genomics/sarscov2/nanopore/fastq/test.fastq.gz', checkIfExists: true) ] """ } @@ -52,11 +47,8 @@ nextflow_process { then { assertAll( { assert process.success }, - { assert snapshot(process.out).match() } + { assert snapshot(sanitizeOutput(process.out)).match() } ) } - } - - } diff --git a/modules/nf-core/porechop/porechop/tests/main.nf.test.snap b/modules/nf-core/porechop/porechop/tests/main.nf.test.snap index cf544d2db425..8ed36a5b1142 100644 --- a/modules/nf-core/porechop/porechop/tests/main.nf.test.snap +++ b/modules/nf-core/porechop/porechop/tests/main.nf.test.snap @@ -1,70 +1,45 @@ { - "versions": { - "content": [ - [ - "versions.yml:md5,712c0753b56d0fb530092dfb5bdf2e5c" - ] - ], - "timestamp": "2023-12-18T07:47:16.83444" - }, - "log": { - "content": [ - [ - "", - "\u001b[1m\u001b[4mLoading reads\u001b[0m", - "test.fastq.gz", - "100 reads loaded", - "", - "", - "\u001b[1m\u001b[4mLooking for known adapter sets\u001b[0m", - "" - ] - ], - "timestamp": "2023-12-18T07:47:16.853899" - }, - "reads": { - "content": [ - [ - [ - { - "id": "test", - "single_end": true - }, - "test_porechop.fastq.gz:md5,886fdb859fb50e0dddd35007bcff043e" - ] - ] - ], - "timestamp": "2023-12-18T07:47:16.811393" - }, - "stub": { + "sarscov2 - nanopore - fastq": { "content": [ { - "0": [ + "log": [ [ { - "id": "test", - "single_end": true + "id": "test" }, - "test_porechop.fastq.gz:md5,d41d8cd98f00b204e9800998ecf8427e" + "test_porechop.log" ] ], - "1": [ + "reads": [ [ { - "id": "test", - "single_end": true + "id": "test" }, - "test_porechop.log:md5,d41d8cd98f00b204e9800998ecf8427e" + "test_porechop.fastq.gz:md5,886fdb859fb50e0dddd35007bcff043e" ] ], - "2": [ - "versions.yml:md5,712c0753b56d0fb530092dfb5bdf2e5c" - ], + "versions_porechop": [ + [ + "PORECHOP_PORECHOP", + "porechop", + "0.2.4" + ] + ] + } + ], + "timestamp": "2026-08-06T17:59:42.244576518", + "meta": { + "nf-test": "0.9.5", + "nextflow": "26.04.6" + } + }, + "sarscov2 - nanopore - fastq -- stub": { + "content": [ + { "log": [ [ { - "id": "test", - "single_end": true + "id": "test" }, "test_porechop.log:md5,d41d8cd98f00b204e9800998ecf8427e" ] @@ -72,17 +47,24 @@ "reads": [ [ { - "id": "test", - "single_end": true + "id": "test" }, "test_porechop.fastq.gz:md5,d41d8cd98f00b204e9800998ecf8427e" ] ], - "versions": [ - "versions.yml:md5,712c0753b56d0fb530092dfb5bdf2e5c" + "versions_porechop": [ + [ + "PORECHOP_PORECHOP", + "porechop", + "0.2.4" + ] ] } ], - "timestamp": "2023-12-18T07:47:37.814949" + "timestamp": "2026-08-06T17:59:48.632879484", + "meta": { + "nf-test": "0.9.5", + "nextflow": "26.04.6" + } } } \ No newline at end of file diff --git a/modules/nf-core/porechop/porechop/tests/nextflow.config b/modules/nf-core/porechop/porechop/tests/nextflow.config index a9ecf7b6a693..b9fd091cabd9 100644 --- a/modules/nf-core/porechop/porechop/tests/nextflow.config +++ b/modules/nf-core/porechop/porechop/tests/nextflow.config @@ -1,9 +1,6 @@ process { - - withName: PORECHOP_PORECHOP { ext.args = '' ext.prefix = { "${meta.id}_porechop" } } - }