Nicholas Youngblut
05/12/2025, 4:26 PMIf you prefer to provide versions in a separate YAML file, MultiQC will also look for filenames ending in...but it appears that at least most nf-core pipelines/modules usein your search path, for example*_mqc_versions.(yml|yaml)orrnaseq_mqc_versions.yml. The content of these YAML files should be a YAML dictionary, similar to the previous examples but without the top levelmapping_mqc_versions.yaml.software_versions
versions.yml , and not *_mqc_versions.(yml|yaml) .
At least for nf-core/rnaseq, the following is used:
softwareVersionsToYAML(ch_versions)
.collectFile(storeDir: "${params.outdir}/pipeline_info", name: 'nf_core_rnaseq_software_mqc_versions.yml', sort: true, newLine: true)
.set { ch_collated_versions }
Is there a way to just use versions.yml instead of requiring this somewhat complex step extra step of using softwareVersionsToYAML?Nicholas Youngblut
05/12/2025, 4:27 PMcat <<-END_VERSIONS > versions.yml
"${task.process}":
salmon: \$(echo \$(salmon --version) | sed -e "s/salmon //g")
END_VERSIONSNicholas Youngblut
05/12/2025, 4:37 PMsoftwareVersionsToYAML is not documented in https://docs.seqera.io/multiqc/reports/customisation#software-versions-yaml-fileNicholas Youngblut
05/12/2025, 4:41 PMprocess {
versions {
container = 'quay.io/biocontainers/salmon:1.10.3--hecfa306_0'
command = 'salmon: $(echo \$(salmon --version) | sed -e "s/salmon //g")'
}
}Maxime Garcia
05/12/2025, 8:26 PMNicholas Youngblut
05/12/2025, 8:29 PMso we add the softwareYou mean adding the software to the file name? Really, versions should be named by container or conda env, right?
Maxime Garcia
05/12/2025, 8:30 PMversions.yml fileMaxime Garcia
05/12/2025, 8:30 PM*_mqc_versions.ymlMaxime Garcia
05/12/2025, 8:31 PMMaxime Garcia
05/12/2025, 8:32 PMNicholas Youngblut
05/12/2025, 8:32 PMAll of them gets collected and produce a single
softwareVersionsToYAML is not built into nextflow, and there seems to be no standard docs on collecting versions into one yaml fileMaxime Garcia
05/12/2025, 8:33 PMMaxime Garcia
05/12/2025, 8:33 PMMaxime Garcia
05/12/2025, 8:34 PMMaxime Garcia
05/12/2025, 8:36 PMNicholas Youngblut
05/12/2025, 8:36 PMMaxime Garcia
05/12/2025, 8:37 PMNicholas Youngblut
05/12/2025, 8:38 PMLastly, calling the executable to get the version for every single job is inefficient, especially for 10's or 100's of 1000's of jobs.
Maybe using a version introspection system divorced from processes would be helpful, in which the user provides a command that is run once per container/env (similar to Snakemake).
Maxime Garcia
05/12/2025, 8:40 PMMaxime Garcia
05/12/2025, 8:40 PMMaxime Garcia
05/12/2025, 8:41 PMNicholas Youngblut
05/12/2025, 8:41 PMMaxime Garcia
05/12/2025, 8:43 PMMaxime Garcia
05/12/2025, 8:44 PMMaxime Garcia
05/12/2025, 8:44 PMMaxime Garcia
05/12/2025, 8:45 PMMaxime Garcia
05/12/2025, 8:46 PMNicholas Youngblut
05/12/2025, 8:46 PMcmd would just be run once per process?Maxime Garcia
05/12/2025, 8:48 PMtopicMaxime Garcia
05/12/2025, 8:48 PMNicholas Youngblut
05/12/2025, 8:49 PMeval is usefulMaxime Garcia
05/12/2025, 8:49 PMMaxime Garcia
05/12/2025, 8:49 PMMaxime Garcia
05/12/2025, 8:49 PMNicholas Youngblut
05/12/2025, 8:50 PMeval would be used to obtain software versions?Maxime Garcia
05/12/2025, 8:50 PMNicholas Youngblut
05/12/2025, 8:50 PMMaxime Garcia
05/12/2025, 8:50 PMMaxime Garcia
05/12/2025, 8:51 PMMaxime Garcia
05/12/2025, 8:51 PMMaxime Garcia
05/12/2025, 8:51 PMNicholas Youngblut
05/12/2025, 8:53 PMversions . My current code for a simple pipeline:
ch_version_files = ch_version_files.mix(STAR_map.out.versions)
.mix(SALMON_quant.out.versions)
.mix(TXimport.out.versions)
.mix(ALIGNMENTS_distances.out.versions)
.mix(BAM_MARKDUPLICATES_PICARD.out.versions)
.mix(STRANDEDNESS_fromSpliceMotifs.out.versions)
.mix(BAM_RSEQC.out.versions)Nicholas Youngblut
05/12/2025, 8:59 PMeval would actually be used for obtaining all software versions and adding them to the final multiqc reportMaxime Garcia
05/12/2025, 9:31 PMtopic is to avoid having such multiple lines
ch_version_files = ch_version_files.mix(STAR_map.out.versions)Maxime Garcia
05/12/2025, 9:31 PMMaxime Garcia
05/12/2025, 9:31 PMMaxime Garcia
05/12/2025, 9:32 PMWe should call itOne of the best compliment I ever got from Paolooperatormaxim
Phil Ewels
05/13/2025, 2:29 PMPhil Ewels
05/13/2025, 2:30 PMPhil Ewels
05/13/2025, 2:30 PM