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:
https://github.com/nf-core/modules/blob/72f633b541815ae9565599e5b3cf66d863736ae1/modules/nf-core/fastqc/main.nf#L38-L41
https://github.com/epi2me-labs/wf-template/blob/3edea44cdf9449093a2adc2f08bb16ec143373bf/main.nf#L20-L30
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)
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:
https://github.com/nf-core/modules/blob/72f633b541815ae9565599e5b3cf66d863736ae1/modules/nf-core/fastqc/main.nf#L38-L41
https://github.com/epi2me-labs/wf-template/blob/3edea44cdf9449093a2adc2f08bb16ec143373bf/main.nf#L20-L30
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
processwhich is available to use as a string (or map of strings).Usage scenario
Anyone who wants to record their software at runtime.
Suggest implementation
Somewhere within the .command.run the .task.versions file is created:
Back in the pipeline code: