diff --git a/modules/nf-core/getorganelle/config/environment.yml b/modules/nf-core/getorganelle/config/environment.yml index 6b5a3b01cfbc..f7a0757b6885 100644 --- a/modules/nf-core/getorganelle/config/environment.yml +++ b/modules/nf-core/getorganelle/config/environment.yml @@ -4,4 +4,4 @@ channels: - conda-forge - bioconda dependencies: - - bioconda::getorganelle=1.7.7.0 + - bioconda::getorganelle=1.7.7.1 diff --git a/modules/nf-core/getorganelle/config/main.nf b/modules/nf-core/getorganelle/config/main.nf index 0817b87f17cd..7e812254bae7 100644 --- a/modules/nf-core/getorganelle/config/main.nf +++ b/modules/nf-core/getorganelle/config/main.nf @@ -3,16 +3,16 @@ process GETORGANELLE_CONFIG { label 'process_single' conda "${moduleDir}/environment.yml" - container "${ workflow.containerEngine in ['singularity', 'apptainer'] && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/getorganelle:1.7.7.0--pyh7cba7a3_0': - 'quay.io/biocontainers/getorganelle:1.7.7.0--pyh7cba7a3_0' }" + container "${workflow.containerEngine in ['singularity', 'apptainer'] && !task.ext.singularity_pull_docker_container + ? 'https://depot.galaxyproject.org/singularity/getorganelle:1.7.7.1--pyhdfd78af_0' + : 'quay.io/biocontainers/getorganelle:1.7.7.1--pyhdfd78af_0'}" input: val(organelle_type) output: tuple val(organelle_type), path("getorganelle"), emit: db - path "versions.yml" , emit: versions + tuple val("${task.process}"), val('getorganelle'), eval("get_organelle_config.py --version |& sed 's/^GetOrganelle v//'"), topic: versions, emit: versions_getorganelle when: task.ext.when == null || task.ext.when @@ -21,25 +21,14 @@ process GETORGANELLE_CONFIG { def args = task.ext.args ?: '' """ get_organelle_config.py \\ - $args \\ + ${args} \\ -a ${organelle_type} \\ --config-dir getorganelle - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - getorganelle: \$(get_organelle_config.py --version | sed 's/^GetOrganelle v//g') - END_VERSIONS """ stub: - """ mkdir -p getorganelle/{LabelDatabase,SeedDatabase} touch getorganelle/{LabelDatabase,SeedDatabase}/${organelle_type}.fasta - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - getorganelle: \$(get_organelle_config.py --version | sed 's/^GetOrganelle v//g') - END_VERSIONS """ } diff --git a/modules/nf-core/getorganelle/config/meta.yml b/modules/nf-core/getorganelle/config/meta.yml index 19560cc91994..87938fe5777b 100644 --- a/modules/nf-core/getorganelle/config/meta.yml +++ b/modules/nf-core/getorganelle/config/meta.yml @@ -13,9 +13,9 @@ tools: documentation: "https://github.com/Kinggerm/GetOrganelle" tool_dev_url: "https://github.com/Kinggerm/GetOrganelle" doi: "10.1186/s13059-020-02154-5" - licence: ["GPL v3"] + licence: + - "GPL v3" identifier: biotools:getorganelle - input: - organelle_type: type: string @@ -30,12 +30,26 @@ output: - getorganelle: type: directory description: Downloaded database for GetOrganelle + versions_getorganelle: + - - ${task.process}: + type: string + description: The name of the process + - getorganelle: + type: string + description: Downloaded database for GetOrganelle + - get_organelle_config.py --version |& sed 's/^GetOrganelle 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 + - getorganelle: + type: string + description: Downloaded database for GetOrganelle + - get_organelle_config.py --version |& sed 's/^GetOrganelle v//': + type: eval + description: The expression to obtain the version of the tool authors: - "@erinyoung" diff --git a/modules/nf-core/getorganelle/config/tests/main.nf.test b/modules/nf-core/getorganelle/config/tests/main.nf.test index 924ca52affd3..41baf2299dee 100644 --- a/modules/nf-core/getorganelle/config/tests/main.nf.test +++ b/modules/nf-core/getorganelle/config/tests/main.nf.test @@ -15,7 +15,6 @@ nextflow_process { process { """ input[0] = 'all' - """ } } @@ -24,25 +23,13 @@ nextflow_process { assertAll( { assert process.success }, { - def all_files = [] - - file(process.out.db[0][1]).eachFileRecurse (FileType.FILES) { file -> - all_files << file - } - - def all_file_names = all_files.collect { it.name }.toSorted() - - def stable_file_names = [ - 'VERSION', - 'animal_mt.fasta' - ] - - def stable_files = all_files.findAll { it.name in stable_file_names }.toSorted() + def stable_name = getAllFilesFromDir(process.out.db[0][1].toString(), include:['*', '**/*']) + def stable_content = getAllFilesFromDir(process.out.db[0][1].toString(), include:["**/VERSION", "**/animal_mt.fasta"]) assert snapshot( - all_file_names, - stable_files, - process.out.versions[0] + stable_name*.name.sort(), + stable_content, + process.out.findAll { key, val -> key.startsWith('versions') } ).match() } ) @@ -55,7 +42,6 @@ nextflow_process { process { """ input[0] = 'all' - """ } } @@ -63,7 +49,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/getorganelle/config/tests/main.nf.test.snap b/modules/nf-core/getorganelle/config/tests/main.nf.test.snap index 2b4dcab3067d..ff50772f8e4b 100644 --- a/modules/nf-core/getorganelle/config/tests/main.nf.test.snap +++ b/modules/nf-core/getorganelle/config/tests/main.nf.test.snap @@ -2,7 +2,7 @@ "test-getorganelle-config-stub": { "content": [ { - "0": [ + "db": [ [ "all", [ @@ -15,32 +15,20 @@ ] ] ], - "1": [ - "versions.yml:md5,4e972ee1ef3a8d3509c9442fe644258b" - ], - "db": [ + "versions_getorganelle": [ [ - "all", - [ - [ - "all.fasta:md5,d41d8cd98f00b204e9800998ecf8427e" - ], - [ - "all.fasta:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ] + "GETORGANELLE_CONFIG", + "getorganelle", + "1.7.7.1" ] - ], - "versions": [ - "versions.yml:md5,4e972ee1ef3a8d3509c9442fe644258b" ] } ], + "timestamp": "2026-05-07T13:18:22.471441535", "meta": { - "nf-test": "0.9.0", - "nextflow": "24.04.4" - }, - "timestamp": "2024-09-02T12:42:17.160676" + "nf-test": "0.9.5", + "nextflow": "25.10.4" + } }, "test-getorganelle-config": { "content": [ @@ -166,12 +154,20 @@ "VERSION:md5,f3d5d8493c18ca2e553a6012d1505310", "animal_mt.fasta:md5,2833e57f91c231bd19d678d869ed05df" ], - "versions.yml:md5,4e972ee1ef3a8d3509c9442fe644258b" + { + "versions_getorganelle": [ + [ + "GETORGANELLE_CONFIG", + "getorganelle", + "1.7.7.1" + ] + ] + } ], + "timestamp": "2026-05-07T13:49:20.038930564", "meta": { - "nf-test": "0.9.0", - "nextflow": "24.04.4" - }, - "timestamp": "2024-09-02T13:02:45.095312" + "nf-test": "0.9.5", + "nextflow": "25.10.4" + } } } \ No newline at end of file diff --git a/modules/nf-core/getorganelle/fromreads/main.nf b/modules/nf-core/getorganelle/fromreads/main.nf index a96c2c70fc24..0c550efaf38f 100644 --- a/modules/nf-core/getorganelle/fromreads/main.nf +++ b/modules/nf-core/getorganelle/fromreads/main.nf @@ -4,8 +4,8 @@ process GETORGANELLE_FROMREADS { conda "${moduleDir}/environment.yml" container "${workflow.containerEngine in ['singularity', 'apptainer'] && !task.ext.singularity_pull_docker_container - ? 'https://depot.galaxyproject.org/singularity/getorganelle:1.7.7.0--pyh7cba7a3_0' - : 'quay.io/biocontainers/getorganelle:1.7.7.0--pyh7cba7a3_0'}" + ? 'https://depot.galaxyproject.org/singularity/getorganelle:1.7.7.1--pyhdfd78af_0' + : 'quay.io/biocontainers/getorganelle:1.7.7.1--pyhdfd78af_0'}" input: tuple val(meta), path(fastq) @@ -13,9 +13,8 @@ process GETORGANELLE_FROMREADS { output: tuple val(meta), path("results/${prefix}.${organelle_type}.fasta.gz"), emit: fasta, optional: true - path "results/*", emit: etc - // the rest of the result files - tuple val("${task.process}"), val('getorganelle_from_reads'), eval("get_organelle_from_reads.py --version 2>&1 | sed -n 's/GetOrganelle //p'"), topic: versions, emit: versions_getorganelle + tuple val(meta), path("results/*"), emit: etc + tuple val("${task.process}"), val('getorganelle'), eval("get_organelle_from_reads.py --version |& sed 's/^GetOrganelle v//'"), topic: versions, emit: versions_getorganelle when: task.ext.when == null || task.ext.when @@ -49,6 +48,6 @@ process GETORGANELLE_FROMREADS { mkdir results touch results/test_1.fastq touch results/test_2.fastq - echo ''| gzip > results/${prefix}.${organelle_type}.fasta.gz + echo "" | gzip > results/${prefix}.${organelle_type}.fasta.gz """ } diff --git a/modules/nf-core/getorganelle/fromreads/meta.yml b/modules/nf-core/getorganelle/fromreads/meta.yml index c84629cc1594..9153b06bb4af 100644 --- a/modules/nf-core/getorganelle/fromreads/meta.yml +++ b/modules/nf-core/getorganelle/fromreads/meta.yml @@ -12,9 +12,9 @@ tools: documentation: "https://github.com/Kinggerm/GetOrganelle" tool_dev_url: "https://github.com/Kinggerm/GetOrganelle" doi: "10.1186/s13059-020-02154-5" - licence: ["GPL v3"] + licence: + - "GPL v3" identifier: biotools:getorganelle - input: - - meta: type: map @@ -45,20 +45,25 @@ output: description: Complete or partial organelle sequences pattern: "*.fasta.gz" ontologies: - - edam: http://edamontology.org/format_3989 # GZIP format + - edam: http://edamontology.org/format_3989 # GZIP etc: - - results/*: - type: file - description: Other output files - ontologies: [] + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. `[ id:'test', single_end:false ]` + - results/*: + type: file + description: Other output files + ontologies: [] versions_getorganelle: - - ${task.process}: type: string description: The name of the process - - getorganelle_from_reads: + - getorganelle: type: string description: The name of the tool - - "get_organelle_from_reads.py --version 2>&1 | sed -n 's/GetOrganelle //p'": + - get_organelle_from_reads.py --version |& sed 's/^GetOrganelle v//': type: eval description: The expression to obtain the version of the tool topics: @@ -66,10 +71,10 @@ topics: - - ${task.process}: type: string description: The name of the process - - getorganelle_from_reads: + - getorganelle: type: string description: The name of the tool - - "get_organelle_from_reads.py --version 2>&1 | sed -n 's/GetOrganelle //p'": + - get_organelle_from_reads.py --version |& sed 's/^GetOrganelle v//': type: eval description: The expression to obtain the version of the tool authors: diff --git a/modules/nf-core/getorganelle/fromreads/tests/main.nf.test b/modules/nf-core/getorganelle/fromreads/tests/main.nf.test index ad078a396340..06b91f4ad592 100644 --- a/modules/nf-core/getorganelle/fromreads/tests/main.nf.test +++ b/modules/nf-core/getorganelle/fromreads/tests/main.nf.test @@ -25,14 +25,13 @@ nextflow_process { process { """ input[0] = [ - [ id:'test', single_end:false ], // meta map + [ id:'test' ], [ - file(params.test_data['homo_sapiens']['illumina']['test_1_fastq_gz'], checkIfExists: true), - file(params.test_data['homo_sapiens']['illumina']['test_2_fastq_gz'], checkIfExists: true) + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/fastq/test_1.fastq.gz', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/fastq/test_2.fastq.gz', checkIfExists: true) ] ] input[1] = GETORGANELLE_CONFIG.out.db - """ } } @@ -40,12 +39,7 @@ nextflow_process { then { assertAll( { assert process.success }, - { assert snapshot( - process.out.etc[0][0], - process.out.etc[0][1], - process.out.etc.flatten().collect { file(it).name }.sort(), - process.out.fasta, - process.out.findAll { key, val -> key.startsWith('versions') }).match('main_output') }, + { assert snapshot(sanitizeOutput(process.out, unstableKeys: ["etc"])).match() }, ) } @@ -57,35 +51,25 @@ nextflow_process { process { """ input[0] = [ - [ id:'test', single_end:false ], // meta map + [ id:'test' ], [ - file(params.test_data['homo_sapiens']['illumina']['test_1_fastq_gz'], checkIfExists: true), - file(params.test_data['homo_sapiens']['illumina']['test_2_fastq_gz'], checkIfExists: true) + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/fastq/test_1.fastq.gz', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/fastq/test_2.fastq.gz', checkIfExists: true) ] ] input[1] = [ 'animal_mt', file('mock/getorganelle') ] - """ } } then { - def fileList_results = process.out.etc.flatten().collect { file(it).name }.sort() - def fileList_fasta = file(process.out.fasta[0][1]).name assertAll( { assert process.success }, - { assert snapshot( - fileList_results, - fileList_fasta, - process.out.findAll { key, val -> key.startsWith('versions') } - ).match('file_list') } - + { assert snapshot(sanitizeOutput(process.out)).match() } ) } - } - } diff --git a/modules/nf-core/getorganelle/fromreads/tests/main.nf.test.snap b/modules/nf-core/getorganelle/fromreads/tests/main.nf.test.snap index c93449f79c09..009001e9cdc1 100644 --- a/modules/nf-core/getorganelle/fromreads/tests/main.nf.test.snap +++ b/modules/nf-core/getorganelle/fromreads/tests/main.nf.test.snap @@ -1,55 +1,74 @@ { - "main_output": { + "homo_sapiens - animal_mt db, fastq.gz - fasta": { "content": [ - "1-test_1.fastq.gz.fastq:md5,6de988b85909e6529bad0022703bcab2", - "2-test_2.fastq.gz.fastq:md5,539acd65e93bf16a5ace7d6034e704c7", - [ - "1-test_1.fastq.gz.fastq", - "2-test_2.fastq.gz.fastq", - "test.get_org.log.txt", - "test.seed" - ], - [ - - ], { + "etc": [ + [ + { + "id": "test" + }, + [ + "1-test_1.fastq.gz.fastq", + "2-test_2.fastq.gz.fastq", + "test.get_org.log.txt", + "test.seed" + ] + ] + ], + "fasta": [ + + ], "versions_getorganelle": [ [ "GETORGANELLE_FROMREADS", - "getorganelle_from_reads", - "v1.7.7.1" + "getorganelle", + "1.7.7.1" ] ] } ], + "timestamp": "2026-05-11T05:10:31.896792074", "meta": { - "nf-test": "0.9.1", - "nextflow": "25.10.2" - }, - "timestamp": "2026-03-13T15:02:40.788137495" + "nf-test": "0.9.5", + "nextflow": "26.04.0" + } }, - "file_list": { + "homo_sapiens - animal_mt db, fastq.gz - fasta - stub": { "content": [ - [ - "test.animal_mt.fasta.gz", - "test_1.fastq", - "test_2.fastq" - ], - "test.animal_mt.fasta.gz", { + "etc": [ + [ + { + "id": "test" + }, + [ + "test.animal_mt.fasta.gz:md5,68b329da9893e34099c7d8ad5cb9c940", + "test_1.fastq:md5,d41d8cd98f00b204e9800998ecf8427e", + "test_2.fastq:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ] + ], + "fasta": [ + [ + { + "id": "test" + }, + "test.animal_mt.fasta.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ], "versions_getorganelle": [ [ "GETORGANELLE_FROMREADS", - "getorganelle_from_reads", - "v1.7.7.1" + "getorganelle", + "1.7.7.1" ] ] } ], + "timestamp": "2026-05-11T05:07:41.705584488", "meta": { - "nf-test": "0.9.1", - "nextflow": "25.10.2" - }, - "timestamp": "2026-03-13T15:02:48.071085128" + "nf-test": "0.9.5", + "nextflow": "26.04.0" + } } } \ No newline at end of file