diff --git a/modules/nf-core/universc/main.nf b/modules/nf-core/universc/main.nf index 0c082435c67a..9b3cec651595 100644 --- a/modules/nf-core/universc/main.nf +++ b/modules/nf-core/universc/main.nf @@ -15,7 +15,8 @@ process UNIVERSC { output: tuple val(meta), path("${prefix}/outs/*"), emit: outs - path "versions.yml" , emit: versions + tuple val("${task.process}"), val('cellranger'), eval('cellranger count --version 2>&1 | head -n 2 | tail -n 1 | sed "s/^.* //g" | sed "s/(//g" | sed "s/)//g"'), emit: versions_cellranger, topic: versions + tuple val("${task.process}"), val('universc'), eval('bash /universc/launch_universc.sh --version | grep version | grep universc | sed "s/^.* //g"'), emit: versions_universc, topic: versions when: task.ext.when == null || task.ext.when @@ -47,12 +48,6 @@ process UNIVERSC { echo !! > ${prefix}/outs/_invocation cp _log ${prefix}/outs/_log cp _err ${prefix}/outs/_err - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - cellranger: \$(echo \$(cellranger count --version 2>&1 | head -n 2 | tail -n 1 | sed 's/^.* //g' | sed 's/(//g' | sed 's/)//g' )) - universc: \$(echo \$(bash /universc/launch_universc.sh --version | grep version | grep universc | sed 's/^.* //g' )) - END_VERSIONS """ @@ -81,22 +76,16 @@ process UNIVERSC { mkdir -p filtered_feature_bc_matrix touch filtered_feature_bc_matrix.h5 - echo | gzip > filtered_feature_bc_matrix/barcodes.tsv.gz - echo | gzip > filtered_feature_bc_matrix/features.tsv.gz - echo | gzip > filtered_feature_bc_matrix/matrix.mtx.gz + echo "" | gzip > filtered_feature_bc_matrix/barcodes.tsv.gz + echo "" | gzip > filtered_feature_bc_matrix/features.tsv.gz + echo "" | gzip > filtered_feature_bc_matrix/matrix.mtx.gz mkdir -p raw_feature_bc_matrix touch raw_feature_bc_matrix.h5 - echo | gzip > raw_feature_bc_matrix/barcodes.tsv.gz - echo | gzip > raw_feature_bc_matrix/features.tsv.gz - echo | gzip > raw_feature_bc_matrix/matrix.mtx.gz + echo "" | gzip > raw_feature_bc_matrix/barcodes.tsv.gz + echo "" | gzip > raw_feature_bc_matrix/features.tsv.gz + echo "" | gzip > raw_feature_bc_matrix/matrix.mtx.gz cd ../.. - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - cellranger: \$(echo \$(cellranger count --version 2>&1 | head -n 2 | tail -n 1 | sed 's/^.* //g' | sed 's/(//g' | sed 's/)//g' )) - universc: \$(echo \$(bash /universc/launch_universc.sh --version | grep version | grep universc | sed 's/^.* //g' )) - END_VERSIONS """ } diff --git a/modules/nf-core/universc/meta.yml b/modules/nf-core/universc/meta.yml index 89f9a309f731..60cc60045391 100644 --- a/modules/nf-core/universc/meta.yml +++ b/modules/nf-core/universc/meta.yml @@ -54,13 +54,46 @@ output: description: Files containing the outputs of Cell Ranger pattern: "${prefix}/outs/*" ontologies: [] + versions_cellranger: + - - ${task.process}: + type: string + description: The name of the process + - cellranger: + type: string + description: The name of the tool + - 'cellranger count --version 2>&1 | head -n 2 | tail -n 1 | sed "s/^.* //g" | sed "s/(//g" | sed "s/)//g"': + type: eval + description: The expression to obtain the version of the tool + versions_universc: + - - ${task.process}: + type: string + description: The name of the process + - universc: + type: string + description: The name of the tool + - 'bash /universc/launch_universc.sh --version | grep version | grep universc | sed "s/^.* //g"': + type: eval + description: The expression to obtain the version of the tool +topics: versions: - - versions.yml: - type: file - description: File containing software version - pattern: "versions.yml" - ontologies: - - edam: http://edamontology.org/format_3750 # YAML + - - ${task.process}: + type: string + description: The name of the process + - cellranger: + type: string + description: The name of the tool + - 'cellranger count --version 2>&1 | head -n 2 | tail -n 1 | sed "s/^.* //g" | sed "s/(//g" | sed "s/)//g"': + type: eval + description: The expression to obtain the version of the tool + - - ${task.process}: + type: string + description: The name of the process + - universc: + type: string + description: The name of the tool + - 'bash /universc/launch_universc.sh --version | grep version | grep universc | sed "s/^.* //g"': + type: eval + description: The expression to obtain the version of the tool authors: - "@kbattenb" - "@tomkellygenetics" diff --git a/modules/nf-core/universc/tests/main.nf.test b/modules/nf-core/universc/tests/main.nf.test index e51a6d3b3099..f543aa195c06 100644 --- a/modules/nf-core/universc/tests/main.nf.test +++ b/modules/nf-core/universc/tests/main.nf.test @@ -45,13 +45,7 @@ nextflow_process { then { assertAll( { assert process.success }, - { assert snapshot( - process.out.outs[0][1].collect{ - file(it).name.find(/_err|_log|\.h5|\.bam/) - ? file(it).name : it // _err is empty and others are not stable - }, - process.out.versions - ).match() } + { assert snapshot(sanitizeOutput(process.out, unstableKeys: ['outs'])).match() } ) } } @@ -80,10 +74,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/universc/tests/main.nf.test.snap b/modules/nf-core/universc/tests/main.nf.test.snap index e106189ad77c..c56f29aede54 100644 --- a/modules/nf-core/universc/tests/main.nf.test.snap +++ b/modules/nf-core/universc/tests/main.nf.test.snap @@ -2,7 +2,7 @@ "universc_10x -- stub": { "content": [ { - "0": [ + "outs": [ [ { "id": "test", @@ -33,9 +33,31 @@ ] ] ], - "1": [ - "versions.yml:md5,70bfcfea05b26a198a980e8b0eabb348" + "versions_cellranger": [ + [ + "UNIVERSC", + "cellranger", + "3.0.2.9001" + ] ], + "versions_universc": [ + [ + "UNIVERSC", + "universc", + "1.2.5.1" + ] + ] + } + ], + "timestamp": "2026-07-31T17:17:10.433427325", + "meta": { + "nf-test": "0.9.5", + "nextflow": "26.04.0" + } + }, + "universc_10x": { + "content": [ + { "outs": [ [ { @@ -43,80 +65,42 @@ "single_end": false }, [ - "_err:md5,d41d8cd98f00b204e9800998ecf8427e", - "_invocation:md5,d41d8cd98f00b204e9800998ecf8427e", - "_log:md5,d41d8cd98f00b204e9800998ecf8427e", - "basic_stats.txt:md5,d41d8cd98f00b204e9800998ecf8427e", - [ - "barcodes.tsv.gz:md5,68b329da9893e34099c7d8ad5cb9c940", - "features.tsv.gz:md5,68b329da9893e34099c7d8ad5cb9c940", - "matrix.mtx.gz:md5,68b329da9893e34099c7d8ad5cb9c940" - ], - "filtered_feature_bc_matrix.h5:md5,d41d8cd98f00b204e9800998ecf8427e", - "metrics_summary.csv:md5,d41d8cd98f00b204e9800998ecf8427e", - "molecule_info.h5:md5,d41d8cd98f00b204e9800998ecf8427e", - "possorted_genome_bam.bam:md5,d41d8cd98f00b204e9800998ecf8427e", - "possorted_genome_bam.bam.bai:md5,d41d8cd98f00b204e9800998ecf8427e", - [ - "barcodes.tsv.gz:md5,68b329da9893e34099c7d8ad5cb9c940", - "features.tsv.gz:md5,68b329da9893e34099c7d8ad5cb9c940", - "matrix.mtx.gz:md5,68b329da9893e34099c7d8ad5cb9c940" - ], - "raw_feature_bc_matrix.h5:md5,d41d8cd98f00b204e9800998ecf8427e", - "web_summary.html:md5,d41d8cd98f00b204e9800998ecf8427e" + "_err", + "_invocation", + "_log", + "basic_stats.txt", + "filtered_feature_bc_matrix", + "filtered_feature_bc_matrix.h5", + "metrics_summary.csv", + "molecule_info.h5", + "possorted_genome_bam.bam", + "possorted_genome_bam.bam.bai", + "raw_feature_bc_matrix", + "raw_feature_bc_matrix.h5", + "web_summary.html" ] ] ], - "versions": [ - "versions.yml:md5,70bfcfea05b26a198a980e8b0eabb348" + "versions_cellranger": [ + [ + "UNIVERSC", + "cellranger", + "3.0.2.9001" + ] + ], + "versions_universc": [ + [ + "UNIVERSC", + "universc", + "1.2.5.1" + ] ] - }, - { - "UNIVERSC": { - "cellranger": "3.0.2.9001", - "universc": "1.2.5.1" - } } ], + "timestamp": "2026-07-31T17:17:03.350245092", "meta": { - "nf-test": "0.9.2", - "nextflow": "25.04.2" - }, - "timestamp": "2025-05-29T12:54:18.627245737" - }, - "universc_10x": { - "content": [ - [ - "_err", - "_invocation:md5,adbbbc1027756be9fdeebabf979863e5", - "_log", - "basic_stats.txt:md5,90004df04ec7b65a0dd8d26a08e55fd2", - [ - "barcodes.tsv.gz:md5,11504585bad0cefa736757ed934b5417", - "features.tsv.gz:md5,7f05863a60b0ef33073ca1833f27c497", - "matrix.mtx.gz:md5,429de6faa1dc870ca64f0150b2ad7a76" - ], - "filtered_feature_bc_matrix.h5", - "metrics_summary.csv:md5,bba1b122b15698d97a034af61e3fcd59", - "molecule_info.h5", - "possorted_genome_bam.bam", - "possorted_genome_bam.bam.bai", - [ - "barcodes.tsv.gz:md5,bf994f994561412303520a2fb3ac87f8", - "features.tsv.gz:md5,7f05863a60b0ef33073ca1833f27c497", - "matrix.mtx.gz:md5,476dac7e51140291ad7e3219b8c7cc1a" - ], - "raw_feature_bc_matrix.h5", - "web_summary.html:md5,98a001e1278b03322211f59a48eb8bb2" - ], - [ - "versions.yml:md5,70bfcfea05b26a198a980e8b0eabb348" - ] - ], - "meta": { - "nf-test": "0.9.2", - "nextflow": "25.04.2" - }, - "timestamp": "2025-05-29T13:33:37.644843156" + "nf-test": "0.9.5", + "nextflow": "26.04.0" + } } } \ No newline at end of file