-
Notifications
You must be signed in to change notification settings - Fork 730
Closed
Labels
Description
New feature
Many pipelines attempt to catch the software versions running within the container. The most common method is to catch a file with the software version written to it, typically using some fun string parsing:
This populates the output directive with an additional channel and prevents people using the pipe operator amongst other things.
Why not get this into a separate, native directive? It could automatically populate some property of the process
which is available to use as a string (or map of strings).
Usage scenario
Anyone who wants to record their software at runtime.
Suggest implementation
process FASTQC {
// process goes here
versions:
fastqc = 'fastqc --version | sed -e "s/FastQC v//g"'
python = 'python --version'
}
Somewhere within the .command.run the .task.versions file is created:
fastqc: 0.12.1
python: 3.11.2
Back in the pipeline code:
FASTQC.versions == [ name: ${task.process}, versions: [ fastqc: "0.12.1", python: "3.11.2" ] ]
// It's syntactic sugar around the FASTQC.out.versions channel, so can be used like so:
ch_versions = ch_versions.mix(FASTQC.versions)
Puumanamana and mribeirodantasmaxulysse