From ee58c4d5e095ed0e0b4a2bab6d2e20114b83b49a Mon Sep 17 00:00:00 2001 From: hkaspersen Date: Wed, 20 Sep 2023 11:03:04 +0200 Subject: [PATCH 1/8] added corrected kraken2 report as output from bracken --- conf/modules.config | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/conf/modules.config b/conf/modules.config index 6800691f..3c1c1e94 100644 --- a/conf/modules.config +++ b/conf/modules.config @@ -469,10 +469,17 @@ process { ext.args = { "${meta.db_params}" } ext.prefix = params.perform_runmerging ? { "${meta.id}_${meta.db_name}.bracken" } : { "${meta.id}_${meta.run_accession}_${meta.db_name}.bracken" } publishDir = [ + [ path: { "${params.outdir}/bracken/${meta.db_name}/" }, mode: params.publish_dir_mode, pattern: '*.tsv' - ] + ], + [ + path: { "${params.outdir}/bracken/${meta.db_name}/" }, + mode: params.publish_dir_mode, + pattern: '*bracken.kraken2.report_bracken*.txt' + ] + ] } withName: BRACKEN_COMBINEBRACKENOUTPUTS { From c15d035c43c04194f0cad25ff91a1ada0b4c7663 Mon Sep 17 00:00:00 2001 From: hkaspersen Date: Thu, 21 Sep 2023 09:49:18 +0200 Subject: [PATCH 2/8] corrected bracken report output definition --- conf/modules.config | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/conf/modules.config b/conf/modules.config index 3c1c1e94..c0c72b9f 100644 --- a/conf/modules.config +++ b/conf/modules.config @@ -469,16 +469,9 @@ process { ext.args = { "${meta.db_params}" } ext.prefix = params.perform_runmerging ? { "${meta.id}_${meta.db_name}.bracken" } : { "${meta.id}_${meta.run_accession}_${meta.db_name}.bracken" } publishDir = [ - [ path: { "${params.outdir}/bracken/${meta.db_name}/" }, mode: params.publish_dir_mode, - pattern: '*.tsv' - ], - [ - path: { "${params.outdir}/bracken/${meta.db_name}/" }, - mode: params.publish_dir_mode, - pattern: '*bracken.kraken2.report_bracken*.txt' - ] + pattern: '*{.tsv,.report_bracken_species.txt}' ] } From 6a5719cb3a322eabde364ce2ba77b3d561ef796f Mon Sep 17 00:00:00 2001 From: hkaspersen Date: Thu, 21 Sep 2023 09:49:45 +0200 Subject: [PATCH 3/8] added line for changes to output --- CHANGELOG.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 329deb57..1e593a8e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,17 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## v1.2.0dev [unreleased] + +### `Added` +- [#379](https://github.com/nf-core/taxprofiler/pull/379) Added Bracken-corrected Kraken2 report as output (added by @hkaspersen) + +### `Fixed` + +### `Dependencies` + +### `Deprecated` + ## v1.1.0 - Augmented Akita [2023-09-19] ### `Added` From 2f2224e7ff3a52d89b7893f73554fa3567128abb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A5kon=20Kaspersen?= Date: Fri, 29 Sep 2023 10:00:11 +0200 Subject: [PATCH 4/8] updated bracken module --- modules.json | 2 +- modules/nf-core/bracken/bracken/main.nf | 3 ++- modules/nf-core/bracken/bracken/meta.yml | 4 ++++ 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/modules.json b/modules.json index f7d76b4f..0774f09c 100644 --- a/modules.json +++ b/modules.json @@ -27,7 +27,7 @@ }, "bracken/bracken": { "branch": "master", - "git_sha": "911696ea0b62df80e900ef244d7867d177971f73", + "git_sha": "093e35505936bce5127e1d14966b6cac91cd137f", "installed_by": ["modules"] }, "bracken/combinebrackenoutputs": { diff --git a/modules/nf-core/bracken/bracken/main.nf b/modules/nf-core/bracken/bracken/main.nf index 453b415b..ec49c10e 100644 --- a/modules/nf-core/bracken/bracken/main.nf +++ b/modules/nf-core/bracken/bracken/main.nf @@ -14,7 +14,8 @@ process BRACKEN_BRACKEN { path database output: - tuple val(meta), path(bracken_report), emit: reports + tuple val(meta), path(bracken_report) , emit: reports + tuple val(meta), path("*bracken_species.txt"), emit: txt path "versions.yml" , emit: versions when: diff --git a/modules/nf-core/bracken/bracken/meta.yml b/modules/nf-core/bracken/bracken/meta.yml index 4a05eddc..43f0455a 100644 --- a/modules/nf-core/bracken/bracken/meta.yml +++ b/modules/nf-core/bracken/bracken/meta.yml @@ -43,6 +43,10 @@ output: type: file description: TSV output report of the re-estimated abundances pattern: "*.{tsv}" + - txt: + type: file + description: TXT file of bracken corrected results of Kraken2 report output + pattern: "*.txt" authors: - "@Midnighter" From 89f9051f0e2ef63fdc9196076218e5d2fce67bb2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A5kon=20Kaspersen?= Date: Sat, 30 Sep 2023 15:06:52 +0200 Subject: [PATCH 5/8] corrected bracken output glob --- conf/modules.config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/modules.config b/conf/modules.config index c0c72b9f..2c9ed8d4 100644 --- a/conf/modules.config +++ b/conf/modules.config @@ -471,7 +471,7 @@ process { publishDir = [ path: { "${params.outdir}/bracken/${meta.db_name}/" }, mode: params.publish_dir_mode, - pattern: '*{.tsv,.report_bracken_species.txt}' + pattern: '*{.tsv,.txt}' ] } From a29fa7d25592a65c020968b517825ba3d7834531 Mon Sep 17 00:00:00 2001 From: "James A. Fellows Yates" Date: Sun, 1 Oct 2023 17:39:51 +0200 Subject: [PATCH 6/8] Update conf/modules.config --- conf/modules.config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/modules.config b/conf/modules.config index d6e3e7a8..36209f3a 100644 --- a/conf/modules.config +++ b/conf/modules.config @@ -472,7 +472,7 @@ process { path: { "${params.outdir}/bracken/${meta.db_name}/" }, mode: params.publish_dir_mode, pattern: '*{.tsv,.txt}' - ] + ] } withName: BRACKEN_COMBINEBRACKENOUTPUTS { From 1dd9144c552e1b9034abf89c7f1028b1af27a8b6 Mon Sep 17 00:00:00 2001 From: "James A. Fellows Yates" Date: Sun, 1 Oct 2023 17:44:54 +0200 Subject: [PATCH 7/8] Update output.md --- docs/output.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/output.md b/docs/output.md index cae701f3..493eed21 100644 --- a/docs/output.md +++ b/docs/output.md @@ -345,6 +345,7 @@ The first step of using Bracken requires running Kraken2, therefore the initial - `bracken__combined_reports.txt`: combined bracken results as output from Bracken's `combine_bracken_outputs.py` script - `/` - `_.tsv`: TSV file containing per-sample summary of Bracken results with abundance information + - `_.report_bracken_species.txt`: Kraken2 style report with Bracken abundance information From e6c2cf9c6f99996659eb2036699876837291866e Mon Sep 17 00:00:00 2001 From: "James A. Fellows Yates" Date: Sun, 1 Oct 2023 17:45:46 +0200 Subject: [PATCH 8/8] Apply suggestions from code review --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index bec1d119..522df711 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,7 +7,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### `Added` -- [#379](https://github.com/nf-core/taxprofiler/pull/379) Added support for previously missing Bracken-corrected Kraken2 report as output (added by @hkaspersen) +- [#379](https://github.com/nf-core/taxprofiler/pull/379) Added support for previously missing Bracken-corrected Kraken2 report as output (added by @hkaspersen & @jfy133 ) - [#380](https://github.com/nf-core/taxprofiler/pull/380) Updated to nf-core pipeline template v2.10 (added by @LilyAnderssonLee & @sofstam) ### `Fixed`