From 80bd41354adcc3e8eb2cc0100f59b5b27314a018 Mon Sep 17 00:00:00 2001 From: "James A. Fellows Yates" Date: Fri, 12 Jan 2024 16:18:44 +0100 Subject: [PATCH 01/14] Post release version bump --- CHANGELOG.md | 10 ++++++++++ assets/multiqc_config.yml | 4 ++-- nextflow.config | 2 +- 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fd5261af..25cf8324 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,16 @@ 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). +## dev [unreleased] + +### `Added` + +### `Fixed` + +### `Dependencies` + +### `Deprecated` + ## v1.1.3 - Augmented Akita Patch [2024-01-12] ### `Added` diff --git a/assets/multiqc_config.yml b/assets/multiqc_config.yml index 58524b75..316663b5 100644 --- a/assets/multiqc_config.yml +++ b/assets/multiqc_config.yml @@ -1,7 +1,7 @@ report_comment: > - This report has been generated by the nf-core/taxprofiler + This report has been generated by the nf-core/taxprofiler analysis pipeline. For information about how to interpret these results, please see the - documentation. + documentation. report_section_order: "nf-core-taxprofiler-methods-description": diff --git a/nextflow.config b/nextflow.config index 518a4e92..28698045 100644 --- a/nextflow.config +++ b/nextflow.config @@ -372,7 +372,7 @@ manifest { description = """Taxonomic classification and profiling of shotgun short- and long-read metagenomic data""" mainScript = 'main.nf' nextflowVersion = '!>=23.04.0' - version = '1.1.3' + version = '1.1.4dev' doi = '10.1101/2023.10.20.563221' } From ea57403c5e4d682e826540342615d25f429b72b1 Mon Sep 17 00:00:00 2001 From: LilyAnderssonLee Date: Mon, 22 Jan 2024 12:56:12 +0100 Subject: [PATCH 02/14] fix the output of fastq in LONGREAD_HOSTREMOVAL --- conf/modules.config | 2 +- subworkflows/local/longread_hostremoval.nf | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/conf/modules.config b/conf/modules.config index b45267be..6782f266 100644 --- a/conf/modules.config +++ b/conf/modules.config @@ -380,7 +380,7 @@ process { [ path: { "${params.outdir}/samtools/fastq" }, mode: params.publish_dir_mode, - pattern: '*.fastq.gz', + pattern: '*.unmapped_other.fastq.gz', enabled: params.save_hostremoval_unmapped ], [ diff --git a/subworkflows/local/longread_hostremoval.nf b/subworkflows/local/longread_hostremoval.nf index c5a10436..bc146d6f 100644 --- a/subworkflows/local/longread_hostremoval.nf +++ b/subworkflows/local/longread_hostremoval.nf @@ -54,7 +54,7 @@ workflow LONGREAD_HOSTREMOVAL { emit: stats = SAMTOOLS_STATS.out.stats //channel: [val(meta), [reads ] ] - reads = SAMTOOLS_FASTQ.out.fastq.mix( SAMTOOLS_FASTQ.out.other) // channel: [ val(meta), [ reads ] ] + reads = SAMTOOLS_FASTQ.out.other // channel: [ val(meta), [ reads ] ] versions = ch_versions // channel: [ versions.yml ] mqc = ch_multiqc_files } From 08a05e18e72459677f45b212b35f28d917822634 Mon Sep 17 00:00:00 2001 From: LilyAnderssonLee Date: Mon, 22 Jan 2024 13:05:14 +0100 Subject: [PATCH 03/14] add changelog --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 25cf8324..1954eba1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### `Fixed` +- [#430](https://github.com/nf-core/taxprofiler/pull/430) Fix the fastq output in the module LONGREAD_HOSTREMOVAL. (fix by @LilyAnderssonLee) + ### `Dependencies` ### `Deprecated` From 7f621b38bd684808b99b127685a9c4adfd9550af Mon Sep 17 00:00:00 2001 From: LilyAnderssonLee Date: Mon, 22 Jan 2024 13:08:59 +0100 Subject: [PATCH 04/14] nf-core-bot to fix the linting --- .devcontainer/devcontainer.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 4ecfbfe3..4a9bc5c7 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -18,11 +18,11 @@ "python.linting.flake8Path": "/opt/conda/bin/flake8", "python.linting.pycodestylePath": "/opt/conda/bin/pycodestyle", "python.linting.pydocstylePath": "/opt/conda/bin/pydocstyle", - "python.linting.pylintPath": "/opt/conda/bin/pylint" + "python.linting.pylintPath": "/opt/conda/bin/pylint", }, // Add the IDs of extensions you want installed when the container is created. - "extensions": ["ms-python.python", "ms-python.vscode-pylance", "nf-core.nf-core-extensionpack"] - } - } + "extensions": ["ms-python.python", "ms-python.vscode-pylance", "nf-core.nf-core-extensionpack"], + }, + }, } From c1120baedd0d4f27fd68608f82b0fd660cd3d38c Mon Sep 17 00:00:00 2001 From: Sofia Stamouli Date: Mon, 22 Jan 2024 16:11:18 +0100 Subject: [PATCH 05/14] Update kaiju2table module --- CHANGELOG.md | 8 ++ modules.json | 2 +- .../nf-core/kaiju/kaiju2table/environment.yml | 7 ++ modules/nf-core/kaiju/kaiju2table/main.nf | 26 +++-- modules/nf-core/kaiju/kaiju2table/meta.yml | 8 +- .../kaiju/kaiju2table/tests/main.nf.test | 106 ++++++++++++++++++ .../kaiju/kaiju2table/tests/main.nf.test.snap | 39 +++++++ .../nf-core/kaiju/kaiju2table/tests/tags.yml | 2 + 8 files changed, 187 insertions(+), 11 deletions(-) create mode 100644 modules/nf-core/kaiju/kaiju2table/environment.yml create mode 100644 modules/nf-core/kaiju/kaiju2table/tests/main.nf.test create mode 100644 modules/nf-core/kaiju/kaiju2table/tests/main.nf.test.snap create mode 100644 modules/nf-core/kaiju/kaiju2table/tests/tags.yml diff --git a/CHANGELOG.md b/CHANGELOG.md index 25cf8324..ed8157c6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,8 +9,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### `Fixed` +[#431](https://github.com/nf-core/modules/pull/4781#event-11555493525) Updated kaiju2table module to report taxon names (fix by @Joon-Klaps) + ### `Dependencies` +| Tool | Previous version | New version | +| ------------- | ---------------- | ----------- | +| kaiju | 1.8.2 | 1.10.0 | + + + ### `Deprecated` ## v1.1.3 - Augmented Akita Patch [2024-01-12] diff --git a/modules.json b/modules.json index 9f195992..6de85b68 100644 --- a/modules.json +++ b/modules.json @@ -113,7 +113,7 @@ }, "kaiju/kaiju2table": { "branch": "master", - "git_sha": "911696ea0b62df80e900ef244d7867d177971f73", + "git_sha": "3db50674956b1fb3741a44eb917458d788a50197", "installed_by": ["modules"] }, "kmcp/profile": { diff --git a/modules/nf-core/kaiju/kaiju2table/environment.yml b/modules/nf-core/kaiju/kaiju2table/environment.yml new file mode 100644 index 00000000..18685f41 --- /dev/null +++ b/modules/nf-core/kaiju/kaiju2table/environment.yml @@ -0,0 +1,7 @@ +name: kaiju_kaiju2table +channels: + - conda-forge + - bioconda + - defaults +dependencies: + - bioconda::kaiju=1.10.0 diff --git a/modules/nf-core/kaiju/kaiju2table/main.nf b/modules/nf-core/kaiju/kaiju2table/main.nf index e426a062..44049744 100644 --- a/modules/nf-core/kaiju/kaiju2table/main.nf +++ b/modules/nf-core/kaiju/kaiju2table/main.nf @@ -2,13 +2,13 @@ process KAIJU_KAIJU2TABLE { tag "$meta.id" label 'process_single' - conda "bioconda::kaiju=1.8.2" + conda "${moduleDir}/environment.yml" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/kaiju:1.8.2--h5b5514e_1': - 'biocontainers/kaiju:1.8.2--h2e03b76_0' }" + 'https://depot.galaxyproject.org/singularity/kaiju:1.10.0--h43eeafb_0': + 'biocontainers/kaiju:1.10.0--h43eeafb_0' }" input: - tuple val(meta), path(results) + tuple val(meta), path(input) path db val taxon_rank @@ -24,13 +24,25 @@ process KAIJU_KAIJU2TABLE { def prefix = task.ext.prefix ?: "${meta.id}" """ dbnodes=`find -L ${db} -name "*nodes.dmp"` - dbname=`find -L ${db} -name "*.fmi" -not -name "._*"` + dbnames=`find -L ${db} -name "*names.dmp"` kaiju2table $args \\ -t \$dbnodes \\ - -n \$dbname \\ + -n \$dbnames \\ -r ${taxon_rank} \\ -o ${prefix}.txt \\ - ${results} + ${input} + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + kaiju: \$(echo \$( kaiju -h 2>&1 | sed -n 1p | sed 's/^.*Kaiju //' )) + END_VERSIONS + """ + + stub: + def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + """ + touch ${prefix}.txt cat <<-END_VERSIONS > versions.yml "${task.process}": diff --git a/modules/nf-core/kaiju/kaiju2table/meta.yml b/modules/nf-core/kaiju/kaiju2table/meta.yml index bc3e85d7..0f62374e 100644 --- a/modules/nf-core/kaiju/kaiju2table/meta.yml +++ b/modules/nf-core/kaiju/kaiju2table/meta.yml @@ -3,6 +3,7 @@ description: write your description here keywords: - classify - metagenomics + - taxonomic profiling tools: - kaiju: description: Fast and sensitive taxonomic classification for metagenomics @@ -11,7 +12,6 @@ tools: tool_dev_url: https://github.com/bioinformatics-centre/kaiju doi: "10.1038/ncomms11257" licence: ["GNU GPL v3"] - input: - meta: type: map @@ -27,7 +27,6 @@ input: description: | Taxonomic rank to display in report pattern: "phylum|class|order|family|genus|species" - output: - meta: type: map @@ -43,8 +42,11 @@ output: description: | Summary table for a given taxonomic rank pattern: "*.{tsv}" - authors: - "@sofstam" - "@talnor" - "@jfy133" +maintainers: + - "@sofstam" + - "@talnor" + - "@jfy133" diff --git a/modules/nf-core/kaiju/kaiju2table/tests/main.nf.test b/modules/nf-core/kaiju/kaiju2table/tests/main.nf.test new file mode 100644 index 00000000..d93fb31a --- /dev/null +++ b/modules/nf-core/kaiju/kaiju2table/tests/main.nf.test @@ -0,0 +1,106 @@ +nextflow_process { + + name "Test Process KAIJU_KAIJU2TABLE" + script "../main.nf" + process "KAIJU_KAIJU2TABLE" + + tag "modules" + tag "modules_nfcore" + tag "kaiju" + tag "kaiju/kaiju2table" + tag "kaiju/kaiju" + tag "untar" + + test("sarscov2 - fastq - single-end") { + + + setup { + run ("UNTAR"){ + script "../../../untar/main.nf" + process { + """ + input[0] = [ [], file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/db/kaiju.tar.gz', checkIfExists: true) ] + """ + } + } + + run("KAIJU_KAIJU") { + script "../../kaiju/main.nf" + process { + """ + input[0] = [ + [ id:'test', single_end:true ], // meta map + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true) + ] + input[1] = UNTAR.out.untar.map{ it[1] } + """ + } + } + } + + when { + process { + """ + input[0] = KAIJU_KAIJU.out.results + input[1] = UNTAR.out.untar.map{ it[1] } + input[2] = 'species' + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + + } + + test("sarscov2 - fastq - stub") { + + options "-stub" + + setup { + run ("UNTAR"){ + script "../../../untar/main.nf" + process { + """ + input[0] = [ [], file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/db/kaiju.tar.gz', checkIfExists: true) ] + """ + } + } + + run("KAIJU_KAIJU") { + script "../../kaiju/main.nf" + process { + """ + input[0] = [ + [ id:'test', single_end:true ], // meta map + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true) + ] + input[1] = UNTAR.out.untar.map{ it[1] } + """ + } + } + } + + when { + process { + """ + input[0] = KAIJU_KAIJU.out.results + input[1] = UNTAR.out.untar.map{ it[1] } + input[2] = 'species' + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(file(process.out.summary[0][1]).name).match() } + ) + } + + } +} diff --git a/modules/nf-core/kaiju/kaiju2table/tests/main.nf.test.snap b/modules/nf-core/kaiju/kaiju2table/tests/main.nf.test.snap new file mode 100644 index 00000000..e97eb8b8 --- /dev/null +++ b/modules/nf-core/kaiju/kaiju2table/tests/main.nf.test.snap @@ -0,0 +1,39 @@ +{ + "sarscov2 - fastq - stub": { + "content": [ + "test.txt" + ], + "timestamp": "2024-01-20T16:10:49.521322767" + }, + "sarscov2 - fastq - single-end": { + "content": [ + { + "0": [ + [ + { + "id": "test", + "single_end": true + }, + "test.txt:md5,0d9f8fd36fcf2888296ae12632c5f0a8" + ] + ], + "1": [ + "versions.yml:md5,2b2b98cb635a611e5eb964e5a77f6248" + ], + "summary": [ + [ + { + "id": "test", + "single_end": true + }, + "test.txt:md5,0d9f8fd36fcf2888296ae12632c5f0a8" + ] + ], + "versions": [ + "versions.yml:md5,2b2b98cb635a611e5eb964e5a77f6248" + ] + } + ], + "timestamp": "2024-01-20T16:08:47.644443775" + } +} diff --git a/modules/nf-core/kaiju/kaiju2table/tests/tags.yml b/modules/nf-core/kaiju/kaiju2table/tests/tags.yml new file mode 100644 index 00000000..0fa6b81e --- /dev/null +++ b/modules/nf-core/kaiju/kaiju2table/tests/tags.yml @@ -0,0 +1,2 @@ +kaiju/kaiju2table: + - "modules/nf-core/kaiju/kaiju2table/**" From e6b9b263b5bd6b5152aabff3cdbcbe2bbbef813a Mon Sep 17 00:00:00 2001 From: Sofia Stamouli Date: Mon, 22 Jan 2024 16:15:40 +0100 Subject: [PATCH 06/14] Prettier --- CHANGELOG.md | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ed8157c6..d0a46624 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,11 +13,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### `Dependencies` -| Tool | Previous version | New version | -| ------------- | ---------------- | ----------- | -| kaiju | 1.8.2 | 1.10.0 | - - +| Tool | Previous version | New version | +| ----- | ---------------- | ----------- | +| kaiju | 1.8.2 | 1.10.0 | ### `Deprecated` From 28c850f3c8a599a5c25293a5e4bf399ce232615d Mon Sep 17 00:00:00 2001 From: LilyAnderssonLee Date: Mon, 22 Jan 2024 18:29:22 +0100 Subject: [PATCH 07/14] update the publishDir pattern for samtools/fastq --- conf/modules.config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/modules.config b/conf/modules.config index 6782f266..a6c0f82b 100644 --- a/conf/modules.config +++ b/conf/modules.config @@ -380,7 +380,7 @@ process { [ path: { "${params.outdir}/samtools/fastq" }, mode: params.publish_dir_mode, - pattern: '*.unmapped_other.fastq.gz', + pattern: '*_other.fastq.gz', enabled: params.save_hostremoval_unmapped ], [ From eb96105f49e6f7ff2ea96b6ebad470d40531f5fc Mon Sep 17 00:00:00 2001 From: nf-core-bot Date: Tue, 23 Jan 2024 14:05:46 +0100 Subject: [PATCH 08/14] Prettier --- .devcontainer/devcontainer.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 4a9bc5c7..4ecfbfe3 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -18,11 +18,11 @@ "python.linting.flake8Path": "/opt/conda/bin/flake8", "python.linting.pycodestylePath": "/opt/conda/bin/pycodestyle", "python.linting.pydocstylePath": "/opt/conda/bin/pydocstyle", - "python.linting.pylintPath": "/opt/conda/bin/pylint", + "python.linting.pylintPath": "/opt/conda/bin/pylint" }, // Add the IDs of extensions you want installed when the container is created. - "extensions": ["ms-python.python", "ms-python.vscode-pylance", "nf-core.nf-core-extensionpack"], - }, - }, + "extensions": ["ms-python.python", "ms-python.vscode-pylance", "nf-core.nf-core-extensionpack"] + } + } } From 761ba5b208cf01bc7457fc207c6e246cbc11474f Mon Sep 17 00:00:00 2001 From: nf-core-bot Date: Tue, 23 Jan 2024 14:12:20 +0100 Subject: [PATCH 09/14] Prettier --- CHANGELOG.md | 1 - 1 file changed, 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b81e1ee9..7aa4584d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,7 +12,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - [#431](https://github.com/nf-core/modules/pull/4781#event-11555493525) Updated kaiju2table module to report taxon names (fix by @Joon-Klaps) - [#430](https://github.com/nf-core/taxprofiler/pull/430) Fix the fastq output in the module LONGREAD_HOSTREMOVAL. (fix by @LilyAnderssonLee) - ### `Dependencies` | Tool | Previous version | New version | From bd22884f3828295ee6593c4fe47738b389463a2a Mon Sep 17 00:00:00 2001 From: nf-core-bot Date: Tue, 23 Jan 2024 14:20:05 +0100 Subject: [PATCH 10/14] [automated] Fix linting with Prettier --- .devcontainer/devcontainer.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 4ecfbfe3..8d7e49f6 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -18,11 +18,11 @@ "python.linting.flake8Path": "/opt/conda/bin/flake8", "python.linting.pycodestylePath": "/opt/conda/bin/pycodestyle", "python.linting.pydocstylePath": "/opt/conda/bin/pydocstyle", - "python.linting.pylintPath": "/opt/conda/bin/pylint" + "python.linting.pylintPath": "/opt/conda/bin/pylint", }, // Add the IDs of extensions you want installed when the container is created. "extensions": ["ms-python.python", "ms-python.vscode-pylance", "nf-core.nf-core-extensionpack"] - } - } + }, + }, } From f5f5670a08653382519af391d87afb6341108886 Mon Sep 17 00:00:00 2001 From: nf-core-bot Date: Tue, 23 Jan 2024 14:34:04 +0100 Subject: [PATCH 11/14] Prettier --- .devcontainer/devcontainer.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 8d7e49f6..4ecfbfe3 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -18,11 +18,11 @@ "python.linting.flake8Path": "/opt/conda/bin/flake8", "python.linting.pycodestylePath": "/opt/conda/bin/pycodestyle", "python.linting.pydocstylePath": "/opt/conda/bin/pydocstyle", - "python.linting.pylintPath": "/opt/conda/bin/pylint", + "python.linting.pylintPath": "/opt/conda/bin/pylint" }, // Add the IDs of extensions you want installed when the container is created. "extensions": ["ms-python.python", "ms-python.vscode-pylance", "nf-core.nf-core-extensionpack"] - }, - }, + } + } } From 10c4fad993696e2427512500d71faaea58c06dbd Mon Sep 17 00:00:00 2001 From: nf-core-bot Date: Tue, 23 Jan 2024 14:37:54 +0100 Subject: [PATCH 12/14] Prettier --- .devcontainer/devcontainer.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 4ecfbfe3..4a9bc5c7 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -18,11 +18,11 @@ "python.linting.flake8Path": "/opt/conda/bin/flake8", "python.linting.pycodestylePath": "/opt/conda/bin/pycodestyle", "python.linting.pydocstylePath": "/opt/conda/bin/pydocstyle", - "python.linting.pylintPath": "/opt/conda/bin/pylint" + "python.linting.pylintPath": "/opt/conda/bin/pylint", }, // Add the IDs of extensions you want installed when the container is created. - "extensions": ["ms-python.python", "ms-python.vscode-pylance", "nf-core.nf-core-extensionpack"] - } - } + "extensions": ["ms-python.python", "ms-python.vscode-pylance", "nf-core.nf-core-extensionpack"], + }, + }, } From 913a2d744de6cb71788049c9b5fc02b6704ee61a Mon Sep 17 00:00:00 2001 From: nf-core-bot Date: Tue, 23 Jan 2024 17:10:15 +0100 Subject: [PATCH 13/14] Update all kaiju modules --- modules.json | 4 +- modules/nf-core/kaiju/kaiju/environment.yml | 7 ++ modules/nf-core/kaiju/kaiju/main.nf | 20 ++- modules/nf-core/kaiju/kaiju/meta.yml | 9 +- .../nf-core/kaiju/kaiju/tests/main.nf.test | 117 ++++++++++++++++++ .../kaiju/kaiju/tests/main.nf.test.snap | 8 ++ modules/nf-core/kaiju/kaiju/tests/tags.yml | 2 + .../nf-core/kaiju/kaiju2krona/environment.yml | 7 ++ modules/nf-core/kaiju/kaiju2krona/main.nf | 19 ++- modules/nf-core/kaiju/kaiju2krona/meta.yml | 5 +- .../kaiju/kaiju2krona/tests/main.nf.test | 105 ++++++++++++++++ .../kaiju/kaiju2krona/tests/main.nf.test.snap | 39 ++++++ .../nf-core/kaiju/kaiju2krona/tests/tags.yml | 2 + 13 files changed, 329 insertions(+), 15 deletions(-) create mode 100644 modules/nf-core/kaiju/kaiju/environment.yml create mode 100644 modules/nf-core/kaiju/kaiju/tests/main.nf.test create mode 100644 modules/nf-core/kaiju/kaiju/tests/main.nf.test.snap create mode 100644 modules/nf-core/kaiju/kaiju/tests/tags.yml create mode 100644 modules/nf-core/kaiju/kaiju2krona/environment.yml create mode 100644 modules/nf-core/kaiju/kaiju2krona/tests/main.nf.test create mode 100644 modules/nf-core/kaiju/kaiju2krona/tests/main.nf.test.snap create mode 100644 modules/nf-core/kaiju/kaiju2krona/tests/tags.yml diff --git a/modules.json b/modules.json index 6de85b68..938aaf58 100644 --- a/modules.json +++ b/modules.json @@ -103,12 +103,12 @@ }, "kaiju/kaiju": { "branch": "master", - "git_sha": "911696ea0b62df80e900ef244d7867d177971f73", + "git_sha": "3db50674956b1fb3741a44eb917458d788a50197", "installed_by": ["modules"] }, "kaiju/kaiju2krona": { "branch": "master", - "git_sha": "911696ea0b62df80e900ef244d7867d177971f73", + "git_sha": "3db50674956b1fb3741a44eb917458d788a50197", "installed_by": ["modules"] }, "kaiju/kaiju2table": { diff --git a/modules/nf-core/kaiju/kaiju/environment.yml b/modules/nf-core/kaiju/kaiju/environment.yml new file mode 100644 index 00000000..baac450b --- /dev/null +++ b/modules/nf-core/kaiju/kaiju/environment.yml @@ -0,0 +1,7 @@ +name: kaiju_kaiju +channels: + - conda-forge + - bioconda + - defaults +dependencies: + - bioconda::kaiju=1.10.0 diff --git a/modules/nf-core/kaiju/kaiju/main.nf b/modules/nf-core/kaiju/kaiju/main.nf index 12f51f2c..2f5f6e7d 100644 --- a/modules/nf-core/kaiju/kaiju/main.nf +++ b/modules/nf-core/kaiju/kaiju/main.nf @@ -2,10 +2,10 @@ process KAIJU_KAIJU { tag "$meta.id" label 'process_high' - conda "bioconda::kaiju=1.8.2" + conda "${moduleDir}/environment.yml" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/kaiju:1.8.2--h5b5514e_1': - 'biocontainers/kaiju:1.8.2--h5b5514e_1' }" + 'https://depot.galaxyproject.org/singularity/kaiju:1.10.0--h43eeafb_0': + 'biocontainers/kaiju:1.10.0--h43eeafb_0' }" input: tuple val(meta), path(reads) @@ -38,4 +38,18 @@ process KAIJU_KAIJU { kaiju: \$(echo \$( kaiju -h 2>&1 | sed -n 1p | sed 's/^.*Kaiju //' )) END_VERSIONS """ + + stub: + def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + def input = meta.single_end ? "-i ${reads}" : "-i ${reads[0]} -j ${reads[1]}" + """ + touch ${prefix}.tsv + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + kaiju: \$(echo \$( kaiju -h 2>&1 | sed -n 1p | sed 's/^.*Kaiju //' )) + END_VERSIONS + """ + } diff --git a/modules/nf-core/kaiju/kaiju/meta.yml b/modules/nf-core/kaiju/kaiju/meta.yml index e24c8efc..33c85690 100644 --- a/modules/nf-core/kaiju/kaiju/meta.yml +++ b/modules/nf-core/kaiju/kaiju/meta.yml @@ -13,7 +13,6 @@ tools: tool_dev_url: https://github.com/bioinformatics-centre/kaiju doi: "10.1038/ncomms11257" licence: ["GNU GPL v3"] - input: - meta: type: map @@ -27,11 +26,10 @@ input: respectively. pattern: "*.{fastq,fq,fasta,fa,fsa,fas,fna,fastq.gz,fq.gz,fasta.gz,fa.gz,fsa.gz,fas.gz,fna.gz}" - db: - type: files + type: directory description: | List containing the database and nodes files for Kaiju e.g. [ 'database.fmi', 'nodes.dmp' ] - output: - meta: type: map @@ -46,8 +44,11 @@ output: type: file description: Results with taxonomic classification of each read pattern: "*.tsv" - authors: - "@talnor" - "@sofstam" - "@jfy133" +maintainers: + - "@talnor" + - "@sofstam" + - "@jfy133" diff --git a/modules/nf-core/kaiju/kaiju/tests/main.nf.test b/modules/nf-core/kaiju/kaiju/tests/main.nf.test new file mode 100644 index 00000000..ede2f952 --- /dev/null +++ b/modules/nf-core/kaiju/kaiju/tests/main.nf.test @@ -0,0 +1,117 @@ +nextflow_process { + + name "Test Process KAIJU_KAIJU" + script "../main.nf" + process "KAIJU_KAIJU" + + tag "modules" + tag "modules_nfcore" + tag "kaiju" + tag "kaiju/kaiju" + tag "untar" + + test("sarscov2 - fastq - single-end") { + + setup { + run ("UNTAR"){ + script "../../../untar/main.nf" + process { + """ + input[0] = [ [], file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/db/kaiju.tar.gz', checkIfExists: true) ] + """ + } + } + } + + when { + process { + """ + input[0] = [ + [ id:'test', single_end:true ], // meta map + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true) + ] + input[1] = UNTAR.out.untar.map{ it[1] } + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert path(process.out.results[0][1]).getText().contains("C\tERR5069949.2257580\t2697049") } + ) + } + + } + + test("sarscov2 - fastq - paired-end") { + + setup { + run ("UNTAR"){ + script "../../../untar/main.nf" + process { + """ + input[0] = [ [], file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/db/kaiju.tar.gz', checkIfExists: true) ] + """ + } + } + } + + when { + process { + """ + input[0] = [ + [ id:'test', single_end:false ], + [ file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_2.fastq.gz', checkIfExists: true)] + ] + input[1] = UNTAR.out.untar.map{ it[1] } + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert path(process.out.results[0][1]).getText().contains("C\tERR5069949.2257580\t2697049") } + ) + } + } + + test("sarscov2 - fastq - stub") { + + options '-stub' + + setup { + run ("UNTAR"){ + script "../../../untar/main.nf" + process { + """ + input[0] = [ [], file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/db/kaiju.tar.gz', checkIfExists: true) ] + """ + } + } + } + + when { + process { + """ + input[0] = [ + [ id:'test', single_end:false ], + [ file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_2.fastq.gz', checkIfExists: true)] + ] + input[1] = UNTAR.out.untar.map{ it[1] } + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(file(process.out.results[0][1]).name).match() } + ) + } + } + +} diff --git a/modules/nf-core/kaiju/kaiju/tests/main.nf.test.snap b/modules/nf-core/kaiju/kaiju/tests/main.nf.test.snap new file mode 100644 index 00000000..08735f47 --- /dev/null +++ b/modules/nf-core/kaiju/kaiju/tests/main.nf.test.snap @@ -0,0 +1,8 @@ +{ + "sarscov2 - fastq - stub": { + "content": [ + "test.tsv" + ], + "timestamp": "2024-01-20T14:44:57.116024519" + } +} \ No newline at end of file diff --git a/modules/nf-core/kaiju/kaiju/tests/tags.yml b/modules/nf-core/kaiju/kaiju/tests/tags.yml new file mode 100644 index 00000000..c73d4df5 --- /dev/null +++ b/modules/nf-core/kaiju/kaiju/tests/tags.yml @@ -0,0 +1,2 @@ +kaiju/kaiju: + - "modules/nf-core/kaiju/kaiju/**" diff --git a/modules/nf-core/kaiju/kaiju2krona/environment.yml b/modules/nf-core/kaiju/kaiju2krona/environment.yml new file mode 100644 index 00000000..2905be97 --- /dev/null +++ b/modules/nf-core/kaiju/kaiju2krona/environment.yml @@ -0,0 +1,7 @@ +name: kaiju_kaiju2krona +channels: + - conda-forge + - bioconda + - defaults +dependencies: + - bioconda::kaiju=1.10.0 diff --git a/modules/nf-core/kaiju/kaiju2krona/main.nf b/modules/nf-core/kaiju/kaiju2krona/main.nf index efa05d4d..85d2dfd2 100644 --- a/modules/nf-core/kaiju/kaiju2krona/main.nf +++ b/modules/nf-core/kaiju/kaiju2krona/main.nf @@ -2,10 +2,10 @@ process KAIJU_KAIJU2KRONA { tag "$meta.id" label 'process_single' - conda "bioconda::kaiju=1.8.2" + conda "${moduleDir}/environment.yml" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/kaiju:1.8.2--h5b5514e_1': - 'biocontainers/kaiju:1.8.2--h5b5514e_1' }" + 'https://depot.galaxyproject.org/singularity/kaiju:1.10.0--h43eeafb_0': + 'biocontainers/kaiju:1.10.0--h43eeafb_0' }" input: tuple val(meta), path(tsv) @@ -36,4 +36,17 @@ process KAIJU_KAIJU2KRONA { kaiju: \$(echo \$( kaiju -h 2>&1 | sed -n 1p | sed 's/^.*Kaiju //' )) END_VERSIONS """ + + stub: + def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + """ + touch ${prefix}.txt + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + kaiju: \$(echo \$( kaiju -h 2>&1 | sed -n 1p | sed 's/^.*Kaiju //' )) + END_VERSIONS + """ } + diff --git a/modules/nf-core/kaiju/kaiju2krona/meta.yml b/modules/nf-core/kaiju/kaiju2krona/meta.yml index a0dc2fdb..355416f8 100644 --- a/modules/nf-core/kaiju/kaiju2krona/meta.yml +++ b/modules/nf-core/kaiju/kaiju2krona/meta.yml @@ -13,7 +13,6 @@ tools: tool_dev_url: https://github.com/bioinformatics-centre/kaiju doi: "10.1038/ncomms11257" licence: ["GNU GPL v3"] - input: - meta: type: map @@ -24,7 +23,6 @@ input: type: file description: Kaiju tab-separated output file pattern: "*.{tsv,txt}" - output: - meta: type: map @@ -39,6 +37,7 @@ output: type: file description: Krona text-based input file converted from Kaiju report pattern: "*.{txt,krona}" - authors: - "@MillironX" +maintainers: + - "@MillironX" diff --git a/modules/nf-core/kaiju/kaiju2krona/tests/main.nf.test b/modules/nf-core/kaiju/kaiju2krona/tests/main.nf.test new file mode 100644 index 00000000..cf522cd0 --- /dev/null +++ b/modules/nf-core/kaiju/kaiju2krona/tests/main.nf.test @@ -0,0 +1,105 @@ +nextflow_process { + + name "Test Process KAIJU_KAIJU2KRONA" + script "../main.nf" + process "KAIJU_KAIJU2KRONA" + + tag "modules" + tag "modules_nfcore" + tag "kaiju" + tag "kaiju/kaiju2krona" + tag "kaiju/kaiju" + tag "untar" + + test("sarscov2 - fastq - single-end") { + + + setup { + run ("UNTAR"){ + script "../../../untar/main.nf" + process { + """ + input[0] = [ [], file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/db/kaiju.tar.gz', checkIfExists: true) ] + """ + } + } + + run("KAIJU_KAIJU") { + script "../../kaiju/main.nf" + process { + """ + input[0] = [ + [ id:'test', single_end:true ], // meta map + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true) + ] + input[1] = UNTAR.out.untar.map{ it[1] } + """ + } + } + } + + when { + process { + """ + input[0] = KAIJU_KAIJU.out.results + input[1] = UNTAR.out.untar.map{ it[1] } + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + + } + + test("sarscov2 - fastq - stub") { + + options "-stub" + + setup { + run ("UNTAR"){ + script "../../../untar/main.nf" + process { + """ + input[0] = [ [], file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/db/kaiju.tar.gz', checkIfExists: true) ] + """ + } + } + + run("KAIJU_KAIJU") { + script "../../kaiju/main.nf" + process { + """ + input[0] = [ + [ id:'test', single_end:true ], // meta map + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true) + ] + input[1] = UNTAR.out.untar.map{ it[1] } + """ + } + } + } + + when { + process { + """ + input[0] = KAIJU_KAIJU.out.results + input[1] = UNTAR.out.untar.map{ it[1] } + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(file(process.out.txt[0][1]).name).match() } + ) + } + + } + +} diff --git a/modules/nf-core/kaiju/kaiju2krona/tests/main.nf.test.snap b/modules/nf-core/kaiju/kaiju2krona/tests/main.nf.test.snap new file mode 100644 index 00000000..5532a694 --- /dev/null +++ b/modules/nf-core/kaiju/kaiju2krona/tests/main.nf.test.snap @@ -0,0 +1,39 @@ +{ + "sarscov2 - fastq - stub": { + "content": [ + "test.txt" + ], + "timestamp": "2024-01-20T15:06:32.789121011" + }, + "sarscov2 - fastq - single-end": { + "content": [ + { + "0": [ + [ + { + "id": "test", + "single_end": true + }, + "test.txt:md5,68b2309d37767e444193fa6cea7c0494" + ] + ], + "1": [ + "versions.yml:md5,f75aa349971d581981d3a0399450b395" + ], + "txt": [ + [ + { + "id": "test", + "single_end": true + }, + "test.txt:md5,68b2309d37767e444193fa6cea7c0494" + ] + ], + "versions": [ + "versions.yml:md5,f75aa349971d581981d3a0399450b395" + ] + } + ], + "timestamp": "2024-01-20T15:06:08.840865115" + } +} \ No newline at end of file diff --git a/modules/nf-core/kaiju/kaiju2krona/tests/tags.yml b/modules/nf-core/kaiju/kaiju2krona/tests/tags.yml new file mode 100644 index 00000000..661fe924 --- /dev/null +++ b/modules/nf-core/kaiju/kaiju2krona/tests/tags.yml @@ -0,0 +1,2 @@ +kaiju/kaiju2krona: + - "modules/nf-core/kaiju/kaiju2krona/**" From 47978b7d9009117e6f16ea1688c84fba262ac812 Mon Sep 17 00:00:00 2001 From: nf-core-bot Date: Wed, 24 Jan 2024 10:53:12 +0100 Subject: [PATCH 14/14] Patch release 1.1.4 --- CHANGELOG.md | 2 +- assets/multiqc_config.yml | 4 ++-- nextflow.config | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7aa4584d..87e86cee 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,7 +3,7 @@ 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). -## dev [unreleased] +## v1.1.4 - Augmented Akita Patch [2024-01-24] ### `Added` diff --git a/assets/multiqc_config.yml b/assets/multiqc_config.yml index 316663b5..7a6b1290 100644 --- a/assets/multiqc_config.yml +++ b/assets/multiqc_config.yml @@ -1,7 +1,7 @@ report_comment: > - This report has been generated by the nf-core/taxprofiler + This report has been generated by the nf-core/taxprofiler analysis pipeline. For information about how to interpret these results, please see the - documentation. + documentation. report_section_order: "nf-core-taxprofiler-methods-description": diff --git a/nextflow.config b/nextflow.config index 28698045..5a955074 100644 --- a/nextflow.config +++ b/nextflow.config @@ -372,7 +372,7 @@ manifest { description = """Taxonomic classification and profiling of shotgun short- and long-read metagenomic data""" mainScript = 'main.nf' nextflowVersion = '!>=23.04.0' - version = '1.1.4dev' + version = '1.1.4' doi = '10.1101/2023.10.20.563221' }