Use `eval` to collect version
Nobody has claimed this yet.
- Dominant language
- Nextflow
- Stars
- 429
- Forks
- 1.1k
- Avg merge
- 1d 6h
- Merged PRs (30d)
- 153
Description
Nextflow 24.02.0-edge brings with it two new features which should give much cleaner syntax for collecting tool versions: channel topics using topic (see https://github.com/nf-core/modules/issues/4517) and eval. They are designed to work together nicely, but are technically separate features.
- Docs for
eval: https://nextflow.io/docs/latest/process.html#output-type-eval - Blog post about
evalandtopic: https://nextflow.io/blog/2024/nextflow-2404-highlights.html#process-eval-outputs - Example pipeline change: https://github.com/nf-core/fetchngs/pull/312
The blog post contains a basic example of how this can be used to collect versions:
process FASTQC {
input:
tuple val(meta), path(reads)
output:
tuple val(meta), path('*.html'), emit: html
tuple val("${task.process}"), val('fastqc'), eval('fastqc --version'), topic: versions
"""
fastqc $reads
"""
}
workflow {
Channel.topic('versions')
| unique()
| collectFile(name: 'collated_versions.yml')
| CUSTOM_DUMPSOFTWAREVERSIONS
}
Needs some thought about how we approach these changes - may be best to do a bulk change everywhere in one go, as it affects multiple code locations (modules and pipelines).
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the linked Nextflow eval documentation, blog example, and the existing version-collection patterns across the modules and pipelines. Identify all affected locations, then verify that the migrated outputs collect into the expected collated_versions.yml flow and that the relevant module and pipeline checks still pass.
Written by the indexing model from the issue text.
Assessment
- Domain
- data-engineering, tooling
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100