new module: fastaguard#12239
Conversation
| def fasta = file(workDir.resolve("pass.fa").toString()) | ||
| fasta.text = [ | ||
| ">clean", | ||
| "ACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGT" |
There was a problem hiding this comment.
you could probably make this string a bit shorter ;)
There was a problem hiding this comment.
Shortened the fixture using Groovy string multiplication.
| def prefix = task.ext.prefix ?: meta.id | ||
| def args = task.ext.args ?: '--profile assembly --gate pipeline' | ||
| """ | ||
| set +e |
There was a problem hiding this comment.
This is not required, it should be set by default.
| set +e |
There was a problem hiding this comment.
Removed set +e.
| task.ext.when == null || task.ext.when | ||
|
|
||
| script: | ||
| def prefix = task.ext.prefix ?: meta.id |
There was a problem hiding this comment.
Does this work?
This is what we normally use:
| def prefix = task.ext.prefix ?: meta.id | |
| def prefix = task.ext.prefix ?: ${meta.id} |
There was a problem hiding this comment.
Updated the fallback to use the interpolated meta.id value.
|
|
||
| script: | ||
| def prefix = task.ext.prefix ?: meta.id | ||
| def args = task.ext.args ?: '--profile assembly --gate pipeline' |
There was a problem hiding this comment.
We don't normally set default args like this. Are they required for the tool to run? Or to run on the test data?
There was a problem hiding this comment.
Removed the module defaults. The test-specific profile and gate arguments are now set in tests/nextflow.config.
| status=\$? | ||
| set -e | ||
|
|
||
| printf "%s\\n" "\${status}" > ${prefix}.fastaguard.exit_code | ||
|
|
||
| if [ "\${status}" -eq 3 ]; then | ||
| exit "\${status}" | ||
| fi |
There was a problem hiding this comment.
What is this for, why are you trying to capture the exit code in this way?
There was a problem hiding this comment.
FastaGuard returns 0 for PASS, 1 for WARN, 2 for QC failure, and 3 for input or tool errors. The module preserves reports for 0-2 and fails the task for 3 or higher.
| type: eval | ||
| description: The expression to obtain the version of the tool | ||
| authors: | ||
| - "FastaGuard contributors" |
There was a problem hiding this comment.
This should be the author of the nf-core/module (i.e. you)
There was a problem hiding this comment.
Updated the module author to @ehsanestaji.
| def fasta = file(workDir.resolve("pass.fa").toString()) | ||
| fasta.text = [ | ||
| ">clean", | ||
| ("ACGT" * 60) |
There was a problem hiding this comment.
Does this work? If so, that's cool.
There was a problem hiding this comment.
Yes. nf-test evaluates the string multiplication correctly, and all four module tests pass.
|
Review comments have been addressed and all checks are passing. Ready for another review. |
Description
This PR adds a new
FASTAGUARDmodule for FastaGuard, a FASTA preflight and triage tool for assembly and submission-readiness workflows.The module emits HTML, JSON, TSV, MultiQC custom-content JSON, a captured FastaGuard exit-code file, and topic-channel version metadata. PASS/WARN/FAIL/invalid FASTA fixtures are included so blocking FASTA results still preserve report evidence for workflow review.
No existing FastaGuard module, open PR, or open issue was found before opening this PR.
PR checklist
topic: versions.label.Local validation
nf-core modules lint fastaguard- 47 passed, 0 warnings, 0 failures.nf-core modules test fastaguard --profile conda --once --no-prompts- all tests passed.nf-core modules test fastaguard --profile docker --once --no-prompts- all tests passed.nf-core modules test fastaguard --profile singularity- not run locally because Singularity/Apptainer is not installed on this macOS host.