From 71586ed35f215fca806775587155a5edd4b915c0 Mon Sep 17 00:00:00 2001 From: EfraMP Date: Fri, 26 Jun 2026 16:47:50 -0600 Subject: [PATCH 1/2] Update module --- modules/nf-core/mirtrace/qc/main.nf | 34 ++++------- modules/nf-core/mirtrace/qc/meta.yml | 55 +++++++++++------- .../nf-core/mirtrace/qc/tests/main.nf.test | 5 +- .../mirtrace/qc/tests/main.nf.test.snap | 58 +++++++++---------- 4 files changed, 77 insertions(+), 75 deletions(-) diff --git a/modules/nf-core/mirtrace/qc/main.nf b/modules/nf-core/mirtrace/qc/main.nf index 20163f41f4e7..af0d706b18fd 100644 --- a/modules/nf-core/mirtrace/qc/main.nf +++ b/modules/nf-core/mirtrace/qc/main.nf @@ -1,29 +1,29 @@ process MIRTRACE_QC { - tag "$meta.id" + tag "${meta.id}" label 'process_medium' conda "${moduleDir}/environment.yml" - container "${ workflow.containerEngine in ['singularity', 'apptainer'] && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/mirtrace:1.0.1--0': - 'quay.io/biocontainers/mirtrace:1.0.1--0' }" + container "${workflow.containerEngine in ['singularity', 'apptainer'] && !task.ext.singularity_pull_docker_container + ? 'https://depot.galaxyproject.org/singularity/mirtrace:1.0.1--0' + : 'quay.io/biocontainers/mirtrace:1.0.1--0'}" input: tuple val(meta), path(reads), path(mirtrace_config) - val(mirtrace_species) + val mirtrace_species output: - tuple val(meta), path ("*.html") , emit: html - tuple val(meta), path ("*.json") , emit: json - tuple val(meta), path ("*.tsv") , emit: tsv - tuple val(meta), path ("qc_passed_reads.all.collapsed/*.{fa,fasta}") , emit: all_fa - tuple val(meta), path ("qc_passed_reads.rnatype_unknown.collapsed/*.{fa,fasta}") , emit: rnatype_unknown_fa - path "versions.yml" , emit: versions + tuple val(meta), path("*.html"), emit: html + tuple val(meta), path("*.json"), emit: json + tuple val(meta), path("*.tsv"), emit: tsv + tuple val(meta), path("qc_passed_reads.all.collapsed/*.{fa,fasta}"), emit: all_fa + tuple val(meta), path("qc_passed_reads.rnatype_unknown.collapsed/*.{fa,fasta}"), emit: rnatype_unknown_fa + tuple val("${task.process}"), val('mirtrace'), eval('mirtrace -v'), emit: versions_mirtrace, topic: versions when: task.ext.when == null || task.ext.when script: - def mirtrace_mode = mirtrace_config ? "--config ${mirtrace_config}": "${reads}" + def mirtrace_mode = mirtrace_config ? "--config ${mirtrace_config}" : "${reads}" """ mirtrace qc \\ @@ -32,11 +32,6 @@ process MIRTRACE_QC { --output-dir . \\ --force \\ ${mirtrace_mode} - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - mirtrace: \$(echo \$(mirtrace -v)) - END_VERSIONS """ stub: @@ -52,10 +47,5 @@ process MIRTRACE_QC { touch qc_passed_reads.all.collapsed/${prefix}.fa touch qc_passed_reads.rnatype_unknown.collapsed/${prefix}.fa - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - mirtrace: \$(echo \$(mirtrace -v)) - END_VERSIONS """ } diff --git a/modules/nf-core/mirtrace/qc/meta.yml b/modules/nf-core/mirtrace/qc/meta.yml index f9eddd5189fa..4b7a99058aaa 100644 --- a/modules/nf-core/mirtrace/qc/meta.yml +++ b/modules/nf-core/mirtrace/qc/meta.yml @@ -1,4 +1,3 @@ -# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/meta-schema.json name: "mirtrace_qc" description: "A tool for quality control and tracing taxonomic origins of microRNA sequencing data" @@ -23,9 +22,9 @@ tools: documentation: "https://github.com/friedlanderlab/mirtrace/blob/master/release-bundle-includes/doc/manual/mirtrace_manual.pdf" tool_dev_url: "https://github.com/friedlanderlab/mirtrace/tree/master" doi: "10.1186/s13059-018-1588-9" - licence: ["GPL v2"] + licence: + - "GPL v2" identifier: biotools:miRTrace - input: - - meta: type: map @@ -37,17 +36,17 @@ input: description: microRNA sequencing data pattern: "*.{fastq,fastq.gz}" ontologies: - - edam: http://edamontology.org/format_1930 # FASTQ + - edam: http://edamontology.org/format_1930 - mirtrace_config: type: file - description: (Optional) CSV with list of FASTQ files to process with one entry - per row. No headers. Each row consists of the following columns "FASTQ file - path, id, adapter, PHRED-ASCII-offset". + description: (Optional) CSV with list of FASTQ files to process with one + entry per row. No headers. Each row consists of the following columns + "FASTQ file path, id, adapter, PHRED-ASCII-offset". ontologies: [] - mirtrace_species: type: string - description: Target species in microRNA sequencing data (miRbase encoding, e.g. - “hsa” for Homo sapiens) + description: Target species in microRNA sequencing data (miRbase encoding, + e.g. “hsa” for Homo sapiens) output: html: - - meta: @@ -71,7 +70,7 @@ output: description: JSON file pattern: "*.{json}" ontologies: - - edam: http://edamontology.org/format_3464 # JSON + - edam: http://edamontology.org/format_3464 tsv: - - meta: type: map @@ -83,7 +82,7 @@ output: description: TSV file pattern: "*.{tsv}" ontologies: - - edam: http://edamontology.org/format_3475 # TSV + - edam: http://edamontology.org/format_3475 all_fa: - - meta: type: map @@ -92,8 +91,8 @@ output: e.g. `[ id:'sample1', single_end:false ]` - qc_passed_reads.all.collapsed/*.{fa,fasta}: type: file - description: QC-passed reads in FASTA file. Identical reads are collapsed. - Entries are sorted by abundance. + description: QC-passed reads in FASTA file. Identical reads are + collapsed. Entries are sorted by abundance. pattern: "*.{fa,fasta}" ontologies: [] rnatype_unknown_fa: @@ -104,17 +103,31 @@ output: e.g. `[ id:'sample1', single_end:false ]` - qc_passed_reads.rnatype_unknown.collapsed/*.{fa,fasta}: type: file - description: Unknown RNA type QC-passed reads in FASTA file. Identical reads - are collapsed. Entries are sorted by abundance. + description: Unknown RNA type QC-passed reads in FASTA file. Identical + reads are collapsed. Entries are sorted by abundance. pattern: "*.{fa,fasta}" ontologies: [] + versions_mirtrace: + - - ${task.process}: + type: string + description: The name of the process + - mirtrace: + type: string + description: The name of the tool + - mirtrace -v: + 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 + - mirtrace: + type: string + description: The name of the tool + - mirtrace -v: + type: eval + description: The expression to obtain the version of the tool authors: - "@atrigila" maintainers: diff --git a/modules/nf-core/mirtrace/qc/tests/main.nf.test b/modules/nf-core/mirtrace/qc/tests/main.nf.test index d0ef1c7b3bd0..83dccd4340d3 100644 --- a/modules/nf-core/mirtrace/qc/tests/main.nf.test +++ b/modules/nf-core/mirtrace/qc/tests/main.nf.test @@ -44,7 +44,7 @@ nextflow_process { { assert snapshot(process.out.all_fa).match("all_fa") }, // Check versions - { assert snapshot(process.out.versions).match("versions") } + { assert snapshot(process.out.findAll { key, val -> key.startsWith('versions') }) }, ) } @@ -121,6 +121,9 @@ nextflow_process { { assert snapshot(process.out.rnatype_unknown_fa).match("rnatype_unknown_fa_config") }, { assert snapshot(process.out.all_fa).match("all_fa_config") }, + // Check versions + { assert snapshot(process.out.findAll { key, val -> key.startsWith('versions') }) }, + ) } diff --git a/modules/nf-core/mirtrace/qc/tests/main.nf.test.snap b/modules/nf-core/mirtrace/qc/tests/main.nf.test.snap index 3f5593b73a13..7619d7881440 100644 --- a/modules/nf-core/mirtrace/qc/tests/main.nf.test.snap +++ b/modules/nf-core/mirtrace/qc/tests/main.nf.test.snap @@ -10,11 +10,11 @@ ] ] ], + "timestamp": "2024-09-10T18:35:10.022991825", "meta": { "nf-test": "0.9.0", "nextflow": "24.04.4" - }, - "timestamp": "2024-09-10T18:35:10.022991825" + } }, "all_fa": { "content": [ @@ -28,23 +28,11 @@ ] ] ], + "timestamp": "2024-09-10T18:33:02.971744888", "meta": { "nf-test": "0.9.0", "nextflow": "24.04.4" - }, - "timestamp": "2024-09-10T18:33:02.971744888" - }, - "versions": { - "content": [ - [ - "versions.yml:md5,b50529beb497fc9882232140b636d9ce" - ] - ], - "meta": { - "nf-test": "0.9.0", - "nextflow": "24.04.4" - }, - "timestamp": "2024-09-02T14:00:50.712738593" + } }, "tsv_config": { "content": [ @@ -65,11 +53,11 @@ ] ] ], + "timestamp": "2024-09-10T18:35:09.99291948", "meta": { "nf-test": "0.9.0", "nextflow": "24.04.4" - }, - "timestamp": "2024-09-10T18:35:09.99291948" + } }, "tsv": { "content": [ @@ -91,11 +79,11 @@ ] ] ], + "timestamp": "2024-09-10T18:33:02.856967195", "meta": { "nf-test": "0.9.0", "nextflow": "24.04.4" - }, - "timestamp": "2024-09-10T18:33:02.856967195" + } }, "rnatype_unknown_fa_config": { "content": [ @@ -108,11 +96,11 @@ ] ] ], + "timestamp": "2024-09-10T18:35:10.010723637", "meta": { "nf-test": "0.9.0", "nextflow": "24.04.4" - }, - "timestamp": "2024-09-10T18:35:10.010723637" + } }, "human - fastq - stub": { "content": [ @@ -163,7 +151,11 @@ ] ], "5": [ - "versions.yml:md5,b50529beb497fc9882232140b636d9ce" + [ + "MIRTRACE_QC", + "mirtrace", + "1.0.1" + ] ], "all_fa": [ [ @@ -210,16 +202,20 @@ "test.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" ] ], - "versions": [ - "versions.yml:md5,b50529beb497fc9882232140b636d9ce" + "versions_mirtrace": [ + [ + "MIRTRACE_QC", + "mirtrace", + "1.0.1" + ] ] } ], + "timestamp": "2026-06-26T16:40:20.531125", "meta": { - "nf-test": "0.9.0", - "nextflow": "24.04.4" - }, - "timestamp": "2024-09-02T13:43:42.209949119" + "nf-test": "0.9.4", + "nextflow": "26.04.1" + } }, "rnatype_unknown_fa": { "content": [ @@ -233,10 +229,10 @@ ] ] ], + "timestamp": "2024-09-10T18:33:02.917439516", "meta": { "nf-test": "0.9.0", "nextflow": "24.04.4" - }, - "timestamp": "2024-09-10T18:33:02.917439516" + } } } \ No newline at end of file From 91c1b8f40a41a1c9fe4930f40f69e603e90e212f Mon Sep 17 00:00:00 2001 From: EfraMP Date: Fri, 26 Jun 2026 17:04:47 -0600 Subject: [PATCH 2/2] Solve bug --- .../nf-core/mirtrace/qc/tests/main.nf.test | 4 +-- .../mirtrace/qc/tests/main.nf.test.snap | 36 +++++++++++++++++++ 2 files changed, 38 insertions(+), 2 deletions(-) diff --git a/modules/nf-core/mirtrace/qc/tests/main.nf.test b/modules/nf-core/mirtrace/qc/tests/main.nf.test index 83dccd4340d3..a9ca18c33233 100644 --- a/modules/nf-core/mirtrace/qc/tests/main.nf.test +++ b/modules/nf-core/mirtrace/qc/tests/main.nf.test @@ -44,7 +44,7 @@ nextflow_process { { assert snapshot(process.out.all_fa).match("all_fa") }, // Check versions - { assert snapshot(process.out.findAll { key, val -> key.startsWith('versions') }) }, + { assert snapshot(process.out.findAll { key, val -> key.startsWith('versions') }).match("versions") }, ) } @@ -122,7 +122,7 @@ nextflow_process { { assert snapshot(process.out.all_fa).match("all_fa_config") }, // Check versions - { assert snapshot(process.out.findAll { key, val -> key.startsWith('versions') }) }, + { assert snapshot(process.out.findAll { key, val -> key.startsWith('versions') }).match("versions_config") }, ) } diff --git a/modules/nf-core/mirtrace/qc/tests/main.nf.test.snap b/modules/nf-core/mirtrace/qc/tests/main.nf.test.snap index 7619d7881440..1726fa5ae45d 100644 --- a/modules/nf-core/mirtrace/qc/tests/main.nf.test.snap +++ b/modules/nf-core/mirtrace/qc/tests/main.nf.test.snap @@ -59,6 +59,24 @@ "nextflow": "24.04.4" } }, + "versions": { + "content": [ + { + "versions_mirtrace": [ + [ + "MIRTRACE_QC", + "mirtrace", + "1.0.1" + ] + ] + } + ], + "timestamp": "2026-06-26T17:01:42.471329", + "meta": { + "nf-test": "0.9.4", + "nextflow": "26.04.1" + } + }, "tsv": { "content": [ [ @@ -102,6 +120,24 @@ "nextflow": "24.04.4" } }, + "versions_config": { + "content": [ + { + "versions_mirtrace": [ + [ + "MIRTRACE_QC", + "mirtrace", + "1.0.1" + ] + ] + } + ], + "timestamp": "2026-06-26T17:03:42.424407", + "meta": { + "nf-test": "0.9.4", + "nextflow": "26.04.1" + } + }, "human - fastq - stub": { "content": [ {