diff --git a/modules/nf-core/minia/environment.yml b/modules/nf-core/minia/environment.yml index 42eb2644eef5..fa6b5eb89992 100644 --- a/modules/nf-core/minia/environment.yml +++ b/modules/nf-core/minia/environment.yml @@ -4,4 +4,4 @@ channels: - conda-forge - bioconda dependencies: - - bioconda::minia=3.2.6 + - bioconda::minia=3.2.6=h22625ea_6 diff --git a/modules/nf-core/minia/main.nf b/modules/nf-core/minia/main.nf index 55ff6062132c..4821ac28ca1a 100644 --- a/modules/nf-core/minia/main.nf +++ b/modules/nf-core/minia/main.nf @@ -4,17 +4,18 @@ process MINIA { conda "${moduleDir}/environment.yml" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/minia:3.2.6--h9a82719_0' : - 'biocontainers/minia:3.2.6--h9a82719_0' }" + 'https://community-cr-prod.seqera.io/docker/registry/v2/blobs/sha256/40/40a4c0032d52284f76044828f50750948f2717e63f084e1ea80f6bd068b65b25/data' : + 'community.wave.seqera.io/library/minia:3.2.6--df502ab09998dab4' }" input: tuple val(meta), path(reads) output: - tuple val(meta), path('*.contigs.fa'), emit: contigs - tuple val(meta), path('*.unitigs.fa'), emit: unitigs - tuple val(meta), path('*.h5') , emit: h5 - path "versions.yml" , emit: versions + tuple val(meta), path('*.contigs.fa.gz'), emit: contigs + tuple val(meta), path('*.unitigs.fa.gz'), emit: unitigs + tuple val(meta), path('*.h5') , emit: h5 + tuple val(meta), path("*-minia.log") , emit: log + tuple val("${task.process}"), val("minia"), eval("minia -v | sed -n 's/Minia version //p'"), topic: versions, emit: versions_minia when: task.ext.when == null || task.ext.when @@ -29,24 +30,22 @@ process MINIA { $args \\ -nb-cores $task.cpus \\ -in input_files.txt \\ - -out $prefix - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - minia: \$(echo \$(minia --version 2>&1 | grep Minia) | sed 's/^.*Minia version //;') - END_VERSIONS + -out $prefix > ${prefix}-minia.log 2>&1 + + if [ -f ${prefix}.contigs.fa ]; then + gzip -cn ${prefix}.contigs.fa > ${prefix}.contigs.fa.gz + fi + if [ -f ${prefix}.unitigs.fa ]; then + gzip -cn ${prefix}.unitigs.fa > ${prefix}.unitigs.fa.gz + fi """ stub: def prefix = task.ext.prefix ?: "${meta.id}" """ - touch ${prefix}.contigs.fa - touch ${prefix}.unitigs.fa + echo "" | gzip > ${prefix}.contigs.fa.gz + echo "" | gzip > ${prefix}.unitigs.fa.gz touch ${prefix}.h5 - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - minia: \$(echo \$(minia --version 2>&1 | grep Minia) | sed 's/^.*Minia version //;') - END_VERSIONS + touch ${prefix}-minia.log """ } diff --git a/modules/nf-core/minia/meta.yml b/modules/nf-core/minia/meta.yml index 4aeb2e124604..bc6e67e8f6dc 100644 --- a/modules/nf-core/minia/meta.yml +++ b/modules/nf-core/minia/meta.yml @@ -11,60 +11,90 @@ tools: a human genome on a desktop computer in a day. The output of Minia is a set of contigs. homepage: https://github.com/GATB/minia documentation: https://github.com/GATB/minia - licence: ["AGPL-3.0-or-later"] + licence: + - "AGPL-3.0-or-later" identifier: biotools:minia input: - - meta: type: map description: | Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] + e.g. [ id:'test' ] - reads: type: file description: Input reads in FastQ format pattern: "*.{fastq.gz, fastq}" - ontologies: [] + ontologies: + - edam: http://edamontology.org/format_1930 # FASTQ output: contigs: - - meta: type: map description: | Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - "*.contigs.fa": + e.g. [ id:'test' ] + - "*.contigs.fa.gz": type: file description: The assembled contigs - pattern: "*.contigs.fa" - ontologies: [] + pattern: "*.contigs.fa.gz" + ontologies: + - edam: http://edamontology.org/format_3989 unitigs: - - meta: type: map description: | Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - "*.unitigs.fa": + e.g. [ id:'test' ] + - "*.unitigs.fa.gz": type: file description: The assembled unitigs - pattern: "*.unitigs.fa" - ontologies: [] + pattern: "*.unitigs.fa.gz" + ontologies: + - edam: http://edamontology.org/format_3989 h5: - - meta: type: map description: | Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] + e.g. [ id:'test' ] - "*.h5": type: file - description: Minia output h5 file - pattern: "*{.h5}" + description: Minia assembly graph in binary h5 format + pattern: "*.h5" ontologies: [] + + log: + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test' ] + - "*-minia.log": + type: file + description: Minia assembly log file + pattern: "*-minia.log" + ontologies: [] + versions_minia: + - - ${task.process}: + type: string + description: The name of the process + - minia: + type: string + description: The name of the tool + - minia -v | sed -n 's/Minia version //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 + - minia: + type: string + description: The name of the tool + - minia -v | sed -n 's/Minia version //p': + type: eval + description: The expression to obtain the version of the tool authors: - "@drpatelh" - "@kevinmenden" diff --git a/modules/nf-core/minia/tests/main.nf.test b/modules/nf-core/minia/tests/main.nf.test index e83a74c0f786..1523f22273bb 100644 --- a/modules/nf-core/minia/tests/main.nf.test +++ b/modules/nf-core/minia/tests/main.nf.test @@ -9,7 +9,39 @@ nextflow_process { tag "modules_nfcore" tag "minia" - test("test-minia") { + test("sarscov2 - fastq - se") { + + when { + process { + """ + input[0] = [ + [ id:'test' ], // meta map + [ + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_interleaved.fastq.gz', checkIfExists: true), ] + ] + + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert path(process.out.contigs[0][1]).linesGzip.any { it.contains('AAA') } }, + { assert path(process.out.unitigs[0][1]).linesGzip.any { it.contains('CCC') } }, + { assert snapshot( + file(process.out.contigs[0][1]).name, + file(process.out.unitigs[0][1]).name, + file(process.out.h5[0][1]).name, + file(process.out.log[0][1]).name, + process.out.findAll { key, val -> key.startsWith('versions') } + ).match() + } + ) + } + } + + test("sarscov2 - fastq - pe") { when { process { @@ -29,13 +61,14 @@ nextflow_process { then { assertAll( { assert process.success }, - { assert file(process.out.contigs[0][1]).text.contains('AAA') }, - { assert file(process.out.unitigs[0][1]).text.contains('CCC') }, + { assert path(process.out.contigs[0][1]).linesGzip.any { it.contains('AAA') } }, + { assert path(process.out.unitigs[0][1]).linesGzip.any { it.contains('CCC') } }, { assert snapshot( file(process.out.contigs[0][1]).name, file(process.out.unitigs[0][1]).name, file(process.out.h5[0][1]).name, - process.out.versions, + file(process.out.log[0][1]).name, + process.out.findAll { key, val -> key.startsWith('versions') }, ).match() } ) diff --git a/modules/nf-core/minia/tests/main.nf.test.snap b/modules/nf-core/minia/tests/main.nf.test.snap index 56a728ed833b..be400df14666 100644 --- a/modules/nf-core/minia/tests/main.nf.test.snap +++ b/modules/nf-core/minia/tests/main.nf.test.snap @@ -1,18 +1,47 @@ { - "test-minia": { + "sarscov2 - fastq - se": { "content": [ - "test.contigs.fa", - "test.unitigs.fa", + "test.contigs.fa.gz", + "test.unitigs.fa.gz", "test.h5", - [ - "versions.yml:md5,242f8593f9ee8955fb73580c78f30200" - ] + "test-minia.log", + { + "versions_minia": [ + [ + "MINIA", + "minia", + "3.2.6" + ] + ] + } + ], + "timestamp": "2026-03-30T08:38:40.819046992", + "meta": { + "nf-test": "0.9.4", + "nextflow": "25.10.4" + } + }, + "sarscov2 - fastq - pe": { + "content": [ + "test.contigs.fa.gz", + "test.unitigs.fa.gz", + "test.h5", + "test-minia.log", + { + "versions_minia": [ + [ + "MINIA", + "minia", + "3.2.6" + ] + ] + } ], + "timestamp": "2026-03-30T08:38:55.382497644", "meta": { - "nf-test": "0.9.0", - "nextflow": "24.04.4" - }, - "timestamp": "2024-09-05T19:56:44.252673" + "nf-test": "0.9.4", + "nextflow": "25.10.4" + } }, "test-minia-stub": { "content": [ @@ -22,7 +51,7 @@ { "id": "test" }, - "test.contigs.fa:md5,d41d8cd98f00b204e9800998ecf8427e" + "test.contigs.fa.gz:md5,68b329da9893e34099c7d8ad5cb9c940" ] ], "1": [ @@ -30,7 +59,7 @@ { "id": "test" }, - "test.unitigs.fa:md5,d41d8cd98f00b204e9800998ecf8427e" + "test.unitigs.fa.gz:md5,68b329da9893e34099c7d8ad5cb9c940" ] ], "2": [ @@ -42,14 +71,26 @@ ] ], "3": [ - "versions.yml:md5,242f8593f9ee8955fb73580c78f30200" + [ + { + "id": "test" + }, + "test-minia.log:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "4": [ + [ + "MINIA", + "minia", + "3.2.6" + ] ], "contigs": [ [ { "id": "test" }, - "test.contigs.fa:md5,d41d8cd98f00b204e9800998ecf8427e" + "test.contigs.fa.gz:md5,68b329da9893e34099c7d8ad5cb9c940" ] ], "h5": [ @@ -60,23 +101,35 @@ "test.h5:md5,d41d8cd98f00b204e9800998ecf8427e" ] ], + "log": [ + [ + { + "id": "test" + }, + "test-minia.log:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], "unitigs": [ [ { "id": "test" }, - "test.unitigs.fa:md5,d41d8cd98f00b204e9800998ecf8427e" + "test.unitigs.fa.gz:md5,68b329da9893e34099c7d8ad5cb9c940" ] ], - "versions": [ - "versions.yml:md5,242f8593f9ee8955fb73580c78f30200" + "versions_minia": [ + [ + "MINIA", + "minia", + "3.2.6" + ] ] } ], + "timestamp": "2026-03-30T08:39:11.428189324", "meta": { - "nf-test": "0.9.0", - "nextflow": "24.04.4" - }, - "timestamp": "2024-09-05T19:52:02.585904" + "nf-test": "0.9.4", + "nextflow": "25.10.4" + } } } \ No newline at end of file