From 1427e8c877fac89c5d9cff4ce66830d31fbc94d9 Mon Sep 17 00:00:00 2001 From: LouisLeNezet Date: Mon, 11 May 2026 21:59:01 +0200 Subject: [PATCH] Update to topics --- modules/nf-core/graphmap2/align/main.nf | 22 ++----- modules/nf-core/graphmap2/align/meta.yml | 32 +++++++--- .../graphmap2/align/tests/main.nf.test | 15 ++--- .../graphmap2/align/tests/main.nf.test.snap | 59 ++++++++++--------- modules/nf-core/graphmap2/index/main.nf | 20 ++----- modules/nf-core/graphmap2/index/meta.yml | 32 +++++++--- .../graphmap2/index/tests/main.nf.test | 6 +- .../graphmap2/index/tests/main.nf.test.snap | 44 +++++++------- 8 files changed, 115 insertions(+), 115 deletions(-) diff --git a/modules/nf-core/graphmap2/align/main.nf b/modules/nf-core/graphmap2/align/main.nf index cc9fded6d27b..8ff7b10d1d1a 100644 --- a/modules/nf-core/graphmap2/align/main.nf +++ b/modules/nf-core/graphmap2/align/main.nf @@ -15,7 +15,7 @@ process GRAPHMAP2_ALIGN { output: tuple val(meta), path("*.sam"), emit: sam - path "versions.yml" , emit: versions + tuple val("${task.process}"), val('graphmap2'), eval("graphmap2 2>&1 | sed -n 's/Version: v//p'"), emit: versions_graphmap2, topic: versions when: task.ext.when == null || task.ext.when @@ -26,17 +26,12 @@ process GRAPHMAP2_ALIGN { """ graphmap2 \\ align \\ - -t $task.cpus \\ - -r $fasta \\ - -i $index \\ - -d $reads \\ + -t ${task.cpus} \\ + -r ${fasta} \\ + -i ${index} \\ + -d ${reads} \\ -o ${prefix}.sam \\ - $args - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - graphmap2: \$(echo \$(graphmap2 align 2>&1) | sed 's/^.*Version: v//; s/ .*\$//') - END_VERSIONS + ${args} """ stub: @@ -44,11 +39,6 @@ process GRAPHMAP2_ALIGN { """ touch ${prefix}.sam - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - graphmap2: \$(echo \$(graphmap2 align 2>&1) | sed 's/^.*Version: v//; s/ .*\$//') - END_VERSIONS """ } diff --git a/modules/nf-core/graphmap2/align/meta.yml b/modules/nf-core/graphmap2/align/meta.yml index 96d6ba5fce9b..936be7d39471 100644 --- a/modules/nf-core/graphmap2/align/meta.yml +++ b/modules/nf-core/graphmap2/align/meta.yml @@ -1,5 +1,6 @@ name: graphmap2_align -description: A versatile pairwise aligner for genomic and spliced nucleotide sequences +description: A versatile pairwise aligner for genomic and spliced nucleotide + sequences keywords: - align - fasta @@ -12,7 +13,8 @@ tools: A versatile pairwise aligner for genomic and spliced nucleotide sequences. homepage: https://github.com/lbcb-sci/graphmap2 documentation: https://github.com/lbcb-sci/graphmap2#graphmap2---a-highly-sensitive-and-accurate-mapper-for-long-error-prone-reads - licence: ["MIT"] + licence: + - "MIT" identifier: biotools:Graphmap2 input: - - meta: @@ -46,13 +48,27 @@ output: description: Alignment in SAM format pattern: "*.sam" ontologies: [] + versions_graphmap2: + - - ${task.process}: + type: string + description: The name of the process + - graphmap2: + type: string + description: The name of the tool + - "graphmap2 2>&1 | sed -n 's/Version: v//p'": + 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 + - graphmap2: + type: string + description: The name of the tool + - "graphmap2 2>&1 | sed -n 's/Version: v//p'": + type: eval + description: The expression to obtain the version of the tool authors: - "@yuukiiwa" - "@drpatelh" diff --git a/modules/nf-core/graphmap2/align/tests/main.nf.test b/modules/nf-core/graphmap2/align/tests/main.nf.test index 22f32c503abe..bf6b1b3303b8 100644 --- a/modules/nf-core/graphmap2/align/tests/main.nf.test +++ b/modules/nf-core/graphmap2/align/tests/main.nf.test @@ -30,7 +30,7 @@ nextflow_process { """ input[0] = [ [id:'test'], - [file(params.modules_testdata_base_path + 'genomics/sarscov2/nanopore/fastq/test.fastq.gz', checkIfExists:true)] + file(params.modules_testdata_base_path + 'genomics/sarscov2/nanopore/fastq/test.fastq.gz', checkIfExists:true) ] input[1] = file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists:true) input[2] = GRAPHMAP2_INDEX.out.index @@ -40,11 +40,7 @@ nextflow_process { then { assertAll( { assert process.success }, - { assert snapshot( - process.out.versions, - // sam(process.out.sam[0][1]).getSamLinesMD5() htsjdk.samtools.SAMFormatException: Error parsing text SAM file. MAPQ must be zero if RNAME is not specified - file(process.out.sam[0][1]).name - ).match() } + { assert snapshot(sanitizeOutput(process.out, unstableKeys: ["sam"])).match() } ) } } @@ -57,7 +53,7 @@ nextflow_process { """ input[0] = [ [id:'test'], - [file(params.modules_testdata_base_path + 'genomics/sarscov2/nanopore/fastq/test.fastq.gz', checkIfExists:true)] + file(params.modules_testdata_base_path + 'genomics/sarscov2/nanopore/fastq/test.fastq.gz', checkIfExists:true) ] input[1] = file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists:true) input[2] = GRAPHMAP2_INDEX.out.index @@ -67,10 +63,7 @@ nextflow_process { then { assertAll( { assert process.success }, - { assert snapshot( - process.out, - path(process.out.versions[0]).yaml - ).match() } + { assert snapshot(sanitizeOutput(process.out)).match() } ) } } diff --git a/modules/nf-core/graphmap2/align/tests/main.nf.test.snap b/modules/nf-core/graphmap2/align/tests/main.nf.test.snap index fafd6a40782a..fef7b7bdbb28 100644 --- a/modules/nf-core/graphmap2/align/tests/main.nf.test.snap +++ b/modules/nf-core/graphmap2/align/tests/main.nf.test.snap @@ -2,7 +2,7 @@ "sarscov2 - fastq - fasta - index -- stub": { "content": [ { - "0": [ + "sam": [ [ { "id": "test" @@ -10,44 +10,45 @@ "test.sam:md5,d41d8cd98f00b204e9800998ecf8427e" ] ], - "1": [ - "versions.yml:md5,0c397959d073e21ab58ceed89978f8bb" - ], - "sam": [ + "versions_graphmap2": [ [ - { - "id": "test" - }, - "test.sam:md5,d41d8cd98f00b204e9800998ecf8427e" + "GRAPHMAP2_ALIGN", + "graphmap2", + "0.6.3" ] - ], - "versions": [ - "versions.yml:md5,0c397959d073e21ab58ceed89978f8bb" ] - }, - { - "GRAPHMAP2_ALIGN": { - "graphmap2": "0.6.3" - } } ], + "timestamp": "2026-05-11T21:53:33.81849412", "meta": { - "nf-test": "0.9.2", - "nextflow": "24.10.5" - }, - "timestamp": "2025-04-14T11:52:49.613989705" + "nf-test": "0.9.5", + "nextflow": "26.03.2" + } }, "sarscov2 - fastq - fasta - index": { "content": [ - [ - "versions.yml:md5,0c397959d073e21ab58ceed89978f8bb" - ], - "test.sam" + { + "sam": [ + [ + { + "id": "test" + }, + "test.sam" + ] + ], + "versions_graphmap2": [ + [ + "GRAPHMAP2_ALIGN", + "graphmap2", + "0.6.3" + ] + ] + } ], + "timestamp": "2026-05-11T21:53:19.638775357", "meta": { - "nf-test": "0.9.2", - "nextflow": "24.10.5" - }, - "timestamp": "2025-04-14T11:52:41.96001224" + "nf-test": "0.9.5", + "nextflow": "26.03.2" + } } } \ No newline at end of file diff --git a/modules/nf-core/graphmap2/index/main.nf b/modules/nf-core/graphmap2/index/main.nf index d7dc240de2aa..ccc82d404e9d 100644 --- a/modules/nf-core/graphmap2/index/main.nf +++ b/modules/nf-core/graphmap2/index/main.nf @@ -10,8 +10,8 @@ process GRAPHMAP2_INDEX { path fasta output: - path "*.gmidx" , emit: index - path "versions.yml" , emit: versions + path "*.gmidx", emit: index + tuple val("${task.process}"), val('graphmap2'), eval("graphmap2 2>&1 | sed -n 's/Version: v//p'"), emit: versions_graphmap2, topic: versions when: task.ext.when == null || task.ext.when @@ -21,25 +21,15 @@ process GRAPHMAP2_INDEX { """ graphmap2 \\ align \\ - -t $task.cpus \\ + -t ${task.cpus} \\ -I \\ - $args \\ - -r $fasta - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - graphmap2: \$(echo \$(graphmap2 align 2>&1) | sed 's/^.*Version: v//; s/ .*\$//') - END_VERSIONS + ${args} \\ + -r ${fasta} """ stub: """ touch ${fasta}.gmidx - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - graphmap2: \$(echo \$(graphmap2 align 2>&1) | sed 's/^.*Version: v//; s/ .*\$//') - END_VERSIONS """ } diff --git a/modules/nf-core/graphmap2/index/meta.yml b/modules/nf-core/graphmap2/index/meta.yml index b776e5804dd1..c1c9b3f96683 100644 --- a/modules/nf-core/graphmap2/index/meta.yml +++ b/modules/nf-core/graphmap2/index/meta.yml @@ -1,5 +1,6 @@ name: graphmap2_index -description: A versatile pairwise aligner for genomic and spliced nucleotide sequences +description: A versatile pairwise aligner for genomic and spliced nucleotide + sequences keywords: - index - fasta @@ -10,7 +11,8 @@ tools: A versatile pairwise aligner for genomic and spliced nucleotide sequences. homepage: https://github.com/lbcb-sci/graphmap2 documentation: https://github.com/lbcb-sci/graphmap2#graphmap2---a-highly-sensitive-and-accurate-mapper-for-long-error-prone-reads - licence: ["MIT"] + licence: + - "MIT" identifier: biotools:Graphmap2 input: - fasta: @@ -25,13 +27,27 @@ output: description: Index file in gmidx format pattern: "*.gmidx" ontologies: [] + versions_graphmap2: + - - ${task.process}: + type: string + description: The name of the process + - graphmap2: + type: string + description: The name of the tool + - "graphmap2 2>&1 | sed -n 's/Version: v//p'": + 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 + - graphmap2: + type: string + description: The name of the tool + - "graphmap2 2>&1 | sed -n 's/Version: v//p'": + type: eval + description: The expression to obtain the version of the tool authors: - "@yuukiiwa" - "@drpatelh" diff --git a/modules/nf-core/graphmap2/index/tests/main.nf.test b/modules/nf-core/graphmap2/index/tests/main.nf.test index c2280f4b8470..07ed8b1aca83 100644 --- a/modules/nf-core/graphmap2/index/tests/main.nf.test +++ b/modules/nf-core/graphmap2/index/tests/main.nf.test @@ -16,7 +16,6 @@ nextflow_process { process { """ input[0] = file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true) - """ } } @@ -24,7 +23,7 @@ nextflow_process { then { assertAll( { assert process.success }, - { assert snapshot(process.out).match() } + { assert snapshot(sanitizeOutput(process.out)).match() } ) } } @@ -36,7 +35,6 @@ nextflow_process { process { """ input[0] = file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true) - """ } } @@ -44,7 +42,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/graphmap2/index/tests/main.nf.test.snap b/modules/nf-core/graphmap2/index/tests/main.nf.test.snap index f2a1bd4913e2..73b89bec21e1 100644 --- a/modules/nf-core/graphmap2/index/tests/main.nf.test.snap +++ b/modules/nf-core/graphmap2/index/tests/main.nf.test.snap @@ -2,47 +2,43 @@ "test-graphmap2-index": { "content": [ { - "0": [ - "genome.fasta.gmidx:md5,2973f9b7fa52c78899c73908f8afc6be" - ], - "1": [ - "versions.yml:md5,5ed117fba7781f80accc26514884422b" - ], "index": [ "genome.fasta.gmidx:md5,2973f9b7fa52c78899c73908f8afc6be" ], - "versions": [ - "versions.yml:md5,5ed117fba7781f80accc26514884422b" + "versions_graphmap2": [ + [ + "GRAPHMAP2_INDEX", + "graphmap2", + "0.6.3" + ] ] } ], + "timestamp": "2026-05-11T21:53:42.106618858", "meta": { - "nf-test": "0.9.0", - "nextflow": "24.04.4" - }, - "timestamp": "2024-09-02T13:27:09.356592" + "nf-test": "0.9.5", + "nextflow": "26.03.2" + } }, "test-graphmap2-index-stub": { "content": [ { - "0": [ - "genome.fasta.gmidx:md5,d41d8cd98f00b204e9800998ecf8427e" - ], - "1": [ - "versions.yml:md5,5ed117fba7781f80accc26514884422b" - ], "index": [ "genome.fasta.gmidx:md5,d41d8cd98f00b204e9800998ecf8427e" ], - "versions": [ - "versions.yml:md5,5ed117fba7781f80accc26514884422b" + "versions_graphmap2": [ + [ + "GRAPHMAP2_INDEX", + "graphmap2", + "0.6.3" + ] ] } ], + "timestamp": "2026-05-11T21:53:50.425418781", "meta": { - "nf-test": "0.9.0", - "nextflow": "24.04.4" - }, - "timestamp": "2024-09-02T13:28:12.316661" + "nf-test": "0.9.5", + "nextflow": "26.03.2" + } } } \ No newline at end of file