From ee04fc27377391c39cacd79641301f87af48cc4d Mon Sep 17 00:00:00 2001 From: JIANHONG OU Date: Thu, 14 Apr 2022 12:56:42 -0400 Subject: [PATCH 01/73] add module motus_downloaddb --- modules/motus/downloaddb/main.nf | 39 +++++++++++++++++++ modules/motus/downloaddb/meta.yml | 35 +++++++++++++++++ tests/config/pytest_modules.yml | 4 ++ tests/modules/motus/downloaddb/main.nf | 12 ++++++ .../modules/motus/downloaddb/nextflow.config | 5 +++ tests/modules/motus/downloaddb/test.yml | 9 +++++ 6 files changed, 104 insertions(+) create mode 100644 modules/motus/downloaddb/main.nf create mode 100644 modules/motus/downloaddb/meta.yml create mode 100644 tests/modules/motus/downloaddb/main.nf create mode 100644 tests/modules/motus/downloaddb/nextflow.config create mode 100644 tests/modules/motus/downloaddb/test.yml diff --git a/modules/motus/downloaddb/main.nf b/modules/motus/downloaddb/main.nf new file mode 100644 index 00000000..02e5c22d --- /dev/null +++ b/modules/motus/downloaddb/main.nf @@ -0,0 +1,39 @@ +process MOTUS_DOWNLOADDB { + label 'process_low' + + conda (params.enable_conda ? "bioconda::motus=3.0.1" : null) + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/motus:3.0.1--pyhdfd78af_0': + 'quay.io/biocontainers/motus:3.0.1--pyhdfd78af_0' }" + + input: + path motus_downloaddb + + output: + path "db_mOTU" , emit: db + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + """ + ## must copy file to working directory, + ## otherwise the reference_db will be download to bin folder + ## other than current directory + cp $motus_downloaddb ${motus_downloaddb.simpleName}_copy.py + python ${motus_downloaddb.simpleName}_copy.py \\ + -t $task.cpus + ## clean up + rm ${motus_downloaddb.simpleName}_copy.py + + ## mOTUs version number is not available from command line. + ## mOTUs save the version number in index database folder. + ## mOTUs will check the database version is same version as exec version. + cat <<-END_VERSIONS > versions.yml + "${task.process}": + mOTUs: \$(grep motus db_mOTU/db_mOTU_versions | sed 's/motus\\t//g') + END_VERSIONS + """ +} diff --git a/modules/motus/downloaddb/meta.yml b/modules/motus/downloaddb/meta.yml new file mode 100644 index 00000000..8557b2ed --- /dev/null +++ b/modules/motus/downloaddb/meta.yml @@ -0,0 +1,35 @@ +name: "motus_downloaddb" +description: Download the mOTUs database +keywords: + - classify + - metagenomics + - fastq + - taxonomic profiling +tools: + - "motus": + description: "The mOTU profiler is a computational tool that estimates relative taxonomic abundance of known and currently unknown microbial community members using metagenomic shotgun sequencing data." + homepage: "None" + documentation: "https://github.com/motu-tool/mOTUs/wiki" + tool_dev_url: "https://github.com/motu-tool/mOTUs" + doi: "10.1038/s41467-019-08844-4" + licence: "['GPL v3']" + +input: + - motus_downloaddb: + type: file + description: | + the mOTUs downloadDB source file + pattern: "*{.py}" + +output: + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" + - db: + type: file + description: The mOTUs database + pattern: "db_mOTU" + +authors: + - "@jianhong" diff --git a/tests/config/pytest_modules.yml b/tests/config/pytest_modules.yml index cd4913cf..b11f5516 100644 --- a/tests/config/pytest_modules.yml +++ b/tests/config/pytest_modules.yml @@ -1194,6 +1194,10 @@ mosdepth: - modules/mosdepth/** - tests/modules/mosdepth/** +motus/downloaddb: + - modules/motus/downloaddb/** + - tests/modules/motus/downloaddb/** + msisensor/msi: - modules/msisensor/msi/** - tests/modules/msisensor/msi/** diff --git a/tests/modules/motus/downloaddb/main.nf b/tests/modules/motus/downloaddb/main.nf new file mode 100644 index 00000000..f7680ca9 --- /dev/null +++ b/tests/modules/motus/downloaddb/main.nf @@ -0,0 +1,12 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { MOTUS_DOWNLOADDB } from '../../../../modules/motus/downloaddb/main.nf' + +workflow test_motus_downloaddb { + + input = file('https://raw.githubusercontent.com/motu-tool/mOTUs/master/motus/downloadDB.py') + + MOTUS_DOWNLOADDB ( input ) +} diff --git a/tests/modules/motus/downloaddb/nextflow.config b/tests/modules/motus/downloaddb/nextflow.config new file mode 100644 index 00000000..50f50a7a --- /dev/null +++ b/tests/modules/motus/downloaddb/nextflow.config @@ -0,0 +1,5 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + +} \ No newline at end of file diff --git a/tests/modules/motus/downloaddb/test.yml b/tests/modules/motus/downloaddb/test.yml new file mode 100644 index 00000000..ada5383a --- /dev/null +++ b/tests/modules/motus/downloaddb/test.yml @@ -0,0 +1,9 @@ +- name: motus downloaddb test_motus_downloaddb + command: nextflow run tests/modules/motus/downloaddb -entry test_motus_downloaddb -c tests/config/nextflow.config + tags: + - motus + - motus/downloaddb + files: + - path: output/motus/db_mOTU/db_mOTU_versions + - path: output/motus/versions.yml + md5sum: b9b843b2435b01bb430ee8780b5c639e From f1f1df984c4213840546475af9bb9c204ae00def Mon Sep 17 00:00:00 2001 From: JIANHONG OU Date: Sun, 17 Apr 2022 11:06:06 -0400 Subject: [PATCH 02/73] Update modules/motus/downloaddb/main.nf Co-authored-by: James A. Fellows Yates --- modules/motus/downloaddb/main.nf | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/motus/downloaddb/main.nf b/modules/motus/downloaddb/main.nf index 02e5c22d..406eb502 100644 --- a/modules/motus/downloaddb/main.nf +++ b/modules/motus/downloaddb/main.nf @@ -24,6 +24,7 @@ process MOTUS_DOWNLOADDB { ## other than current directory cp $motus_downloaddb ${motus_downloaddb.simpleName}_copy.py python ${motus_downloaddb.simpleName}_copy.py \\ + $args \\ -t $task.cpus ## clean up rm ${motus_downloaddb.simpleName}_copy.py From 2551201f4387dfcc12af3e896c331b917aeba63c Mon Sep 17 00:00:00 2001 From: JIANHONG OU Date: Sun, 17 Apr 2022 11:10:48 -0400 Subject: [PATCH 03/73] Update modules/motus/downloaddb/main.nf Co-authored-by: James A. Fellows Yates --- modules/motus/downloaddb/main.nf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/motus/downloaddb/main.nf b/modules/motus/downloaddb/main.nf index 406eb502..6fbe96ec 100644 --- a/modules/motus/downloaddb/main.nf +++ b/modules/motus/downloaddb/main.nf @@ -7,7 +7,7 @@ process MOTUS_DOWNLOADDB { 'quay.io/biocontainers/motus:3.0.1--pyhdfd78af_0' }" input: - path motus_downloaddb + path motus_downloaddb_script output: path "db_mOTU" , emit: db From d247ef4a0deccb1c0f36268590f58bb0835cec76 Mon Sep 17 00:00:00 2001 From: JIANHONG OU Date: Sun, 17 Apr 2022 11:10:54 -0400 Subject: [PATCH 04/73] Update modules/motus/downloaddb/main.nf Co-authored-by: James A. Fellows Yates --- modules/motus/downloaddb/main.nf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/motus/downloaddb/main.nf b/modules/motus/downloaddb/main.nf index 6fbe96ec..0456b471 100644 --- a/modules/motus/downloaddb/main.nf +++ b/modules/motus/downloaddb/main.nf @@ -10,7 +10,7 @@ process MOTUS_DOWNLOADDB { path motus_downloaddb_script output: - path "db_mOTU" , emit: db + path "db_mOTU/" , emit: db path "versions.yml" , emit: versions when: From 32d5257defe4a6683d009dcf3d0ac0474df44300 Mon Sep 17 00:00:00 2001 From: JIANHONG OU Date: Sun, 17 Apr 2022 11:12:08 -0400 Subject: [PATCH 05/73] Update modules/motus/downloaddb/meta.yml Co-authored-by: James A. Fellows Yates --- modules/motus/downloaddb/meta.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/motus/downloaddb/meta.yml b/modules/motus/downloaddb/meta.yml index 8557b2ed..1fa5e220 100644 --- a/modules/motus/downloaddb/meta.yml +++ b/modules/motus/downloaddb/meta.yml @@ -18,7 +18,7 @@ input: - motus_downloaddb: type: file description: | - the mOTUs downloadDB source file + the mOTUs downloadDB script source file pattern: "*{.py}" output: From 51214d655b9e8ac930b36376adf9b9d3ce73e40e Mon Sep 17 00:00:00 2001 From: JIANHONG OU Date: Sun, 17 Apr 2022 11:19:58 -0400 Subject: [PATCH 06/73] Update modules/motus/downloaddb/main.nf Co-authored-by: James A. Fellows Yates --- modules/motus/downloaddb/main.nf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/motus/downloaddb/main.nf b/modules/motus/downloaddb/main.nf index 0456b471..b4bcea23 100644 --- a/modules/motus/downloaddb/main.nf +++ b/modules/motus/downloaddb/main.nf @@ -19,7 +19,7 @@ process MOTUS_DOWNLOADDB { script: def args = task.ext.args ?: '' """ - ## must copy file to working directory, + ## must copy script file to working directory, ## otherwise the reference_db will be download to bin folder ## other than current directory cp $motus_downloaddb ${motus_downloaddb.simpleName}_copy.py From 407d0bb752da0b97f8596e39fe29c012dbd08fd5 Mon Sep 17 00:00:00 2001 From: JIANHONG OU Date: Sun, 17 Apr 2022 11:22:23 -0400 Subject: [PATCH 07/73] update motus_downloaddb --- modules/motus/downloaddb/main.nf | 11 ++++++----- modules/motus/downloaddb/meta.yml | 6 ++++-- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/modules/motus/downloaddb/main.nf b/modules/motus/downloaddb/main.nf index 0456b471..928b1294 100644 --- a/modules/motus/downloaddb/main.nf +++ b/modules/motus/downloaddb/main.nf @@ -11,23 +11,24 @@ process MOTUS_DOWNLOADDB { output: path "db_mOTU/" , emit: db - path "versions.yml" , emit: versions + path "versions.yml" , emit: versions when: task.ext.when == null || task.ext.when script: - def args = task.ext.args ?: '' + def args = task.ext.args ?: '' + def software = ${motus_downloaddb.simpleName}_copy.py """ ## must copy file to working directory, ## otherwise the reference_db will be download to bin folder ## other than current directory - cp $motus_downloaddb ${motus_downloaddb.simpleName}_copy.py - python ${motus_downloaddb.simpleName}_copy.py \\ + cp $motus_downloaddb ${software} + python ${software} \\ $args \\ -t $task.cpus ## clean up - rm ${motus_downloaddb.simpleName}_copy.py + rm ${software} ## mOTUs version number is not available from command line. ## mOTUs save the version number in index database folder. diff --git a/modules/motus/downloaddb/meta.yml b/modules/motus/downloaddb/meta.yml index 1fa5e220..2d363cb1 100644 --- a/modules/motus/downloaddb/meta.yml +++ b/modules/motus/downloaddb/meta.yml @@ -5,6 +5,8 @@ keywords: - metagenomics - fastq - taxonomic profiling + - database + - download tools: - "motus": description: "The mOTU profiler is a computational tool that estimates relative taxonomic abundance of known and currently unknown microbial community members using metagenomic shotgun sequencing data." @@ -19,7 +21,7 @@ input: type: file description: | the mOTUs downloadDB script source file - pattern: "*{.py}" + pattern: "downloadDB.py" output: - versions: @@ -27,7 +29,7 @@ output: description: File containing software versions pattern: "versions.yml" - db: - type: file + type: directory description: The mOTUs database pattern: "db_mOTU" From ec23ebc7c5c2517d18128eac06306dcdcf701fdb Mon Sep 17 00:00:00 2001 From: "James A. Fellows Yates" Date: Sun, 17 Apr 2022 21:17:59 +0200 Subject: [PATCH 08/73] Update modules/motus/downloaddb/main.nf --- modules/motus/downloaddb/main.nf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/motus/downloaddb/main.nf b/modules/motus/downloaddb/main.nf index e2a0cec6..8162c664 100644 --- a/modules/motus/downloaddb/main.nf +++ b/modules/motus/downloaddb/main.nf @@ -18,7 +18,7 @@ process MOTUS_DOWNLOADDB { script: def args = task.ext.args ?: '' - def software = ${motus_downloaddb.simpleName}_copy.py + def software = ${motus_downloaddb.simplename}_copy.py """ ## must copy script file to working directory, ## otherwise the reference_db will be download to bin folder From 87005786e07eb3265aa011e5c1c34146cd4d9c0d Mon Sep 17 00:00:00 2001 From: "James A. Fellows Yates" Date: Sun, 17 Apr 2022 21:18:55 +0200 Subject: [PATCH 09/73] Update modules/motus/downloaddb/main.nf --- modules/motus/downloaddb/main.nf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/motus/downloaddb/main.nf b/modules/motus/downloaddb/main.nf index 8162c664..e2a0cec6 100644 --- a/modules/motus/downloaddb/main.nf +++ b/modules/motus/downloaddb/main.nf @@ -18,7 +18,7 @@ process MOTUS_DOWNLOADDB { script: def args = task.ext.args ?: '' - def software = ${motus_downloaddb.simplename}_copy.py + def software = ${motus_downloaddb.simpleName}_copy.py """ ## must copy script file to working directory, ## otherwise the reference_db will be download to bin folder 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 10/73] 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 24fb7c89aafa401b084e8022b8999efca15fae9d Mon Sep 17 00:00:00 2001 From: JIANHONG OU Date: Thu, 28 Apr 2022 08:14:30 -0400 Subject: [PATCH 11/73] Update modules/motus/downloaddb/main.nf Co-authored-by: Robert A. Petit III --- modules/motus/downloaddb/main.nf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/motus/downloaddb/main.nf b/modules/motus/downloaddb/main.nf index e2a0cec6..58f3cd03 100644 --- a/modules/motus/downloaddb/main.nf +++ b/modules/motus/downloaddb/main.nf @@ -18,7 +18,7 @@ process MOTUS_DOWNLOADDB { script: def args = task.ext.args ?: '' - def software = ${motus_downloaddb.simpleName}_copy.py + def software = "${motus_downloaddb.simpleName}_copy.py" """ ## must copy script file to working directory, ## otherwise the reference_db will be download to bin folder 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 12/73] 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 13/73] 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 14/73] 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 15/73] 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 16/73] 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 17/73] 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 18/73] 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 19/73] 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 20/73] 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 21/73] 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 3f07761da5cfee184a281acb1dfe80838566f234 Mon Sep 17 00:00:00 2001 From: JIANHONG OU Date: Mon, 2 May 2022 08:19:13 -0400 Subject: [PATCH 22/73] remove the output check for the versions.yml. --- tests/modules/motus/downloaddb/test.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/tests/modules/motus/downloaddb/test.yml b/tests/modules/motus/downloaddb/test.yml index ada5383a..e61f937f 100644 --- a/tests/modules/motus/downloaddb/test.yml +++ b/tests/modules/motus/downloaddb/test.yml @@ -5,5 +5,3 @@ - motus/downloaddb files: - path: output/motus/db_mOTU/db_mOTU_versions - - path: output/motus/versions.yml - md5sum: b9b843b2435b01bb430ee8780b5c639e From 31dd31079d8f2968dcd39eb3e4eca5687467d634 Mon Sep 17 00:00:00 2001 From: JIANHONG OU Date: Mon, 2 May 2022 08:41:41 -0400 Subject: [PATCH 23/73] update teh versions.yml --- modules/motus/downloaddb/main.nf | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/modules/motus/downloaddb/main.nf b/modules/motus/downloaddb/main.nf index 58f3cd03..6a689e4a 100644 --- a/modules/motus/downloaddb/main.nf +++ b/modules/motus/downloaddb/main.nf @@ -30,12 +30,9 @@ process MOTUS_DOWNLOADDB { ## clean up rm ${software} - ## mOTUs version number is not available from command line. - ## mOTUs save the version number in index database folder. - ## mOTUs will check the database version is same version as exec version. cat <<-END_VERSIONS > versions.yml "${task.process}": - mOTUs: \$(grep motus db_mOTU/db_mOTU_versions | sed 's/motus\\t//g') + mOTUs: \$(echo \$(motus -h 2>&1) | sed 's/^.*Version: //; s/References.*\$//') END_VERSIONS """ } From 250d64dfde684d9e180e737e79540d1675b17dcb Mon Sep 17 00:00:00 2001 From: JIANHONG OU Date: Mon, 2 May 2022 08:52:54 -0400 Subject: [PATCH 24/73] fix the typo of motus_downloadb. --- modules/motus/downloaddb/main.nf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/motus/downloaddb/main.nf b/modules/motus/downloaddb/main.nf index 6a689e4a..46bec9b6 100644 --- a/modules/motus/downloaddb/main.nf +++ b/modules/motus/downloaddb/main.nf @@ -18,12 +18,12 @@ process MOTUS_DOWNLOADDB { script: def args = task.ext.args ?: '' - def software = "${motus_downloaddb.simpleName}_copy.py" + def software = "${motus_downloaddb_script.simpleName}_copy.py" """ ## must copy script file to working directory, ## otherwise the reference_db will be download to bin folder ## other than current directory - cp $motus_downloaddb ${software} + cp $motus_downloaddb_script ${software} python ${software} \\ $args \\ -t $task.cpus From 38d9d81aaf61c83743b7e43e405917e7aeb376a6 Mon Sep 17 00:00:00 2001 From: Carpanzano Date: Mon, 2 May 2022 16:10:57 +0200 Subject: [PATCH 25/73] 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 26/73] 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 27/73] 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 28/73] 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 29/73] 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 30/73] 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 31/73] 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 32/73] 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 33/73] 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 34/73] 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 35/73] 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 36/73] 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 37/73] 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 38/73] 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 5735f515f805445d0d2132fa5b587e0a1f61d2ec Mon Sep 17 00:00:00 2001 From: JIANHONG OU Date: Mon, 2 May 2022 12:25:48 -0400 Subject: [PATCH 39/73] fix a typo in version export. --- modules/motus/downloaddb/main.nf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/motus/downloaddb/main.nf b/modules/motus/downloaddb/main.nf index 46bec9b6..c8af459a 100644 --- a/modules/motus/downloaddb/main.nf +++ b/modules/motus/downloaddb/main.nf @@ -32,7 +32,7 @@ process MOTUS_DOWNLOADDB { cat <<-END_VERSIONS > versions.yml "${task.process}": - mOTUs: \$(echo \$(motus -h 2>&1) | sed 's/^.*Version: //; s/References.*\$//') + mOTUs: \$(echo \$(motus -h 2>&1) | sed 's/^.*Version: //; s/Reference.*\$//') END_VERSIONS """ } From 5136ed29c4ce92eb32160ff7c5ad63ba243861fa Mon Sep 17 00:00:00 2001 From: Carpanzano Date: Mon, 2 May 2022 18:38:59 +0200 Subject: [PATCH 40/73] 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 41/73] 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 42/73] 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 43/73] 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 550390345785fe0ebb1835616f895af2bdadf122 Mon Sep 17 00:00:00 2001 From: ljmesi <37740329+ljmesi@users.noreply.github.com> Date: Tue, 3 May 2022 09:46:04 +0200 Subject: [PATCH 44/73] Add compression for output fastq file --- modules/samtools/bam2fq/main.nf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/samtools/bam2fq/main.nf b/modules/samtools/bam2fq/main.nf index 5d6aa79d..554af48b 100644 --- a/modules/samtools/bam2fq/main.nf +++ b/modules/samtools/bam2fq/main.nf @@ -45,7 +45,7 @@ process SAMTOOLS_BAM2FQ { bam2fq \\ $args \\ -@ $task.cpus \\ - $inputbam >${prefix}_interleaved.fq.gz + $inputbam | gzip > ${prefix}_interleaved.fq.gz cat <<-END_VERSIONS > versions.yml "${task.process}": From 59d6e6e1dd0dc5cbfff7d431725caeaf201c40e4 Mon Sep 17 00:00:00 2001 From: ljmesi <37740329+ljmesi@users.noreply.github.com> Date: Tue, 3 May 2022 09:56:50 +0200 Subject: [PATCH 45/73] Add updated md5sums --- tests/modules/samtools/bam2fq/test.yml | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/tests/modules/samtools/bam2fq/test.yml b/tests/modules/samtools/bam2fq/test.yml index 213c7a2d..6fcc9c22 100644 --- a/tests/modules/samtools/bam2fq/test.yml +++ b/tests/modules/samtools/bam2fq/test.yml @@ -1,17 +1,19 @@ - name: samtools bam2fq test_samtools_bam2fq_nosplit - command: nextflow run ./tests/modules/samtools/bam2fq -entry test_samtools_bam2fq_nosplit -c ./tests/config/nextflow.config -c ./tests/modules/samtools/bam2fq/nextflow.config + command: nextflow run tests/modules/samtools/bam2fq -entry test_samtools_bam2fq_nosplit -c tests/config/nextflow.config tags: - - samtools/bam2fq - samtools + - samtools/bam2fq files: - path: output/samtools/test_interleaved.fq.gz - md5sum: d733e66d29a4b366bf9df8c42f845256 + md5sum: 7a57a8ab53dd1d799cca67a85c47ccd9 + - path: output/samtools/versions.yml + md5sum: 4973eac1b6a8f090d5fcd4456d65a894 - name: samtools bam2fq test_samtools_bam2fq_withsplit - command: nextflow run ./tests/modules/samtools/bam2fq -entry test_samtools_bam2fq_withsplit -c ./tests/config/nextflow.config -c ./tests/modules/samtools/bam2fq/nextflow.config + command: nextflow run tests/modules/samtools/bam2fq -entry test_samtools_bam2fq_withsplit -c tests/config/nextflow.config tags: - - samtools/bam2fq - samtools + - samtools/bam2fq files: - path: output/samtools/test_1.fq.gz md5sum: 1c84aadcdca10e97be2b5b6ce773f5ed @@ -21,3 +23,5 @@ md5sum: 709872fc2910431b1e8b7074bfe38c67 - path: output/samtools/test_singleton.fq.gz md5sum: 709872fc2910431b1e8b7074bfe38c67 + - path: output/samtools/versions.yml + md5sum: e92d21bbcda2fed7cb438d95c51edff0 From 5510ea39fe638594bc26ac34cadf4a84bf27d159 Mon Sep 17 00:00:00 2001 From: ljmesi <37740329+ljmesi@users.noreply.github.com> Date: Tue, 3 May 2022 15:18:09 +0200 Subject: [PATCH 46/73] Test --no-name to solve inconsistent checksums --- modules/samtools/bam2fq/main.nf | 2 +- tests/modules/samtools/bam2fq/test.yml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/samtools/bam2fq/main.nf b/modules/samtools/bam2fq/main.nf index 554af48b..9301d1d3 100644 --- a/modules/samtools/bam2fq/main.nf +++ b/modules/samtools/bam2fq/main.nf @@ -45,7 +45,7 @@ process SAMTOOLS_BAM2FQ { bam2fq \\ $args \\ -@ $task.cpus \\ - $inputbam | gzip > ${prefix}_interleaved.fq.gz + $inputbam | gzip --no-name > ${prefix}_interleaved.fq.gz cat <<-END_VERSIONS > versions.yml "${task.process}": diff --git a/tests/modules/samtools/bam2fq/test.yml b/tests/modules/samtools/bam2fq/test.yml index 6fcc9c22..674730d7 100644 --- a/tests/modules/samtools/bam2fq/test.yml +++ b/tests/modules/samtools/bam2fq/test.yml @@ -1,8 +1,8 @@ - name: samtools bam2fq test_samtools_bam2fq_nosplit command: nextflow run tests/modules/samtools/bam2fq -entry test_samtools_bam2fq_nosplit -c tests/config/nextflow.config tags: - - samtools - samtools/bam2fq + - samtools files: - path: output/samtools/test_interleaved.fq.gz md5sum: 7a57a8ab53dd1d799cca67a85c47ccd9 @@ -12,8 +12,8 @@ - name: samtools bam2fq test_samtools_bam2fq_withsplit command: nextflow run tests/modules/samtools/bam2fq -entry test_samtools_bam2fq_withsplit -c tests/config/nextflow.config tags: - - samtools - samtools/bam2fq + - samtools files: - path: output/samtools/test_1.fq.gz md5sum: 1c84aadcdca10e97be2b5b6ce773f5ed From a39fa4e003efce395debe34de57c5b28472c762c Mon Sep 17 00:00:00 2001 From: ljmesi <37740329+ljmesi@users.noreply.github.com> Date: Tue, 3 May 2022 15:47:49 +0200 Subject: [PATCH 47/73] Fix checksum for one file --- tests/modules/samtools/bam2fq/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/modules/samtools/bam2fq/test.yml b/tests/modules/samtools/bam2fq/test.yml index 674730d7..9d641e4a 100644 --- a/tests/modules/samtools/bam2fq/test.yml +++ b/tests/modules/samtools/bam2fq/test.yml @@ -5,7 +5,7 @@ - samtools files: - path: output/samtools/test_interleaved.fq.gz - md5sum: 7a57a8ab53dd1d799cca67a85c47ccd9 + md5sum: 7290d2d8dbef0fa57c0e2f28b5db1bf8 - path: output/samtools/versions.yml md5sum: 4973eac1b6a8f090d5fcd4456d65a894 From dc59ad0bf5cd65a921c85680e872097da43d2f77 Mon Sep 17 00:00:00 2001 From: JIANHONG OU Date: Tue, 3 May 2022 12:27:39 -0400 Subject: [PATCH 48/73] fix the version issue. --- modules/motus/downloaddb/main.nf | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/motus/downloaddb/main.nf b/modules/motus/downloaddb/main.nf index c8af459a..20dae83c 100644 --- a/modules/motus/downloaddb/main.nf +++ b/modules/motus/downloaddb/main.nf @@ -30,9 +30,12 @@ process MOTUS_DOWNLOADDB { ## clean up rm ${software} + ## mOTUs version number is not available from command line. + ## mOTUs save the version number in index database folder. + ## mOTUs will check the database version is same version as exec version. cat <<-END_VERSIONS > versions.yml "${task.process}": - mOTUs: \$(echo \$(motus -h 2>&1) | sed 's/^.*Version: //; s/Reference.*\$//') + mOTUs: \$(grep motus db_mOTU/db_mOTU_versions | sed 's/motus\\t//g') END_VERSIONS """ } From c517ce9b4d3f09f2d49cf0c6795019a6e78938b3 Mon Sep 17 00:00:00 2001 From: Nicolas Vannieuwkerke Date: Wed, 4 May 2022 13:42:12 +0200 Subject: [PATCH 49/73] Added the module and some simple testing --- modules/happy/main.nf | 53 +++++++++++++++++++++++++++++ modules/happy/meta.yml | 51 +++++++++++++++++++++++++++ tests/config/pytest_modules.yml | 4 +++ tests/modules/happy/main.nf | 39 +++++++++++++++++++++ tests/modules/happy/nextflow.config | 5 +++ tests/modules/happy/test.yml | 7 ++++ 6 files changed, 159 insertions(+) create mode 100644 modules/happy/main.nf create mode 100644 modules/happy/meta.yml create mode 100644 tests/modules/happy/main.nf create mode 100644 tests/modules/happy/nextflow.config create mode 100644 tests/modules/happy/test.yml diff --git a/modules/happy/main.nf b/modules/happy/main.nf new file mode 100644 index 00000000..68059dd8 --- /dev/null +++ b/modules/happy/main.nf @@ -0,0 +1,53 @@ +def VERSION_HAP = '0.3.14' +def VERSION_PRE = '0.3.14' + +process HAPPY { + tag "$meta.id" + label 'process_medium' + + conda (params.enable_conda ? "bioconda::hap.py=0.3.14" : null) + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/hap.py:0.3.14--py27h5c5a3ab_0': + 'quay.io/biocontainers/hap.py:0.3.14--py27h5c5a3ab_0' }" + + input: + tuple val(meta), path(truth_vcf), path(query_vcf), path(bed) + tuple path(fasta), path(fasta_fai) + + output: + tuple val(meta), path('*.csv'), path('*.json') , emit: metrics + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + def args2 = task.ext.args2 ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + + """ + pre.py \\ + $args \\ + -R $bed \\ + --reference $fasta \\ + --threads $task.cpus \\ + $query_vcf \\ + ${prefix}_preprocessed.vcf.gz + + hap.py \\ + $truth_vcf \\ + ${prefix}_preprocessed.vcf.gz \\ + $args2 \\ + --reference $fasta \\ + --threads $task.cpus \\ + -R $bed \\ + -o $prefix + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + hap.py: $VERSION_HAP + pre.py: $VERSION_PRE + END_VERSIONS + """ +} diff --git a/modules/happy/meta.yml b/modules/happy/meta.yml new file mode 100644 index 00000000..52d98e04 --- /dev/null +++ b/modules/happy/meta.yml @@ -0,0 +1,51 @@ +name: "happy" +description: Hap.py is a tool to compare diploid genotypes at haplotype level. Rather than comparing VCF records row by row, hap.py will generate and match alternate sequences in a superlocus. A superlocus is a small region of the genome (sized between 1 and around 1000 bp) that contains one or more variants. +keywords: + - happy + - benchmark + - haplotype +tools: + - "happy": + description: "Haplotype VCF comparison tools" + homepage: "https://www.illumina.com/products/by-type/informatics-products/basespace-sequence-hub/apps/hap-py-benchmarking.html" + documentation: "https://github.com/Illumina/hap.py" + tool_dev_url: "https://github.com/Illumina/hap.py" + doi: "" + licence: "['BSD-2-clause']" + +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - truth_vcf: + type: file + description: gold standard VCF file + pattern: "*.{vcf,vcf.gz}" + - query_vcf: + type: file + description: VCF file to query + pattern: "*.{vcf,vcf.gz}" + - bed: + type: file + description: BED file + pattern: "*.bed" + - fasta: + type: file + description: FASTA file of the reference genome + pattern: "*.{fa,fasta}" + +output: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" + +authors: + - "@nvnieuwk" diff --git a/tests/config/pytest_modules.yml b/tests/config/pytest_modules.yml index f4feb844..c14ffc8e 100644 --- a/tests/config/pytest_modules.yml +++ b/tests/config/pytest_modules.yml @@ -891,6 +891,10 @@ hamronization/summarize: - modules/hamronization/summarize/** - tests/modules/hamronization/summarize/** +happy: + - modules/happy/** + - tests/modules/happy/** + hicap: - modules/hicap/** - tests/modules/hicap/** diff --git a/tests/modules/happy/main.nf b/tests/modules/happy/main.nf new file mode 100644 index 00000000..0ce23b50 --- /dev/null +++ b/tests/modules/happy/main.nf @@ -0,0 +1,39 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { HAPPY } from '../../../modules/happy/main.nf' + +workflow test_happy_vcf { + + input = [ + [ id:'test' ], // meta map + file(params.test_data['homo_sapiens']['illumina']['test_rnaseq_vcf'], checkIfExists: true), + file(params.test_data['homo_sapiens']['illumina']['test_genome21_indels_vcf_gz'], checkIfExists: true), + file(params.test_data['homo_sapiens']['genome']['genome_bed'], checkIfExists: true) + ] + + fasta = Channel.value([ + file(params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true), + file(params.test_data['homo_sapiens']['genome']['genome_fasta_fai'], checkIfExists: true) + ]) + + HAPPY ( input, fasta ) +} + +workflow test_happy_gvcf { + + input = [ + [ id:'test' ], // meta map + file(params.test_data['homo_sapiens']['illumina']['test_rnaseq_vcf'], checkIfExists: true), + file(params.test_data['homo_sapiens']['illumina']['test_genome_vcf'], checkIfExists: true), + file(params.test_data['homo_sapiens']['genome']['genome_bed'], checkIfExists: true) + ] + + fasta = Channel.value([ + file(params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true), + file(params.test_data['homo_sapiens']['genome']['genome_fasta_fai'], checkIfExists: true) + ]) + + HAPPY ( input, fasta ) +} diff --git a/tests/modules/happy/nextflow.config b/tests/modules/happy/nextflow.config new file mode 100644 index 00000000..50f50a7a --- /dev/null +++ b/tests/modules/happy/nextflow.config @@ -0,0 +1,5 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + +} \ No newline at end of file diff --git a/tests/modules/happy/test.yml b/tests/modules/happy/test.yml new file mode 100644 index 00000000..d85d42a2 --- /dev/null +++ b/tests/modules/happy/test.yml @@ -0,0 +1,7 @@ +- name: happy test_happy + command: nextflow run tests/modules/happy -entry test_happy -c tests/config/nextflow.config + tags: + - happy + files: + - path: output/happy/versions.yml + md5sum: ab8944c1b24e55bab311a9d389c75c90 From 37338ecee30a7210e9a40d993370fd25bddf003d Mon Sep 17 00:00:00 2001 From: Nicolas Vannieuwkerke Date: Wed, 4 May 2022 14:00:02 +0200 Subject: [PATCH 50/73] Finished the module --- modules/happy/meta.yml | 12 ++++++++++++ tests/modules/happy/test.yml | 26 +++++++++++++++++++++++--- 2 files changed, 35 insertions(+), 3 deletions(-) diff --git a/modules/happy/meta.yml b/modules/happy/meta.yml index 52d98e04..28142d9b 100644 --- a/modules/happy/meta.yml +++ b/modules/happy/meta.yml @@ -42,6 +42,18 @@ output: description: | Groovy Map containing sample information e.g. [ id:'test', single_end:false ] + - summary: + type: file + description: A CSV file containing the summary of the benchmarking + pattern: "*.summary.csv" + - extended: + type: file + description: A CSV file containing extended info of the benchmarking + pattern: "*.extended.csv" + - runinfo: + type: file + description: A JSON file containing the run info + pattern: "*.runinfo.json" - versions: type: file description: File containing software versions diff --git a/tests/modules/happy/test.yml b/tests/modules/happy/test.yml index d85d42a2..7dddca17 100644 --- a/tests/modules/happy/test.yml +++ b/tests/modules/happy/test.yml @@ -1,7 +1,27 @@ -- name: happy test_happy - command: nextflow run tests/modules/happy -entry test_happy -c tests/config/nextflow.config +- name: happy test_happy_vcf + command: nextflow run tests/modules/happy -entry test_happy_vcf -c tests/config/nextflow.config tags: - happy files: + - path: output/happy/test.extended.csv + md5sum: ef79c7c789ef4f146ca2e50dafaf22b3 + - path: output/happy/test.runinfo.json + contains: '"name": "hap.py"' + - path: output/happy/test.summary.csv + md5sum: f8aa5d36d3c48dede2f607fd565894ad - path: output/happy/versions.yml - md5sum: ab8944c1b24e55bab311a9d389c75c90 + md5sum: 2c2b8249f9f52194da7f09076dbb5019 + +- name: happy test_happy_gvcf + command: nextflow run tests/modules/happy -entry test_happy_gvcf -c tests/config/nextflow.config + tags: + - happy + files: + - path: output/happy/test.extended.csv + md5sum: 3d5c21b67a259a3f6dcb088d55b86cd3 + - path: output/happy/test.runinfo.json + contains: '"name": "hap.py"' + - path: output/happy/test.summary.csv + md5sum: 03044e9bb5a0c6f0947b7e910fc8a558 + - path: output/happy/versions.yml + md5sum: 75331161af9ec046d045ffcba83abddf From 065a5d6a7f13a50ad7965fdc770df50363bde3d7 Mon Sep 17 00:00:00 2001 From: Nicolas Vannieuwkerke Date: Wed, 4 May 2022 14:05:21 +0200 Subject: [PATCH 51/73] Fixed a linting issue --- modules/happy/main.nf | 2 +- modules/happy/meta.yml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/happy/main.nf b/modules/happy/main.nf index 68059dd8..1338686e 100644 --- a/modules/happy/main.nf +++ b/modules/happy/main.nf @@ -25,7 +25,7 @@ process HAPPY { def args = task.ext.args ?: '' def args2 = task.ext.args2 ?: '' def prefix = task.ext.prefix ?: "${meta.id}" - + """ pre.py \\ $args \\ diff --git a/modules/happy/meta.yml b/modules/happy/meta.yml index 28142d9b..aba9410b 100644 --- a/modules/happy/meta.yml +++ b/modules/happy/meta.yml @@ -45,7 +45,7 @@ output: - summary: type: file description: A CSV file containing the summary of the benchmarking - pattern: "*.summary.csv" + pattern: "*.summary.csv" - extended: type: file description: A CSV file containing extended info of the benchmarking @@ -60,4 +60,4 @@ output: pattern: "versions.yml" authors: - - "@nvnieuwk" + - "@nvnieuwk" \ No newline at end of file From 177a7e49f249952d8b3271c454529a768f16af43 Mon Sep 17 00:00:00 2001 From: Nicolas Vannieuwkerke Date: Wed, 4 May 2022 14:06:42 +0200 Subject: [PATCH 52/73] Fixed a linting issue --- modules/happy/meta.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/happy/meta.yml b/modules/happy/meta.yml index aba9410b..d732df22 100644 --- a/modules/happy/meta.yml +++ b/modules/happy/meta.yml @@ -60,4 +60,4 @@ output: pattern: "versions.yml" authors: - - "@nvnieuwk" \ No newline at end of file + - "@nvnieuwk" From c1393bf999e4e967d24d7ec3d2e864c5d0a856e3 Mon Sep 17 00:00:00 2001 From: Nicolas Vannieuwkerke Date: Wed, 4 May 2022 14:14:01 +0200 Subject: [PATCH 53/73] Possible fix for the pytest errors? --- tests/modules/happy/test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/modules/happy/test.yml b/tests/modules/happy/test.yml index 7dddca17..f5bdef52 100644 --- a/tests/modules/happy/test.yml +++ b/tests/modules/happy/test.yml @@ -6,7 +6,7 @@ - path: output/happy/test.extended.csv md5sum: ef79c7c789ef4f146ca2e50dafaf22b3 - path: output/happy/test.runinfo.json - contains: '"name": "hap.py"' + contains: 'hap.py' - path: output/happy/test.summary.csv md5sum: f8aa5d36d3c48dede2f607fd565894ad - path: output/happy/versions.yml @@ -20,7 +20,7 @@ - path: output/happy/test.extended.csv md5sum: 3d5c21b67a259a3f6dcb088d55b86cd3 - path: output/happy/test.runinfo.json - contains: '"name": "hap.py"' + contains: 'hap.py' - path: output/happy/test.summary.csv md5sum: 03044e9bb5a0c6f0947b7e910fc8a558 - path: output/happy/versions.yml From 505ab038037df6a7d7af1db1cae3354b8f713364 Mon Sep 17 00:00:00 2001 From: Nicolas Vannieuwkerke Date: Wed, 4 May 2022 14:14:53 +0200 Subject: [PATCH 54/73] fixed a description --- modules/happy/meta.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/happy/meta.yml b/modules/happy/meta.yml index d732df22..6b5b86cf 100644 --- a/modules/happy/meta.yml +++ b/modules/happy/meta.yml @@ -25,7 +25,7 @@ input: pattern: "*.{vcf,vcf.gz}" - query_vcf: type: file - description: VCF file to query + description: VCF/GVCF file to query pattern: "*.{vcf,vcf.gz}" - bed: type: file From 17dbd2bb82093cd6ca1d1439c5c7815eb0b9a2a6 Mon Sep 17 00:00:00 2001 From: Nicolas Vannieuwkerke Date: Wed, 4 May 2022 14:18:56 +0200 Subject: [PATCH 55/73] Linting issue fixed --- tests/modules/happy/test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/modules/happy/test.yml b/tests/modules/happy/test.yml index f5bdef52..937df32e 100644 --- a/tests/modules/happy/test.yml +++ b/tests/modules/happy/test.yml @@ -6,7 +6,7 @@ - path: output/happy/test.extended.csv md5sum: ef79c7c789ef4f146ca2e50dafaf22b3 - path: output/happy/test.runinfo.json - contains: 'hap.py' + contains: hap.py - path: output/happy/test.summary.csv md5sum: f8aa5d36d3c48dede2f607fd565894ad - path: output/happy/versions.yml @@ -20,7 +20,7 @@ - path: output/happy/test.extended.csv md5sum: 3d5c21b67a259a3f6dcb088d55b86cd3 - path: output/happy/test.runinfo.json - contains: 'hap.py' + contains: hap.py - path: output/happy/test.summary.csv md5sum: 03044e9bb5a0c6f0947b7e910fc8a558 - path: output/happy/versions.yml From 583ea138006d8c49d4821bbfaeba81408ff57053 Mon Sep 17 00:00:00 2001 From: Nicolas Vannieuwkerke Date: Wed, 4 May 2022 14:22:55 +0200 Subject: [PATCH 56/73] Another try to fix the pytest issues --- tests/modules/happy/test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/modules/happy/test.yml b/tests/modules/happy/test.yml index 937df32e..c0a34387 100644 --- a/tests/modules/happy/test.yml +++ b/tests/modules/happy/test.yml @@ -6,7 +6,7 @@ - path: output/happy/test.extended.csv md5sum: ef79c7c789ef4f146ca2e50dafaf22b3 - path: output/happy/test.runinfo.json - contains: hap.py + contains: dist - path: output/happy/test.summary.csv md5sum: f8aa5d36d3c48dede2f607fd565894ad - path: output/happy/versions.yml @@ -20,7 +20,7 @@ - path: output/happy/test.extended.csv md5sum: 3d5c21b67a259a3f6dcb088d55b86cd3 - path: output/happy/test.runinfo.json - contains: hap.py + contains: dist - path: output/happy/test.summary.csv md5sum: 03044e9bb5a0c6f0947b7e910fc8a558 - path: output/happy/versions.yml From 5889d6c9233fae612dbce8d333773f1a8b1d47e9 Mon Sep 17 00:00:00 2001 From: Nicolas Vannieuwkerke Date: Wed, 4 May 2022 14:46:15 +0200 Subject: [PATCH 57/73] Another possible fix for the pytest issues --- tests/modules/happy/test.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tests/modules/happy/test.yml b/tests/modules/happy/test.yml index c0a34387..9af6cc83 100644 --- a/tests/modules/happy/test.yml +++ b/tests/modules/happy/test.yml @@ -6,7 +6,9 @@ - path: output/happy/test.extended.csv md5sum: ef79c7c789ef4f146ca2e50dafaf22b3 - path: output/happy/test.runinfo.json - contains: dist + contains: + - 'dist' + - 'python_version' - path: output/happy/test.summary.csv md5sum: f8aa5d36d3c48dede2f607fd565894ad - path: output/happy/versions.yml @@ -20,7 +22,9 @@ - path: output/happy/test.extended.csv md5sum: 3d5c21b67a259a3f6dcb088d55b86cd3 - path: output/happy/test.runinfo.json - contains: dist + contains: + - 'dist' + - 'python_version' - path: output/happy/test.summary.csv md5sum: 03044e9bb5a0c6f0947b7e910fc8a558 - path: output/happy/versions.yml From 3c661386728c3552da55db5252ef2bae8f113220 Mon Sep 17 00:00:00 2001 From: Nicolas Vannieuwkerke Date: Wed, 4 May 2022 14:49:17 +0200 Subject: [PATCH 58/73] Linting issue + removed the contains lines --- tests/modules/happy/test.yml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/tests/modules/happy/test.yml b/tests/modules/happy/test.yml index 9af6cc83..0fd26e5b 100644 --- a/tests/modules/happy/test.yml +++ b/tests/modules/happy/test.yml @@ -6,9 +6,6 @@ - path: output/happy/test.extended.csv md5sum: ef79c7c789ef4f146ca2e50dafaf22b3 - path: output/happy/test.runinfo.json - contains: - - 'dist' - - 'python_version' - path: output/happy/test.summary.csv md5sum: f8aa5d36d3c48dede2f607fd565894ad - path: output/happy/versions.yml @@ -22,9 +19,6 @@ - path: output/happy/test.extended.csv md5sum: 3d5c21b67a259a3f6dcb088d55b86cd3 - path: output/happy/test.runinfo.json - contains: - - 'dist' - - 'python_version' - path: output/happy/test.summary.csv md5sum: 03044e9bb5a0c6f0947b7e910fc8a558 - path: output/happy/versions.yml From f875aec46b9ab231ab96dfa4bb3b62c53fb821ee Mon Sep 17 00:00:00 2001 From: Nicolas Vannieuwkerke Date: Wed, 4 May 2022 15:29:48 +0200 Subject: [PATCH 59/73] Split the module into two parts --- modules/happy/{ => happy}/main.nf | 21 ++----- modules/happy/{ => happy}/meta.yml | 6 +- modules/happy/prepy/main.nf | 41 ++++++++++++++ modules/happy/prepy/meta.yml | 55 +++++++++++++++++++ tests/config/pytest_modules.yml | 4 ++ tests/modules/happy/{ => happy}/main.nf | 6 +- .../modules/happy/{ => happy}/nextflow.config | 0 tests/modules/happy/{ => happy}/test.yml | 14 +++-- tests/modules/happy/prepy/main.nf | 37 +++++++++++++ tests/modules/happy/prepy/nextflow.config | 5 ++ tests/modules/happy/prepy/test.yml | 19 +++++++ 11 files changed, 182 insertions(+), 26 deletions(-) rename modules/happy/{ => happy}/main.nf (74%) rename modules/happy/{ => happy}/meta.yml (93%) create mode 100644 modules/happy/prepy/main.nf create mode 100644 modules/happy/prepy/meta.yml rename tests/modules/happy/{ => happy}/main.nf (90%) rename tests/modules/happy/{ => happy}/nextflow.config (100%) rename tests/modules/happy/{ => happy}/test.yml (58%) create mode 100644 tests/modules/happy/prepy/main.nf create mode 100644 tests/modules/happy/prepy/nextflow.config create mode 100644 tests/modules/happy/prepy/test.yml diff --git a/modules/happy/main.nf b/modules/happy/happy/main.nf similarity index 74% rename from modules/happy/main.nf rename to modules/happy/happy/main.nf index 1338686e..1bb99117 100644 --- a/modules/happy/main.nf +++ b/modules/happy/happy/main.nf @@ -1,7 +1,6 @@ -def VERSION_HAP = '0.3.14' -def VERSION_PRE = '0.3.14' +def VERSION = '0.3.14' -process HAPPY { +process HAPPY_HAPPY { tag "$meta.id" label 'process_medium' @@ -23,22 +22,13 @@ process HAPPY { script: def args = task.ext.args ?: '' - def args2 = task.ext.args2 ?: '' def prefix = task.ext.prefix ?: "${meta.id}" """ - pre.py \\ - $args \\ - -R $bed \\ - --reference $fasta \\ - --threads $task.cpus \\ - $query_vcf \\ - ${prefix}_preprocessed.vcf.gz - hap.py \\ $truth_vcf \\ - ${prefix}_preprocessed.vcf.gz \\ - $args2 \\ + $query_vcf \\ + $args \\ --reference $fasta \\ --threads $task.cpus \\ -R $bed \\ @@ -46,8 +36,7 @@ process HAPPY { cat <<-END_VERSIONS > versions.yml "${task.process}": - hap.py: $VERSION_HAP - pre.py: $VERSION_PRE + hap.py: $VERSION END_VERSIONS """ } diff --git a/modules/happy/meta.yml b/modules/happy/happy/meta.yml similarity index 93% rename from modules/happy/meta.yml rename to modules/happy/happy/meta.yml index 6b5b86cf..8ec762d5 100644 --- a/modules/happy/meta.yml +++ b/modules/happy/happy/meta.yml @@ -1,4 +1,4 @@ -name: "happy" +name: "happy_happy" description: Hap.py is a tool to compare diploid genotypes at haplotype level. Rather than comparing VCF records row by row, hap.py will generate and match alternate sequences in a superlocus. A superlocus is a small region of the genome (sized between 1 and around 1000 bp) that contains one or more variants. keywords: - happy @@ -35,6 +35,10 @@ input: type: file description: FASTA file of the reference genome pattern: "*.{fa,fasta}" + - fasta_fai: + type: file + description: The index of the reference FASTA + pattern: "*.fai" output: - meta: diff --git a/modules/happy/prepy/main.nf b/modules/happy/prepy/main.nf new file mode 100644 index 00000000..936f56ea --- /dev/null +++ b/modules/happy/prepy/main.nf @@ -0,0 +1,41 @@ +def VERSION = '0.3.14' + +process HAPPY_PREPY { + tag "$meta.id" + label 'process_medium' + + conda (params.enable_conda ? "bioconda::hap.py=0.3.14" : null) + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/hap.py:0.3.14--py27h5c5a3ab_0': + 'quay.io/biocontainers/hap.py:0.3.14--py27h5c5a3ab_0' }" + + input: + tuple val(meta), path(vcf), path(bed) + tuple path(fasta), path(fasta_fai) + + output: + tuple val(meta), path('*.vcf.gz') , emit: preprocessed_vcf + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + + """ + pre.py \\ + $args \\ + -R $bed \\ + --reference $fasta \\ + --threads $task.cpus \\ + $vcf \\ + ${prefix}.vcf.gz + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + pre.py: $VERSION + END_VERSIONS + """ +} diff --git a/modules/happy/prepy/meta.yml b/modules/happy/prepy/meta.yml new file mode 100644 index 00000000..7e27a652 --- /dev/null +++ b/modules/happy/prepy/meta.yml @@ -0,0 +1,55 @@ +name: "happy_prepy" +description: Pre.py is a preprocessing tool made to preprocess VCF files for Hap.py +keywords: + - happy + - benchmark + - haplotype +tools: + - "happy": + description: "Haplotype VCF comparison tools" + homepage: "https://www.illumina.com/products/by-type/informatics-products/basespace-sequence-hub/apps/hap-py-benchmarking.html" + documentation: "https://github.com/Illumina/hap.py" + tool_dev_url: "https://github.com/Illumina/hap.py" + doi: "" + licence: "['BSD-2-clause']" + +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - vcf: + type: file + description: VCF file to preprocess + pattern: "*.{vcf,vcf.gz}" + - bed: + type: file + description: BED file + pattern: "*.bed" + - fasta: + type: file + description: FASTA file of the reference genome + pattern: "*.{fa,fasta}" + - fasta_fai: + type: file + description: The index of the reference FASTA + pattern: "*.fai" + +output: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - vcf: + type: file + description: A preprocessed VCF file + pattern: "*.vcf.gz" + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" + +authors: + - "@nvnieuwk" diff --git a/tests/config/pytest_modules.yml b/tests/config/pytest_modules.yml index c14ffc8e..4f85ba7d 100644 --- a/tests/config/pytest_modules.yml +++ b/tests/config/pytest_modules.yml @@ -895,6 +895,10 @@ happy: - modules/happy/** - tests/modules/happy/** +happy/prepy: + - modules/happy/prepy/** + - tests/modules/happy/prepy/** + hicap: - modules/hicap/** - tests/modules/hicap/** diff --git a/tests/modules/happy/main.nf b/tests/modules/happy/happy/main.nf similarity index 90% rename from tests/modules/happy/main.nf rename to tests/modules/happy/happy/main.nf index 0ce23b50..515a657b 100644 --- a/tests/modules/happy/main.nf +++ b/tests/modules/happy/happy/main.nf @@ -2,7 +2,7 @@ nextflow.enable.dsl = 2 -include { HAPPY } from '../../../modules/happy/main.nf' +include { HAPPY_HAPPY } from '../../../../modules/happy/happy/main.nf' workflow test_happy_vcf { @@ -18,7 +18,7 @@ workflow test_happy_vcf { file(params.test_data['homo_sapiens']['genome']['genome_fasta_fai'], checkIfExists: true) ]) - HAPPY ( input, fasta ) + HAPPY_HAPPY ( input, fasta ) } workflow test_happy_gvcf { @@ -35,5 +35,5 @@ workflow test_happy_gvcf { file(params.test_data['homo_sapiens']['genome']['genome_fasta_fai'], checkIfExists: true) ]) - HAPPY ( input, fasta ) + HAPPY_HAPPY ( input, fasta ) } diff --git a/tests/modules/happy/nextflow.config b/tests/modules/happy/happy/nextflow.config similarity index 100% rename from tests/modules/happy/nextflow.config rename to tests/modules/happy/happy/nextflow.config diff --git a/tests/modules/happy/test.yml b/tests/modules/happy/happy/test.yml similarity index 58% rename from tests/modules/happy/test.yml rename to tests/modules/happy/happy/test.yml index 0fd26e5b..89a1f012 100644 --- a/tests/modules/happy/test.yml +++ b/tests/modules/happy/happy/test.yml @@ -1,7 +1,8 @@ -- name: happy test_happy_vcf - command: nextflow run tests/modules/happy -entry test_happy_vcf -c tests/config/nextflow.config +- name: happy happy test_happy_vcf + command: nextflow run tests/modules/happy/happy -entry test_happy_vcf -c tests/config/nextflow.config tags: - happy + - happy/happy files: - path: output/happy/test.extended.csv md5sum: ef79c7c789ef4f146ca2e50dafaf22b3 @@ -9,12 +10,13 @@ - path: output/happy/test.summary.csv md5sum: f8aa5d36d3c48dede2f607fd565894ad - path: output/happy/versions.yml - md5sum: 2c2b8249f9f52194da7f09076dbb5019 + md5sum: 82243bf6dbdc71aa63211ee2a89f47f2 -- name: happy test_happy_gvcf - command: nextflow run tests/modules/happy -entry test_happy_gvcf -c tests/config/nextflow.config +- name: happy happy test_happy_gvcf + command: nextflow run tests/modules/happy/happy -entry test_happy_gvcf -c tests/config/nextflow.config tags: - happy + - happy/happy files: - path: output/happy/test.extended.csv md5sum: 3d5c21b67a259a3f6dcb088d55b86cd3 @@ -22,4 +24,4 @@ - path: output/happy/test.summary.csv md5sum: 03044e9bb5a0c6f0947b7e910fc8a558 - path: output/happy/versions.yml - md5sum: 75331161af9ec046d045ffcba83abddf + md5sum: 551fa216952d6f5de78e6e453b92aaab diff --git a/tests/modules/happy/prepy/main.nf b/tests/modules/happy/prepy/main.nf new file mode 100644 index 00000000..0b511104 --- /dev/null +++ b/tests/modules/happy/prepy/main.nf @@ -0,0 +1,37 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { HAPPY_PREPY } from '../../../../modules/happy/prepy/main.nf' + +workflow test_happy_prepy_vcf { + + input = [ + [ id:'test' ], // meta map + file(params.test_data['homo_sapiens']['illumina']['test_genome21_indels_vcf_gz'], checkIfExists: true), + file(params.test_data['homo_sapiens']['genome']['genome_bed'], checkIfExists: true) + ] + + fasta = Channel.value([ + file(params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true), + file(params.test_data['homo_sapiens']['genome']['genome_fasta_fai'], checkIfExists: true) + ]) + + HAPPY_PREPY ( input, fasta ) +} + +workflow test_happy_prepy_gvcf { + + input = [ + [ id:'test' ], // meta map + file(params.test_data['homo_sapiens']['illumina']['test_genome_vcf'], checkIfExists: true), + file(params.test_data['homo_sapiens']['genome']['genome_bed'], checkIfExists: true) + ] + + fasta = Channel.value([ + file(params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true), + file(params.test_data['homo_sapiens']['genome']['genome_fasta_fai'], checkIfExists: true) + ]) + + HAPPY_PREPY ( input, fasta ) +} diff --git a/tests/modules/happy/prepy/nextflow.config b/tests/modules/happy/prepy/nextflow.config new file mode 100644 index 00000000..50f50a7a --- /dev/null +++ b/tests/modules/happy/prepy/nextflow.config @@ -0,0 +1,5 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + +} \ No newline at end of file diff --git a/tests/modules/happy/prepy/test.yml b/tests/modules/happy/prepy/test.yml new file mode 100644 index 00000000..a0a45c38 --- /dev/null +++ b/tests/modules/happy/prepy/test.yml @@ -0,0 +1,19 @@ +- name: happy prepy test_happy_prepy_vcf + command: nextflow run tests/modules/happy/prepy -entry test_happy_prepy_vcf -c tests/config/nextflow.config + tags: + - happy/prepy + - happy + files: + - path: output/happy/test.vcf.gz + - path: output/happy/versions.yml + md5sum: 814d20f1f29f23a3d21012748a5d6393 + +- name: happy prepy test_happy_prepy_gvcf + command: nextflow run tests/modules/happy/prepy -entry test_happy_prepy_gvcf -c tests/config/nextflow.config + tags: + - happy/prepy + - happy + files: + - path: output/happy/test.vcf.gz + - path: output/happy/versions.yml + md5sum: 970a54de46e68ef6d5228a26eaa4c8e7 From 42bdc5471e1591ba6c8272dcd8a955ea21fec2e3 Mon Sep 17 00:00:00 2001 From: Nicolas Vannieuwkerke Date: Wed, 4 May 2022 15:40:34 +0200 Subject: [PATCH 60/73] Changed the pytest location of happy --- tests/config/pytest_modules.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/config/pytest_modules.yml b/tests/config/pytest_modules.yml index 4f85ba7d..32a28477 100644 --- a/tests/config/pytest_modules.yml +++ b/tests/config/pytest_modules.yml @@ -891,9 +891,9 @@ hamronization/summarize: - modules/hamronization/summarize/** - tests/modules/hamronization/summarize/** -happy: - - modules/happy/** - - tests/modules/happy/** +happy/happy: + - modules/happy/happy/** + - tests/modules/happy/happy/** happy/prepy: - modules/happy/prepy/** From 6b8ca501ed2d20e7d021f56cb6b15406cc4e584c Mon Sep 17 00:00:00 2001 From: Carpanzano Date: Wed, 4 May 2022 16:34:52 +0200 Subject: [PATCH 61/73] 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 62/73] 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 63/73] 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 64/73] 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 65/73] 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 ec5bada3fc9aa2bf7cbce711f870139f9a649b51 Mon Sep 17 00:00:00 2001 From: "James A. Fellows Yates" Date: Wed, 4 May 2022 20:55:16 +0200 Subject: [PATCH 66/73] Update modules/motus/downloaddb/meta.yml --- modules/motus/downloaddb/meta.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modules/motus/downloaddb/meta.yml b/modules/motus/downloaddb/meta.yml index 2d363cb1..416f6ba8 100644 --- a/modules/motus/downloaddb/meta.yml +++ b/modules/motus/downloaddb/meta.yml @@ -7,6 +7,8 @@ keywords: - taxonomic profiling - database - download + - database + - download tools: - "motus": description: "The mOTU profiler is a computational tool that estimates relative taxonomic abundance of known and currently unknown microbial community members using metagenomic shotgun sequencing data." From e9c82a5f48fd4801f56854ab7e68c737721155c0 Mon Sep 17 00:00:00 2001 From: JIANHONG OU Date: Wed, 4 May 2022 15:29:06 -0400 Subject: [PATCH 67/73] Update modules/motus/downloaddb/meta.yml Co-authored-by: James A. Fellows Yates --- modules/motus/downloaddb/meta.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/motus/downloaddb/meta.yml b/modules/motus/downloaddb/meta.yml index 416f6ba8..1d6b265b 100644 --- a/modules/motus/downloaddb/meta.yml +++ b/modules/motus/downloaddb/meta.yml @@ -20,7 +20,7 @@ tools: input: - motus_downloaddb: - type: file + type: directory description: | the mOTUs downloadDB script source file pattern: "downloadDB.py" From 29ee72c693fc271943a9cc719e856cbb806b925c Mon Sep 17 00:00:00 2001 From: JIANHONG OU Date: Wed, 4 May 2022 15:37:12 -0400 Subject: [PATCH 68/73] update meta.yml and remove the cleanup step. --- modules/motus/downloaddb/main.nf | 2 -- modules/motus/downloaddb/meta.yml | 6 +++--- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/modules/motus/downloaddb/main.nf b/modules/motus/downloaddb/main.nf index 20dae83c..317624b5 100644 --- a/modules/motus/downloaddb/main.nf +++ b/modules/motus/downloaddb/main.nf @@ -27,8 +27,6 @@ process MOTUS_DOWNLOADDB { python ${software} \\ $args \\ -t $task.cpus - ## clean up - rm ${software} ## mOTUs version number is not available from command line. ## mOTUs save the version number in index database folder. diff --git a/modules/motus/downloaddb/meta.yml b/modules/motus/downloaddb/meta.yml index 1d6b265b..a4759128 100644 --- a/modules/motus/downloaddb/meta.yml +++ b/modules/motus/downloaddb/meta.yml @@ -7,8 +7,6 @@ keywords: - taxonomic profiling - database - download - - database - - download tools: - "motus": description: "The mOTU profiler is a computational tool that estimates relative taxonomic abundance of known and currently unknown microbial community members using metagenomic shotgun sequencing data." @@ -22,7 +20,9 @@ input: - motus_downloaddb: type: directory description: | - the mOTUs downloadDB script source file + The mOTUs downloadDB script source file. + It is the source file installed or + remote source in github such as https://raw.githubusercontent.com/motu-tool/mOTUs/master/motus/downloadDB.py pattern: "downloadDB.py" output: From 6393a085c5fcea11963774c041808df169907487 Mon Sep 17 00:00:00 2001 From: "James A. Fellows Yates" Date: Thu, 5 May 2022 08:23:51 +0200 Subject: [PATCH 69/73] Apply suggestions from code review --- modules/motus/downloaddb/meta.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/motus/downloaddb/meta.yml b/modules/motus/downloaddb/meta.yml index a4759128..64df5ee0 100644 --- a/modules/motus/downloaddb/meta.yml +++ b/modules/motus/downloaddb/meta.yml @@ -32,7 +32,7 @@ output: pattern: "versions.yml" - db: type: directory - description: The mOTUs database + description: The mOTUs database directory pattern: "db_mOTU" authors: From be8ce6de2ae833802a44b9c2b3991dbb56eb43a4 Mon Sep 17 00:00:00 2001 From: ljmesi <37740329+ljmesi@users.noreply.github.com> Date: Thu, 5 May 2022 08:32:45 +0200 Subject: [PATCH 70/73] Remove variable md5sum from the tests --- tests/modules/samtools/bam2fq/test.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/modules/samtools/bam2fq/test.yml b/tests/modules/samtools/bam2fq/test.yml index 9d641e4a..4f9472e5 100644 --- a/tests/modules/samtools/bam2fq/test.yml +++ b/tests/modules/samtools/bam2fq/test.yml @@ -5,7 +5,6 @@ - samtools files: - path: output/samtools/test_interleaved.fq.gz - md5sum: 7290d2d8dbef0fa57c0e2f28b5db1bf8 - path: output/samtools/versions.yml md5sum: 4973eac1b6a8f090d5fcd4456d65a894 From 204dfba2d8635d1a73255538441544a0c1501d4d Mon Sep 17 00:00:00 2001 From: Carpanzano Date: Thu, 5 May 2022 10:51:22 +0200 Subject: [PATCH 71/73] 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 40dd662fd26c3eb3160b7c8cbbe9bff80bbe2c30 Mon Sep 17 00:00:00 2001 From: MaxUlysse Date: Thu, 5 May 2022 12:57:14 +0200 Subject: [PATCH 72/73] update ensemblvep and snpeff modules --- modules/ensemblvep/Dockerfile | 11 +++-- modules/ensemblvep/build.sh | 5 +- modules/ensemblvep/main.nf | 1 + modules/ensemblvep/meta.yml | 15 ++---- modules/snpeff/Dockerfile | 9 ++-- modules/snpeff/build.sh | 5 +- modules/snpeff/meta.yml | 12 ----- .../nf-core/annotation/ensemblvep/main.nf | 31 ++++++++++++ .../nf-core/annotation/ensemblvep/meta.yml | 49 +++++++++++++++++++ .../nf-core/annotation/snpeff/main.nf | 28 +++++++++++ .../snpeff}/meta.yml | 18 +++++-- .../nf-core/annotation_ensemblvep/main.nf | 26 ---------- .../nf-core/annotation_ensemblvep/meta.yml | 29 ----------- .../nf-core/annotation_snpeff/main.nf | 23 --------- tests/modules/ensemblvep/main.nf | 2 +- .../ensemblvep}/main.nf | 4 +- .../ensemblvep}/nextflow.config | 2 +- .../ensemblvep}/test.yml | 0 .../snpeff}/main.nf | 2 +- .../snpeff}/nextflow.config | 2 +- .../snpeff}/test.yml | 0 21 files changed, 149 insertions(+), 125 deletions(-) mode change 100755 => 100644 modules/snpeff/build.sh create mode 100644 subworkflows/nf-core/annotation/ensemblvep/main.nf create mode 100644 subworkflows/nf-core/annotation/ensemblvep/meta.yml create mode 100644 subworkflows/nf-core/annotation/snpeff/main.nf rename subworkflows/nf-core/{annotation_snpeff => annotation/snpeff}/meta.yml (66%) delete mode 100644 subworkflows/nf-core/annotation_ensemblvep/main.nf delete mode 100644 subworkflows/nf-core/annotation_ensemblvep/meta.yml delete mode 100644 subworkflows/nf-core/annotation_snpeff/main.nf rename tests/subworkflows/nf-core/{annotation_ensemblvep => annotation/ensemblvep}/main.nf (69%) rename tests/subworkflows/nf-core/{annotation_ensemblvep => annotation/ensemblvep}/nextflow.config (88%) rename tests/subworkflows/nf-core/{annotation_ensemblvep => annotation/ensemblvep}/test.yml (100%) rename tests/subworkflows/nf-core/{annotation_snpeff => annotation/snpeff}/main.nf (74%) rename tests/subworkflows/nf-core/{annotation_snpeff => annotation/snpeff}/nextflow.config (88%) rename tests/subworkflows/nf-core/{annotation_snpeff => annotation/snpeff}/test.yml (100%) diff --git a/modules/ensemblvep/Dockerfile b/modules/ensemblvep/Dockerfile index ac1b4691..b4a1c664 100644 --- a/modules/ensemblvep/Dockerfile +++ b/modules/ensemblvep/Dockerfile @@ -8,13 +8,14 @@ LABEL \ COPY environment.yml / RUN conda env create -f /environment.yml && conda clean -a -# Add conda installation dir to PATH (instead of doing 'conda activate') -ENV PATH /opt/conda/envs/nf-core-vep-104.3/bin:$PATH - # Setup default ARG variables ARG GENOME=GRCh38 ARG SPECIES=homo_sapiens -ARG VEP_VERSION=99 +ARG VEP_VERSION=104 +ARG VEP_TAG=104.3 + +# Add conda installation dir to PATH (instead of doing 'conda activate') +ENV PATH /opt/conda/envs/nf-core-vep-${VEP_TAG}/bin:$PATH # Download Genome RUN vep_install \ @@ -27,4 +28,4 @@ RUN vep_install \ --NO_BIOPERL --NO_HTSLIB --NO_TEST --NO_UPDATE # Dump the details of the installed packages to a file for posterity -RUN conda env export --name nf-core-vep-104.3 > nf-core-vep-104.3.yml +RUN conda env export --name nf-core-vep-${VEP_TAG} > nf-core-vep-${VEP_TAG}.yml diff --git a/modules/ensemblvep/build.sh b/modules/ensemblvep/build.sh index 5fcb91df..650c8704 100755 --- a/modules/ensemblvep/build.sh +++ b/modules/ensemblvep/build.sh @@ -10,11 +10,12 @@ build_push() { VEP_TAG=$4 docker build \ + . \ -t nfcore/vep:${VEP_TAG}.${GENOME} \ - software/vep/. \ --build-arg GENOME=${GENOME} \ --build-arg SPECIES=${SPECIES} \ - --build-arg VEP_VERSION=${VEP_VERSION} + --build-arg VEP_VERSION=${VEP_VERSION} \ + --build-arg VEP_TAG=${VEP_TAG} docker push nfcore/vep:${VEP_TAG}.${GENOME} } diff --git a/modules/ensemblvep/main.nf b/modules/ensemblvep/main.nf index c2bd055f..a5a9b1ab 100644 --- a/modules/ensemblvep/main.nf +++ b/modules/ensemblvep/main.nf @@ -13,6 +13,7 @@ process ENSEMBLVEP { val species val cache_version path cache + path extra_files output: tuple val(meta), path("*.ann.vcf"), emit: vcf diff --git a/modules/ensemblvep/meta.yml b/modules/ensemblvep/meta.yml index cd9c8905..418bb970 100644 --- a/modules/ensemblvep/meta.yml +++ b/modules/ensemblvep/meta.yml @@ -10,17 +10,6 @@ tools: homepage: https://www.ensembl.org/info/docs/tools/vep/index.html documentation: https://www.ensembl.org/info/docs/tools/vep/script/index.html licence: ["Apache-2.0"] -params: - - use_cache: - type: boolean - description: | - Enable the usage of containers with cache - Does not work with conda - - vep_tag: - type: value - description: | - Specify the tag for the container - https://hub.docker.com/r/nfcore/vep/tags input: - meta: type: map @@ -47,6 +36,10 @@ input: type: file description: | path to VEP cache (optional) + - extra_files: + type: tuple + description: | + path to file(s) needed for plugins (optional) output: - vcf: type: file diff --git a/modules/snpeff/Dockerfile b/modules/snpeff/Dockerfile index 608716a4..d0e34757 100644 --- a/modules/snpeff/Dockerfile +++ b/modules/snpeff/Dockerfile @@ -8,15 +8,16 @@ LABEL \ COPY environment.yml / RUN conda env create -f /environment.yml && conda clean -a -# Add conda installation dir to PATH (instead of doing 'conda activate') -ENV PATH /opt/conda/envs/nf-core-snpeff-5.0/bin:$PATH - # Setup default ARG variables ARG GENOME=GRCh38 ARG SNPEFF_CACHE_VERSION=99 +ARG SNPEFF_TAG=99 + +# Add conda installation dir to PATH (instead of doing 'conda activate') +ENV PATH /opt/conda/envs/nf-core-snpeff-${SNPEFF_TAG}/bin:$PATH # Download Genome RUN snpEff download -v ${GENOME}.${SNPEFF_CACHE_VERSION} # Dump the details of the installed packages to a file for posterity -RUN conda env export --name nf-core-snpeff-5.0 > nf-core-snpeff-5.0.yml +RUN conda env export --name nf-core-snpeff-${SNPEFF_TAG} > nf-core-snpeff-${SNPEFF_TAG}.yml diff --git a/modules/snpeff/build.sh b/modules/snpeff/build.sh old mode 100755 new mode 100644 index b94ffd69..2fccf9a8 --- a/modules/snpeff/build.sh +++ b/modules/snpeff/build.sh @@ -9,10 +9,11 @@ build_push() { SNPEFF_TAG=$3 docker build \ + . \ -t nfcore/snpeff:${SNPEFF_TAG}.${GENOME} \ - software/snpeff/. \ --build-arg GENOME=${GENOME} \ - --build-arg SNPEFF_CACHE_VERSION=${SNPEFF_CACHE_VERSION} + --build-arg SNPEFF_CACHE_VERSION=${SNPEFF_CACHE_VERSION} \ + --build-arg SNPEFF_TAG=${SNPEFF_TAG} docker push nfcore/snpeff:${SNPEFF_TAG}.${GENOME} } diff --git a/modules/snpeff/meta.yml b/modules/snpeff/meta.yml index c191b9ac..2f0d866e 100644 --- a/modules/snpeff/meta.yml +++ b/modules/snpeff/meta.yml @@ -10,18 +10,6 @@ tools: homepage: https://pcingola.github.io/SnpEff/ documentation: https://pcingola.github.io/SnpEff/se_introduction/ licence: ["MIT"] -params: - - use_cache: - type: boolean - description: | - boolean to enable the usage of containers with cache - Enable the usage of containers with cache - Does not work with conda - - snpeff_tag: - type: value - description: | - Specify the tag for the container - https://hub.docker.com/r/nfcore/snpeff/tags input: - meta: type: map diff --git a/subworkflows/nf-core/annotation/ensemblvep/main.nf b/subworkflows/nf-core/annotation/ensemblvep/main.nf new file mode 100644 index 00000000..5073f38d --- /dev/null +++ b/subworkflows/nf-core/annotation/ensemblvep/main.nf @@ -0,0 +1,31 @@ +// +// Run VEP to annotate VCF files +// + +include { ENSEMBLVEP } from '../../../../modules/ensemblvep/main' +include { TABIX_BGZIPTABIX } from '../../../../modules/tabix/bgziptabix/main' + +workflow ANNOTATION_ENSEMBLVEP { + take: + vcf // channel: [ val(meta), vcf ] + vep_genome // value: genome to use + vep_species // value: species to use + vep_cache_version // value: cache version to use + vep_cache // path: /path/to/vep/cache (optionnal) + vep_extra_files // channel: [ file1, file2...] (optionnal) + + main: + ch_versions = Channel.empty() + + ENSEMBLVEP(vcf, vep_genome, vep_species, vep_cache_version, vep_cache, vep_extra_files) + TABIX_BGZIPTABIX(ENSEMBLVEP.out.vcf) + + // Gather versions of all tools used + ch_versions = ch_versions.mix(ENSEMBLVEP.out.versions.first()) + ch_versions = ch_versions.mix(TABIX_BGZIPTABIX.out.versions.first()) + + emit: + vcf_tbi = TABIX_BGZIPTABIX.out.gz_tbi // channel: [ val(meta), vcf.gz, vcf.gz.tbi ] + reports = ENSEMBLVEP.out.report // path: *.html + versions = ch_versions // path: versions.yml +} diff --git a/subworkflows/nf-core/annotation/ensemblvep/meta.yml b/subworkflows/nf-core/annotation/ensemblvep/meta.yml new file mode 100644 index 00000000..585e003b --- /dev/null +++ b/subworkflows/nf-core/annotation/ensemblvep/meta.yml @@ -0,0 +1,49 @@ +name: annotation_ensemblvep +description: | + Perform annotation with ensemblvep and bgzip + tabix index the resulting VCF file +keywords: + - ensemblvep +modules: + - ensemblvep + - tabix/bgziptabix +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - vcf: + type: file + description: | + vcf to annotate + - genome: + type: value + description: | + which genome to annotate with + - species: + type: value + description: | + which species to annotate with + - cache_version: + type: value + description: | + which version of the cache to annotate with + - cache: + type: file + description: | + path to VEP cache (optional) + - extra_files: + type: tuple + description: | + path to file(s) needed for plugins (optional) +output: + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" + - vcf_tbi: + type: file + description: Compressed vcf file + tabix index + pattern: "[ *{.vcf.gz,vcf.gz.tbi} ]" +authors: + - "@maxulysse" diff --git a/subworkflows/nf-core/annotation/snpeff/main.nf b/subworkflows/nf-core/annotation/snpeff/main.nf new file mode 100644 index 00000000..dcf06eb0 --- /dev/null +++ b/subworkflows/nf-core/annotation/snpeff/main.nf @@ -0,0 +1,28 @@ +// +// Run SNPEFF to annotate VCF files +// + +include { SNPEFF } from '../../../../modules/snpeff/main' +include { TABIX_BGZIPTABIX } from '../../../../modules/tabix/bgziptabix/main' + +workflow ANNOTATION_SNPEFF { + take: + vcf // channel: [ val(meta), vcf ] + snpeff_db // value: db version to use + snpeff_cache // path: /path/to/snpeff/cache (optionnal) + + main: + ch_versions = Channel.empty() + + SNPEFF(vcf, snpeff_db, snpeff_cache) + TABIX_BGZIPTABIX(SNPEFF.out.vcf) + + // Gather versions of all tools used + ch_versions = ch_versions.mix(SNPEFF.out.versions.first()) + ch_versions = ch_versions.mix(TABIX_BGZIPTABIX.out.versions.first()) + + emit: + vcf_tbi = TABIX_BGZIPTABIX.out.gz_tbi // channel: [ val(meta), vcf.gz, vcf.gz.tbi ] + reports = SNPEFF.out.report // path: *.html + versions = ch_versions // path: versions.yml +} diff --git a/subworkflows/nf-core/annotation_snpeff/meta.yml b/subworkflows/nf-core/annotation/snpeff/meta.yml similarity index 66% rename from subworkflows/nf-core/annotation_snpeff/meta.yml rename to subworkflows/nf-core/annotation/snpeff/meta.yml index e0773626..241a00cc 100644 --- a/subworkflows/nf-core/annotation_snpeff/meta.yml +++ b/subworkflows/nf-core/annotation/snpeff/meta.yml @@ -11,11 +11,19 @@ input: type: map description: | Groovy Map containing sample information - e.g. [ id:'test' ] - - input: - type: vcf - description: list containing one vcf file - pattern: "[ *.{vcf,vcf.gz} ]" + e.g. [ id:'test', single_end:false ] + - vcf: + type: file + description: | + vcf to annotate + - db: + type: value + description: | + which db to annotate with + - cache: + type: file + description: | + path to snpEff cache (optional) output: - versions: type: file diff --git a/subworkflows/nf-core/annotation_ensemblvep/main.nf b/subworkflows/nf-core/annotation_ensemblvep/main.nf deleted file mode 100644 index 3f3ecc6e..00000000 --- a/subworkflows/nf-core/annotation_ensemblvep/main.nf +++ /dev/null @@ -1,26 +0,0 @@ -// -// Run VEP to annotate VCF files -// - -include { ENSEMBLVEP } from '../../../modules/ensemblvep/main' -include { TABIX_BGZIPTABIX as ANNOTATION_BGZIPTABIX } from '../../../modules/tabix/bgziptabix/main' - -workflow ANNOTATION_ENSEMBLVEP { - take: - vcf // channel: [ val(meta), vcf ] - vep_genome // value: which genome - vep_species // value: which species - vep_cache_version // value: which cache version - vep_cache // path: path_to_vep_cache (optionnal) - - main: - ENSEMBLVEP(vcf, vep_genome, vep_species, vep_cache_version, vep_cache) - ANNOTATION_BGZIPTABIX(ENSEMBLVEP.out.vcf) - - ch_versions = ENSEMBLVEP.out.versions.first().mix(ANNOTATION_BGZIPTABIX.out.versions.first()) - - emit: - vcf_tbi = ANNOTATION_BGZIPTABIX.out.gz_tbi // channel: [ val(meta), vcf.gz, vcf.gz.tbi ] - reports = ENSEMBLVEP.out.report // path: *.html - versions = ch_versions // path: versions.yml -} diff --git a/subworkflows/nf-core/annotation_ensemblvep/meta.yml b/subworkflows/nf-core/annotation_ensemblvep/meta.yml deleted file mode 100644 index 991a8b2f..00000000 --- a/subworkflows/nf-core/annotation_ensemblvep/meta.yml +++ /dev/null @@ -1,29 +0,0 @@ -name: annotation_ensemblvep -description: | - Perform annotation with ensemblvep and bgzip + tabix index the resulting VCF file -keywords: - - ensemblvep -modules: - - ensemblvep - - tabix/bgziptabix -input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test' ] - - input: - type: vcf - description: list containing one vcf file - pattern: "[ *.{vcf,vcf.gz} ]" -output: - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" - - vcf_tbi: - type: file - description: Compressed vcf file + tabix index - pattern: "[ *{.vcf.gz,vcf.gz.tbi} ]" -authors: - - "@maxulysse" diff --git a/subworkflows/nf-core/annotation_snpeff/main.nf b/subworkflows/nf-core/annotation_snpeff/main.nf deleted file mode 100644 index add5f9c8..00000000 --- a/subworkflows/nf-core/annotation_snpeff/main.nf +++ /dev/null @@ -1,23 +0,0 @@ -// -// Run SNPEFF to annotate VCF files -// - -include { SNPEFF } from '../../../modules/snpeff/main' -include { TABIX_BGZIPTABIX as ANNOTATION_BGZIPTABIX } from '../../../modules/tabix/bgziptabix/main' - -workflow ANNOTATION_SNPEFF { - take: - vcf // channel: [ val(meta), vcf ] - snpeff_db // value: version of db to use - snpeff_cache // path: path_to_snpeff_cache (optionnal) - - main: - SNPEFF(vcf, snpeff_db, snpeff_cache) - ANNOTATION_BGZIPTABIX(SNPEFF.out.vcf) - ch_versions = SNPEFF.out.versions.first().mix(ANNOTATION_BGZIPTABIX.out.versions.first()) - - emit: - vcf_tbi = ANNOTATION_BGZIPTABIX.out.gz_tbi // channel: [ val(meta), vcf.gz, vcf.gz.tbi ] - reports = SNPEFF.out.report // path: *.html - versions = ch_versions // path: versions.yml -} diff --git a/tests/modules/ensemblvep/main.nf b/tests/modules/ensemblvep/main.nf index 223847c7..30d19957 100644 --- a/tests/modules/ensemblvep/main.nf +++ b/tests/modules/ensemblvep/main.nf @@ -10,5 +10,5 @@ workflow test_ensemblvep { file(params.test_data['sarscov2']['illumina']['test_vcf'], checkIfExists: true) ] - ENSEMBLVEP ( input, "WBcel235", "caenorhabditis_elegans", "104", [] ) + ENSEMBLVEP ( input, "WBcel235", "caenorhabditis_elegans", "104", [], [] ) } diff --git a/tests/subworkflows/nf-core/annotation_ensemblvep/main.nf b/tests/subworkflows/nf-core/annotation/ensemblvep/main.nf similarity index 69% rename from tests/subworkflows/nf-core/annotation_ensemblvep/main.nf rename to tests/subworkflows/nf-core/annotation/ensemblvep/main.nf index 0f00c62e..2c599671 100644 --- a/tests/subworkflows/nf-core/annotation_ensemblvep/main.nf +++ b/tests/subworkflows/nf-core/annotation/ensemblvep/main.nf @@ -2,7 +2,7 @@ nextflow.enable.dsl = 2 -include { ANNOTATION_ENSEMBLVEP } from '../../../../subworkflows/nf-core/annotation_ensemblvep/main' +include { ANNOTATION_ENSEMBLVEP } from '../../../../../subworkflows/nf-core/annotation/ensemblvep/main' workflow annotation_ensemblvep { input = [ @@ -10,5 +10,5 @@ workflow annotation_ensemblvep { file(params.test_data['sarscov2']['illumina']['test_vcf'], checkIfExists: true) ] - ANNOTATION_ENSEMBLVEP ( input, "WBcel235", "caenorhabditis_elegans", "104", [] ) + ANNOTATION_ENSEMBLVEP ( input, "WBcel235", "caenorhabditis_elegans", "104", [], [] ) } diff --git a/tests/subworkflows/nf-core/annotation_ensemblvep/nextflow.config b/tests/subworkflows/nf-core/annotation/ensemblvep/nextflow.config similarity index 88% rename from tests/subworkflows/nf-core/annotation_ensemblvep/nextflow.config rename to tests/subworkflows/nf-core/annotation/ensemblvep/nextflow.config index 4e8d2990..806adb58 100644 --- a/tests/subworkflows/nf-core/annotation_ensemblvep/nextflow.config +++ b/tests/subworkflows/nf-core/annotation/ensemblvep/nextflow.config @@ -7,7 +7,7 @@ process { publishDir = [ enabled: false ] } - withName: ANNOTATION_BGZIPTABIX { + withName: TABIX_BGZIPTABIX { ext.prefix = { "${meta.id}_VEP.ann.vcf" } } diff --git a/tests/subworkflows/nf-core/annotation_ensemblvep/test.yml b/tests/subworkflows/nf-core/annotation/ensemblvep/test.yml similarity index 100% rename from tests/subworkflows/nf-core/annotation_ensemblvep/test.yml rename to tests/subworkflows/nf-core/annotation/ensemblvep/test.yml diff --git a/tests/subworkflows/nf-core/annotation_snpeff/main.nf b/tests/subworkflows/nf-core/annotation/snpeff/main.nf similarity index 74% rename from tests/subworkflows/nf-core/annotation_snpeff/main.nf rename to tests/subworkflows/nf-core/annotation/snpeff/main.nf index c80197ee..4aee20ee 100644 --- a/tests/subworkflows/nf-core/annotation_snpeff/main.nf +++ b/tests/subworkflows/nf-core/annotation/snpeff/main.nf @@ -2,7 +2,7 @@ nextflow.enable.dsl = 2 -include { ANNOTATION_SNPEFF } from '../../../../subworkflows/nf-core/annotation_snpeff/main' +include { ANNOTATION_SNPEFF } from '../../../../../subworkflows/nf-core/annotation_snpeff/main' workflow annotation_snpeff { input = [ diff --git a/tests/subworkflows/nf-core/annotation_snpeff/nextflow.config b/tests/subworkflows/nf-core/annotation/snpeff/nextflow.config similarity index 88% rename from tests/subworkflows/nf-core/annotation_snpeff/nextflow.config rename to tests/subworkflows/nf-core/annotation/snpeff/nextflow.config index be76cb4a..31fd635b 100644 --- a/tests/subworkflows/nf-core/annotation_snpeff/nextflow.config +++ b/tests/subworkflows/nf-core/annotation/snpeff/nextflow.config @@ -7,7 +7,7 @@ process { publishDir = [ enabled: false ] } - withName: ANNOTATION_BGZIPTABIX { + withName: TABIX_BGZIPTABIX { ext.prefix = { "${meta.id}_snpEff.ann.vcf" } } diff --git a/tests/subworkflows/nf-core/annotation_snpeff/test.yml b/tests/subworkflows/nf-core/annotation/snpeff/test.yml similarity index 100% rename from tests/subworkflows/nf-core/annotation_snpeff/test.yml rename to tests/subworkflows/nf-core/annotation/snpeff/test.yml From 9083d3bb3dfeae8dc61d6a2e9e097468af5fafcd Mon Sep 17 00:00:00 2001 From: Carpanzano Date: Thu, 5 May 2022 13:51:41 +0200 Subject: [PATCH 73/73] 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