Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 12 additions & 11 deletions modules/nf-core/fastavalidator/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -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 \\
Expand All @@ -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
"""
}
29 changes: 22 additions & 7 deletions modules/nf-core/fastavalidator/meta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down
40 changes: 32 additions & 8 deletions modules/nf-core/fastavalidator/tests/main.nf.test.snap
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,11 @@

],
"2": [
"versions.yml:md5,05aa059840b3b4dd6d88bc1e4bf976d7"
[
"FASTAVALIDATOR",
"py_fasta_validator",
"0.6"
]
],
"error_log": [

Expand All @@ -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": [
Expand All @@ -52,7 +64,11 @@
]
],
"2": [
"versions.yml:md5,05aa059840b3b4dd6d88bc1e4bf976d7"
[
"FASTAVALIDATOR",
"py_fasta_validator",
"0.6"
]
],
"error_log": [
[
Expand All @@ -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"
}
}
}
Loading