1
0
Fork 0
mirror of https://github.com/MillironX/taxprofiler.git synced 2024-11-25 02:59:55 +00:00

Update combine bracken outputs to include meta for publishing purposes

This commit is contained in:
James Fellows Yates 2022-12-12 10:10:24 +01:00
parent 8939ce3e20
commit 3df0a383da
4 changed files with 19 additions and 8 deletions

View file

@ -330,12 +330,12 @@ process {
] ]
} }
withName: KRAKENTOOLS_COMBINEKREPORTS { withName: KRAKENTOOLS_COMBINEKREPORTS_KRAKEN {
ext.prefix = { "kraken2_${meta.id}_combined_reports" } ext.prefix = { "kraken2_${meta.id}_combined_reports" }
publishDir = [ publishDir = [
path: { "${params.outdir}/kraken2/" }, path: { "${params.outdir}/kraken2/" },
mode: params.publish_dir_mode, mode: params.publish_dir_mode,
pattern: '*.{txt}' pattern: '*.txt'
] ]
} }

View file

@ -32,7 +32,7 @@
}, },
"bracken/combinebrackenoutputs": { "bracken/combinebrackenoutputs": {
"branch": "master", "branch": "master",
"git_sha": "5e34754d42cd2d5d248ca8673c0a53cdf5624905", "git_sha": "9c87d5fdad182590a370ea43a4ecebd200a6f6fb",
"installed_by": ["modules"] "installed_by": ["modules"]
}, },
"cat/fastq": { "cat/fastq": {

View file

@ -1,4 +1,5 @@
process BRACKEN_COMBINEBRACKENOUTPUTS { process BRACKEN_COMBINEBRACKENOUTPUTS {
tag "$meta.id"
label 'process_low' label 'process_low'
conda (params.enable_conda ? "bioconda::bracken=2.7" : null) conda (params.enable_conda ? "bioconda::bracken=2.7" : null)
@ -7,18 +8,18 @@ process BRACKEN_COMBINEBRACKENOUTPUTS {
'quay.io/biocontainers/bracken:2.7--py39hc16433a_0' }" 'quay.io/biocontainers/bracken:2.7--py39hc16433a_0' }"
input: input:
path input tuple val(meta), path(input)
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:
task.ext.when == null || task.ext.when task.ext.when == null || task.ext.when
script: script:
def args = task.ext.args ?: '' def args = task.ext.args ?: ''
def prefix = task.ext.prefix ?: "bracken_combined.txt" def prefix = task.ext.prefix ?: "${meta.id}"
// WARN: Version information not provided by tool on CLI. // WARN: Version information not provided by tool on CLI.
// Please update version string below when bumping container versions. // Please update version string below when bumping container versions.
def VERSION = '2.7' def VERSION = '2.7'
@ -26,7 +27,7 @@ process BRACKEN_COMBINEBRACKENOUTPUTS {
combine_bracken_outputs.py \\ combine_bracken_outputs.py \\
$args \\ $args \\
--files ${input} \\ --files ${input} \\
-o ${prefix} -o ${prefix}.txt
cat <<-END_VERSIONS > versions.yml cat <<-END_VERSIONS > versions.yml
"${task.process}": "${task.process}":

View file

@ -12,12 +12,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 ]
- input: - input:
type: file type: file
description: List of output files from bracken description: List of output files from bracken
pattern: "*" pattern: "*"
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