diff --git a/modules/amrfinderplus/run/main.nf b/modules/amrfinderplus/run/main.nf index d60c3da4..3b15bee7 100644 --- a/modules/amrfinderplus/run/main.nf +++ b/modules/amrfinderplus/run/main.nf @@ -15,6 +15,8 @@ process AMRFINDERPLUS_RUN { tuple val(meta), path("${prefix}.tsv") , emit: report tuple val(meta), path("${prefix}-mutations.tsv"), emit: mutation_report, optional: true path "versions.yml" , emit: versions + env VER , emit: tool_version + env DBVER , emit: db_version when: task.ext.when == null || task.ext.when @@ -46,6 +48,8 @@ process AMRFINDERPLUS_RUN { --database amrfinderdb \\ --threads $task.cpus > ${prefix}.tsv + VER=\$(amrfinder --version) + DBVER=\$(echo \$(amrfinder --database amrfinderdb --database_version 2> stdout) | rev | cut -f 1 -d ' ' | rev) cat <<-END_VERSIONS > versions.yml "${task.process}": diff --git a/modules/amrfinderplus/run/meta.yml b/modules/amrfinderplus/run/meta.yml index 813adf3e..40359784 100644 --- a/modules/amrfinderplus/run/meta.yml +++ b/modules/amrfinderplus/run/meta.yml @@ -46,6 +46,14 @@ output: type: file description: Report of organism-specific point-mutations pattern: "*-mutations.tsv" + - tool_version: + type: string + description: The version of the tool in string format (useful for downstream tools such as hAMRronization) + - db_version: + type: string + description: The version of the used database in string format (useful for downstream tools such as hAMRronization) authors: - "@rpetit3" + - "@louperelo" + - "@jfy133"