diff --git a/modules/nf-core/fastavalidator/main.nf b/modules/nf-core/fastavalidator/main.nf index ac5470fb6d4f..7131eedc4d2e 100644 --- a/modules/nf-core/fastavalidator/main.nf +++ b/modules/nf-core/fastavalidator/main.nf @@ -13,12 +13,18 @@ process FASTAVALIDATOR { output: tuple val(meta), path('*.success.log') , emit: success_log , optional: true tuple val(meta), path('*.error.log') , emit: error_log , optional: true - path "versions.yml" , emit: versions + tuple val("${task.process}"), val('py_fasta_validator'), eval('py_fasta_validator --version | cut -d" " -f3'), emit: versions_py_fasta_validator, topic: versions + when: task.ext.when == null || task.ext.when script: + // Exit if running this module with -profile conda / -profile mamba + if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) { + error "Fastavalidator module does not support Conda. Please use Docker / Singularity instead." + } + def prefix = task.ext.prefix ?: "${meta.id}" """ py_fasta_validator \\ @@ -41,22 +47,17 @@ process FASTAVALIDATOR { echo "Validation successful..." \\ > "${prefix}.success.log" fi - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - py_fasta_validator: \$(py_fasta_validator -v | sed 's/.* version //') - END_VERSIONS """ stub: + // Exit if running this module with -profile conda / -profile mamba + if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) { + error "Fastavalidator module does not support Conda. Please use Docker / Singularity instead." + } + def prefix = task.ext.prefix ?: "${meta.id}" """ echo "Validation successful..." \\ > "${prefix}.success.log" - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - py_fasta_validator: \$(py_fasta_validator -v | sed 's/.* version //') - END_VERSIONS """ } diff --git a/modules/nf-core/fastavalidator/meta.yml b/modules/nf-core/fastavalidator/meta.yml index f35d63714668..406fefea29b1 100644 --- a/modules/nf-core/fastavalidator/meta.yml +++ b/modules/nf-core/fastavalidator/meta.yml @@ -17,7 +17,8 @@ tools: documentation: "https://github.com/linsalrob/py_fasta_validator" tool_dev_url: "https://github.com/linsalrob/py_fasta_validator" doi: "10.5281/zenodo.5002710" - licence: ["MIT"] + licence: + - "MIT" identifier: "" input: - - meta: @@ -53,13 +54,27 @@ output: description: Log file for failed validation pattern: "*.error.log" ontologies: [] + versions_py_fasta_validator: + - - ${task.process}: + type: string + description: The name of the process + - py_fasta_validator: + type: string + description: The name of the tool + - py_fasta_validator --version | cut -d" " -f3: + 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 + - py_fasta_validator: + type: string + description: The name of the tool + - py_fasta_validator --version | cut -d" " -f3: + type: eval + description: The expression to obtain the version of the tool authors: - "@gallvp" maintainers: diff --git a/modules/nf-core/fastavalidator/tests/main.nf.test.snap b/modules/nf-core/fastavalidator/tests/main.nf.test.snap index 382dee720665..2ea6f6c9cf68 100644 --- a/modules/nf-core/fastavalidator/tests/main.nf.test.snap +++ b/modules/nf-core/fastavalidator/tests/main.nf.test.snap @@ -15,7 +15,11 @@ ], "2": [ - "versions.yml:md5,05aa059840b3b4dd6d88bc1e4bf976d7" + [ + "FASTAVALIDATOR", + "py_fasta_validator", + "0.6" + ] ], "error_log": [ @@ -29,12 +33,20 @@ "test.success.log:md5,b0b859eda1db5cd43915846e00ebc22c" ] ], - "versions": [ - "versions.yml:md5,05aa059840b3b4dd6d88bc1e4bf976d7" + "versions_py_fasta_validator": [ + [ + "FASTAVALIDATOR", + "py_fasta_validator", + "0.6" + ] ] } ], - "timestamp": "2023-11-28T11:23:25.106872" + "timestamp": "2026-03-15T21:53:50.62913298", + "meta": { + "nf-test": "0.9.4", + "nextflow": "25.10.4" + } }, "sarscov2-gff3-invalid": { "content": [ @@ -52,7 +64,11 @@ ] ], "2": [ - "versions.yml:md5,05aa059840b3b4dd6d88bc1e4bf976d7" + [ + "FASTAVALIDATOR", + "py_fasta_validator", + "0.6" + ] ], "error_log": [ [ @@ -66,11 +82,19 @@ "success_log": [ ], - "versions": [ - "versions.yml:md5,05aa059840b3b4dd6d88bc1e4bf976d7" + "versions_py_fasta_validator": [ + [ + "FASTAVALIDATOR", + "py_fasta_validator", + "0.6" + ] ] } ], - "timestamp": "2023-11-28T11:23:29.40324" + "timestamp": "2026-03-15T21:53:59.053193204", + "meta": { + "nf-test": "0.9.4", + "nextflow": "25.10.4" + } } } \ No newline at end of file