mirror of
https://github.com/MillironX/nf-core_modules.git
synced 2024-12-22 02:58:17 +00:00
Amrfinderplus add tool and db version as output (#1912)
* not yet working: add db version to versions.yml * next try: db version number not in versions.yml * Fix amrfinderplus versioning * Update main.nf * Apply suggestions from code review * Update main.nf * Dump version for syncrony with run * Update test.yml * Apply suggestions from code review * add tool and db version to output * Apply suggestions from code review Co-authored-by: James A. Fellows Yates <jfy133@gmail.com> * Update meta.yml Co-authored-by: James Fellows Yates <jfy133@gmail.com>
This commit is contained in:
parent
8656636f0d
commit
839bc6b1ad
2 changed files with 12 additions and 0 deletions
|
@ -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}":
|
||||
|
|
|
@ -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"
|
||||
|
|
Loading…
Reference in a new issue