From 7f8180f45841cc3ffb40ca70c564a8d14ed254f7 Mon Sep 17 00:00:00 2001 From: "Moritz E. Beber" Date: Fri, 14 Oct 2022 12:49:07 +0200 Subject: [PATCH] fix: emit tool versions --- modules/local/kraken_standard_report.nf | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/modules/local/kraken_standard_report.nf b/modules/local/kraken_standard_report.nf index ab47d81..aada6fb 100644 --- a/modules/local/kraken_standard_report.nf +++ b/modules/local/kraken_standard_report.nf @@ -12,6 +12,7 @@ process KRAKEN_STANDARD_REPORT { output: tuple val(meta), path(result), emit: report + path 'versions.yml' , emit: versions when: task.ext.when == null || task.ext.when @@ -21,6 +22,11 @@ process KRAKEN_STANDARD_REPORT { result = "${prefix}_standardized.kraken2.report.txt" """ cut -f1-3,6-8 '${report}' > '${result}' + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + cut: \$(echo \$(cut --version 2>&1) | sed 's/^.*(GNU coreutils) //; s/ Copyright.*\$//') + END_VERSIONS """ }