Update KRAKENTOOLS/COMBINEKREPORTS (#2043)

* Update main.nf

* Update meta.yml

* Re-add logos as not staged in a way that works with MultiQC config files

* Add meta to combinekreports
This commit is contained in:
James A. Fellows Yates 2022-09-13 14:31:27 +02:00 committed by GitHub
parent 77a6dd3f61
commit ee0346b4d1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 17 additions and 7 deletions

View file

@ -7,10 +7,10 @@ process KRAKENTOOLS_COMBINEKREPORTS {
'quay.io/biocontainers/krakentools:1.2--pyh5e36f6f_0' }" 'quay.io/biocontainers/krakentools:1.2--pyh5e36f6f_0' }"
input: input:
path kreports tuple val(meta), path(kreports)
output: output:
path "*.txt", emit: txt tuple val(meta), path("*.txt"), emit: txt
path "versions.yml", emit: versions path "versions.yml", emit: versions
when: when:
@ -18,12 +18,12 @@ process KRAKENTOOLS_COMBINEKREPORTS {
script: script:
def args = task.ext.args ?: '' def args = task.ext.args ?: ''
def prefix = task.ext.prefix ?: "kreports_combined.txt" prefix = task.ext.prefix ?: "${meta.id}"
def VERSION = '1.2' // WARN: Version information not provided by tool on CLI. Please update this string when bumping container versions. def VERSION = '1.2' // WARN: Version information not provided by tool on CLI. Please update this string when bumping container versions.
""" """
combine_kreports.py \\ combine_kreports.py \\
-r ${kreports} \\ -r ${kreports} \\
-o ${prefix} \\ -o ${prefix}.txt \\
${args} ${args}
cat <<-END_VERSIONS > versions.yml cat <<-END_VERSIONS > versions.yml

View file

@ -14,12 +14,22 @@ tools:
licence: ["GPL v3"] licence: ["GPL v3"]
input: input:
- meta:
type: map
description: |
Groovy Map containing sample information
e.g. [ id:'test', single_end:false ]
- kreports: - kreports:
type: file type: file
description: List of kraken-style report files description: List of kraken-style report files
pattern: "*.{txt,kreport}" pattern: "*.{txt,kreport}"
output: output:
- meta:
type: map
description: |
Groovy Map containing sample information
e.g. [ id:'test', single_end:false ]
- versions: - versions:
type: file type: file
description: File containing software versions description: File containing software versions

View file

@ -19,5 +19,5 @@ workflow test_krakentools_combinekreports {
UNTAR ( db ) UNTAR ( db )
KRAKEN2_KRAKEN2 ( input, UNTAR.out.untar.map{ it[1] }, false, false ) KRAKEN2_KRAKEN2 ( input, UNTAR.out.untar.map{ it[1] }, false, false )
KRAKENTOOLS_COMBINEKREPORTS ( KRAKEN2_KRAKEN2.out.report.map{ [ it[1] ] }.collect().dump() ) KRAKENTOOLS_COMBINEKREPORTS ( KRAKEN2_KRAKEN2.out.report.map{ [[id:"test"], it[1]] }.groupTuple().dump())
} }

View file

@ -1,9 +1,9 @@
- name: krakentools combinekreports test_krakentools_combinekreports - name: krakentools combinekreports test_krakentools_combinekreports
command: nextflow run ./tests/modules/krakentools/combinekreports -entry test_krakentools_combinekreports -c ./tests/config/nextflow.config -c ./tests/modules/krakentools/combinekreports/nextflow.config command: nextflow run ./tests/modules/krakentools/combinekreports -entry test_krakentools_combinekreports -c ./tests/config/nextflow.config -c ./tests/modules/krakentools/combinekreports/nextflow.config
tags: tags:
- krakentools/combinekreports
- krakentools - krakentools
- krakentools/combinekreports
files: files:
- path: output/krakentools/kreports_combined.txt - path: output/krakentools/test.txt
contains: contains:
- "#Number of Samples: 2" - "#Number of Samples: 2"