From a5e7943f2be542cd186abbed45fb522546605dd8 Mon Sep 17 00:00:00 2001 From: Simone Carpanzano <96130486+carpanz@users.noreply.github.com> Date: Wed, 27 Apr 2022 22:43:31 +0200 Subject: [PATCH 01/36] update krona module add "$args" to the module --- modules/krona/kronadb/main.nf | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/krona/kronadb/main.nf b/modules/krona/kronadb/main.nf index afcb0694..3ba745a2 100644 --- a/modules/krona/kronadb/main.nf +++ b/modules/krona/kronadb/main.nf @@ -18,7 +18,9 @@ process KRONA_KRONADB { script: def args = task.ext.args ?: '' """ - ktUpdateTaxonomy.sh taxonomy + ktUpdateTaxonomy.sh \\ + $args \\ + taxonomy cat <<-END_VERSIONS > versions.yml "${task.process}": From 2efa5a09abb1393f10ffa240cff388e09dab9b40 Mon Sep 17 00:00:00 2001 From: Simone Carpanzano <96130486+carpanz@users.noreply.github.com> Date: Fri, 29 Apr 2022 00:00:13 +0200 Subject: [PATCH 02/36] Update main.nf $args line 28 --- modules/krona/ktimporttaxonomy/main.nf | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/krona/ktimporttaxonomy/main.nf b/modules/krona/ktimporttaxonomy/main.nf index 7837bb87..4fa15669 100644 --- a/modules/krona/ktimporttaxonomy/main.nf +++ b/modules/krona/ktimporttaxonomy/main.nf @@ -23,7 +23,10 @@ process KRONA_KTIMPORTTAXONOMY { script: def args = task.ext.args ?: '' """ - ktImportTaxonomy "$report" -tax taxonomy + ktImportTaxonomy \\ + "$report" \\ + $args \\ + -tax taxonomy cat <<-END_VERSIONS > versions.yml "${task.process}": From 10a3718ad67ff27f99551c8a5f39c9936e6263b3 Mon Sep 17 00:00:00 2001 From: Simone Carpanzano <96130486+carpanz@users.noreply.github.com> Date: Fri, 29 Apr 2022 00:03:54 +0200 Subject: [PATCH 03/36] Update test_data.config add 'metagenome' in sarscov2 --- tests/config/test_data.config | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/config/test_data.config b/tests/config/test_data.config index 1a5c377c..51454c39 100644 --- a/tests/config/test_data.config +++ b/tests/config/test_data.config @@ -110,6 +110,10 @@ params { test_sequencing_summary = "${test_data_dir}/genomics/sarscov2/nanopore/sequencing_summary/test.sequencing_summary.txt" } + 'metagenome' { + classified_reads_alignment = "${test_data_dir}/genomics/sarscov2/metagenome/test_1.kraken2.reads.txt + report = "${test_data_dir}/genomics/sarscov2/metagenome/test_1.kraken2.report.txt + } } 'homo_sapiens' { 'genome' { From f13a0070d0f68ff47fc6e1cac7b21b88e52f877f Mon Sep 17 00:00:00 2001 From: Simone Carpanzano <96130486+carpanz@users.noreply.github.com> Date: Fri, 29 Apr 2022 00:04:49 +0200 Subject: [PATCH 04/36] Update test_data.config --- tests/config/test_data.config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/config/test_data.config b/tests/config/test_data.config index 51454c39..ff97106d 100644 --- a/tests/config/test_data.config +++ b/tests/config/test_data.config @@ -112,7 +112,7 @@ params { } 'metagenome' { classified_reads_alignment = "${test_data_dir}/genomics/sarscov2/metagenome/test_1.kraken2.reads.txt - report = "${test_data_dir}/genomics/sarscov2/metagenome/test_1.kraken2.report.txt + report_txt = "${test_data_dir}/genomics/sarscov2/metagenome/test_1.kraken2.report.txt } } 'homo_sapiens' { From a76be27d9f071129d1a0fe9c952c6452cf2ef05f Mon Sep 17 00:00:00 2001 From: Simone Carpanzano <96130486+carpanz@users.noreply.github.com> Date: Fri, 29 Apr 2022 00:06:55 +0200 Subject: [PATCH 05/36] Update test_data.config --- tests/config/test_data.config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/config/test_data.config b/tests/config/test_data.config index ff97106d..7f305cda 100644 --- a/tests/config/test_data.config +++ b/tests/config/test_data.config @@ -112,7 +112,7 @@ params { } 'metagenome' { classified_reads_alignment = "${test_data_dir}/genomics/sarscov2/metagenome/test_1.kraken2.reads.txt - report_txt = "${test_data_dir}/genomics/sarscov2/metagenome/test_1.kraken2.report.txt + report = '${test_data_dir}/genomics/sarscov2/metagenome/test_1.kraken2.report.txt } } 'homo_sapiens' { From a6026e6d3079490a7ab94c456bf439bfb4d0747d Mon Sep 17 00:00:00 2001 From: Simone Carpanzano <96130486+carpanz@users.noreply.github.com> Date: Fri, 29 Apr 2022 00:08:27 +0200 Subject: [PATCH 06/36] Update test_data.config --- tests/config/test_data.config | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/config/test_data.config b/tests/config/test_data.config index 7f305cda..579695a8 100644 --- a/tests/config/test_data.config +++ b/tests/config/test_data.config @@ -111,8 +111,8 @@ params { test_sequencing_summary = "${test_data_dir}/genomics/sarscov2/nanopore/sequencing_summary/test.sequencing_summary.txt" } 'metagenome' { - classified_reads_alignment = "${test_data_dir}/genomics/sarscov2/metagenome/test_1.kraken2.reads.txt - report = '${test_data_dir}/genomics/sarscov2/metagenome/test_1.kraken2.report.txt + classified_reads_alignment = "${test_data_dir}/genomics/sarscov2/metagenome/test_1.kraken2.reads.txt" + report = "${test_data_dir}/genomics/sarscov2/metagenome/test_1.kraken2.report.txt" } } 'homo_sapiens' { From 05e283405c7a4088f7c65f79ba4a2acef06ce839 Mon Sep 17 00:00:00 2001 From: Simone Carpanzano <96130486+carpanz@users.noreply.github.com> Date: Fri, 29 Apr 2022 00:13:01 +0200 Subject: [PATCH 07/36] Update test_data.config --- tests/config/test_data.config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/config/test_data.config b/tests/config/test_data.config index 579695a8..4337d5b9 100644 --- a/tests/config/test_data.config +++ b/tests/config/test_data.config @@ -111,7 +111,7 @@ params { test_sequencing_summary = "${test_data_dir}/genomics/sarscov2/nanopore/sequencing_summary/test.sequencing_summary.txt" } 'metagenome' { - classified_reads_alignment = "${test_data_dir}/genomics/sarscov2/metagenome/test_1.kraken2.reads.txt" + classified_reads_assignment = "${test_data_dir}/genomics/sarscov2/metagenome/test_1.kraken2.reads.txt" report = "${test_data_dir}/genomics/sarscov2/metagenome/test_1.kraken2.report.txt" } } From 20787514d91b5fc699e85b8a1558b5b4de97f451 Mon Sep 17 00:00:00 2001 From: Carpanzano Date: Fri, 29 Apr 2022 15:11:21 +0200 Subject: [PATCH 08/36] modifiche per il test --- tests/modules/krona/ktimporttaxonomy/main.nf | 21 +++++++++++++++---- .../krona/ktimporttaxonomy/nextflow.config | 8 +++++++ 2 files changed, 25 insertions(+), 4 deletions(-) diff --git a/tests/modules/krona/ktimporttaxonomy/main.nf b/tests/modules/krona/ktimporttaxonomy/main.nf index a23e6fcb..280658a5 100644 --- a/tests/modules/krona/ktimporttaxonomy/main.nf +++ b/tests/modules/krona/ktimporttaxonomy/main.nf @@ -2,15 +2,28 @@ nextflow.enable.dsl = 2 -include { KRONA_KTIMPORTTAXONOMY } from '../../../../modules/krona/ktimporttaxonomy/main.nf' +include { KRONA_KTIMPORTTAXONOMY_READS } from '../../../../modules/krona/ktimporttaxonomy/main.nf' -workflow test_krona_ktimporttaxonomy { +include { KRONA_KTIMPORTTAXONOMY_REPORT } from '../../../../modules/krona/ktimporttaxonomy/main.nf' + +workflow test_krona_ktimporttaxonomy_reads { input = [ [ id:'test', single_end:false ], // meta map - file(params.test_data['generic']['txt']['hello'], checkIfExists: true) + file(params.test_data['sarscov2']['metagenome']['test_1.kraken2.reads.txt'], checkIfExists: true) ] taxonomy = file(params.test_data['generic']['txt']['hello'], checkIfExists: true) - KRONA_KTIMPORTTAXONOMY ( input, taxonomy ) + KRONA_KTIMPORTTAXONOMY_READS ( input, taxonomy ) +} + +workflow test_krona_ktimporttaxonomy_report { + + input = [ + [ id:'test', single_end:false ], // meta map + file(params.test_data['sarscov2']['metagenome']['test_1.kraken2.report.txt'], checkIfExists: true) + ] + taxonomy = file(params.test_data['generic']['txt']['hello'], checkIfExists: true) + + KRONA_KTIMPORTTAXONOMY_REPORT ( input, taxonomy ) } diff --git a/tests/modules/krona/ktimporttaxonomy/nextflow.config b/tests/modules/krona/ktimporttaxonomy/nextflow.config index 8730f1c4..0abcdbeb 100644 --- a/tests/modules/krona/ktimporttaxonomy/nextflow.config +++ b/tests/modules/krona/ktimporttaxonomy/nextflow.config @@ -2,4 +2,12 @@ process { publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + withName: CLASSIFIED_READS { + ext.args = '-t 3' + } + + withName: CLASSIFIED_REPORT { + ext.args = '-m 3 -t 5' + } + } From d9d0eb393bcc16d672ae39418dd6b4296777e95d Mon Sep 17 00:00:00 2001 From: Simone Carpanzano <96130486+carpanz@users.noreply.github.com> Date: Fri, 29 Apr 2022 15:39:50 +0200 Subject: [PATCH 09/36] Update nextflow.config --- tests/modules/krona/ktimporttaxonomy/nextflow.config | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/modules/krona/ktimporttaxonomy/nextflow.config b/tests/modules/krona/ktimporttaxonomy/nextflow.config index 0abcdbeb..fb4d86f5 100644 --- a/tests/modules/krona/ktimporttaxonomy/nextflow.config +++ b/tests/modules/krona/ktimporttaxonomy/nextflow.config @@ -2,11 +2,11 @@ process { publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } - withName: CLASSIFIED_READS { + withName: KRONA_KTIMPORTTAXONOMY_READS { ext.args = '-t 3' } - withName: CLASSIFIED_REPORT { + withName: KRONA_KTIMPORTTAXONOMY_REPORT { ext.args = '-m 3 -t 5' } From 6bf0a407f6427c017921e7d6f30c58b80c6e4445 Mon Sep 17 00:00:00 2001 From: Carpanzano Date: Fri, 29 Apr 2022 15:51:27 +0200 Subject: [PATCH 10/36] modifiche nextflow.config --- tests/modules/krona/ktimporttaxonomy/nextflow.config | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/modules/krona/ktimporttaxonomy/nextflow.config b/tests/modules/krona/ktimporttaxonomy/nextflow.config index fb4d86f5..0abcdbeb 100644 --- a/tests/modules/krona/ktimporttaxonomy/nextflow.config +++ b/tests/modules/krona/ktimporttaxonomy/nextflow.config @@ -2,11 +2,11 @@ process { publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } - withName: KRONA_KTIMPORTTAXONOMY_READS { + withName: CLASSIFIED_READS { ext.args = '-t 3' } - withName: KRONA_KTIMPORTTAXONOMY_REPORT { + withName: CLASSIFIED_REPORT { ext.args = '-m 3 -t 5' } From 41fd2d15576ba669a7aaec281a9d95de219185f4 Mon Sep 17 00:00:00 2001 From: Carpanzano Date: Fri, 29 Apr 2022 17:52:12 +0200 Subject: [PATCH 11/36] modifiche --- tests/modules/krona/ktimporttaxonomy/nextflow.config | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/modules/krona/ktimporttaxonomy/nextflow.config b/tests/modules/krona/ktimporttaxonomy/nextflow.config index 0abcdbeb..fb4d86f5 100644 --- a/tests/modules/krona/ktimporttaxonomy/nextflow.config +++ b/tests/modules/krona/ktimporttaxonomy/nextflow.config @@ -2,11 +2,11 @@ process { publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } - withName: CLASSIFIED_READS { + withName: KRONA_KTIMPORTTAXONOMY_READS { ext.args = '-t 3' } - withName: CLASSIFIED_REPORT { + withName: KRONA_KTIMPORTTAXONOMY_REPORT { ext.args = '-m 3 -t 5' } From 38d9d81aaf61c83743b7e43e405917e7aeb376a6 Mon Sep 17 00:00:00 2001 From: Carpanzano Date: Mon, 2 May 2022 16:10:57 +0200 Subject: [PATCH 12/36] update code --- tests/modules/krona/ktimporttaxonomy/main.nf | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/tests/modules/krona/ktimporttaxonomy/main.nf b/tests/modules/krona/ktimporttaxonomy/main.nf index 280658a5..e58543a6 100644 --- a/tests/modules/krona/ktimporttaxonomy/main.nf +++ b/tests/modules/krona/ktimporttaxonomy/main.nf @@ -2,9 +2,11 @@ nextflow.enable.dsl = 2 -include { KRONA_KTIMPORTTAXONOMY_READS } from '../../../../modules/krona/ktimporttaxonomy/main.nf' +include { KRONA_KTIMPORTTAXONOMY as TAXONOMY_READS } from '../../../../modules/krona/ktimporttaxonomy/main.nf' -include { KRONA_KTIMPORTTAXONOMY_REPORT } from '../../../../modules/krona/ktimporttaxonomy/main.nf' +include { KRONA_KTIMPORTTAXONOMY as TAXONOMY_REPORT } from '../../../../modules/krona/ktimporttaxonomy/main.nf' + +include { KRONA_KRONADB as DOWNLOAD_DB } from '../../../../modules/krona/kronadb/main.nf' workflow test_krona_ktimporttaxonomy_reads { @@ -12,9 +14,10 @@ workflow test_krona_ktimporttaxonomy_reads { [ id:'test', single_end:false ], // meta map file(params.test_data['sarscov2']['metagenome']['test_1.kraken2.reads.txt'], checkIfExists: true) ] - taxonomy = file(params.test_data['generic']['txt']['hello'], checkIfExists: true) + // taxonomy = file(params.test_data['generic']['txt']['hello'], checkIfExists: true) - KRONA_KTIMPORTTAXONOMY_READS ( input, taxonomy ) + DOWNLOAD_DB() + TAXONOMY_READS ( input, DOWNLOAD_DB.out.db ) } workflow test_krona_ktimporttaxonomy_report { @@ -25,5 +28,6 @@ workflow test_krona_ktimporttaxonomy_report { ] taxonomy = file(params.test_data['generic']['txt']['hello'], checkIfExists: true) - KRONA_KTIMPORTTAXONOMY_REPORT ( input, taxonomy ) + TDOWNLOAD_DB() + TAXONOMY_REPORT ( input, DOWNLOAD_DB.out.db ) } From 42310cbce29929b0c40520f852ca19307febf094 Mon Sep 17 00:00:00 2001 From: Carpanzano Date: Mon, 2 May 2022 16:14:38 +0200 Subject: [PATCH 13/36] updated config to reflect names in test workflow --- tests/modules/krona/ktimporttaxonomy/nextflow.config | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/modules/krona/ktimporttaxonomy/nextflow.config b/tests/modules/krona/ktimporttaxonomy/nextflow.config index fb4d86f5..973b60ba 100644 --- a/tests/modules/krona/ktimporttaxonomy/nextflow.config +++ b/tests/modules/krona/ktimporttaxonomy/nextflow.config @@ -2,11 +2,11 @@ process { publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } - withName: KRONA_KTIMPORTTAXONOMY_READS { + withName: TAXONOMY_READS { ext.args = '-t 3' } - withName: KRONA_KTIMPORTTAXONOMY_REPORT { + withName: TAXONOMY_REPORT { ext.args = '-m 3 -t 5' } From 80f107515e5e4d0db115d4ce4677a8c98bd50633 Mon Sep 17 00:00:00 2001 From: Carpanzano Date: Mon, 2 May 2022 16:22:22 +0200 Subject: [PATCH 14/36] update nextflow.config withName --- tests/modules/krona/ktimporttaxonomy/main.nf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/modules/krona/ktimporttaxonomy/main.nf b/tests/modules/krona/ktimporttaxonomy/main.nf index e58543a6..4ac0f0ac 100644 --- a/tests/modules/krona/ktimporttaxonomy/main.nf +++ b/tests/modules/krona/ktimporttaxonomy/main.nf @@ -12,7 +12,7 @@ workflow test_krona_ktimporttaxonomy_reads { input = [ [ id:'test', single_end:false ], // meta map - file(params.test_data['sarscov2']['metagenome']['test_1.kraken2.reads.txt'], checkIfExists: true) + file(params.test_data['sarscov2']['metagenome']['classified_reads_assignment'], checkIfExists: true) ] // taxonomy = file(params.test_data['generic']['txt']['hello'], checkIfExists: true) @@ -24,7 +24,7 @@ workflow test_krona_ktimporttaxonomy_report { input = [ [ id:'test', single_end:false ], // meta map - file(params.test_data['sarscov2']['metagenome']['test_1.kraken2.report.txt'], checkIfExists: true) + file(params.test_data['sarscov2']['metagenome']['report'], checkIfExists: true) ] taxonomy = file(params.test_data['generic']['txt']['hello'], checkIfExists: true) From 700d6ab3f1a5596a2c9bbdd22c763644061580a8 Mon Sep 17 00:00:00 2001 From: Carpanzano Date: Mon, 2 May 2022 16:55:18 +0200 Subject: [PATCH 15/36] errore TDOWNLOAD --- tests/modules/krona/ktimporttaxonomy/main.nf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/modules/krona/ktimporttaxonomy/main.nf b/tests/modules/krona/ktimporttaxonomy/main.nf index 4ac0f0ac..9987eec5 100644 --- a/tests/modules/krona/ktimporttaxonomy/main.nf +++ b/tests/modules/krona/ktimporttaxonomy/main.nf @@ -28,6 +28,6 @@ workflow test_krona_ktimporttaxonomy_report { ] taxonomy = file(params.test_data['generic']['txt']['hello'], checkIfExists: true) - TDOWNLOAD_DB() + DOWNLOAD_DB() TAXONOMY_REPORT ( input, DOWNLOAD_DB.out.db ) } From 2e4c200a26ecb6dd63f2c95e5ab619d99e7a7582 Mon Sep 17 00:00:00 2001 From: Carpanzano Date: Mon, 2 May 2022 17:13:20 +0200 Subject: [PATCH 16/36] remove new line between includes --- tests/modules/krona/ktimporttaxonomy/main.nf | 2 -- 1 file changed, 2 deletions(-) diff --git a/tests/modules/krona/ktimporttaxonomy/main.nf b/tests/modules/krona/ktimporttaxonomy/main.nf index 9987eec5..56ff8ae2 100644 --- a/tests/modules/krona/ktimporttaxonomy/main.nf +++ b/tests/modules/krona/ktimporttaxonomy/main.nf @@ -3,9 +3,7 @@ nextflow.enable.dsl = 2 include { KRONA_KTIMPORTTAXONOMY as TAXONOMY_READS } from '../../../../modules/krona/ktimporttaxonomy/main.nf' - include { KRONA_KTIMPORTTAXONOMY as TAXONOMY_REPORT } from '../../../../modules/krona/ktimporttaxonomy/main.nf' - include { KRONA_KRONADB as DOWNLOAD_DB } from '../../../../modules/krona/kronadb/main.nf' workflow test_krona_ktimporttaxonomy_reads { From 3cebcbfc0ae17d3fe026619ee7c0cb1c7c2a665d Mon Sep 17 00:00:00 2001 From: Carpanzano Date: Mon, 2 May 2022 17:13:58 +0200 Subject: [PATCH 17/36] remove taxonomy not used in place of db --- tests/modules/krona/ktimporttaxonomy/main.nf | 2 -- 1 file changed, 2 deletions(-) diff --git a/tests/modules/krona/ktimporttaxonomy/main.nf b/tests/modules/krona/ktimporttaxonomy/main.nf index 56ff8ae2..c259a793 100644 --- a/tests/modules/krona/ktimporttaxonomy/main.nf +++ b/tests/modules/krona/ktimporttaxonomy/main.nf @@ -12,7 +12,6 @@ workflow test_krona_ktimporttaxonomy_reads { [ id:'test', single_end:false ], // meta map file(params.test_data['sarscov2']['metagenome']['classified_reads_assignment'], checkIfExists: true) ] - // taxonomy = file(params.test_data['generic']['txt']['hello'], checkIfExists: true) DOWNLOAD_DB() TAXONOMY_READS ( input, DOWNLOAD_DB.out.db ) @@ -24,7 +23,6 @@ workflow test_krona_ktimporttaxonomy_report { [ id:'test', single_end:false ], // meta map file(params.test_data['sarscov2']['metagenome']['report'], checkIfExists: true) ] - taxonomy = file(params.test_data['generic']['txt']['hello'], checkIfExists: true) DOWNLOAD_DB() TAXONOMY_REPORT ( input, DOWNLOAD_DB.out.db ) From 028dc3cb876415932054df1d456e2f6549c52219 Mon Sep 17 00:00:00 2001 From: carpanz Date: Mon, 2 May 2022 17:24:55 +0200 Subject: [PATCH 18/36] updated test yml file --- tests/modules/krona/ktimporttaxonomy/test.yml | 30 +++++++++++++++---- 1 file changed, 25 insertions(+), 5 deletions(-) diff --git a/tests/modules/krona/ktimporttaxonomy/test.yml b/tests/modules/krona/ktimporttaxonomy/test.yml index b7748980..b73e6473 100644 --- a/tests/modules/krona/ktimporttaxonomy/test.yml +++ b/tests/modules/krona/ktimporttaxonomy/test.yml @@ -1,9 +1,29 @@ -- name: krona ktimporttaxonomy test_krona_ktimporttaxonomy - command: nextflow run ./tests/modules/krona/ktimporttaxonomy -entry test_krona_ktimporttaxonomy -c ./tests/config/nextflow.config -c ./tests/modules/krona/ktimporttaxonomy/nextflow.config +- name: krona ktimporttaxonomy test_krona_ktimporttaxonomy_reads + command: nextflow run tests/modules/krona/ktimporttaxonomy -entry test_krona_ktimporttaxonomy_reads -c tests/config/nextflow.config tags: - krona/ktimporttaxonomy - krona files: - - path: output/krona/taxonomy.krona.html - contains: - - "DOCTYPE html PUBLIC" + - path: output/download/taxonomy/taxonomy.tab + md5sum: 0d13b5b3838f12d1f51827464345e0f0 + - path: output/download/versions.yml + md5sum: 5bf3137779303fb36e4c5373704a4bb6 + - path: output/taxonomy/taxonomy.krona.html + contains: '[ # TODO nf-core: file md5sum was variable, please replace this text with a string found in the file instead ]' + - path: output/taxonomy/versions.yml + md5sum: ea32399c9fd3bc1d4fc1081cb3a345d5 + +- name: krona ktimporttaxonomy test_krona_ktimporttaxonomy_report + command: nextflow run tests/modules/krona/ktimporttaxonomy -entry test_krona_ktimporttaxonomy_report -c tests/config/nextflow.config + tags: + - krona/ktimporttaxonomy + - krona + files: + - path: output/download/taxonomy/taxonomy.tab + md5sum: 0d13b5b3838f12d1f51827464345e0f0 + - path: output/download/versions.yml + md5sum: ea7720c3555ad61eb06b46454c87407e + - path: output/taxonomy/taxonomy.krona.html + contains: '[ # TODO nf-core: file md5sum was variable, please replace this text with a string found in the file instead ]' + - path: output/taxonomy/versions.yml + md5sum: 4d46e08ff46dbd1e7075b93903b72400 From 1188264fa209e4de8e139d79e0d79684d543c11a Mon Sep 17 00:00:00 2001 From: Carpanzano Date: Mon, 2 May 2022 17:25:58 +0200 Subject: [PATCH 19/36] finished test yml file --- tests/modules/krona/ktimporttaxonomy/test.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/modules/krona/ktimporttaxonomy/test.yml b/tests/modules/krona/ktimporttaxonomy/test.yml index b73e6473..f9d4c91a 100644 --- a/tests/modules/krona/ktimporttaxonomy/test.yml +++ b/tests/modules/krona/ktimporttaxonomy/test.yml @@ -9,7 +9,8 @@ - path: output/download/versions.yml md5sum: 5bf3137779303fb36e4c5373704a4bb6 - path: output/taxonomy/taxonomy.krona.html - contains: '[ # TODO nf-core: file md5sum was variable, please replace this text with a string found in the file instead ]' + contains: + - "DOCTYPE html PUBLIC" - path: output/taxonomy/versions.yml md5sum: ea32399c9fd3bc1d4fc1081cb3a345d5 @@ -24,6 +25,7 @@ - path: output/download/versions.yml md5sum: ea7720c3555ad61eb06b46454c87407e - path: output/taxonomy/taxonomy.krona.html - contains: '[ # TODO nf-core: file md5sum was variable, please replace this text with a string found in the file instead ]' + contains: + - "DOCTYPE html PUBLIC" - path: output/taxonomy/versions.yml md5sum: 4d46e08ff46dbd1e7075b93903b72400 From 76a0e3ef04aac7c3ea70b375aaabee9f2dfb332a Mon Sep 17 00:00:00 2001 From: Carpanzano Date: Mon, 2 May 2022 17:40:50 +0200 Subject: [PATCH 20/36] updated config kraken report name --- tests/config/test_data.config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/config/test_data.config b/tests/config/test_data.config index 4337d5b9..21cf5b27 100644 --- a/tests/config/test_data.config +++ b/tests/config/test_data.config @@ -112,7 +112,7 @@ params { } 'metagenome' { classified_reads_assignment = "${test_data_dir}/genomics/sarscov2/metagenome/test_1.kraken2.reads.txt" - report = "${test_data_dir}/genomics/sarscov2/metagenome/test_1.kraken2.report.txt" + kraken_report = "${test_data_dir}/genomics/sarscov2/metagenome/test_1.kraken2.report.txt" } } 'homo_sapiens' { From c9ab26ba8e5b222599baca73fa40a36909834685 Mon Sep 17 00:00:00 2001 From: Carpanzano Date: Mon, 2 May 2022 17:41:55 +0200 Subject: [PATCH 21/36] synced name of report as in test config --- tests/modules/krona/ktimporttaxonomy/main.nf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/modules/krona/ktimporttaxonomy/main.nf b/tests/modules/krona/ktimporttaxonomy/main.nf index c259a793..5fa227b6 100644 --- a/tests/modules/krona/ktimporttaxonomy/main.nf +++ b/tests/modules/krona/ktimporttaxonomy/main.nf @@ -21,7 +21,7 @@ workflow test_krona_ktimporttaxonomy_report { input = [ [ id:'test', single_end:false ], // meta map - file(params.test_data['sarscov2']['metagenome']['report'], checkIfExists: true) + file(params.test_data['sarscov2']['metagenome']['kraken_report'], checkIfExists: true) ] DOWNLOAD_DB() From c07ae8c48345b2700684eda60fda099c159ad6de Mon Sep 17 00:00:00 2001 From: Carpanzano Date: Mon, 2 May 2022 17:47:45 +0200 Subject: [PATCH 22/36] fixed lint in ktimporttaxonomy --- modules/krona/ktimporttaxonomy/main.nf | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/krona/ktimporttaxonomy/main.nf b/modules/krona/ktimporttaxonomy/main.nf index 4fa15669..6a9fae89 100644 --- a/modules/krona/ktimporttaxonomy/main.nf +++ b/modules/krona/ktimporttaxonomy/main.nf @@ -24,9 +24,9 @@ process KRONA_KTIMPORTTAXONOMY { def args = task.ext.args ?: '' """ ktImportTaxonomy \\ - "$report" \\ - $args \\ - -tax taxonomy + "$report" \\ + $args \\ + -tax taxonomy cat <<-END_VERSIONS > versions.yml "${task.process}": From b0a2d36ec1e8cd53258961e8fbd1e40b42e07638 Mon Sep 17 00:00:00 2001 From: Carpanzano Date: Mon, 2 May 2022 18:16:08 +0200 Subject: [PATCH 23/36] removing kronadb module from testing ktimporttaxonomy test - NB: temporarily using test db while testdb is added to test-datasets --- tests/modules/krona/ktimporttaxonomy/main.nf | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/modules/krona/ktimporttaxonomy/main.nf b/tests/modules/krona/ktimporttaxonomy/main.nf index 5fa227b6..e48882b9 100644 --- a/tests/modules/krona/ktimporttaxonomy/main.nf +++ b/tests/modules/krona/ktimporttaxonomy/main.nf @@ -12,9 +12,9 @@ workflow test_krona_ktimporttaxonomy_reads { [ id:'test', single_end:false ], // meta map file(params.test_data['sarscov2']['metagenome']['classified_reads_assignment'], checkIfExists: true) ] + taxonomy = file("https://raw.githubusercontent.com/lescai/test-datasets/modules/data/genomics/sarscov2/metagenome/krona_taxonomy.tab") - DOWNLOAD_DB() - TAXONOMY_READS ( input, DOWNLOAD_DB.out.db ) + TAXONOMY_READS ( input, taxonomy ) } workflow test_krona_ktimporttaxonomy_report { @@ -23,7 +23,7 @@ workflow test_krona_ktimporttaxonomy_report { [ id:'test', single_end:false ], // meta map file(params.test_data['sarscov2']['metagenome']['kraken_report'], checkIfExists: true) ] + taxonomy = file("https://raw.githubusercontent.com/lescai/test-datasets/modules/data/genomics/sarscov2/metagenome/krona_taxonomy.tab") - DOWNLOAD_DB() - TAXONOMY_REPORT ( input, DOWNLOAD_DB.out.db ) + TAXONOMY_REPORT ( input, taxonomy ) } From 6e83196634582e7a70dc1ab52e293e26f80c7acc Mon Sep 17 00:00:00 2001 From: carpanz Date: Mon, 2 May 2022 18:20:36 +0200 Subject: [PATCH 24/36] updating test yml after removing kronadb from test --- tests/modules/krona/ktimporttaxonomy/test.yml | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/tests/modules/krona/ktimporttaxonomy/test.yml b/tests/modules/krona/ktimporttaxonomy/test.yml index f9d4c91a..64ec948e 100644 --- a/tests/modules/krona/ktimporttaxonomy/test.yml +++ b/tests/modules/krona/ktimporttaxonomy/test.yml @@ -1,31 +1,21 @@ - name: krona ktimporttaxonomy test_krona_ktimporttaxonomy_reads command: nextflow run tests/modules/krona/ktimporttaxonomy -entry test_krona_ktimporttaxonomy_reads -c tests/config/nextflow.config tags: - - krona/ktimporttaxonomy - krona + - krona/ktimporttaxonomy files: - - path: output/download/taxonomy/taxonomy.tab - md5sum: 0d13b5b3838f12d1f51827464345e0f0 - - path: output/download/versions.yml - md5sum: 5bf3137779303fb36e4c5373704a4bb6 - path: output/taxonomy/taxonomy.krona.html - contains: - - "DOCTYPE html PUBLIC" + contains: '[ # TODO nf-core: file md5sum was variable, please replace this text with a string found in the file instead ]' - path: output/taxonomy/versions.yml md5sum: ea32399c9fd3bc1d4fc1081cb3a345d5 - name: krona ktimporttaxonomy test_krona_ktimporttaxonomy_report command: nextflow run tests/modules/krona/ktimporttaxonomy -entry test_krona_ktimporttaxonomy_report -c tests/config/nextflow.config tags: - - krona/ktimporttaxonomy - krona + - krona/ktimporttaxonomy files: - - path: output/download/taxonomy/taxonomy.tab - md5sum: 0d13b5b3838f12d1f51827464345e0f0 - - path: output/download/versions.yml - md5sum: ea7720c3555ad61eb06b46454c87407e - path: output/taxonomy/taxonomy.krona.html - contains: - - "DOCTYPE html PUBLIC" + contains: '[ # TODO nf-core: file md5sum was variable, please replace this text with a string found in the file instead ]' - path: output/taxonomy/versions.yml md5sum: 4d46e08ff46dbd1e7075b93903b72400 From 32b8f3f612e22aeca11dd8ec1fb0a025d1e8e8ed Mon Sep 17 00:00:00 2001 From: Carpanzano Date: Mon, 2 May 2022 18:21:26 +0200 Subject: [PATCH 25/36] adding contain for html output in test yml --- tests/modules/krona/ktimporttaxonomy/test.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tests/modules/krona/ktimporttaxonomy/test.yml b/tests/modules/krona/ktimporttaxonomy/test.yml index 64ec948e..26d16dde 100644 --- a/tests/modules/krona/ktimporttaxonomy/test.yml +++ b/tests/modules/krona/ktimporttaxonomy/test.yml @@ -5,7 +5,8 @@ - krona/ktimporttaxonomy files: - path: output/taxonomy/taxonomy.krona.html - contains: '[ # TODO nf-core: file md5sum was variable, please replace this text with a string found in the file instead ]' + contains: + - "DOCTYPE html PUBLIC" - path: output/taxonomy/versions.yml md5sum: ea32399c9fd3bc1d4fc1081cb3a345d5 @@ -16,6 +17,6 @@ - krona/ktimporttaxonomy files: - path: output/taxonomy/taxonomy.krona.html - contains: '[ # TODO nf-core: file md5sum was variable, please replace this text with a string found in the file instead ]' - - path: output/taxonomy/versions.yml + contains: + - "DOCTYPE html PUBLIC" md5sum: 4d46e08ff46dbd1e7075b93903b72400 From 5136ed29c4ce92eb32160ff7c5ad63ba243861fa Mon Sep 17 00:00:00 2001 From: Carpanzano Date: Mon, 2 May 2022 18:38:59 +0200 Subject: [PATCH 26/36] removed include and changed process name due to expected folder name before tokenize --- tests/modules/krona/ktimporttaxonomy/main.nf | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/tests/modules/krona/ktimporttaxonomy/main.nf b/tests/modules/krona/ktimporttaxonomy/main.nf index e48882b9..f8e9f485 100644 --- a/tests/modules/krona/ktimporttaxonomy/main.nf +++ b/tests/modules/krona/ktimporttaxonomy/main.nf @@ -2,9 +2,8 @@ nextflow.enable.dsl = 2 -include { KRONA_KTIMPORTTAXONOMY as TAXONOMY_READS } from '../../../../modules/krona/ktimporttaxonomy/main.nf' -include { KRONA_KTIMPORTTAXONOMY as TAXONOMY_REPORT } from '../../../../modules/krona/ktimporttaxonomy/main.nf' -include { KRONA_KRONADB as DOWNLOAD_DB } from '../../../../modules/krona/kronadb/main.nf' +include { KRONA_KTIMPORTTAXONOMY as KRONA_TAXONOMY_READS } from '../../../../modules/krona/ktimporttaxonomy/main.nf' +include { KRONA_KTIMPORTTAXONOMY as KRONA_TAXONOMY_REPORT } from '../../../../modules/krona/ktimporttaxonomy/main.nf' workflow test_krona_ktimporttaxonomy_reads { @@ -14,7 +13,7 @@ workflow test_krona_ktimporttaxonomy_reads { ] taxonomy = file("https://raw.githubusercontent.com/lescai/test-datasets/modules/data/genomics/sarscov2/metagenome/krona_taxonomy.tab") - TAXONOMY_READS ( input, taxonomy ) + KRONA_TAXONOMY_READS ( input, taxonomy ) } workflow test_krona_ktimporttaxonomy_report { @@ -25,5 +24,5 @@ workflow test_krona_ktimporttaxonomy_report { ] taxonomy = file("https://raw.githubusercontent.com/lescai/test-datasets/modules/data/genomics/sarscov2/metagenome/krona_taxonomy.tab") - TAXONOMY_REPORT ( input, taxonomy ) + KRONA_TAXONOMY_REPORT ( input, taxonomy ) } From 1deb789502a3a2765329141598ed3e1a69d5b4fa Mon Sep 17 00:00:00 2001 From: Carpanzano Date: Mon, 2 May 2022 18:39:45 +0200 Subject: [PATCH 27/36] synced withName ext.args with process name --- tests/modules/krona/ktimporttaxonomy/nextflow.config | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/modules/krona/ktimporttaxonomy/nextflow.config b/tests/modules/krona/ktimporttaxonomy/nextflow.config index 973b60ba..3f35bfc2 100644 --- a/tests/modules/krona/ktimporttaxonomy/nextflow.config +++ b/tests/modules/krona/ktimporttaxonomy/nextflow.config @@ -2,11 +2,11 @@ process { publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } - withName: TAXONOMY_READS { + withName: KRONA_TAXONOMY_READS { ext.args = '-t 3' } - withName: TAXONOMY_REPORT { + withName: KRONA_TAXONOMY_REPORT { ext.args = '-m 3 -t 5' } From e8b24458780cc4716c35416fa50bba9efb3361b9 Mon Sep 17 00:00:00 2001 From: carpanz Date: Mon, 2 May 2022 18:43:20 +0200 Subject: [PATCH 28/36] updated file location in test yml --- tests/modules/krona/ktimporttaxonomy/test.yml | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/tests/modules/krona/ktimporttaxonomy/test.yml b/tests/modules/krona/ktimporttaxonomy/test.yml index 26d16dde..14b3d9be 100644 --- a/tests/modules/krona/ktimporttaxonomy/test.yml +++ b/tests/modules/krona/ktimporttaxonomy/test.yml @@ -4,11 +4,10 @@ - krona - krona/ktimporttaxonomy files: - - path: output/taxonomy/taxonomy.krona.html - contains: - - "DOCTYPE html PUBLIC" - - path: output/taxonomy/versions.yml - md5sum: ea32399c9fd3bc1d4fc1081cb3a345d5 + - path: output/krona/taxonomy.krona.html + contains: '[ # TODO nf-core: file md5sum was variable, please replace this text with a string found in the file instead ]' + - path: output/krona/versions.yml + md5sum: c6823bf3822cf3714fe9f2073ee76d60 - name: krona ktimporttaxonomy test_krona_ktimporttaxonomy_report command: nextflow run tests/modules/krona/ktimporttaxonomy -entry test_krona_ktimporttaxonomy_report -c tests/config/nextflow.config @@ -16,7 +15,7 @@ - krona - krona/ktimporttaxonomy files: - - path: output/taxonomy/taxonomy.krona.html - contains: - - "DOCTYPE html PUBLIC" - md5sum: 4d46e08ff46dbd1e7075b93903b72400 + - path: output/krona/taxonomy.krona.html + contains: '[ # TODO nf-core: file md5sum was variable, please replace this text with a string found in the file instead ]' + - path: output/krona/versions.yml + md5sum: 06b76d9a7602d63fec182e195cc16a76 From d2e1408b0f1cd17fed110285d7399f63e6d357ad Mon Sep 17 00:00:00 2001 From: Carpanzano Date: Mon, 2 May 2022 18:44:05 +0200 Subject: [PATCH 29/36] updated content for html file in test yml --- tests/modules/krona/ktimporttaxonomy/test.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/modules/krona/ktimporttaxonomy/test.yml b/tests/modules/krona/ktimporttaxonomy/test.yml index 14b3d9be..5dc02c58 100644 --- a/tests/modules/krona/ktimporttaxonomy/test.yml +++ b/tests/modules/krona/ktimporttaxonomy/test.yml @@ -5,7 +5,8 @@ - krona/ktimporttaxonomy files: - path: output/krona/taxonomy.krona.html - contains: '[ # TODO nf-core: file md5sum was variable, please replace this text with a string found in the file instead ]' + contains: + - "DOCTYPE html PUBLIC" - path: output/krona/versions.yml md5sum: c6823bf3822cf3714fe9f2073ee76d60 @@ -16,6 +17,7 @@ - krona/ktimporttaxonomy files: - path: output/krona/taxonomy.krona.html - contains: '[ # TODO nf-core: file md5sum was variable, please replace this text with a string found in the file instead ]' + contains: + - "DOCTYPE html PUBLIC" - path: output/krona/versions.yml md5sum: 06b76d9a7602d63fec182e195cc16a76 From 6b8ca501ed2d20e7d021f56cb6b15406cc4e584c Mon Sep 17 00:00:00 2001 From: Carpanzano Date: Wed, 4 May 2022 16:34:52 +0200 Subject: [PATCH 30/36] fixing suggestions from PR --- modules/krona/ktimporttaxonomy/main.nf | 4 ++-- modules/krona/{kronadb => ktupdatetaxonomy}/main.nf | 4 ++-- modules/krona/{kronadb => ktupdatetaxonomy}/meta.yml | 0 tests/config/pytest_modules.yml | 6 +++--- tests/config/test_data.config | 1 + tests/modules/krona/kronadb/main.nf | 9 --------- tests/modules/krona/kronadb/test.yml | 7 ------- tests/modules/krona/ktimporttaxonomy/main.nf | 12 ++++++------ tests/modules/krona/ktupdatetaxonomy/main.nf | 9 +++++++++ .../{kronadb => ktupdatetaxonomy}/nextflow.config | 0 tests/modules/krona/ktupdatetaxonomy/test.yml | 7 +++++++ 11 files changed, 30 insertions(+), 29 deletions(-) rename modules/krona/{kronadb => ktupdatetaxonomy}/main.nf (93%) rename modules/krona/{kronadb => ktupdatetaxonomy}/meta.yml (100%) delete mode 100644 tests/modules/krona/kronadb/main.nf delete mode 100644 tests/modules/krona/kronadb/test.yml create mode 100644 tests/modules/krona/ktupdatetaxonomy/main.nf rename tests/modules/krona/{kronadb => ktupdatetaxonomy}/nextflow.config (100%) create mode 100644 tests/modules/krona/ktupdatetaxonomy/test.yml diff --git a/modules/krona/ktimporttaxonomy/main.nf b/modules/krona/ktimporttaxonomy/main.nf index 6a9fae89..bc78c6ba 100644 --- a/modules/krona/ktimporttaxonomy/main.nf +++ b/modules/krona/ktimporttaxonomy/main.nf @@ -24,9 +24,9 @@ process KRONA_KTIMPORTTAXONOMY { def args = task.ext.args ?: '' """ ktImportTaxonomy \\ - "$report" \\ $args \\ - -tax taxonomy + -tax taxonomy/ \\ + "$report" cat <<-END_VERSIONS > versions.yml "${task.process}": diff --git a/modules/krona/kronadb/main.nf b/modules/krona/ktupdatetaxonomy/main.nf similarity index 93% rename from modules/krona/kronadb/main.nf rename to modules/krona/ktupdatetaxonomy/main.nf index 3ba745a2..8326f219 100644 --- a/modules/krona/kronadb/main.nf +++ b/modules/krona/ktupdatetaxonomy/main.nf @@ -1,6 +1,6 @@ def VERSION='2.7.1' // Version information not provided by tool on CLI -process KRONA_KRONADB { +process KRONA_KTUPDATETAXONOMY { label 'process_low' conda (params.enable_conda ? "bioconda::krona=2.7.1" : null) @@ -20,7 +20,7 @@ process KRONA_KRONADB { """ ktUpdateTaxonomy.sh \\ $args \\ - taxonomy + taxonomy/ cat <<-END_VERSIONS > versions.yml "${task.process}": diff --git a/modules/krona/kronadb/meta.yml b/modules/krona/ktupdatetaxonomy/meta.yml similarity index 100% rename from modules/krona/kronadb/meta.yml rename to modules/krona/ktupdatetaxonomy/meta.yml diff --git a/tests/config/pytest_modules.yml b/tests/config/pytest_modules.yml index dcf85ba0..6b649a92 100644 --- a/tests/config/pytest_modules.yml +++ b/tests/config/pytest_modules.yml @@ -1046,9 +1046,9 @@ kraken2/kraken2: - modules/untar/** - tests/modules/kraken2/kraken2/** -krona/kronadb: - - modules/krona/kronadb/** - - tests/modules/krona/kronadb/** +krona/ktupdatetaxonomy: + - modules/krona/ktupdatetaxonomy/** + - tests/modules/krona/ktupdatetaxonomy/** krona/ktimporttaxonomy: - modules/krona/ktimporttaxonomy/** diff --git a/tests/config/test_data.config b/tests/config/test_data.config index 9757a29d..e9a5f4ab 100644 --- a/tests/config/test_data.config +++ b/tests/config/test_data.config @@ -113,6 +113,7 @@ params { 'metagenome' { classified_reads_assignment = "${test_data_dir}/genomics/sarscov2/metagenome/test_1.kraken2.reads.txt" kraken_report = "${test_data_dir}/genomics/sarscov2/metagenome/test_1.kraken2.report.txt" + krona_taxonomy = "${test_data_dir}/genomics/sarscov2/metagenome/krona_taxonomy.tab" } } 'homo_sapiens' { diff --git a/tests/modules/krona/kronadb/main.nf b/tests/modules/krona/kronadb/main.nf deleted file mode 100644 index ed955854..00000000 --- a/tests/modules/krona/kronadb/main.nf +++ /dev/null @@ -1,9 +0,0 @@ -#!/usr/bin/env nextflow - -nextflow.enable.dsl = 2 - -include { KRONA_KRONADB } from '../../../../modules/krona/kronadb/main.nf' - -workflow test_krona_kronadb { - KRONA_KRONADB ( ) -} diff --git a/tests/modules/krona/kronadb/test.yml b/tests/modules/krona/kronadb/test.yml deleted file mode 100644 index 1d61640f..00000000 --- a/tests/modules/krona/kronadb/test.yml +++ /dev/null @@ -1,7 +0,0 @@ -- name: krona kronadb test_krona_kronadb - command: nextflow run ./tests/modules/krona/kronadb -entry test_krona_kronadb -c ./tests/config/nextflow.config -c ./tests/modules/krona/kronadb/nextflow.config - tags: - - krona - - krona/kronadb - files: - - path: output/krona/taxonomy/taxonomy.tab diff --git a/tests/modules/krona/ktimporttaxonomy/main.nf b/tests/modules/krona/ktimporttaxonomy/main.nf index f8e9f485..7b39ee82 100644 --- a/tests/modules/krona/ktimporttaxonomy/main.nf +++ b/tests/modules/krona/ktimporttaxonomy/main.nf @@ -2,8 +2,8 @@ nextflow.enable.dsl = 2 -include { KRONA_KTIMPORTTAXONOMY as KRONA_TAXONOMY_READS } from '../../../../modules/krona/ktimporttaxonomy/main.nf' -include { KRONA_KTIMPORTTAXONOMY as KRONA_TAXONOMY_REPORT } from '../../../../modules/krona/ktimporttaxonomy/main.nf' +include { KRONA_KTIMPORTTAXONOMY as KRONA_KTIMPORTTAXONOMY_READS } from '../../../../modules/krona/ktimporttaxonomy/main.nf' +include { KRONA_KTIMPORTTAXONOMY as KRONA_KTIMPORTTAXONOMY_REPORT } from '../../../../modules/krona/ktimporttaxonomy/main.nf' workflow test_krona_ktimporttaxonomy_reads { @@ -11,9 +11,9 @@ workflow test_krona_ktimporttaxonomy_reads { [ id:'test', single_end:false ], // meta map file(params.test_data['sarscov2']['metagenome']['classified_reads_assignment'], checkIfExists: true) ] - taxonomy = file("https://raw.githubusercontent.com/lescai/test-datasets/modules/data/genomics/sarscov2/metagenome/krona_taxonomy.tab") + taxonomy = file(params.test_data['sarscov2']['metagenome']['krona_taxonomy'], checkIfExists: true) - KRONA_TAXONOMY_READS ( input, taxonomy ) + KRONA_KTIMPORTTAXONOMY_READS ( input, taxonomy ) } workflow test_krona_ktimporttaxonomy_report { @@ -22,7 +22,7 @@ workflow test_krona_ktimporttaxonomy_report { [ id:'test', single_end:false ], // meta map file(params.test_data['sarscov2']['metagenome']['kraken_report'], checkIfExists: true) ] - taxonomy = file("https://raw.githubusercontent.com/lescai/test-datasets/modules/data/genomics/sarscov2/metagenome/krona_taxonomy.tab") + taxonomy = file(params.test_data['sarscov2']['metagenome']['krona_taxonomy'], checkIfExists: true) - KRONA_TAXONOMY_REPORT ( input, taxonomy ) + KRONA_KTIMPORTTAXONOMY_REPORT ( input, taxonomy ) } diff --git a/tests/modules/krona/ktupdatetaxonomy/main.nf b/tests/modules/krona/ktupdatetaxonomy/main.nf new file mode 100644 index 00000000..d2d18f31 --- /dev/null +++ b/tests/modules/krona/ktupdatetaxonomy/main.nf @@ -0,0 +1,9 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { KRONA_KTUPDATETAXONOMY } from '../../../../modules/krona/ktupdatetaxonomy/main.nf' + +workflow test_krona_ktupdatetaxonomy { + KRONA_KTUPDATETAXONOMY ( ) +} diff --git a/tests/modules/krona/kronadb/nextflow.config b/tests/modules/krona/ktupdatetaxonomy/nextflow.config similarity index 100% rename from tests/modules/krona/kronadb/nextflow.config rename to tests/modules/krona/ktupdatetaxonomy/nextflow.config diff --git a/tests/modules/krona/ktupdatetaxonomy/test.yml b/tests/modules/krona/ktupdatetaxonomy/test.yml new file mode 100644 index 00000000..b50fe8f2 --- /dev/null +++ b/tests/modules/krona/ktupdatetaxonomy/test.yml @@ -0,0 +1,7 @@ +- name: krona ktupdatetaxonomy test_krona_ktupdatetaxonomy + command: nextflow run ./tests/modules/krona/ktupdatetaxonomy -entry test_krona_ktupdatetaxonomy -c ./tests/config/nextflow.config -c ./tests/modules/krona/ktupdatetaxonomy/nextflow.config + tags: + - krona + - krona/ktupdatetaxonomy + files: + - path: output/krona/taxonomy/taxonomy.tab From 8b1711d8a19696df101c73df2fa11f8994941823 Mon Sep 17 00:00:00 2001 From: Carpanzano Date: Wed, 4 May 2022 16:38:10 +0200 Subject: [PATCH 31/36] recovering old module name --- modules/krona/kronadb/main.nf | 30 +++++++++++++++++++++++++ modules/krona/kronadb/meta.yml | 30 +++++++++++++++++++++++++ modules/krona/ktupdatetaxonomy/meta.yml | 2 +- 3 files changed, 61 insertions(+), 1 deletion(-) create mode 100644 modules/krona/kronadb/main.nf create mode 100644 modules/krona/kronadb/meta.yml diff --git a/modules/krona/kronadb/main.nf b/modules/krona/kronadb/main.nf new file mode 100644 index 00000000..8326f219 --- /dev/null +++ b/modules/krona/kronadb/main.nf @@ -0,0 +1,30 @@ +def VERSION='2.7.1' // Version information not provided by tool on CLI + +process KRONA_KTUPDATETAXONOMY { + label 'process_low' + + conda (params.enable_conda ? "bioconda::krona=2.7.1" : null) + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/krona:2.7.1--pl526_5' : + 'quay.io/biocontainers/krona:2.7.1--pl526_5' }" + + output: + path 'taxonomy/taxonomy.tab', emit: db + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + """ + ktUpdateTaxonomy.sh \\ + $args \\ + taxonomy/ + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + krona: $VERSION + END_VERSIONS + """ +} diff --git a/modules/krona/kronadb/meta.yml b/modules/krona/kronadb/meta.yml new file mode 100644 index 00000000..2a12aaaf --- /dev/null +++ b/modules/krona/kronadb/meta.yml @@ -0,0 +1,30 @@ +name: krona_kronadb +description: KronaTools Update Taxonomy downloads a taxonomy database +keywords: + - database + - taxonomy + - krona +tools: + - krona: + description: Krona Tools is a set of scripts to create Krona charts from several Bioinformatics tools as well as from text and XML files. + homepage: https://github.com/marbl/Krona/wiki/KronaTools + documentation: https://github.com/marbl/Krona/wiki/Installing + tool_dev_url: + doi: https://doi.org/10.1186/1471-2105-12-385 + licence: + +input: + - none: There is no input. This module downloads a pre-built taxonomy database for use with Krona Tools. + +output: + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" + - db: + type: file + description: A TAB separated file that contains a taxonomy database. + pattern: "*.{tab}" + +authors: + - "@mjakobs" diff --git a/modules/krona/ktupdatetaxonomy/meta.yml b/modules/krona/ktupdatetaxonomy/meta.yml index 2a12aaaf..1e0d6299 100644 --- a/modules/krona/ktupdatetaxonomy/meta.yml +++ b/modules/krona/ktupdatetaxonomy/meta.yml @@ -1,4 +1,4 @@ -name: krona_kronadb +name: krona_ktupdatetaxonomy description: KronaTools Update Taxonomy downloads a taxonomy database keywords: - database From e7b92a7616f653272ce9fb0e443921b37c915e79 Mon Sep 17 00:00:00 2001 From: Carpanzano Date: Wed, 4 May 2022 16:43:22 +0200 Subject: [PATCH 32/36] fixing md5sum changes --- tests/modules/krona/ktimporttaxonomy/test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/modules/krona/ktimporttaxonomy/test.yml b/tests/modules/krona/ktimporttaxonomy/test.yml index 5dc02c58..ffcb5669 100644 --- a/tests/modules/krona/ktimporttaxonomy/test.yml +++ b/tests/modules/krona/ktimporttaxonomy/test.yml @@ -8,7 +8,7 @@ contains: - "DOCTYPE html PUBLIC" - path: output/krona/versions.yml - md5sum: c6823bf3822cf3714fe9f2073ee76d60 + md5sum: 660a8c151191bf4c63bd96db2c7fe503 - name: krona ktimporttaxonomy test_krona_ktimporttaxonomy_report command: nextflow run tests/modules/krona/ktimporttaxonomy -entry test_krona_ktimporttaxonomy_report -c tests/config/nextflow.config @@ -20,4 +20,4 @@ contains: - "DOCTYPE html PUBLIC" - path: output/krona/versions.yml - md5sum: 06b76d9a7602d63fec182e195cc16a76 + md5sum: 8a593c16bb2d4132638fb0fc342fe2b7 From 38faf040ecbae67abbc4d26623f30b1a9b763f2e Mon Sep 17 00:00:00 2001 From: Carpanzano Date: Wed, 4 May 2022 16:54:15 +0200 Subject: [PATCH 33/36] missing change in ext.args config --- tests/modules/krona/ktimporttaxonomy/nextflow.config | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/modules/krona/ktimporttaxonomy/nextflow.config b/tests/modules/krona/ktimporttaxonomy/nextflow.config index 3f35bfc2..fb4d86f5 100644 --- a/tests/modules/krona/ktimporttaxonomy/nextflow.config +++ b/tests/modules/krona/ktimporttaxonomy/nextflow.config @@ -2,11 +2,11 @@ process { publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } - withName: KRONA_TAXONOMY_READS { + withName: KRONA_KTIMPORTTAXONOMY_READS { ext.args = '-t 3' } - withName: KRONA_TAXONOMY_REPORT { + withName: KRONA_KTIMPORTTAXONOMY_REPORT { ext.args = '-m 3 -t 5' } From a6086f549d1e10627ed5caa26f8e8d6485125869 Mon Sep 17 00:00:00 2001 From: Carpanzano Date: Wed, 4 May 2022 17:28:24 +0200 Subject: [PATCH 34/36] recovered process name --- modules/krona/kronadb/main.nf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/krona/kronadb/main.nf b/modules/krona/kronadb/main.nf index 8326f219..eaab43f0 100644 --- a/modules/krona/kronadb/main.nf +++ b/modules/krona/kronadb/main.nf @@ -1,6 +1,6 @@ def VERSION='2.7.1' // Version information not provided by tool on CLI -process KRONA_KTUPDATETAXONOMY { +process KRONA_KRONADB { label 'process_low' conda (params.enable_conda ? "bioconda::krona=2.7.1" : null) From 204dfba2d8635d1a73255538441544a0c1501d4d Mon Sep 17 00:00:00 2001 From: Carpanzano Date: Thu, 5 May 2022 10:51:22 +0200 Subject: [PATCH 35/36] fixing ktupdatetaxonomy/meta.yml as suggested in PR --- modules/krona/ktupdatetaxonomy/meta.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/krona/ktupdatetaxonomy/meta.yml b/modules/krona/ktupdatetaxonomy/meta.yml index 1e0d6299..945b5062 100644 --- a/modules/krona/ktupdatetaxonomy/meta.yml +++ b/modules/krona/ktupdatetaxonomy/meta.yml @@ -4,6 +4,7 @@ keywords: - database - taxonomy - krona + - visualisation tools: - krona: description: Krona Tools is a set of scripts to create Krona charts from several Bioinformatics tools as well as from text and XML files. From 9083d3bb3dfeae8dc61d6a2e9e097468af5fafcd Mon Sep 17 00:00:00 2001 From: Carpanzano Date: Thu, 5 May 2022 13:51:41 +0200 Subject: [PATCH 36/36] integrating suggestions from PR comments, including recovery of tests for kronadb and more detailed explanation of input database in yml file --- modules/krona/ktimporttaxonomy/meta.yml | 7 +++++-- tests/config/pytest_modules.yml | 4 ++++ tests/modules/krona/kronadb/main.nf | 9 +++++++++ tests/modules/krona/kronadb/nextflow.config | 5 +++++ tests/modules/krona/kronadb/test.yml | 7 +++++++ 5 files changed, 30 insertions(+), 2 deletions(-) create mode 100644 tests/modules/krona/kronadb/main.nf create mode 100644 tests/modules/krona/kronadb/nextflow.config create mode 100644 tests/modules/krona/kronadb/test.yml diff --git a/modules/krona/ktimporttaxonomy/meta.yml b/modules/krona/ktimporttaxonomy/meta.yml index b65919f8..df0ad1c9 100644 --- a/modules/krona/ktimporttaxonomy/meta.yml +++ b/modules/krona/ktimporttaxonomy/meta.yml @@ -23,8 +23,11 @@ input: Groovy Map containing sample information e.g. [ id:'test'] - database: - type: path - description: "Path to the taxonomy database downloaded by krona/kronadb" + type: file + description: | + Path to the taxonomy database .tab file downloaded by krona/ktUpdateTaxonomy + The file will be saved under a folder named "taxonomy" as "taxonomy/taxonomy.tab". + The parent folder will be passed as argument to ktImportTaxonomy. - report: type: file description: "A tab-delimited file with taxonomy IDs and (optionally) query IDs, magnitudes, and scores. Query IDs are taken from column 1, taxonomy IDs from column 2, and scores from column 3. Lines beginning with # will be ignored." diff --git a/tests/config/pytest_modules.yml b/tests/config/pytest_modules.yml index dbf6c196..031f5717 100644 --- a/tests/config/pytest_modules.yml +++ b/tests/config/pytest_modules.yml @@ -1054,6 +1054,10 @@ kraken2/kraken2: - modules/untar/** - tests/modules/kraken2/kraken2/** +krona/kronadb: + - modules/krona/kronadb/** + - tests/modules/krona/kronadb/** + krona/ktupdatetaxonomy: - modules/krona/ktupdatetaxonomy/** - tests/modules/krona/ktupdatetaxonomy/** diff --git a/tests/modules/krona/kronadb/main.nf b/tests/modules/krona/kronadb/main.nf new file mode 100644 index 00000000..ed955854 --- /dev/null +++ b/tests/modules/krona/kronadb/main.nf @@ -0,0 +1,9 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { KRONA_KRONADB } from '../../../../modules/krona/kronadb/main.nf' + +workflow test_krona_kronadb { + KRONA_KRONADB ( ) +} diff --git a/tests/modules/krona/kronadb/nextflow.config b/tests/modules/krona/kronadb/nextflow.config new file mode 100644 index 00000000..8730f1c4 --- /dev/null +++ b/tests/modules/krona/kronadb/nextflow.config @@ -0,0 +1,5 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + +} diff --git a/tests/modules/krona/kronadb/test.yml b/tests/modules/krona/kronadb/test.yml new file mode 100644 index 00000000..1d61640f --- /dev/null +++ b/tests/modules/krona/kronadb/test.yml @@ -0,0 +1,7 @@ +- name: krona kronadb test_krona_kronadb + command: nextflow run ./tests/modules/krona/kronadb -entry test_krona_kronadb -c ./tests/config/nextflow.config -c ./tests/modules/krona/kronadb/nextflow.config + tags: + - krona + - krona/kronadb + files: + - path: output/krona/taxonomy/taxonomy.tab