From b412e6dabc99ea1b1bae07e09a4dbcb6e92e5439 Mon Sep 17 00:00:00 2001 From: Priyanka Surana Date: Thu, 27 Jan 2022 14:36:18 +0000 Subject: [PATCH 001/100] Busco module commit with nf-core v2.2 c1 --- modules/busco/main.nf | 42 +++++++++++++++++++++++ modules/busco/meta.yml | 52 +++++++++++++++++++++++++++++ tests/config/pytest_modules.yml | 4 +++ tests/modules/busco/main.nf | 26 +++++++++++++++ tests/modules/busco/nextflow.config | 5 +++ tests/modules/busco/test.yml | 20 +++++++++++ 6 files changed, 149 insertions(+) create mode 100644 modules/busco/main.nf create mode 100644 modules/busco/meta.yml create mode 100644 tests/modules/busco/main.nf create mode 100644 tests/modules/busco/nextflow.config create mode 100644 tests/modules/busco/test.yml diff --git a/modules/busco/main.nf b/modules/busco/main.nf new file mode 100644 index 00000000..445f8ed4 --- /dev/null +++ b/modules/busco/main.nf @@ -0,0 +1,42 @@ +process BUSCO { + tag "$meta.id" + label 'process_medium' + + conda (params.enable_conda ? "bioconda::busco=5.2.2" : null) + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/busco:5.2.2--pyhdfd78af_0': + 'quay.io/biocontainers/busco:5.2.2--pyhdfd78af_0' }" + + input: + tuple val(meta), path(fasta) + path(augustus_config) + val(lineage) + + output: + tuple val(meta), path("${meta.id}/run_*/full_table.tsv"), emit: tsv + tuple val(meta), path("${meta.id}/run_*/short_summary.txt"), emit: txt + path "versions.yml" , emit: versions + + script: + def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + if (lineage) args += " --lineage_dataset $lineage" + """ + # Ensure the input is uncompressed + gzip -cdf $fasta > __UNCOMPRESSED_FASTA_FILE__ + # Copy the image's AUGUSTUS config directory if it was not provided to the module + [ ! -e augustus_config ] && cp -a /usr/local/config augustus_config + AUGUSTUS_CONFIG_PATH=augustus_config \\ + busco \\ + $args \\ + --augustus \\ + --cpu $task.cpus \\ + --in __UNCOMPRESSED_FASTA_FILE__ \\ + --out $meta.id + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + busco: \$( busco --version 2>&1 | sed 's/^BUSCO //' ) + END_VERSIONS + """ +} diff --git a/modules/busco/meta.yml b/modules/busco/meta.yml new file mode 100644 index 00000000..0cd9e402 --- /dev/null +++ b/modules/busco/meta.yml @@ -0,0 +1,52 @@ +name: busco +description: Benchmarking Universal Single Copy Orthologs +keywords: + - quality control + - genome + - transcriptome + - proteome +tools: + - busco: + description: BUSCO provides measures for quantitative assessment of genome assembly, gene set, and transcriptome completeness based on evolutionarily informed expectations of gene content from near-universal single-copy orthologs selected from OrthoDB. + homepage: https://busco.ezlab.org/ + documentation: https://busco.ezlab.org/busco_userguide.html + tool_dev_url: https://gitlab.com/ezlab/busco + doi: "10.1007/978-1-4939-9173-0_14" + licence: ['MIT'] + +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - fasta: + type: file + description: Nucleic or amino acid sequence file in FASTA format + pattern: "*.{fasta}" + - augustus_config: + type: directory + description: AUGUSTUS config directory + +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" + - tsv: + type: file + description: Full summary table + pattern: "*.{tsv}" + - txt: + type: file + description: Short summary text + pattern: "*.{txt}" + +authors: + - "@priyanka-surana" + - "@charles-plessy" diff --git a/tests/config/pytest_modules.yml b/tests/config/pytest_modules.yml index 2321c918..920b85bd 100644 --- a/tests/config/pytest_modules.yml +++ b/tests/config/pytest_modules.yml @@ -230,6 +230,10 @@ bowtie2/build: - modules/bowtie2/build/** - tests/modules/bowtie2/build_test/** +busco: + - modules/busco/** + - tests/modules/busco/** + bwa/aln: - modules/bwa/aln/** - tests/modules/bwa/aln/** diff --git a/tests/modules/busco/main.nf b/tests/modules/busco/main.nf new file mode 100644 index 00000000..28a4921c --- /dev/null +++ b/tests/modules/busco/main.nf @@ -0,0 +1,26 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { BUSCO as BUSCO_BACTE } from '../../../modules/busco/main.nf' +include { BUSCO as BUSCO_CHR22 } from '../../../modules/busco/main.nf' +include { UNTAR } from '../../../modules/untar/main.nf' + +// This tests genome decompression, empty input channels and data download +workflow test_busco_bacteroidales { + input = [ [ id:'test' ], file(params.test_data['bacteroides_fragilis']['genome']['genome_fna_gz'], checkIfExists: true) ] + BUSCO_BACTE ( input, + [], + [] ) +} + +// This tests uncompressed genome, BUSCO lineage file provided via input channel, and offline mode +workflow test_busco_chr22 { + input = [ [ id:'test' ], file(params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true) ] + lineage_dataset = [ file(params.test_data['homo_sapiens']['genome']['chr22_odb10_tar_gz'], checkIfExists: true) ] + UNTAR(lineage_dataset) + BUSCO_CHR22 ( input, + [], + UNTAR.out.untar ) +} + diff --git a/tests/modules/busco/nextflow.config b/tests/modules/busco/nextflow.config new file mode 100644 index 00000000..50f50a7a --- /dev/null +++ b/tests/modules/busco/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/busco/test.yml b/tests/modules/busco/test.yml new file mode 100644 index 00000000..32553d2e --- /dev/null +++ b/tests/modules/busco/test.yml @@ -0,0 +1,20 @@ +- name: busco test_busco_bacteroidales + command: nextflow run ./tests/modules/busco -entry test_busco_bacteroidales -c ./tests/config/nextflow.config -c ./tests/modules/busco/nextflow.config + tags: + - busco + files: + - path: output/busco/test/run_bacteroidales_odb10/full_table.tsv + md5sum: 8d7b401d875ecd9291b01bf4485bf080 + - path: output/busco/test/run_bacteroidales_odb10/short_summary.txt + contains: ['Complete BUSCOs (C)'] + +- name: busco test_busco_chr22 + command: nextflow run ./tests/modules/busco -entry test_busco_chr22 -c ./tests/config/nextflow.config -c ./tests/modules/busco/nextflow.config + tags: + - busco + files: + - path: output/busco/test/run_chr22_odb10/full_table.tsv + md5sum: 83f20e8996c591338ada73b6ab0eb269 + - path: output/busco/test/run_chr22_odb10/short_summary.txt + contains: ['Complete BUSCOs (C)'] + From 3e6be5060007d3feb24e3dfb95d602a3fbd3eb58 Mon Sep 17 00:00:00 2001 From: Priyanka Surana Date: Fri, 25 Feb 2022 13:26:23 +0000 Subject: [PATCH 002/100] Adjusted Augustus Config Path settings. Suggested by @mahesh-panchal --- modules/busco/main.nf | 26 +++++++++++++++++++------- modules/busco/meta.yml | 3 +++ tests/modules/busco/main.nf | 15 ++------------- tests/modules/busco/test.yml | 14 ++------------ 4 files changed, 26 insertions(+), 32 deletions(-) diff --git a/modules/busco/main.nf b/modules/busco/main.nf index 445f8ed4..6e526538 100644 --- a/modules/busco/main.nf +++ b/modules/busco/main.nf @@ -9,6 +9,7 @@ process BUSCO { input: tuple val(meta), path(fasta) + val(mode) path(augustus_config) val(lineage) @@ -24,15 +25,26 @@ process BUSCO { """ # Ensure the input is uncompressed gzip -cdf $fasta > __UNCOMPRESSED_FASTA_FILE__ + + # Nextflow changes the container --entrypoint to /bin/bash (container default entrypoint: /usr/local/env-execute) + # Check for container variable initialisation script and source it. + if [ -f "/usr/local/env-activate.sh" ]; then + # . "/usr/local/env-activate.sh" # Errors out because of various unbound variables + export PATH='/usr/local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin' + export CONDA_PREFIX='/usr/local' + export CONDA_SHLVL='1' + export CONDA_DEFAULT_ENV='/usr/local' + export CONDA_PROMPT_MODIFIER='' + . "/usr/local/etc/conda/activate.d/activate-r-base.sh" + . "/usr/local/etc/conda/activate.d/augustus.sh" + . "/usr/local/etc/conda/activate.d/openjdk_activate.sh" + fi + # Copy the image's AUGUSTUS config directory if it was not provided to the module [ ! -e augustus_config ] && cp -a /usr/local/config augustus_config - AUGUSTUS_CONFIG_PATH=augustus_config \\ - busco \\ - $args \\ - --augustus \\ - --cpu $task.cpus \\ - --in __UNCOMPRESSED_FASTA_FILE__ \\ - --out $meta.id + + # Busco command + AUGUSTUS_CONFIG_PATH=augustus_config busco $args --augustus --mode $mode --cpu $task.cpus --in __UNCOMPRESSED_FASTA_FILE__ --out $meta.id cat <<-END_VERSIONS > versions.yml "${task.process}": diff --git a/modules/busco/meta.yml b/modules/busco/meta.yml index 0cd9e402..8f41f2f3 100644 --- a/modules/busco/meta.yml +++ b/modules/busco/meta.yml @@ -24,6 +24,9 @@ input: type: file description: Nucleic or amino acid sequence file in FASTA format pattern: "*.{fasta}" + - mode: + type: value + description: Sets the assessment MODE – genome, proteins, transcriptome - augustus_config: type: directory description: AUGUSTUS config directory diff --git a/tests/modules/busco/main.nf b/tests/modules/busco/main.nf index 28a4921c..d12abae9 100644 --- a/tests/modules/busco/main.nf +++ b/tests/modules/busco/main.nf @@ -3,24 +3,13 @@ nextflow.enable.dsl = 2 include { BUSCO as BUSCO_BACTE } from '../../../modules/busco/main.nf' -include { BUSCO as BUSCO_CHR22 } from '../../../modules/busco/main.nf' -include { UNTAR } from '../../../modules/untar/main.nf' // This tests genome decompression, empty input channels and data download -workflow test_busco_bacteroidales { +workflow test_busco { input = [ [ id:'test' ], file(params.test_data['bacteroides_fragilis']['genome']['genome_fna_gz'], checkIfExists: true) ] BUSCO_BACTE ( input, + "genome", [], [] ) } -// This tests uncompressed genome, BUSCO lineage file provided via input channel, and offline mode -workflow test_busco_chr22 { - input = [ [ id:'test' ], file(params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true) ] - lineage_dataset = [ file(params.test_data['homo_sapiens']['genome']['chr22_odb10_tar_gz'], checkIfExists: true) ] - UNTAR(lineage_dataset) - BUSCO_CHR22 ( input, - [], - UNTAR.out.untar ) -} - diff --git a/tests/modules/busco/test.yml b/tests/modules/busco/test.yml index 32553d2e..d66bd305 100644 --- a/tests/modules/busco/test.yml +++ b/tests/modules/busco/test.yml @@ -1,5 +1,5 @@ -- name: busco test_busco_bacteroidales - command: nextflow run ./tests/modules/busco -entry test_busco_bacteroidales -c ./tests/config/nextflow.config -c ./tests/modules/busco/nextflow.config +- name: busco test_busco + command: nextflow run ./tests/modules/busco -entry test_busco -c ./tests/config/nextflow.config -c ./tests/modules/busco/nextflow.config tags: - busco files: @@ -8,13 +8,3 @@ - path: output/busco/test/run_bacteroidales_odb10/short_summary.txt contains: ['Complete BUSCOs (C)'] -- name: busco test_busco_chr22 - command: nextflow run ./tests/modules/busco -entry test_busco_chr22 -c ./tests/config/nextflow.config -c ./tests/modules/busco/nextflow.config - tags: - - busco - files: - - path: output/busco/test/run_chr22_odb10/full_table.tsv - md5sum: 83f20e8996c591338ada73b6ab0eb269 - - path: output/busco/test/run_chr22_odb10/short_summary.txt - contains: ['Complete BUSCOs (C)'] - From ee04fc27377391c39cacd79641301f87af48cc4d Mon Sep 17 00:00:00 2001 From: JIANHONG OU Date: Thu, 14 Apr 2022 12:56:42 -0400 Subject: [PATCH 003/100] 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 004/100] 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 005/100] 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 006/100] 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 007/100] 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 008/100] 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 009/100] 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 010/100] 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 011/100] 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 012/100] 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 013/100] 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 014/100] 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 015/100] 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 016/100] 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 017/100] 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 018/100] 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 019/100] 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 020/100] 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 021/100] 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 022/100] 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 023/100] 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 d2004a2b769d9ff6c2f8fd8a1e1d0e5660fcc3f9 Mon Sep 17 00:00:00 2001 From: Ramprasad Neethiraj <20065894+ramprasadn@users.noreply.github.com> Date: Sun, 1 May 2022 21:14:01 +0200 Subject: [PATCH 024/100] update cnvpytor --- modules/cnvpytor/callcnvs/main.nf | 6 +++--- modules/cnvpytor/histogram/main.nf | 6 +++--- modules/cnvpytor/importreaddepth/main.nf | 6 +++--- modules/cnvpytor/partition/main.nf | 6 +++--- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/modules/cnvpytor/callcnvs/main.nf b/modules/cnvpytor/callcnvs/main.nf index 17675cde..fcb36ba5 100644 --- a/modules/cnvpytor/callcnvs/main.nf +++ b/modules/cnvpytor/callcnvs/main.nf @@ -2,10 +2,10 @@ process CNVPYTOR_CALLCNVS { tag "$meta.id" label 'process_medium' - conda (params.enable_conda ? "bioconda::cnvpytor=1.0" : null) + conda (params.enable_conda ? "bioconda::cnvpytor=1.2.1" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/cnvpytor:1.0--py39h6a678da_2': - 'quay.io/biocontainers/cnvpytor:1.0--py39h6a678da_2' }" + 'https://depot.galaxyproject.org/singularity/cnvpytor:1.2.1--pyhdfd78af_0': + 'quay.io/biocontainers/cnvpytor:1.2.1--pyhdfd78af_0' }" input: tuple val(meta), path(pytor) diff --git a/modules/cnvpytor/histogram/main.nf b/modules/cnvpytor/histogram/main.nf index 9e59c6b8..f6e9dd25 100644 --- a/modules/cnvpytor/histogram/main.nf +++ b/modules/cnvpytor/histogram/main.nf @@ -2,10 +2,10 @@ process CNVPYTOR_HISTOGRAM { tag "$meta.id" label 'process_medium' - conda (params.enable_conda ? "bioconda::cnvpytor=1.0" : null) + conda (params.enable_conda ? "bioconda::cnvpytor=1.2.1" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/cnvpytor:1.0--py39h6a678da_2': - 'quay.io/biocontainers/cnvpytor:1.0--py39h6a678da_2' }" + 'https://depot.galaxyproject.org/singularity/cnvpytor:1.2.1--pyhdfd78af_0': + 'quay.io/biocontainers/cnvpytor:1.2.1--pyhdfd78af_0' }" input: tuple val(meta), path(pytor) diff --git a/modules/cnvpytor/importreaddepth/main.nf b/modules/cnvpytor/importreaddepth/main.nf index 162da719..059c19a5 100644 --- a/modules/cnvpytor/importreaddepth/main.nf +++ b/modules/cnvpytor/importreaddepth/main.nf @@ -2,10 +2,10 @@ process CNVPYTOR_IMPORTREADDEPTH { tag "$meta.id" label 'process_medium' - conda (params.enable_conda ? "bioconda::cnvpytor=1.0" : null) + conda (params.enable_conda ? "bioconda::cnvpytor=1.2.1" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/cnvpytor:1.0--py39h6a678da_2': - 'quay.io/biocontainers/cnvpytor:1.0--py39h6a678da_2' }" + 'https://depot.galaxyproject.org/singularity/cnvpytor:1.2.1--pyhdfd78af_0': + 'quay.io/biocontainers/cnvpytor:1.2.1--pyhdfd78af_0' }" input: tuple val(meta), path(input_file), path(index) diff --git a/modules/cnvpytor/partition/main.nf b/modules/cnvpytor/partition/main.nf index 0311bdfc..8365cb29 100644 --- a/modules/cnvpytor/partition/main.nf +++ b/modules/cnvpytor/partition/main.nf @@ -2,10 +2,10 @@ process CNVPYTOR_PARTITION { tag "$meta.id" label 'process_medium' - conda (params.enable_conda ? "bioconda::cnvpytor=1.0" : null) + conda (params.enable_conda ? "bioconda::cnvpytor=1.2.1" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/cnvpytor:1.0--py39h6a678da_2': - 'quay.io/biocontainers/cnvpytor:1.0--py39h6a678da_2' }" + 'https://depot.galaxyproject.org/singularity/cnvpytor:1.2.1--pyhdfd78af_0': + 'quay.io/biocontainers/cnvpytor:1.2.1--pyhdfd78af_0' }" input: tuple val(meta), path(pytor) From 9a9f3e97dedd3cf72720cca5588df4d4edd35d71 Mon Sep 17 00:00:00 2001 From: Ramprasad Neethiraj <20065894+ramprasadn@users.noreply.github.com> Date: Sun, 1 May 2022 21:51:40 +0200 Subject: [PATCH 025/100] fix md5sums --- tests/modules/cnvpytor/callcnvs/test.yml | 3 --- tests/modules/cnvpytor/histogram/test.yml | 3 --- tests/modules/cnvpytor/importreaddepth/test.yml | 4 ---- tests/modules/cnvpytor/partition/test.yml | 3 --- 4 files changed, 13 deletions(-) diff --git a/tests/modules/cnvpytor/callcnvs/test.yml b/tests/modules/cnvpytor/callcnvs/test.yml index 4565151e..e284ab53 100644 --- a/tests/modules/cnvpytor/callcnvs/test.yml +++ b/tests/modules/cnvpytor/callcnvs/test.yml @@ -5,9 +5,7 @@ - cnvpytor/callcnvs files: - path: output/cnvpytor/test.tsv - md5sum: d41d8cd98f00b204e9800998ecf8427e - path: output/cnvpytor/versions.yml - md5sum: 0bea08a253fcb2ff0ff79b99df77b9fa - name: cnvpytor callcnvs test_cnvpytor_callcnvs stub command: nextflow run tests/modules/cnvpytor/callcnvs -entry test_cnvpytor_callcnvs -c tests/config/nextflow.config -stub-run @@ -17,4 +15,3 @@ files: - path: output/cnvpytor/test.tsv - path: output/cnvpytor/versions.yml - md5sum: 0bea08a253fcb2ff0ff79b99df77b9fa diff --git a/tests/modules/cnvpytor/histogram/test.yml b/tests/modules/cnvpytor/histogram/test.yml index 0543fcc3..f67901d4 100644 --- a/tests/modules/cnvpytor/histogram/test.yml +++ b/tests/modules/cnvpytor/histogram/test.yml @@ -5,9 +5,7 @@ - cnvpytor/histogram files: - path: output/cnvpytor/test.pytor - md5sum: aa03a8fa15b39f77816705a48e10312a - path: output/cnvpytor/versions.yml - md5sum: 0f4d75c4f3a3eb26c22616d12b0b78b2 - name: cnvpytor histogram test_cnvpytor_histogram stub command: nextflow run tests/modules/cnvpytor/histogram -entry test_cnvpytor_histogram -c tests/config/nextflow.config -stub-run @@ -17,4 +15,3 @@ files: - path: output/cnvpytor/test.pytor - path: output/cnvpytor/versions.yml - md5sum: 0f4d75c4f3a3eb26c22616d12b0b78b2 diff --git a/tests/modules/cnvpytor/importreaddepth/test.yml b/tests/modules/cnvpytor/importreaddepth/test.yml index b148c38e..a2530c26 100644 --- a/tests/modules/cnvpytor/importreaddepth/test.yml +++ b/tests/modules/cnvpytor/importreaddepth/test.yml @@ -6,7 +6,6 @@ files: - path: output/cnvpytor/test.pytor - path: output/cnvpytor/versions.yml - md5sum: 5834495324c08a37f3fd73ccdd881dc8 - name: cnvpytor importreaddepth test_cnvpytor_importreaddepth stub command: nextflow run tests/modules/cnvpytor/importreaddepth -entry test_cnvpytor_importreaddepth -c tests/config/nextflow.config -stub-run @@ -16,7 +15,6 @@ files: - path: output/cnvpytor/test.pytor - path: output/cnvpytor/versions.yml - md5sum: 5834495324c08a37f3fd73ccdd881dc8 - name: cnvpytor importreaddepth test_cnvpytor_importreaddepth_cram command: nextflow run tests/modules/cnvpytor/importreaddepth -entry test_cnvpytor_importreaddepth_cram -c tests/config/nextflow.config @@ -26,7 +24,6 @@ files: - path: output/cnvpytor/test.pytor - path: output/cnvpytor/versions.yml - md5sum: dfa0afb0982d985b96d1633f71ebb82a - name: cnvpytor importreaddepth test_cnvpytor_importreaddepth_cram stub command: nextflow run tests/modules/cnvpytor/importreaddepth -entry test_cnvpytor_importreaddepth_cram -c tests/config/nextflow.config -stub-run @@ -36,4 +33,3 @@ files: - path: output/cnvpytor/test.pytor - path: output/cnvpytor/versions.yml - md5sum: dfa0afb0982d985b96d1633f71ebb82a diff --git a/tests/modules/cnvpytor/partition/test.yml b/tests/modules/cnvpytor/partition/test.yml index 10232097..e24a1200 100644 --- a/tests/modules/cnvpytor/partition/test.yml +++ b/tests/modules/cnvpytor/partition/test.yml @@ -5,9 +5,7 @@ - cnvpytor/partition files: - path: output/cnvpytor/test.pytor - md5sum: aa03a8fa15b39f77816705a48e10312a - path: output/cnvpytor/versions.yml - md5sum: 7fd6ec952a316463bcd324f176b46b64 - name: cnvpytor partition test_cnvpytor_partition stub command: nextflow run tests/modules/cnvpytor/partition -entry test_cnvpytor_partition -c tests/config/nextflow.config -stub-run @@ -17,4 +15,3 @@ files: - path: output/cnvpytor/test.pytor - path: output/cnvpytor/versions.yml - md5sum: 7fd6ec952a316463bcd324f176b46b64 From 3f07761da5cfee184a281acb1dfe80838566f234 Mon Sep 17 00:00:00 2001 From: JIANHONG OU Date: Mon, 2 May 2022 08:19:13 -0400 Subject: [PATCH 026/100] 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 027/100] 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 028/100] 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 029/100] 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 030/100] 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 031/100] 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 032/100] 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 033/100] 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 034/100] 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 035/100] 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 036/100] 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 037/100] 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 038/100] 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 039/100] 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 040/100] 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 041/100] 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 042/100] 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 043/100] 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 044/100] 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 045/100] 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 046/100] 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 047/100] 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 048/100] 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 049/100] 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 9a72548ee122607e46681f4b0b87296b48580cb3 Mon Sep 17 00:00:00 2001 From: Mahesh Binzer-Panchal Date: Tue, 3 May 2022 08:42:56 +0000 Subject: [PATCH 050/100] Update busco module --- modules/busco/main.nf | 62 +++++++++++++++++++---------- tests/modules/busco/main.nf | 20 +++++++--- tests/modules/busco/nextflow.config | 5 ++- tests/modules/busco/test.yml | 9 ++--- 4 files changed, 60 insertions(+), 36 deletions(-) diff --git a/modules/busco/main.nf b/modules/busco/main.nf index 6e526538..e66beeeb 100644 --- a/modules/busco/main.nf +++ b/modules/busco/main.nf @@ -1,31 +1,31 @@ process BUSCO { tag "$meta.id" label 'process_medium' - - conda (params.enable_conda ? "bioconda::busco=5.2.2" : null) + + conda (params.enable_conda ? "bioconda::busco=5.3.2" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/busco:5.2.2--pyhdfd78af_0': - 'quay.io/biocontainers/busco:5.2.2--pyhdfd78af_0' }" + 'https://depot.galaxyproject.org/singularity/busco:5.3.2--pyhdfd78af_0': + 'quay.io/biocontainers/busco:5.3.2--pyhdfd78af_0' }" input: - tuple val(meta), path(fasta) - val(mode) - path(augustus_config) - val(lineage) + tuple val(meta), path(fasta) // Required: meta map, and fasta sequence file + each lineage // Required: lineage to check against + path busco_lineages_path // Recommended: path to busco lineages - downloads if not set + path config_file // Optional: busco configuration file output: - tuple val(meta), path("${meta.id}/run_*/full_table.tsv"), emit: tsv - tuple val(meta), path("${meta.id}/run_*/short_summary.txt"), emit: txt - path "versions.yml" , emit: versions + tuple val(meta), path("*-busco"), emit: busco_dir + 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}" - if (lineage) args += " --lineage_dataset $lineage" + def prefix = task.ext.prefix ?: "${meta.id}-${lineage}" + def busco_config = config_file ? "--config $config_file" : '' + def busco_lineage_dir = busco_lineages_path ? "--download_path ${busco_lineages_path}" : '' """ - # Ensure the input is uncompressed - gzip -cdf $fasta > __UNCOMPRESSED_FASTA_FILE__ - # Nextflow changes the container --entrypoint to /bin/bash (container default entrypoint: /usr/local/env-execute) # Check for container variable initialisation script and source it. if [ -f "/usr/local/env-activate.sh" ]; then @@ -39,12 +39,30 @@ process BUSCO { . "/usr/local/etc/conda/activate.d/augustus.sh" . "/usr/local/etc/conda/activate.d/openjdk_activate.sh" fi - - # Copy the image's AUGUSTUS config directory if it was not provided to the module - [ ! -e augustus_config ] && cp -a /usr/local/config augustus_config - - # Busco command - AUGUSTUS_CONFIG_PATH=augustus_config busco $args --augustus --mode $mode --cpu $task.cpus --in __UNCOMPRESSED_FASTA_FILE__ --out $meta.id + + # If the augustus config directory is not writable, then copy to writeable area + if [ ! -w "\${AUGUSTUS_CONFIG_PATH}" ]; then + # Create writable tmp directory for augustus + AUG_CONF_DIR=\$( mktemp -d -p \$PWD ) + cp -r \$AUGUSTUS_CONFIG_PATH/* \$AUG_CONF_DIR + export AUGUSTUS_CONFIG_PATH=\$AUG_CONF_DIR + echo "New AUGUSTUS_CONFIG_PATH=\${AUGUSTUS_CONFIG_PATH}" + fi + + # Ensure the input is uncompressed + gzip -cdf $fasta > ${prefix}_uncompressed.fasta + + busco \\ + --cpu $task.cpus \\ + --in ${prefix}_uncompressed.fasta \\ + --out ${prefix}-busco \\ + --lineage_dataset $lineage \\ + $busco_lineage_dir \\ + $busco_config \\ + $args + + # clean up + rm ${prefix}_uncompressed.fasta cat <<-END_VERSIONS > versions.yml "${task.process}": diff --git a/tests/modules/busco/main.nf b/tests/modules/busco/main.nf index d12abae9..4985bd18 100644 --- a/tests/modules/busco/main.nf +++ b/tests/modules/busco/main.nf @@ -2,14 +2,22 @@ nextflow.enable.dsl = 2 -include { BUSCO as BUSCO_BACTE } from '../../../modules/busco/main.nf' +include { BUSCO } from '../../../modules/busco/main.nf' // This tests genome decompression, empty input channels and data download workflow test_busco { - input = [ [ id:'test' ], file(params.test_data['bacteroides_fragilis']['genome']['genome_fna_gz'], checkIfExists: true) ] - BUSCO_BACTE ( input, - "genome", - [], - [] ) + + input = [ + [ id:'test', single_end:false ], // meta map + file( params.test_data['bacteroides_fragilis']['genome']['genome_fna_gz'], checkIfExists: true) + ] + + BUSCO ( + input, + 'bacteria_odb10', + [], // Download busco lineage + [], // No config + ) + } diff --git a/tests/modules/busco/nextflow.config b/tests/modules/busco/nextflow.config index 50f50a7a..feea8d40 100644 --- a/tests/modules/busco/nextflow.config +++ b/tests/modules/busco/nextflow.config @@ -1,5 +1,6 @@ process { publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } - -} \ No newline at end of file + ext.args = '--mode genome' + +} diff --git a/tests/modules/busco/test.yml b/tests/modules/busco/test.yml index d66bd305..3e7c1bf6 100644 --- a/tests/modules/busco/test.yml +++ b/tests/modules/busco/test.yml @@ -1,10 +1,7 @@ - name: busco test_busco - command: nextflow run ./tests/modules/busco -entry test_busco -c ./tests/config/nextflow.config -c ./tests/modules/busco/nextflow.config + command: nextflow run tests/modules/busco -entry test_busco -c tests/config/nextflow.config tags: - busco files: - - path: output/busco/test/run_bacteroidales_odb10/full_table.tsv - md5sum: 8d7b401d875ecd9291b01bf4485bf080 - - path: output/busco/test/run_bacteroidales_odb10/short_summary.txt - contains: ['Complete BUSCOs (C)'] - + - path: output/busco/versions.yml + md5sum: 921e2abe85bf73e63a8b494453dc83cf From 9eff38ff94c2ecf7236b770b005518bacd272983 Mon Sep 17 00:00:00 2001 From: Mahesh Binzer-Panchal Date: Tue, 3 May 2022 09:15:15 +0000 Subject: [PATCH 051/100] Update meta.yml --- modules/busco/meta.yml | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/modules/busco/meta.yml b/modules/busco/meta.yml index 8f41f2f3..72ae4c29 100644 --- a/modules/busco/meta.yml +++ b/modules/busco/meta.yml @@ -22,14 +22,17 @@ input: e.g. [ id:'test', single_end:false ] - fasta: type: file - description: Nucleic or amino acid sequence file in FASTA format - pattern: "*.{fasta}" - - mode: + description: Nucleic or amino acid sequence file in FASTA format. + pattern: "*.{fasta,fna,fa,fasta.gz,fna.gz,fa.gz}" + - lineage: type: value - description: Sets the assessment MODE – genome, proteins, transcriptome - - augustus_config: + description: The BUSCO lineage to use. + - busco_lineages_path: type: directory - description: AUGUSTUS config directory + description: Path to local BUSCO lineages directory. + - config_file: + type: directory + description: Path to BUSCO config file. output: - meta: @@ -37,19 +40,16 @@ output: description: | Groovy Map containing sample information e.g. [ id:'test', single_end:false ] + - busco_dir: + type: directory + description: BUSCO lineage specific output + pattern: "*-busco" - versions: type: file description: File containing software versions pattern: "versions.yml" - - tsv: - type: file - description: Full summary table - pattern: "*.{tsv}" - - txt: - type: file - description: Short summary text - pattern: "*.{txt}" authors: - "@priyanka-surana" - "@charles-plessy" + - "@mahesh-panchal" From 012f08537880805ad70a006f0076e6f8933b860f Mon Sep 17 00:00:00 2001 From: Mahesh Binzer-Panchal Date: Tue, 3 May 2022 09:19:39 +0000 Subject: [PATCH 052/100] Prettier --- modules/busco/meta.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/busco/meta.yml b/modules/busco/meta.yml index 72ae4c29..b73f498b 100644 --- a/modules/busco/meta.yml +++ b/modules/busco/meta.yml @@ -12,7 +12,7 @@ tools: documentation: https://busco.ezlab.org/busco_userguide.html tool_dev_url: https://gitlab.com/ezlab/busco doi: "10.1007/978-1-4939-9173-0_14" - licence: ['MIT'] + licence: ["MIT"] input: - meta: From 2990dc8357dcf3bb53aef8cf5a7c9e8c8f5caa9b Mon Sep 17 00:00:00 2001 From: Ramprasad Neethiraj <20065894+ramprasadn@users.noreply.github.com> Date: Tue, 3 May 2022 14:20:05 +0200 Subject: [PATCH 053/100] callcnv module --- modules/cnvpytor/callcnvs/main.nf | 14 +++++++------- modules/cnvpytor/callcnvs/meta.yml | 11 +++++++---- 2 files changed, 14 insertions(+), 11 deletions(-) diff --git a/modules/cnvpytor/callcnvs/main.nf b/modules/cnvpytor/callcnvs/main.nf index fcb36ba5..c3866095 100644 --- a/modules/cnvpytor/callcnvs/main.nf +++ b/modules/cnvpytor/callcnvs/main.nf @@ -9,10 +9,11 @@ process CNVPYTOR_CALLCNVS { input: tuple val(meta), path(pytor) + val bin_sizes output: - tuple val(meta), path("*.tsv"), emit: cnvs - path "versions.yml" , emit: versions + tuple val(meta), path("${pytor.baseName}.pytor") , emit: pytor + path "versions.yml" , emit: versions when: task.ext.when == null || task.ext.when @@ -23,22 +24,21 @@ process CNVPYTOR_CALLCNVS { """ cnvpytor \\ -root $pytor \\ - -call $args > ${prefix}.tsv + -call $bin_sizes cat <<-END_VERSIONS > versions.yml "${task.process}": - cnvpytor: \$(echo \$(cnvpytor --version 2>&1) | sed 's/^.*pyCNVnator //; s/Using.*\$//' )) + cnvpytor: \$(echo \$(cnvpytor --version 2>&1) | sed 's/CNVpytor //' )) END_VERSIONS """ stub: - def prefix = task.ext.prefix ?: "${meta.id}" """ - touch ${prefix}.tsv + touch ${pytor.baseName}.pytor cat <<-END_VERSIONS > versions.yml "${task.process}": - cnvpytor: \$(echo \$(cnvpytor --version 2>&1) | sed 's/^.*pyCNVnator //; s/Using.*\$//' )) + cnvpytor: \$(echo \$(cnvpytor --version 2>&1) | sed 's/CNVpytor //' )) END_VERSIONS """ } diff --git a/modules/cnvpytor/callcnvs/meta.yml b/modules/cnvpytor/callcnvs/meta.yml index edfc462a..6ba46b6f 100644 --- a/modules/cnvpytor/callcnvs/meta.yml +++ b/modules/cnvpytor/callcnvs/meta.yml @@ -17,8 +17,11 @@ input: e.g. [ id:'test'] - pytor: type: file - description: cnvpytor root file + description: pytor file containing partitions of read depth histograms using mean-shift method pattern: "*.{pytor}" + - bin_sizes: + type: string + description: list of binsizes separated by space e.g. "1000 10000" and "1000" output: - meta: @@ -26,10 +29,10 @@ output: description: | Groovy Map containing sample information e.g. [ id:'test' ] - - cnvs: + - pytor: type: file - description: file containing identified copy numer variations - pattern: "*.{tsv}" + description: pytor files containing cnv calls + pattern: "*.{pytor}" - versions: type: file description: File containing software versions From 07e026054a018139da73534acacfdcaf8762173e Mon Sep 17 00:00:00 2001 From: Ramprasad Neethiraj <20065894+ramprasadn@users.noreply.github.com> Date: Tue, 3 May 2022 14:24:54 +0200 Subject: [PATCH 054/100] histogram --- modules/cnvpytor/histogram/main.nf | 8 +++++--- modules/cnvpytor/histogram/meta.yml | 3 +++ 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/modules/cnvpytor/histogram/main.nf b/modules/cnvpytor/histogram/main.nf index f6e9dd25..1906fa36 100644 --- a/modules/cnvpytor/histogram/main.nf +++ b/modules/cnvpytor/histogram/main.nf @@ -9,6 +9,8 @@ process CNVPYTOR_HISTOGRAM { input: tuple val(meta), path(pytor) + val bin_sizes + output: tuple val(meta), path("${pytor.baseName}.pytor") , emit: pytor @@ -18,15 +20,15 @@ process CNVPYTOR_HISTOGRAM { task.ext.when == null || task.ext.when script: - def args = task.ext.args ?: '1000' + def bins = bin_sizes ?: '1000' """ cnvpytor \\ -root $pytor \\ - -his $args + -his $bins cat <<-END_VERSIONS > versions.yml "${task.process}": - cnvpytor: \$(echo \$(cnvpytor --version 2>&1) | sed 's/^.*pyCNVnator //; s/Using.*\$//' )) + cnvpytor: \$(echo \$(cnvpytor --version 2>&1) | sed 's/CNVpytor //' )) END_VERSIONS """ diff --git a/modules/cnvpytor/histogram/meta.yml b/modules/cnvpytor/histogram/meta.yml index fcad2221..4855f26d 100644 --- a/modules/cnvpytor/histogram/meta.yml +++ b/modules/cnvpytor/histogram/meta.yml @@ -22,6 +22,9 @@ input: type: file description: pytor file containing read depth data pattern: "*.{pytor}" + - bin_sizes: + type: string + description: list of binsizes separated by space e.g. "1000 10000" and "1000" output: - meta: From 7cc47f6ba6a3aba385fde62bb8c2e0a7ae435ed3 Mon Sep 17 00:00:00 2001 From: Ramprasad Neethiraj <20065894+ramprasadn@users.noreply.github.com> Date: Tue, 3 May 2022 14:25:20 +0200 Subject: [PATCH 055/100] importrd --- modules/cnvpytor/importreaddepth/main.nf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/cnvpytor/importreaddepth/main.nf b/modules/cnvpytor/importreaddepth/main.nf index 059c19a5..ff00c0b0 100644 --- a/modules/cnvpytor/importreaddepth/main.nf +++ b/modules/cnvpytor/importreaddepth/main.nf @@ -43,7 +43,7 @@ process CNVPYTOR_IMPORTREADDEPTH { cat <<-END_VERSIONS > versions.yml "${task.process}": - cnvpytor: \$(echo \$(cnvpytor --version 2>&1) | sed 's/^.*pyCNVnator //; s/Using.*\$//' )) + cnvpytor: \$(echo \$(cnvpytor --version 2>&1) | sed 's/CNVpytor //' )) END_VERSIONS """ } From 829c15c98b1447f9445690e29f2b684dbe053f65 Mon Sep 17 00:00:00 2001 From: Ramprasad Neethiraj <20065894+ramprasadn@users.noreply.github.com> Date: Tue, 3 May 2022 14:26:34 +0200 Subject: [PATCH 056/100] partition --- modules/cnvpytor/partition/main.nf | 7 ++++--- modules/cnvpytor/partition/meta.yml | 3 +++ 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/modules/cnvpytor/partition/main.nf b/modules/cnvpytor/partition/main.nf index 8365cb29..42a5ec78 100644 --- a/modules/cnvpytor/partition/main.nf +++ b/modules/cnvpytor/partition/main.nf @@ -9,6 +9,7 @@ process CNVPYTOR_PARTITION { input: tuple val(meta), path(pytor) + val bin_sizes output: tuple val(meta), path("${pytor.baseName}.pytor"), emit: pytor @@ -18,15 +19,15 @@ process CNVPYTOR_PARTITION { task.ext.when == null || task.ext.when script: - def args = task.ext.args ?: '' + def bins = bin_sizes ?: '1000' """ cnvpytor \\ -root $pytor \\ - -partition $args + -partition $bins cat <<-END_VERSIONS > versions.yml "${task.process}": - cnvpytor: \$(echo \$(cnvpytor --version 2>&1) | sed 's/^.*pyCNVnator //; s/Using.*\$//' )) + cnvpytor: \$(echo \$(cnvpytor --version 2>&1) | sed 's/CNVpytor //' )) END_VERSIONS """ diff --git a/modules/cnvpytor/partition/meta.yml b/modules/cnvpytor/partition/meta.yml index a72cea4c..bb7a047e 100644 --- a/modules/cnvpytor/partition/meta.yml +++ b/modules/cnvpytor/partition/meta.yml @@ -22,6 +22,9 @@ input: type: file description: pytor file containing read depth data pattern: "*.{pytor}" + - bin_sizes: + type: string + description: list of binsizes separated by space e.g. "1000 10000" and "1000" output: - meta: From 3efa931bf6a77a6f6942ebfe4ba8620119f49327 Mon Sep 17 00:00:00 2001 From: Ramprasad Neethiraj <20065894+ramprasadn@users.noreply.github.com> Date: Tue, 3 May 2022 14:26:46 +0200 Subject: [PATCH 057/100] view --- modules/cnvpytor/view/main.nf | 59 ++++++++++++++++++++++++++++++++++ modules/cnvpytor/view/meta.yml | 44 +++++++++++++++++++++++++ 2 files changed, 103 insertions(+) create mode 100644 modules/cnvpytor/view/main.nf create mode 100644 modules/cnvpytor/view/meta.yml diff --git a/modules/cnvpytor/view/main.nf b/modules/cnvpytor/view/main.nf new file mode 100644 index 00000000..c4e49a78 --- /dev/null +++ b/modules/cnvpytor/view/main.nf @@ -0,0 +1,59 @@ +process CNVPYTOR_VIEW { + tag "$meta.id" + label 'process_medium' + + conda (params.enable_conda ? "bioconda::cnvpytor=1.2.1" : null) + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/cnvpytor:1.2.1--pyhdfd78af_0': + 'quay.io/biocontainers/cnvpytor:1.2.1--pyhdfd78af_0' }" + + input: + tuple val(meta), path(pytor) + val bin_sizes + val output_format + + output: + tuple val(meta), path("*.vcf"), emit: vcf , optional: true + tuple val(meta), path("*.tsv"), emit: tsv , optional: true + tuple val(meta), path("*.xls"), emit: xls , optional: true + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def output_suffix = output_format ?: 'vcf' + """ + + python3 < versions.yml + "${task.process}": + cnvpytor: \$(echo \$(cnvpytor --version 2>&1) | sed 's/CNVpytor //' )) + END_VERSIONS + """ + + stub: + def output_suffix = output_format ?: 'vcf' + """ + touch ${pytor.baseName}.${output_suffix} + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + cnvpytor: \$(echo \$(cnvpytor --version 2>&1) | sed 's/CNVpytor //' )) + END_VERSIONS + """ +} diff --git a/modules/cnvpytor/view/meta.yml b/modules/cnvpytor/view/meta.yml new file mode 100644 index 00000000..d4456469 --- /dev/null +++ b/modules/cnvpytor/view/meta.yml @@ -0,0 +1,44 @@ +name: cnvpytor_view +description: view function to generate vcfs +keywords: + - cnv calling +tools: + - cnvpytor: + description: calling CNVs using read depth + homepage: https://github.com/abyzovlab/CNVpytor + documentation: https://github.com/abyzovlab/CNVpytor + tool_dev_url: https://github.com/abyzovlab/CNVpytor + doi: "10.1101/2021.01.27.428472v1" + licence: ["MIT"] + +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test' ] + - pytor: + type: file + description: pytor file containing read depth data + pattern: "*.{pytor}" + - bin_sizes: + type: string + description: list of binsizes separated by space e.g. "1000 10000" and "1000" + +output: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test' ] + - partitions: + type: file + description: pytor file containing partitions of read depth histograms using mean-shift method + pattern: "*.{pytor}" + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" + +authors: + - "@sima-r" From 46e5752b82fb9d0f8d472b3d87efa7419f658279 Mon Sep 17 00:00:00 2001 From: Ramprasad Neethiraj <20065894+ramprasadn@users.noreply.github.com> Date: Tue, 3 May 2022 14:32:45 +0200 Subject: [PATCH 058/100] update tests --- tests/modules/cnvpytor/callcnvs/test.yml | 4 +- tests/modules/cnvpytor/view/main.nf | 43 +++++++++++++++++++++ tests/modules/cnvpytor/view/nextflow.config | 7 ++++ tests/modules/cnvpytor/view/test.yml | 26 +++++++++++++ 4 files changed, 78 insertions(+), 2 deletions(-) create mode 100644 tests/modules/cnvpytor/view/main.nf create mode 100644 tests/modules/cnvpytor/view/nextflow.config create mode 100644 tests/modules/cnvpytor/view/test.yml diff --git a/tests/modules/cnvpytor/callcnvs/test.yml b/tests/modules/cnvpytor/callcnvs/test.yml index e284ab53..fd07db4c 100644 --- a/tests/modules/cnvpytor/callcnvs/test.yml +++ b/tests/modules/cnvpytor/callcnvs/test.yml @@ -4,7 +4,7 @@ - cnvpytor - cnvpytor/callcnvs files: - - path: output/cnvpytor/test.tsv + - path: output/cnvpytor/test.pytor - path: output/cnvpytor/versions.yml - name: cnvpytor callcnvs test_cnvpytor_callcnvs stub @@ -13,5 +13,5 @@ - cnvpytor - cnvpytor/callcnvs files: - - path: output/cnvpytor/test.tsv + - path: output/cnvpytor/test.pytor - path: output/cnvpytor/versions.yml diff --git a/tests/modules/cnvpytor/view/main.nf b/tests/modules/cnvpytor/view/main.nf new file mode 100644 index 00000000..30177c44 --- /dev/null +++ b/tests/modules/cnvpytor/view/main.nf @@ -0,0 +1,43 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { CNVPYTOR_VIEW } from '../../../../modules/cnvpytor/view/main.nf' + +workflow test_cnvpytor_view { + + input = [ + [ id:'test'], // meta map + file(params.test_data['homo_sapiens']['illumina']['test_pytor'], checkIfExists: true) + ] + + bin_sizes = "10000 100000" + + CNVPYTOR_VIEW ( input, bin_sizes, [] ) +} + +workflow test_cnvpytor_view_tsvout { + + input = [ + [ id:'test'], // meta map + file(params.test_data['homo_sapiens']['illumina']['test_pytor'], checkIfExists: true) + ] + + bin_sizes = "10000" + output_suffix = "tsv" + + CNVPYTOR_VIEW ( input, bin_sizes, output_suffix ) +} + +workflow test_cnvpytor_view_stub { + + input = [ + [ id:'test'], // meta map + file(params.test_data['homo_sapiens']['illumina']['test_pytor'], checkIfExists: true) + ] + + bin_sizes = "10000" + output_suffix = "tsv" + + CNVPYTOR_VIEW ( input, bin_sizes, output_suffix ) +} diff --git a/tests/modules/cnvpytor/view/nextflow.config b/tests/modules/cnvpytor/view/nextflow.config new file mode 100644 index 00000000..6d2cc1fb --- /dev/null +++ b/tests/modules/cnvpytor/view/nextflow.config @@ -0,0 +1,7 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + withName: CNVPYTOR_VIEW { + ext.args = '10000 100000' + } +} diff --git a/tests/modules/cnvpytor/view/test.yml b/tests/modules/cnvpytor/view/test.yml new file mode 100644 index 00000000..38f75003 --- /dev/null +++ b/tests/modules/cnvpytor/view/test.yml @@ -0,0 +1,26 @@ +- name: cnvpytor view test_cnvpytor_view + command: nextflow run tests/modules/cnvpytor/view -entry test_cnvpytor_view -c tests/config/nextflow.config + tags: + - cnvpytor + - cnvpytor/view + files: + - path: output/cnvpytor/test_10000.vcf + - path: output/cnvpytor/versions.yml + +- name: cnvpytor view test_cnvpytor_view tsv + command: nextflow run tests/modules/cnvpytor/view -entry test_cnvpytor_view_tsvout -c tests/config/nextflow.config + tags: + - cnvpytor + - cnvpytor/view + files: + - path: output/cnvpytor/test.tsv + - path: output/cnvpytor/versions.yml + +- name: cnvpytor view test_cnvpytor_view stub + command: nextflow run tests/modules/cnvpytor/view -entry test_cnvpytor_view_stub -c tests/config/nextflow.config -stub-run + tags: + - cnvpytor + - cnvpytor/view + files: + - path: output/cnvpytor/test.vcf + - path: output/cnvpytor/versions.yml From 19cfb4e95196d0e8cc14a67ecb8f1ed0b0fcc3a7 Mon Sep 17 00:00:00 2001 From: Ramprasad Neethiraj <20065894+ramprasadn@users.noreply.github.com> Date: Tue, 3 May 2022 14:53:56 +0200 Subject: [PATCH 059/100] update meta files --- modules/cnvpytor/histogram/main.nf | 2 +- modules/cnvpytor/histogram/meta.yml | 1 + modules/cnvpytor/importreaddepth/main.nf | 2 +- modules/cnvpytor/importreaddepth/meta.yml | 1 + modules/cnvpytor/partition/main.nf | 2 +- modules/cnvpytor/partition/meta.yml | 1 + modules/cnvpytor/view/main.nf | 3 ++- modules/cnvpytor/view/meta.yml | 15 ++++++++++++--- tests/modules/cnvpytor/view/main.nf | 7 +++---- tests/modules/cnvpytor/view/test.yml | 2 +- 10 files changed, 24 insertions(+), 12 deletions(-) diff --git a/modules/cnvpytor/histogram/main.nf b/modules/cnvpytor/histogram/main.nf index 1906fa36..fd2ebe14 100644 --- a/modules/cnvpytor/histogram/main.nf +++ b/modules/cnvpytor/histogram/main.nf @@ -38,7 +38,7 @@ process CNVPYTOR_HISTOGRAM { cat <<-END_VERSIONS > versions.yml "${task.process}": - cnvpytor: \$(echo \$(cnvpytor --version 2>&1) | sed 's/^.*pyCNVnator //; s/Using.*\$//' )) + cnvpytor: \$(echo \$(cnvpytor --version 2>&1) | sed 's/CNVpytor //' )) END_VERSIONS """ } diff --git a/modules/cnvpytor/histogram/meta.yml b/modules/cnvpytor/histogram/meta.yml index 4855f26d..ecd48b9a 100644 --- a/modules/cnvpytor/histogram/meta.yml +++ b/modules/cnvpytor/histogram/meta.yml @@ -43,3 +43,4 @@ output: authors: - "@sima-r" + - "@ramprasadn" diff --git a/modules/cnvpytor/importreaddepth/main.nf b/modules/cnvpytor/importreaddepth/main.nf index ff00c0b0..6f9abae9 100644 --- a/modules/cnvpytor/importreaddepth/main.nf +++ b/modules/cnvpytor/importreaddepth/main.nf @@ -32,7 +32,7 @@ process CNVPYTOR_IMPORTREADDEPTH { cat <<-END_VERSIONS > versions.yml "${task.process}": - cnvpytor: \$(echo \$(cnvpytor --version 2>&1) | sed 's/^.*pyCNVnator //; s/Using.*\$//' )) + cnvpytor: \$(echo \$(cnvpytor --version 2>&1) | sed 's/CNVpytor //' )) END_VERSIONS """ diff --git a/modules/cnvpytor/importreaddepth/meta.yml b/modules/cnvpytor/importreaddepth/meta.yml index 1cf3c0d0..8b58887e 100644 --- a/modules/cnvpytor/importreaddepth/meta.yml +++ b/modules/cnvpytor/importreaddepth/meta.yml @@ -52,3 +52,4 @@ output: authors: - "@sima-r" + - "@ramprasadn" diff --git a/modules/cnvpytor/partition/main.nf b/modules/cnvpytor/partition/main.nf index 42a5ec78..6d7a9c6b 100644 --- a/modules/cnvpytor/partition/main.nf +++ b/modules/cnvpytor/partition/main.nf @@ -37,7 +37,7 @@ process CNVPYTOR_PARTITION { cat <<-END_VERSIONS > versions.yml "${task.process}": - cnvpytor: \$(echo \$(cnvpytor --version 2>&1) | sed 's/^.*pyCNVnator //; s/Using.*\$//' )) + cnvpytor: \$(echo \$(cnvpytor --version 2>&1) | sed 's/CNVpytor //' )) END_VERSIONS """ } diff --git a/modules/cnvpytor/partition/meta.yml b/modules/cnvpytor/partition/meta.yml index bb7a047e..17b5e199 100644 --- a/modules/cnvpytor/partition/meta.yml +++ b/modules/cnvpytor/partition/meta.yml @@ -43,3 +43,4 @@ output: authors: - "@sima-r" + - "@ramprasadn" diff --git a/modules/cnvpytor/view/main.nf b/modules/cnvpytor/view/main.nf index c4e49a78..72726615 100644 --- a/modules/cnvpytor/view/main.nf +++ b/modules/cnvpytor/view/main.nf @@ -23,13 +23,14 @@ process CNVPYTOR_VIEW { script: def output_suffix = output_format ?: 'vcf' + def bins = bin_sizes ?: '1000' """ python3 < Date: Tue, 3 May 2022 15:04:37 +0200 Subject: [PATCH 060/100] fix minor errors --- modules/cnvpytor/callcnvs/main.nf | 2 +- modules/cnvpytor/view/meta.yml | 3 +++ tests/modules/cnvpytor/view/test.yml | 1 + 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/modules/cnvpytor/callcnvs/main.nf b/modules/cnvpytor/callcnvs/main.nf index c3866095..092f6def 100644 --- a/modules/cnvpytor/callcnvs/main.nf +++ b/modules/cnvpytor/callcnvs/main.nf @@ -19,7 +19,7 @@ process CNVPYTOR_CALLCNVS { task.ext.when == null || task.ext.when script: - def args = task.ext.args ?: '1000' + def bins = bin_sizes ?: '1000' def prefix = task.ext.prefix ?: "${meta.id}" """ cnvpytor \\ diff --git a/modules/cnvpytor/view/meta.yml b/modules/cnvpytor/view/meta.yml index 0f9bbb43..1392e90e 100644 --- a/modules/cnvpytor/view/meta.yml +++ b/modules/cnvpytor/view/meta.yml @@ -24,6 +24,9 @@ input: - bin_sizes: type: string description: list of binsizes separated by space e.g. "1000 10000" and "1000" + - output_format: + type: string + description: output format of the cnv calls. Valid entries are "tsv", "vcf", and "xls" output: - meta: diff --git a/tests/modules/cnvpytor/view/test.yml b/tests/modules/cnvpytor/view/test.yml index 9c8b346b..ea8ab792 100644 --- a/tests/modules/cnvpytor/view/test.yml +++ b/tests/modules/cnvpytor/view/test.yml @@ -5,6 +5,7 @@ - cnvpytor/view files: - path: output/cnvpytor/test_10000.vcf + - path: output/cnvpytor/test_100000.vcf - path: output/cnvpytor/versions.yml - name: cnvpytor view test_cnvpytor_view tsv 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 061/100] 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 57db28386ebd236e4ffd07c47eba21f284cda55c Mon Sep 17 00:00:00 2001 From: Mahesh Binzer-Panchal Date: Tue, 3 May 2022 13:26:49 +0000 Subject: [PATCH 062/100] Support batch fasta analysis --- modules/busco/main.nf | 24 +++++++++++++++++------- tests/modules/busco/main.nf | 6 ++++-- 2 files changed, 21 insertions(+), 9 deletions(-) diff --git a/modules/busco/main.nf b/modules/busco/main.nf index e66beeeb..4ba4baac 100644 --- a/modules/busco/main.nf +++ b/modules/busco/main.nf @@ -8,10 +8,10 @@ process BUSCO { 'quay.io/biocontainers/busco:5.3.2--pyhdfd78af_0' }" input: - tuple val(meta), path(fasta) // Required: meta map, and fasta sequence file - each lineage // Required: lineage to check against - path busco_lineages_path // Recommended: path to busco lineages - downloads if not set - path config_file // Optional: busco configuration file + tuple val(meta), path(fasta, stageAs: 'tmp_input/*') // Required: meta map, and fasta sequence files + each lineage // Required: lineage to check against + path busco_lineages_path // Recommended: path to busco lineages - downloads if not set + path config_file // Optional: busco configuration file output: tuple val(meta), path("*-busco"), emit: busco_dir @@ -50,11 +50,21 @@ process BUSCO { fi # Ensure the input is uncompressed - gzip -cdf $fasta > ${prefix}_uncompressed.fasta + INPUT_SEQS=input_seqs + mkdir "\$INPUT_SEQS" + cd "\$INPUT_SEQS" + for FASTA in ../tmp_input/*; do + if [ "\${FASTA##*.}" == 'gz' ]; then + gzip -cdf "\$FASTA" > \$( basename "\$FASTA" .gz ) + else + ln -s "\$FASTA" . + fi + done + cd .. busco \\ --cpu $task.cpus \\ - --in ${prefix}_uncompressed.fasta \\ + --in "\$INPUT_SEQS" \\ --out ${prefix}-busco \\ --lineage_dataset $lineage \\ $busco_lineage_dir \\ @@ -62,7 +72,7 @@ process BUSCO { $args # clean up - rm ${prefix}_uncompressed.fasta + rm -rf "\$INPUT_SEQS" cat <<-END_VERSIONS > versions.yml "${task.process}": diff --git a/tests/modules/busco/main.nf b/tests/modules/busco/main.nf index 4985bd18..bdd5f40d 100644 --- a/tests/modules/busco/main.nf +++ b/tests/modules/busco/main.nf @@ -9,7 +9,10 @@ workflow test_busco { input = [ [ id:'test', single_end:false ], // meta map - file( params.test_data['bacteroides_fragilis']['genome']['genome_fna_gz'], checkIfExists: true) + [ + file( params.test_data['bacteroides_fragilis']['genome']['genome_fna_gz'], checkIfExists: true), + file( params.test_data['candidatus_portiera_aleyrodidarum']['genome']['genome_fasta'], checkIfExists: true) + ] ] BUSCO ( @@ -20,4 +23,3 @@ workflow test_busco { ) } - 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 063/100] 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 4be754b0080364ea14470ea152e3d0f3ca38baa8 Mon Sep 17 00:00:00 2001 From: Matthieu Muffato Date: Tue, 3 May 2022 14:53:17 +0100 Subject: [PATCH 064/100] It's a file, not a directory --- modules/busco/meta.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/busco/meta.yml b/modules/busco/meta.yml index b73f498b..e546c5ae 100644 --- a/modules/busco/meta.yml +++ b/modules/busco/meta.yml @@ -31,7 +31,7 @@ input: type: directory description: Path to local BUSCO lineages directory. - config_file: - type: directory + type: file description: Path to BUSCO config file. output: From 6351ec745ea35861554a0896470a43d47d1abee4 Mon Sep 17 00:00:00 2001 From: Matthieu Muffato Date: Tue, 3 May 2022 14:56:27 +0100 Subject: [PATCH 065/100] Update contributor list --- modules/busco/meta.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/busco/meta.yml b/modules/busco/meta.yml index e546c5ae..1301e091 100644 --- a/modules/busco/meta.yml +++ b/modules/busco/meta.yml @@ -53,3 +53,4 @@ authors: - "@priyanka-surana" - "@charles-plessy" - "@mahesh-panchal" + - "@muffato" From 1c54c0b1ae684dba97345a136b802b5ef8e31e4d Mon Sep 17 00:00:00 2001 From: Mahesh Binzer-Panchal Date: Tue, 3 May 2022 16:02:11 +0200 Subject: [PATCH 066/100] Apply suggestions from code review Co-authored-by: Matthieu Muffato --- modules/busco/main.nf | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/modules/busco/main.nf b/modules/busco/main.nf index 4ba4baac..c011b05b 100644 --- a/modules/busco/main.nf +++ b/modules/busco/main.nf @@ -24,20 +24,14 @@ process BUSCO { def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}-${lineage}" def busco_config = config_file ? "--config $config_file" : '' - def busco_lineage_dir = busco_lineages_path ? "--download_path ${busco_lineages_path}" : '' + def busco_lineage_dir = busco_lineages_path ? "--offline --download_path ${busco_lineages_path}" : '' """ # Nextflow changes the container --entrypoint to /bin/bash (container default entrypoint: /usr/local/env-execute) # Check for container variable initialisation script and source it. if [ -f "/usr/local/env-activate.sh" ]; then - # . "/usr/local/env-activate.sh" # Errors out because of various unbound variables - export PATH='/usr/local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin' - export CONDA_PREFIX='/usr/local' - export CONDA_SHLVL='1' - export CONDA_DEFAULT_ENV='/usr/local' - export CONDA_PROMPT_MODIFIER='' - . "/usr/local/etc/conda/activate.d/activate-r-base.sh" - . "/usr/local/etc/conda/activate.d/augustus.sh" - . "/usr/local/etc/conda/activate.d/openjdk_activate.sh" + set +u # Otherwise, errors out because of various unbound variables + . "/usr/local/env-activate.sh" + set -u fi # If the augustus config directory is not writable, then copy to writeable area From f02cd618b89e57f7d7a92bcdd8c654c85897c14c Mon Sep 17 00:00:00 2001 From: "Jill V. Hagey, PhD" Date: Tue, 3 May 2022 10:09:19 -0400 Subject: [PATCH 067/100] Update meta.yml --- modules/busco/meta.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/busco/meta.yml b/modules/busco/meta.yml index 1301e091..007d5e7c 100644 --- a/modules/busco/meta.yml +++ b/modules/busco/meta.yml @@ -54,3 +54,4 @@ authors: - "@charles-plessy" - "@mahesh-panchal" - "@muffato" + - "@jvhagey" From dc59ad0bf5cd65a921c85680e872097da43d2f77 Mon Sep 17 00:00:00 2001 From: JIANHONG OU Date: Tue, 3 May 2022 12:27:39 -0400 Subject: [PATCH 068/100] 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 8df20218bf2f348a4f30b7a9b2f72bdb8e9e23a5 Mon Sep 17 00:00:00 2001 From: Mahesh Binzer-Panchal Date: Wed, 4 May 2022 09:22:43 +0000 Subject: [PATCH 069/100] Add more tests and capture summaries Co-authored-by: Jill V. Hagey, PhD --- modules/busco/main.nf | 11 +- tests/modules/busco/main.nf | 304 +++++++++++++++++++++++++++- tests/modules/busco/nextflow.config | 24 ++- tests/modules/busco/test.yml | 60 +++++- 4 files changed, 392 insertions(+), 7 deletions(-) diff --git a/modules/busco/main.nf b/modules/busco/main.nf index c011b05b..59ac20f8 100644 --- a/modules/busco/main.nf +++ b/modules/busco/main.nf @@ -14,8 +14,11 @@ process BUSCO { path config_file // Optional: busco configuration file output: - tuple val(meta), path("*-busco"), emit: busco_dir - path "versions.yml" , emit: versions + tuple val(meta), path("*-busco.batch_summary.txt"), emit: batch_summary + tuple val(meta), path("short_summary.*.txt") , emit: short_summaries_txt + tuple val(meta), path("short_summary.*.json") , emit: short_summaries_json + tuple val(meta), path("*-busco") , emit: busco_dir + path "versions.yml" , emit: versions when: task.ext.when == null || task.ext.when @@ -68,6 +71,10 @@ process BUSCO { # clean up rm -rf "\$INPUT_SEQS" + # Move files to avoid staging/publishing issues + mv ${prefix}-busco/batch_summary.txt ${prefix}-busco.batch_summary.txt + mv ${prefix}-busco/*/short_summary.*.{json,txt} . + cat <<-END_VERSIONS > versions.yml "${task.process}": busco: \$( busco --version 2>&1 | sed 's/^BUSCO //' ) diff --git a/tests/modules/busco/main.nf b/tests/modules/busco/main.nf index bdd5f40d..a678d371 100644 --- a/tests/modules/busco/main.nf +++ b/tests/modules/busco/main.nf @@ -5,7 +5,70 @@ nextflow.enable.dsl = 2 include { BUSCO } from '../../../modules/busco/main.nf' // This tests genome decompression, empty input channels and data download -workflow test_busco { +workflow test_busco_genome_single_fasta { + + input = [ + [ id:'test', single_end:false ], // meta map + file( params.test_data['bacteroides_fragilis']['genome']['genome_fna_gz'], checkIfExists: true) + ] + + BUSCO ( + input, + ['bacteria_odb10', 'bacteroidetes_odb10'], + [], // Download busco lineage + [], // No config + ) + + /* Output tree: + /tmp/tmpimsfk4sj/busco/ + ├── test-bacteria_odb10-busco -> /tmp/tmp1sz7013h/b7/fdeaab567e1c5bccc475a4c19b8582/test-bacteria_odb10-busco/ + │ ├── batch_summary.txt + │ ├── genome.fna/ + │ │ ├── logs/ + │ │ │ ├── hmmsearch_err.log + │ │ │ ├── hmmsearch_out.log + │ │ │ ├── prodigal_err.log + │ │ │ └── prodigal_out.log + │ │ ├── prodigal_output/ + │ │ │ └── predicted_genes/ + │ │ ├── run_bacteria_odb10/ + │ │ │ ├── busco_sequences/ + │ │ │ ├── full_table.tsv + │ │ │ ├── hmmer_output/ + │ │ │ ├── missing_busco_list.tsv + │ │ │ ├── short_summary.json + │ │ │ └── short_summary.txt + │ │ ├── short_summary.specific.bacteria_odb10.genome.fna.json + │ │ └── short_summary.specific.bacteria_odb10.genome.fna.txt + │ └── logs/ + │ └── busco.log + ├── test-bacteroidetes_odb10-busco -> /tmp/tmp1sz7013h/75/0da56f59ee44bd2b85e0172906de49/test-bacteroidetes_odb10-busco/ + │ ├── batch_summary.txt + │ ├── genome.fna/ + │ │ ├── logs/ + │ │ │ ├── hmmsearch_err.log + │ │ │ ├── hmmsearch_out.log + │ │ │ ├── prodigal_err.log + │ │ │ └── prodigal_out.log + │ │ ├── prodigal_output/ + │ │ │ └── predicted_genes/ + │ │ ├── run_bacteroidetes_odb10/ + │ │ │ ├── busco_sequences/ + │ │ │ ├── full_table.tsv + │ │ │ ├── hmmer_output/ + │ │ │ ├── missing_busco_list.tsv + │ │ │ ├── short_summary.json + │ │ │ └── short_summary.txt + │ │ ├── short_summary.specific.bacteroidetes_odb10.genome.fna.json + │ │ └── short_summary.specific.bacteroidetes_odb10.genome.fna.txt + │ └── logs/ + │ └── busco.log + └── versions.yml -> /tmp/tmp1sz7013h/b7/fdeaab567e1c5bccc475a4c19b8582/versions.yml + */ + +} + +workflow test_busco_genome_multi_fasta { input = [ [ id:'test', single_end:false ], // meta map @@ -22,4 +85,243 @@ workflow test_busco { [], // No config ) + /* Output tree: + /tmp/tmpt22rjxzq/busco/ + ├── test-bacteria_odb10-busco -> /tmp/tmpfxt64xr_/36/425acbe5e9b27ba0bac8861f735494/test-bacteria_odb10-busco/ + │ ├── batch_summary.txt + │ ├── genome.fasta/ + │ │ ├── logs/ + │ │ │ ├── hmmsearch_err.log + │ │ │ ├── hmmsearch_out.log + │ │ │ ├── prodigal_err.log + │ │ │ └── prodigal_out.log + │ │ ├── prodigal_output/ + │ │ │ └── predicted_genes/ + │ │ ├── run_bacteria_odb10/ + │ │ │ ├── busco_sequences/ + │ │ │ ├── full_table.tsv + │ │ │ ├── hmmer_output/ + │ │ │ ├── missing_busco_list.tsv + │ │ │ ├── short_summary.json + │ │ │ └── short_summary.txt + │ │ ├── short_summary.specific.bacteria_odb10.genome.fasta.json + │ │ └── short_summary.specific.bacteria_odb10.genome.fasta.txt + │ ├── genome.fna/ + │ │ ├── logs/ + │ │ │ ├── hmmsearch_err.log + │ │ │ ├── hmmsearch_out.log + │ │ │ ├── prodigal_err.log + │ │ │ └── prodigal_out.log + │ │ ├── prodigal_output/ + │ │ │ └── predicted_genes/ + │ │ ├── run_bacteria_odb10/ + │ │ │ ├── busco_sequences/ + │ │ │ ├── full_table.tsv + │ │ │ ├── hmmer_output/ + │ │ │ ├── missing_busco_list.tsv + │ │ │ ├── short_summary.json + │ │ │ └── short_summary.txt + │ │ ├── short_summary.specific.bacteria_odb10.genome.fna.json + │ │ └── short_summary.specific.bacteria_odb10.genome.fna.txt + │ └── logs/ + │ └── busco.log + └── versions.yml -> /tmp/tmpfxt64xr_/36/425acbe5e9b27ba0bac8861f735494/versions.yml + */ + +} + +workflow test_busco_eukaryote_metaeuk { + + input = [ + [ id:'test', single_end:false ], // meta map + file( params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true) + ] + + BUSCO ( + input, + 'eukaryota_odb10', + [], // Download busco lineage + [], // No config + ) + + /* Output tree: + /tmp/tmp22sf7kg9/busco/ + ├── test-eukaryota_odb10-busco -> /tmp/tmpmic8qsk6/d5/d8cb6681c0fcaa6da34b57ec174d59/test-eukaryota_odb10-busco/ + │ ├── batch_summary.txt + │ ├── genome.fasta/ + │ │ ├── logs/ + │ │ │ ├── hmmsearch_err.log + │ │ │ ├── hmmsearch_out.log + │ │ │ ├── metaeuk_err.log + │ │ │ └── metaeuk_out.log + │ │ ├── run_eukaryota_odb10/ + │ │ │ ├── busco_sequences/ + │ │ │ ├── full_table.tsv + │ │ │ ├── hmmer_output/ + │ │ │ ├── metaeuk_output/ + │ │ │ ├── missing_busco_list.tsv + │ │ │ ├── short_summary.json + │ │ │ └── short_summary.txt + │ │ ├── short_summary.specific.eukaryota_odb10.genome.fasta.json + │ │ └── short_summary.specific.eukaryota_odb10.genome.fasta.txt + │ └── logs/ + │ └── busco.log + └── versions.yml -> /tmp/tmpmic8qsk6/d5/d8cb6681c0fcaa6da34b57ec174d59/versions.yml + */ + +} + +workflow test_busco_eukaryote_augustus { + + input = [ + [ id:'test', single_end:false ], // meta map + file( params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true) + ] + + BUSCO ( + input, + 'eukaryota_odb10', + [], // Download busco lineage + [], // No config + ) + + /* Output tree: + /tmp/tmpo77wyvb9/busco/ + ├── test-eukaryota_odb10-busco -> /tmp/tmpshljnwcg/25/9891a19cbabda15a5c10fb5e34987f/test-eukaryota_odb10-busco/ + │ ├── batch_summary.txt + │ ├── genome.fasta/ + │ │ ├── blast_db/ + │ │ │ ├── genome.fasta.ndb + │ │ │ ├── genome.fasta.nhr + │ │ │ ├── genome.fasta.nin + │ │ │ ├── genome.fasta.not + │ │ │ ├── genome.fasta.nsq + │ │ │ ├── genome.fasta.ntf + │ │ │ └── genome.fasta.nto + │ │ ├── logs/ + │ │ │ ├── makeblastdb_err.log + │ │ │ ├── makeblastdb_out.log + │ │ │ ├── tblastn_err.log + │ │ │ └── tblastn_out.log + │ │ └── run_eukaryota_odb10/ + │ │ ├── augustus_output/ + │ │ ├── blast_output/ + │ │ ├── busco_sequences/ + │ │ └── hmmer_output/ + │ └── logs/ + │ └── busco.log + └── versions.yml -> /tmp/tmpshljnwcg/25/9891a19cbabda15a5c10fb5e34987f/versions.yml + */ + +} + +workflow test_busco_protein { + + input = [ + [ id:'test', single_end:false ], // meta map + file( params.test_data['candidatus_portiera_aleyrodidarum']['genome']['proteome_fasta'], checkIfExists: true) + ] + + BUSCO ( + input, + 'bacteria_odb10', + [], // Download busco lineage + [], // No config + ) + + /* Output tree: + /tmp/tmplju98s42/busco/ + ├── test-bacteria_odb10-busco -> /tmp/tmp0oru9_61/9c/e992f5eee84806770002e4510f51cb/test-bacteria_odb10-busco/ + │ ├── batch_summary.txt + │ ├── logs/ + │ │ └── busco.log + │ └── proteome.fasta/ + │ ├── logs/ + │ │ ├── hmmsearch_err.log + │ │ └── hmmsearch_out.log + │ ├── run_bacteria_odb10/ + │ │ ├── busco_sequences/ + │ │ ├── full_table.tsv + │ │ ├── hmmer_output/ + │ │ ├── missing_busco_list.tsv + │ │ ├── short_summary.json + │ │ └── short_summary.txt + │ ├── short_summary.specific.bacteria_odb10.proteome.fasta.json + │ └── short_summary.specific.bacteria_odb10.proteome.fasta.txt + └── versions.yml -> /tmp/tmp0oru9_61/9c/e992f5eee84806770002e4510f51cb/versions.yml + */ +} +workflow test_busco_transcriptome { + + input = [ + [ id:'test', single_end:false ], // meta map + file( params.test_data['bacteroides_fragilis']['illumina']['test1_contigs_fa_gz'], checkIfExists: true) + ] + + BUSCO ( + input, + 'bacteria_odb10', + [], // Download busco lineage + [], // No config + ) + + /* Output tree: + /tmp/tmp5twpr8o9/busco/ + ├── test-bacteria_odb10-busco -> /tmp/tmp_qyjiads/0d/886515d0f06686b2227517398ef8ce/test-bacteria_odb10-busco/ + │ ├── batch_summary.txt + │ ├── logs/ + │ │ └── busco.log + │ └── test1.contigs.fa/ + │ ├── blast_db/ + │ │ ├── test1.contigs.fa.ndb + │ │ ├── test1.contigs.fa.nhr + │ │ ├── test1.contigs.fa.nin + │ │ ├── test1.contigs.fa.not + │ │ ├── test1.contigs.fa.nsq + │ │ ├── test1.contigs.fa.ntf + │ │ └── test1.contigs.fa.nto + │ ├── logs/ + │ │ ├── hmmsearch_err.log + │ │ ├── hmmsearch_out.log + │ │ ├── makeblastdb_err.log + │ │ ├── makeblastdb_out.log + │ │ ├── tblastn_err.log + │ │ └── tblastn_out.log + │ ├── run_bacteria_odb10/ + │ │ ├── blast_output/ + │ │ ├── busco_sequences/ + │ │ ├── full_table.tsv + │ │ ├── hmmer_output/ + │ │ ├── missing_busco_list.tsv + │ │ ├── short_summary.json + │ │ ├── short_summary.txt + │ │ └── single_copy_proteins.faa + │ ├── short_summary.specific.bacteria_odb10.test1.contigs.fa.json + │ ├── short_summary.specific.bacteria_odb10.test1.contigs.fa.txt + │ └── translated_proteins/ + │ ├── 1024388at2.faa + │ ├── 1054741at2.faa + │ ├── 1093223at2.faa + │ ├── 1151822at2.faa + │ ├── 143460at2.faa + │ ├── 1491686at2.faa + │ ├── 1504821at2.faa + │ ├── 1574817at2.faa + │ ├── 1592033at2.faa + │ ├── 1623045at2.faa + │ ├── 1661836at2.faa + │ ├── 1674344at2.faa + │ ├── 1698718at2.faa + │ ├── 1990650at2.faa + │ ├── 223233at2.faa + │ ├── 402899at2.faa + │ ├── 505485at2.faa + │ ├── 665824at2.faa + │ ├── 776861at2.faa + │ ├── 874197at2.faa + │ ├── 932854at2.faa + │ └── 95696at2.faa + └── versions.yml -> /tmp/tmp_qyjiads/0d/886515d0f06686b2227517398ef8ce/versions.yml + */ + } diff --git a/tests/modules/busco/nextflow.config b/tests/modules/busco/nextflow.config index feea8d40..9e8f718f 100644 --- a/tests/modules/busco/nextflow.config +++ b/tests/modules/busco/nextflow.config @@ -1,6 +1,28 @@ process { publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } - ext.args = '--mode genome' + withName: 'test_busco_genome_single_fasta:BUSCO' { + ext.args = '--mode genome' + } + + withName: 'test_busco_genome_multi_fasta:BUSCO' { + ext.args = '--mode genome' + } + + withName: 'test_busco_eukaryote_metaeuk:BUSCO' { + ext.args = '--mode genome' + } + + withName: 'test_busco_eukaryote_augustus:BUSCO' { + ext.args = '--mode genome --augustus' + } + + withName: 'test_busco_protein:BUSCO' { + ext.args = '--mode proteins' + } + + withName: 'test_busco_transcriptome:BUSCO'{ + ext.args = '--mode transcriptome' + } } diff --git a/tests/modules/busco/test.yml b/tests/modules/busco/test.yml index 3e7c1bf6..2125c3a4 100644 --- a/tests/modules/busco/test.yml +++ b/tests/modules/busco/test.yml @@ -1,7 +1,61 @@ -- name: busco test_busco - command: nextflow run tests/modules/busco -entry test_busco -c tests/config/nextflow.config +- name: busco test_busco_genome_single_fasta + command: nextflow run tests/modules/busco -entry test_busco_genome_single_fasta -c tests/config/nextflow.config tags: - busco + - bacteria + - genome files: - path: output/busco/versions.yml - md5sum: 921e2abe85bf73e63a8b494453dc83cf + md5sum: 8aa830f71587d859df35c6cfab59f35d + +- name: busco test_busco_genome_multi_fasta + command: nextflow run tests/modules/busco -entry test_busco_genome_multi_fasta -c tests/config/nextflow.config + tags: + - busco + - bacteria + - genome + files: + - path: output/busco/versions.yml + md5sum: 9a959eb0a1f765777dff1ea2f5c139c0 + +- name: busco test_busco_eukaryote_metaeuk + command: nextflow run tests/modules/busco -entry test_busco_eukaryote_metaeuk -c tests/config/nextflow.config + tags: + - busco + - eukaryote + - genome + - metaeuk + files: + - path: output/busco/versions.yml + md5sum: 34a808c257e6db1b0456f3b4372bc477 + +- name: busco test_busco_eukaryote_augustus + command: nextflow run tests/modules/busco -entry test_busco_eukaryote_augustus -c tests/config/nextflow.config + tags: + - busco + - eukaryote + - genome + - augustus + files: + - path: output/busco/versions.yml + md5sum: 2caac915461410b16a1524ac064cd0df + +- name: busco test_busco_protein + command: nextflow run tests/modules/busco -entry test_busco_protein -c tests/config/nextflow.config + tags: + - busco + - bacteria + - proteins + files: + - path: output/busco/versions.yml + md5sum: d7392261a57960a7e6aea609dce824f5 + +- name: busco test_busco_transcriptome + command: nextflow run tests/modules/busco -entry test_busco_transcriptome -c tests/config/nextflow.config + tags: + - busco + - bacteria + - transcriptome + files: + - path: output/busco/versions.yml + md5sum: 30eacbc7df70f6b1e72e0a7b6d02a7e1 From 73a8df9522e31eaa34f9f611d8a5a42d6a8c53fe Mon Sep 17 00:00:00 2001 From: Mahesh Binzer-Panchal Date: Wed, 4 May 2022 11:52:42 +0000 Subject: [PATCH 070/100] Fix no genes found test and update test.yml --- modules/busco/main.nf | 6 +- tests/modules/busco/main.nf | 166 +++++++++++++++++------------------ tests/modules/busco/test.yml | 126 +++++++++++++++++++++++--- 3 files changed, 198 insertions(+), 100 deletions(-) diff --git a/modules/busco/main.nf b/modules/busco/main.nf index 59ac20f8..f6bd63e2 100644 --- a/modules/busco/main.nf +++ b/modules/busco/main.nf @@ -15,8 +15,8 @@ process BUSCO { output: tuple val(meta), path("*-busco.batch_summary.txt"), emit: batch_summary - tuple val(meta), path("short_summary.*.txt") , emit: short_summaries_txt - tuple val(meta), path("short_summary.*.json") , emit: short_summaries_json + tuple val(meta), path("short_summary.*.txt") , emit: short_summaries_txt, optional: true + tuple val(meta), path("short_summary.*.json") , emit: short_summaries_json, optional: true tuple val(meta), path("*-busco") , emit: busco_dir path "versions.yml" , emit: versions @@ -73,7 +73,7 @@ process BUSCO { # Move files to avoid staging/publishing issues mv ${prefix}-busco/batch_summary.txt ${prefix}-busco.batch_summary.txt - mv ${prefix}-busco/*/short_summary.*.{json,txt} . + mv ${prefix}-busco/*/short_summary.*.{json,txt} . || echo "Short summaries were not available: No genes were found." cat <<-END_VERSIONS > versions.yml "${task.process}": diff --git a/tests/modules/busco/main.nf b/tests/modules/busco/main.nf index a678d371..f0201d21 100644 --- a/tests/modules/busco/main.nf +++ b/tests/modules/busco/main.nf @@ -20,9 +20,12 @@ workflow test_busco_genome_single_fasta { ) /* Output tree: - /tmp/tmpimsfk4sj/busco/ - ├── test-bacteria_odb10-busco -> /tmp/tmp1sz7013h/b7/fdeaab567e1c5bccc475a4c19b8582/test-bacteria_odb10-busco/ - │ ├── batch_summary.txt + /tmp/tmpisa3ktco/busco/ + ├── short_summary.specific.bacteria_odb10.genome.fna.json -> /tmp/tmpm91x0mn2/8a/ff5c15baba0942cca15a8d53e98009/short_summary.specific.bacteria_odb10.genome.fna.json + ├── short_summary.specific.bacteria_odb10.genome.fna.txt -> /tmp/tmpm91x0mn2/8a/ff5c15baba0942cca15a8d53e98009/short_summary.specific.bacteria_odb10.genome.fna.txt + ├── short_summary.specific.bacteroidetes_odb10.genome.fna.json -> /tmp/tmpm91x0mn2/91/3abf602561d35fcd917711402977a3/short_summary.specific.bacteroidetes_odb10.genome.fna.json + ├── short_summary.specific.bacteroidetes_odb10.genome.fna.txt -> /tmp/tmpm91x0mn2/91/3abf602561d35fcd917711402977a3/short_summary.specific.bacteroidetes_odb10.genome.fna.txt + ├── test-bacteria_odb10-busco -> /tmp/tmpm91x0mn2/8a/ff5c15baba0942cca15a8d53e98009/test-bacteria_odb10-busco/ │ ├── genome.fna/ │ │ ├── logs/ │ │ │ ├── hmmsearch_err.log @@ -31,19 +34,17 @@ workflow test_busco_genome_single_fasta { │ │ │ └── prodigal_out.log │ │ ├── prodigal_output/ │ │ │ └── predicted_genes/ - │ │ ├── run_bacteria_odb10/ - │ │ │ ├── busco_sequences/ - │ │ │ ├── full_table.tsv - │ │ │ ├── hmmer_output/ - │ │ │ ├── missing_busco_list.tsv - │ │ │ ├── short_summary.json - │ │ │ └── short_summary.txt - │ │ ├── short_summary.specific.bacteria_odb10.genome.fna.json - │ │ └── short_summary.specific.bacteria_odb10.genome.fna.txt + │ │ └── run_bacteria_odb10/ + │ │ ├── busco_sequences/ + │ │ ├── full_table.tsv + │ │ ├── hmmer_output/ + │ │ ├── missing_busco_list.tsv + │ │ ├── short_summary.json + │ │ └── short_summary.txt │ └── logs/ │ └── busco.log - ├── test-bacteroidetes_odb10-busco -> /tmp/tmp1sz7013h/75/0da56f59ee44bd2b85e0172906de49/test-bacteroidetes_odb10-busco/ - │ ├── batch_summary.txt + ├── test-bacteria_odb10-busco.batch_summary.txt -> /tmp/tmpm91x0mn2/8a/ff5c15baba0942cca15a8d53e98009/test-bacteria_odb10-busco.batch_summary.txt + ├── test-bacteroidetes_odb10-busco -> /tmp/tmpm91x0mn2/91/3abf602561d35fcd917711402977a3/test-bacteroidetes_odb10-busco/ │ ├── genome.fna/ │ │ ├── logs/ │ │ │ ├── hmmsearch_err.log @@ -52,18 +53,17 @@ workflow test_busco_genome_single_fasta { │ │ │ └── prodigal_out.log │ │ ├── prodigal_output/ │ │ │ └── predicted_genes/ - │ │ ├── run_bacteroidetes_odb10/ - │ │ │ ├── busco_sequences/ - │ │ │ ├── full_table.tsv - │ │ │ ├── hmmer_output/ - │ │ │ ├── missing_busco_list.tsv - │ │ │ ├── short_summary.json - │ │ │ └── short_summary.txt - │ │ ├── short_summary.specific.bacteroidetes_odb10.genome.fna.json - │ │ └── short_summary.specific.bacteroidetes_odb10.genome.fna.txt + │ │ └── run_bacteroidetes_odb10/ + │ │ ├── busco_sequences/ + │ │ ├── full_table.tsv + │ │ ├── hmmer_output/ + │ │ ├── missing_busco_list.tsv + │ │ ├── short_summary.json + │ │ └── short_summary.txt │ └── logs/ │ └── busco.log - └── versions.yml -> /tmp/tmp1sz7013h/b7/fdeaab567e1c5bccc475a4c19b8582/versions.yml + ├── test-bacteroidetes_odb10-busco.batch_summary.txt -> /tmp/tmpm91x0mn2/91/3abf602561d35fcd917711402977a3/test-bacteroidetes_odb10-busco.batch_summary.txt + └── versions.yml -> /tmp/tmpm91x0mn2/91/3abf602561d35fcd917711402977a3/versions.yml */ } @@ -86,9 +86,12 @@ workflow test_busco_genome_multi_fasta { ) /* Output tree: - /tmp/tmpt22rjxzq/busco/ - ├── test-bacteria_odb10-busco -> /tmp/tmpfxt64xr_/36/425acbe5e9b27ba0bac8861f735494/test-bacteria_odb10-busco/ - │ ├── batch_summary.txt + /tmp/tmpk19byek7/busco/ + ├── short_summary.specific.bacteria_odb10.genome.fasta.json -> /tmp/tmplt9fv3tl/15/ff310a16d9ce7ad24e207a05ce718e/short_summary.specific.bacteria_odb10.genome.fasta.json + ├── short_summary.specific.bacteria_odb10.genome.fasta.txt -> /tmp/tmplt9fv3tl/15/ff310a16d9ce7ad24e207a05ce718e/short_summary.specific.bacteria_odb10.genome.fasta.txt + ├── short_summary.specific.bacteria_odb10.genome.fna.json -> /tmp/tmplt9fv3tl/15/ff310a16d9ce7ad24e207a05ce718e/short_summary.specific.bacteria_odb10.genome.fna.json + ├── short_summary.specific.bacteria_odb10.genome.fna.txt -> /tmp/tmplt9fv3tl/15/ff310a16d9ce7ad24e207a05ce718e/short_summary.specific.bacteria_odb10.genome.fna.txt + ├── test-bacteria_odb10-busco -> /tmp/tmplt9fv3tl/15/ff310a16d9ce7ad24e207a05ce718e/test-bacteria_odb10-busco/ │ ├── genome.fasta/ │ │ ├── logs/ │ │ │ ├── hmmsearch_err.log @@ -97,15 +100,13 @@ workflow test_busco_genome_multi_fasta { │ │ │ └── prodigal_out.log │ │ ├── prodigal_output/ │ │ │ └── predicted_genes/ - │ │ ├── run_bacteria_odb10/ - │ │ │ ├── busco_sequences/ - │ │ │ ├── full_table.tsv - │ │ │ ├── hmmer_output/ - │ │ │ ├── missing_busco_list.tsv - │ │ │ ├── short_summary.json - │ │ │ └── short_summary.txt - │ │ ├── short_summary.specific.bacteria_odb10.genome.fasta.json - │ │ └── short_summary.specific.bacteria_odb10.genome.fasta.txt + │ │ └── run_bacteria_odb10/ + │ │ ├── busco_sequences/ + │ │ ├── full_table.tsv + │ │ ├── hmmer_output/ + │ │ ├── missing_busco_list.tsv + │ │ ├── short_summary.json + │ │ └── short_summary.txt │ ├── genome.fna/ │ │ ├── logs/ │ │ │ ├── hmmsearch_err.log @@ -114,18 +115,17 @@ workflow test_busco_genome_multi_fasta { │ │ │ └── prodigal_out.log │ │ ├── prodigal_output/ │ │ │ └── predicted_genes/ - │ │ ├── run_bacteria_odb10/ - │ │ │ ├── busco_sequences/ - │ │ │ ├── full_table.tsv - │ │ │ ├── hmmer_output/ - │ │ │ ├── missing_busco_list.tsv - │ │ │ ├── short_summary.json - │ │ │ └── short_summary.txt - │ │ ├── short_summary.specific.bacteria_odb10.genome.fna.json - │ │ └── short_summary.specific.bacteria_odb10.genome.fna.txt + │ │ └── run_bacteria_odb10/ + │ │ ├── busco_sequences/ + │ │ ├── full_table.tsv + │ │ ├── hmmer_output/ + │ │ ├── missing_busco_list.tsv + │ │ ├── short_summary.json + │ │ └── short_summary.txt │ └── logs/ │ └── busco.log - └── versions.yml -> /tmp/tmpfxt64xr_/36/425acbe5e9b27ba0bac8861f735494/versions.yml + ├── test-bacteria_odb10-busco.batch_summary.txt -> /tmp/tmplt9fv3tl/15/ff310a16d9ce7ad24e207a05ce718e/test-bacteria_odb10-busco.batch_summary.txt + └── versions.yml -> /tmp/tmplt9fv3tl/15/ff310a16d9ce7ad24e207a05ce718e/versions.yml */ } @@ -145,28 +145,28 @@ workflow test_busco_eukaryote_metaeuk { ) /* Output tree: - /tmp/tmp22sf7kg9/busco/ - ├── test-eukaryota_odb10-busco -> /tmp/tmpmic8qsk6/d5/d8cb6681c0fcaa6da34b57ec174d59/test-eukaryota_odb10-busco/ - │ ├── batch_summary.txt + /tmp/tmpeq4dsir5/busco/ + ├── short_summary.specific.eukaryota_odb10.genome.fasta.json -> /tmp/tmp60hby2pk/6f/529873d91cda6bae3a4a6a21746aee/short_summary.specific.eukaryota_odb10.genome.fasta.json + ├── short_summary.specific.eukaryota_odb10.genome.fasta.txt -> /tmp/tmp60hby2pk/6f/529873d91cda6bae3a4a6a21746aee/short_summary.specific.eukaryota_odb10.genome.fasta.txt + ├── test-eukaryota_odb10-busco -> /tmp/tmp60hby2pk/6f/529873d91cda6bae3a4a6a21746aee/test-eukaryota_odb10-busco/ │ ├── genome.fasta/ │ │ ├── logs/ │ │ │ ├── hmmsearch_err.log │ │ │ ├── hmmsearch_out.log │ │ │ ├── metaeuk_err.log │ │ │ └── metaeuk_out.log - │ │ ├── run_eukaryota_odb10/ - │ │ │ ├── busco_sequences/ - │ │ │ ├── full_table.tsv - │ │ │ ├── hmmer_output/ - │ │ │ ├── metaeuk_output/ - │ │ │ ├── missing_busco_list.tsv - │ │ │ ├── short_summary.json - │ │ │ └── short_summary.txt - │ │ ├── short_summary.specific.eukaryota_odb10.genome.fasta.json - │ │ └── short_summary.specific.eukaryota_odb10.genome.fasta.txt + │ │ └── run_eukaryota_odb10/ + │ │ ├── busco_sequences/ + │ │ ├── full_table.tsv + │ │ ├── hmmer_output/ + │ │ ├── metaeuk_output/ + │ │ ├── missing_busco_list.tsv + │ │ ├── short_summary.json + │ │ └── short_summary.txt │ └── logs/ │ └── busco.log - └── versions.yml -> /tmp/tmpmic8qsk6/d5/d8cb6681c0fcaa6da34b57ec174d59/versions.yml + ├── test-eukaryota_odb10-busco.batch_summary.txt -> /tmp/tmp60hby2pk/6f/529873d91cda6bae3a4a6a21746aee/test-eukaryota_odb10-busco.batch_summary.txt + └── versions.yml -> /tmp/tmp60hby2pk/6f/529873d91cda6bae3a4a6a21746aee/versions.yml */ } @@ -186,9 +186,8 @@ workflow test_busco_eukaryote_augustus { ) /* Output tree: - /tmp/tmpo77wyvb9/busco/ - ├── test-eukaryota_odb10-busco -> /tmp/tmpshljnwcg/25/9891a19cbabda15a5c10fb5e34987f/test-eukaryota_odb10-busco/ - │ ├── batch_summary.txt + /tmp/tmp2xqaygjj/busco/ + ├── test-eukaryota_odb10-busco -> /tmp/tmpjqs61x9o/3f/67cc14e873c0ceb45e2a27594d624c/test-eukaryota_odb10-busco/ │ ├── genome.fasta/ │ │ ├── blast_db/ │ │ │ ├── genome.fasta.ndb @@ -210,7 +209,8 @@ workflow test_busco_eukaryote_augustus { │ │ └── hmmer_output/ │ └── logs/ │ └── busco.log - └── versions.yml -> /tmp/tmpshljnwcg/25/9891a19cbabda15a5c10fb5e34987f/versions.yml + ├── test-eukaryota_odb10-busco.batch_summary.txt -> /tmp/tmpjqs61x9o/3f/67cc14e873c0ceb45e2a27594d624c/test-eukaryota_odb10-busco.batch_summary.txt + └── versions.yml -> /tmp/tmpjqs61x9o/3f/67cc14e873c0ceb45e2a27594d624c/versions.yml */ } @@ -230,25 +230,25 @@ workflow test_busco_protein { ) /* Output tree: - /tmp/tmplju98s42/busco/ - ├── test-bacteria_odb10-busco -> /tmp/tmp0oru9_61/9c/e992f5eee84806770002e4510f51cb/test-bacteria_odb10-busco/ - │ ├── batch_summary.txt + /tmp/tmpzwd5dn56/busco/ + ├── short_summary.specific.bacteria_odb10.proteome.fasta.json -> /tmp/tmpk1nlgbf_/ae/0db07b5cd08fb23d0aba5f134ebbe2/short_summary.specific.bacteria_odb10.proteome.fasta.json + ├── short_summary.specific.bacteria_odb10.proteome.fasta.txt -> /tmp/tmpk1nlgbf_/ae/0db07b5cd08fb23d0aba5f134ebbe2/short_summary.specific.bacteria_odb10.proteome.fasta.txt + ├── test-bacteria_odb10-busco -> /tmp/tmpk1nlgbf_/ae/0db07b5cd08fb23d0aba5f134ebbe2/test-bacteria_odb10-busco/ │ ├── logs/ │ │ └── busco.log │ └── proteome.fasta/ │ ├── logs/ │ │ ├── hmmsearch_err.log │ │ └── hmmsearch_out.log - │ ├── run_bacteria_odb10/ - │ │ ├── busco_sequences/ - │ │ ├── full_table.tsv - │ │ ├── hmmer_output/ - │ │ ├── missing_busco_list.tsv - │ │ ├── short_summary.json - │ │ └── short_summary.txt - │ ├── short_summary.specific.bacteria_odb10.proteome.fasta.json - │ └── short_summary.specific.bacteria_odb10.proteome.fasta.txt - └── versions.yml -> /tmp/tmp0oru9_61/9c/e992f5eee84806770002e4510f51cb/versions.yml + │ └── run_bacteria_odb10/ + │ ├── busco_sequences/ + │ ├── full_table.tsv + │ ├── hmmer_output/ + │ ├── missing_busco_list.tsv + │ ├── short_summary.json + │ └── short_summary.txt + ├── test-bacteria_odb10-busco.batch_summary.txt -> /tmp/tmpk1nlgbf_/ae/0db07b5cd08fb23d0aba5f134ebbe2/test-bacteria_odb10-busco.batch_summary.txt + └── versions.yml -> /tmp/tmpk1nlgbf_/ae/0db07b5cd08fb23d0aba5f134ebbe2/versions.yml */ } workflow test_busco_transcriptome { @@ -266,9 +266,10 @@ workflow test_busco_transcriptome { ) /* Output tree: - /tmp/tmp5twpr8o9/busco/ - ├── test-bacteria_odb10-busco -> /tmp/tmp_qyjiads/0d/886515d0f06686b2227517398ef8ce/test-bacteria_odb10-busco/ - │ ├── batch_summary.txt + /tmp/tmpitjyvo9g/busco/ + ├── short_summary.specific.bacteria_odb10.test1.contigs.fa.json -> /tmp/tmp6wqi0eyx/4f/ed0b23f0fc807bb68091298845c135/short_summary.specific.bacteria_odb10.test1.contigs.fa.json + ├── short_summary.specific.bacteria_odb10.test1.contigs.fa.txt -> /tmp/tmp6wqi0eyx/4f/ed0b23f0fc807bb68091298845c135/short_summary.specific.bacteria_odb10.test1.contigs.fa.txt + ├── test-bacteria_odb10-busco -> /tmp/tmp6wqi0eyx/4f/ed0b23f0fc807bb68091298845c135/test-bacteria_odb10-busco/ │ ├── logs/ │ │ └── busco.log │ └── test1.contigs.fa/ @@ -296,8 +297,6 @@ workflow test_busco_transcriptome { │ │ ├── short_summary.json │ │ ├── short_summary.txt │ │ └── single_copy_proteins.faa - │ ├── short_summary.specific.bacteria_odb10.test1.contigs.fa.json - │ ├── short_summary.specific.bacteria_odb10.test1.contigs.fa.txt │ └── translated_proteins/ │ ├── 1024388at2.faa │ ├── 1054741at2.faa @@ -321,7 +320,8 @@ workflow test_busco_transcriptome { │ ├── 874197at2.faa │ ├── 932854at2.faa │ └── 95696at2.faa - └── versions.yml -> /tmp/tmp_qyjiads/0d/886515d0f06686b2227517398ef8ce/versions.yml + ├── test-bacteria_odb10-busco.batch_summary.txt -> /tmp/tmp6wqi0eyx/4f/ed0b23f0fc807bb68091298845c135/test-bacteria_odb10-busco.batch_summary.txt + └── versions.yml -> /tmp/tmp6wqi0eyx/4f/ed0b23f0fc807bb68091298845c135/versions.yml */ } diff --git a/tests/modules/busco/test.yml b/tests/modules/busco/test.yml index 2125c3a4..b838d9b7 100644 --- a/tests/modules/busco/test.yml +++ b/tests/modules/busco/test.yml @@ -2,9 +2,39 @@ command: nextflow run tests/modules/busco -entry test_busco_genome_single_fasta -c tests/config/nextflow.config tags: - busco - - bacteria - - genome files: + - path: output/busco/short_summary.specific.bacteria_odb10.genome.fna.json + contains: + - 'one_line_summary' + - 'input_file' + - 'mode' + - 'dataset' + - path: output/busco/short_summary.specific.bacteria_odb10.genome.fna.txt + contains: + - 'BUSCO version' + - 'The lineage dataset is' + - 'BUSCO was run in mode' + - 'Complete BUSCOs' + - 'Missing BUSCOs' + - 'Dependencies and versions' + - path: output/busco/short_summary.specific.bacteroidetes_odb10.genome.fna.json + contains: + - 'one_line_summary' + - 'input_file' + - 'mode' + - 'dataset' + - path: output/busco/short_summary.specific.bacteroidetes_odb10.genome.fna.txt + contains: + - 'BUSCO version' + - 'The lineage dataset is' + - 'BUSCO was run in mode' + - 'Complete BUSCOs' + - 'Missing BUSCOs' + - 'Dependencies and versions' + - path: output/busco/test-bacteria_odb10-busco.batch_summary.txt + md5sum: e50690742e9ae6abdd2bf99334ff9e12 + - path: output/busco/test-bacteroidetes_odb10-busco.batch_summary.txt + md5sum: 4c1b2c4317c88398eddc30877ed740d9 - path: output/busco/versions.yml md5sum: 8aa830f71587d859df35c6cfab59f35d @@ -12,9 +42,37 @@ command: nextflow run tests/modules/busco -entry test_busco_genome_multi_fasta -c tests/config/nextflow.config tags: - busco - - bacteria - - genome files: + - path: output/busco/short_summary.specific.bacteria_odb10.genome.fasta.json + contains: + - 'one_line_summary' + - 'input_file' + - 'mode' + - 'dataset' + - path: output/busco/short_summary.specific.bacteria_odb10.genome.fasta.txt + contains: + - 'BUSCO version' + - 'The lineage dataset is' + - 'BUSCO was run in mode' + - 'Complete BUSCOs' + - 'Missing BUSCOs' + - 'Dependencies and versions' + - path: output/busco/short_summary.specific.bacteria_odb10.genome.fna.json + contains: + - 'one_line_summary' + - 'input_file' + - 'mode' + - 'dataset' + - path: output/busco/short_summary.specific.bacteria_odb10.genome.fna.txt + contains: + - 'BUSCO version' + - 'The lineage dataset is' + - 'BUSCO was run in mode' + - 'Complete BUSCOs' + - 'Missing BUSCOs' + - 'Dependencies and versions' + - path: output/busco/test-bacteria_odb10-busco.batch_summary.txt + md5sum: 5360dfe83bec1f5741ee115e53e6b517 - path: output/busco/versions.yml md5sum: 9a959eb0a1f765777dff1ea2f5c139c0 @@ -22,10 +80,23 @@ command: nextflow run tests/modules/busco -entry test_busco_eukaryote_metaeuk -c tests/config/nextflow.config tags: - busco - - eukaryote - - genome - - metaeuk files: + - path: output/busco/short_summary.specific.eukaryota_odb10.genome.fasta.json + contains: + - 'one_line_summary' + - 'input_file' + - 'mode' + - 'dataset' + - path: output/busco/short_summary.specific.eukaryota_odb10.genome.fasta.txt + contains: + - 'BUSCO version' + - 'The lineage dataset is' + - 'BUSCO was run in mode' + - 'Complete BUSCOs' + - 'Missing BUSCOs' + - 'Dependencies and versions' + - path: output/busco/test-eukaryota_odb10-busco.batch_summary.txt + md5sum: a70806f99ba5706d7353d3353b3f1d2b - path: output/busco/versions.yml md5sum: 34a808c257e6db1b0456f3b4372bc477 @@ -33,10 +104,9 @@ command: nextflow run tests/modules/busco -entry test_busco_eukaryote_augustus -c tests/config/nextflow.config tags: - busco - - eukaryote - - genome - - augustus files: + - path: output/busco/test-eukaryota_odb10-busco.batch_summary.txt + md5sum: 660393dd43cd6a093b952d4b8ad41e40 - path: output/busco/versions.yml md5sum: 2caac915461410b16a1524ac064cd0df @@ -44,9 +114,23 @@ command: nextflow run tests/modules/busco -entry test_busco_protein -c tests/config/nextflow.config tags: - busco - - bacteria - - proteins files: + - path: output/busco/short_summary.specific.bacteria_odb10.proteome.fasta.json + contains: + - 'one_line_summary' + - 'input_file' + - 'mode' + - 'dataset' + - path: output/busco/short_summary.specific.bacteria_odb10.proteome.fasta.txt + contains: + - 'BUSCO version' + - 'The lineage dataset is' + - 'BUSCO was run in mode' + - 'Complete BUSCOs' + - 'Missing BUSCOs' + - 'Dependencies and versions' + - path: output/busco/test-bacteria_odb10-busco.batch_summary.txt + md5sum: fd3b4e30ce74d1fcb95d6286d6e2049f - path: output/busco/versions.yml md5sum: d7392261a57960a7e6aea609dce824f5 @@ -54,8 +138,22 @@ command: nextflow run tests/modules/busco -entry test_busco_transcriptome -c tests/config/nextflow.config tags: - busco - - bacteria - - transcriptome files: + - path: output/busco/short_summary.specific.bacteria_odb10.test1.contigs.fa.json + contains: + - 'one_line_summary' + - 'input_file' + - 'mode' + - 'dataset' + - path: output/busco/short_summary.specific.bacteria_odb10.test1.contigs.fa.txt + contains: + - 'BUSCO version' + - 'The lineage dataset is' + - 'BUSCO was run in mode' + - 'Complete BUSCOs' + - 'Missing BUSCOs' + - 'Dependencies and versions' + - path: output/busco/test-bacteria_odb10-busco.batch_summary.txt + md5sum: 9a176cafe66ac0adca89dc34ad2be13f - path: output/busco/versions.yml md5sum: 30eacbc7df70f6b1e72e0a7b6d02a7e1 From f65abe1e9a4e9d9932772a4d2355666b9cac9e61 Mon Sep 17 00:00:00 2001 From: Mahesh Binzer-Panchal Date: Wed, 4 May 2022 11:54:51 +0000 Subject: [PATCH 071/100] Prettier --- tests/modules/busco/test.yml | 140 +++++++++++++++++------------------ 1 file changed, 70 insertions(+), 70 deletions(-) diff --git a/tests/modules/busco/test.yml b/tests/modules/busco/test.yml index b838d9b7..43b810ba 100644 --- a/tests/modules/busco/test.yml +++ b/tests/modules/busco/test.yml @@ -5,32 +5,32 @@ files: - path: output/busco/short_summary.specific.bacteria_odb10.genome.fna.json contains: - - 'one_line_summary' - - 'input_file' - - 'mode' - - 'dataset' + - "one_line_summary" + - "input_file" + - "mode" + - "dataset" - path: output/busco/short_summary.specific.bacteria_odb10.genome.fna.txt contains: - - 'BUSCO version' - - 'The lineage dataset is' - - 'BUSCO was run in mode' - - 'Complete BUSCOs' - - 'Missing BUSCOs' - - 'Dependencies and versions' + - "BUSCO version" + - "The lineage dataset is" + - "BUSCO was run in mode" + - "Complete BUSCOs" + - "Missing BUSCOs" + - "Dependencies and versions" - path: output/busco/short_summary.specific.bacteroidetes_odb10.genome.fna.json contains: - - 'one_line_summary' - - 'input_file' - - 'mode' - - 'dataset' + - "one_line_summary" + - "input_file" + - "mode" + - "dataset" - path: output/busco/short_summary.specific.bacteroidetes_odb10.genome.fna.txt contains: - - 'BUSCO version' - - 'The lineage dataset is' - - 'BUSCO was run in mode' - - 'Complete BUSCOs' - - 'Missing BUSCOs' - - 'Dependencies and versions' + - "BUSCO version" + - "The lineage dataset is" + - "BUSCO was run in mode" + - "Complete BUSCOs" + - "Missing BUSCOs" + - "Dependencies and versions" - path: output/busco/test-bacteria_odb10-busco.batch_summary.txt md5sum: e50690742e9ae6abdd2bf99334ff9e12 - path: output/busco/test-bacteroidetes_odb10-busco.batch_summary.txt @@ -45,32 +45,32 @@ files: - path: output/busco/short_summary.specific.bacteria_odb10.genome.fasta.json contains: - - 'one_line_summary' - - 'input_file' - - 'mode' - - 'dataset' + - "one_line_summary" + - "input_file" + - "mode" + - "dataset" - path: output/busco/short_summary.specific.bacteria_odb10.genome.fasta.txt contains: - - 'BUSCO version' - - 'The lineage dataset is' - - 'BUSCO was run in mode' - - 'Complete BUSCOs' - - 'Missing BUSCOs' - - 'Dependencies and versions' + - "BUSCO version" + - "The lineage dataset is" + - "BUSCO was run in mode" + - "Complete BUSCOs" + - "Missing BUSCOs" + - "Dependencies and versions" - path: output/busco/short_summary.specific.bacteria_odb10.genome.fna.json contains: - - 'one_line_summary' - - 'input_file' - - 'mode' - - 'dataset' + - "one_line_summary" + - "input_file" + - "mode" + - "dataset" - path: output/busco/short_summary.specific.bacteria_odb10.genome.fna.txt contains: - - 'BUSCO version' - - 'The lineage dataset is' - - 'BUSCO was run in mode' - - 'Complete BUSCOs' - - 'Missing BUSCOs' - - 'Dependencies and versions' + - "BUSCO version" + - "The lineage dataset is" + - "BUSCO was run in mode" + - "Complete BUSCOs" + - "Missing BUSCOs" + - "Dependencies and versions" - path: output/busco/test-bacteria_odb10-busco.batch_summary.txt md5sum: 5360dfe83bec1f5741ee115e53e6b517 - path: output/busco/versions.yml @@ -83,18 +83,18 @@ files: - path: output/busco/short_summary.specific.eukaryota_odb10.genome.fasta.json contains: - - 'one_line_summary' - - 'input_file' - - 'mode' - - 'dataset' + - "one_line_summary" + - "input_file" + - "mode" + - "dataset" - path: output/busco/short_summary.specific.eukaryota_odb10.genome.fasta.txt contains: - - 'BUSCO version' - - 'The lineage dataset is' - - 'BUSCO was run in mode' - - 'Complete BUSCOs' - - 'Missing BUSCOs' - - 'Dependencies and versions' + - "BUSCO version" + - "The lineage dataset is" + - "BUSCO was run in mode" + - "Complete BUSCOs" + - "Missing BUSCOs" + - "Dependencies and versions" - path: output/busco/test-eukaryota_odb10-busco.batch_summary.txt md5sum: a70806f99ba5706d7353d3353b3f1d2b - path: output/busco/versions.yml @@ -117,18 +117,18 @@ files: - path: output/busco/short_summary.specific.bacteria_odb10.proteome.fasta.json contains: - - 'one_line_summary' - - 'input_file' - - 'mode' - - 'dataset' + - "one_line_summary" + - "input_file" + - "mode" + - "dataset" - path: output/busco/short_summary.specific.bacteria_odb10.proteome.fasta.txt contains: - - 'BUSCO version' - - 'The lineage dataset is' - - 'BUSCO was run in mode' - - 'Complete BUSCOs' - - 'Missing BUSCOs' - - 'Dependencies and versions' + - "BUSCO version" + - "The lineage dataset is" + - "BUSCO was run in mode" + - "Complete BUSCOs" + - "Missing BUSCOs" + - "Dependencies and versions" - path: output/busco/test-bacteria_odb10-busco.batch_summary.txt md5sum: fd3b4e30ce74d1fcb95d6286d6e2049f - path: output/busco/versions.yml @@ -141,18 +141,18 @@ files: - path: output/busco/short_summary.specific.bacteria_odb10.test1.contigs.fa.json contains: - - 'one_line_summary' - - 'input_file' - - 'mode' - - 'dataset' + - "one_line_summary" + - "input_file" + - "mode" + - "dataset" - path: output/busco/short_summary.specific.bacteria_odb10.test1.contigs.fa.txt contains: - - 'BUSCO version' - - 'The lineage dataset is' - - 'BUSCO was run in mode' - - 'Complete BUSCOs' - - 'Missing BUSCOs' - - 'Dependencies and versions' + - "BUSCO version" + - "The lineage dataset is" + - "BUSCO was run in mode" + - "Complete BUSCOs" + - "Missing BUSCOs" + - "Dependencies and versions" - path: output/busco/test-bacteria_odb10-busco.batch_summary.txt md5sum: 9a176cafe66ac0adca89dc34ad2be13f - path: output/busco/versions.yml From 6b8ca501ed2d20e7d021f56cb6b15406cc4e584c Mon Sep 17 00:00:00 2001 From: Carpanzano Date: Wed, 4 May 2022 16:34:52 +0200 Subject: [PATCH 072/100] 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 073/100] 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 074/100] 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 075/100] 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 076/100] 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 077/100] 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 078/100] 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 079/100] 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 080/100] 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 081/100] 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 865ad3447a2b74167a25f36e0471f7dbe42fce97 Mon Sep 17 00:00:00 2001 From: Mahesh Binzer-Panchal Date: Thu, 5 May 2022 08:23:54 +0000 Subject: [PATCH 082/100] Update meta.yml output files --- modules/busco/meta.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/modules/busco/meta.yml b/modules/busco/meta.yml index 007d5e7c..19c2c991 100644 --- a/modules/busco/meta.yml +++ b/modules/busco/meta.yml @@ -40,6 +40,18 @@ output: description: | Groovy Map containing sample information e.g. [ id:'test', single_end:false ] + - batch_summary: + type: file + description: Summary of all sequence files analyzed + pattern: "*-busco.batch_summary.txt" + - short_summaries_txt: + type: file + description: Short Busco summary in plain text format + pattern: "short_summary.*.txt" + - short_summaries_json: + type: file + description: Short Busco summary in JSON format + pattern: "short_summary.*.json" - busco_dir: type: directory description: BUSCO lineage specific output From 204dfba2d8635d1a73255538441544a0c1501d4d Mon Sep 17 00:00:00 2001 From: Carpanzano Date: Thu, 5 May 2022 10:51:22 +0200 Subject: [PATCH 083/100] 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 084/100] 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 085/100] 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 From 2542ae1823d57777434a63849e217eabf97b3a8e Mon Sep 17 00:00:00 2001 From: Mahesh Binzer-Panchal Date: Thu, 5 May 2022 16:33:32 +0200 Subject: [PATCH 086/100] Update modules/busco/main.nf Co-authored-by: Sateesh Peri <33637490+sateeshperi@users.noreply.github.com> --- modules/busco/main.nf | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/busco/main.nf b/modules/busco/main.nf index f6bd63e2..15e7ce5c 100644 --- a/modules/busco/main.nf +++ b/modules/busco/main.nf @@ -8,10 +8,10 @@ process BUSCO { 'quay.io/biocontainers/busco:5.3.2--pyhdfd78af_0' }" input: - tuple val(meta), path(fasta, stageAs: 'tmp_input/*') // Required: meta map, and fasta sequence files - each lineage // Required: lineage to check against - path busco_lineages_path // Recommended: path to busco lineages - downloads if not set - path config_file // Optional: busco configuration file + tuple val(meta), path('tmp_input/*') // Required: meta map, and fasta sequence files + each lineage // Required: lineage to check against + path busco_lineages_path // Recommended: path to busco lineages - downloads if not set + path config_file // Optional: busco configuration file output: tuple val(meta), path("*-busco.batch_summary.txt"), emit: batch_summary From 1289626cc99eecb3436bd067cd90a85028957d5f Mon Sep 17 00:00:00 2001 From: Harshil Patel Date: Thu, 5 May 2022 16:09:45 +0100 Subject: [PATCH 087/100] Update modules/busco/main.nf --- modules/busco/main.nf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/busco/main.nf b/modules/busco/main.nf index 15e7ce5c..8c1b1dad 100644 --- a/modules/busco/main.nf +++ b/modules/busco/main.nf @@ -8,7 +8,7 @@ process BUSCO { 'quay.io/biocontainers/busco:5.3.2--pyhdfd78af_0' }" input: - tuple val(meta), path('tmp_input/*') // Required: meta map, and fasta sequence files + tuple val(meta), path('tmp_input/*') each lineage // Required: lineage to check against path busco_lineages_path // Recommended: path to busco lineages - downloads if not set path config_file // Optional: busco configuration file From ea1f5daf449190dd3b8550c1307f14aa3371413d Mon Sep 17 00:00:00 2001 From: Ramprasad Neethiraj <20065894+ramprasadn@users.noreply.github.com> Date: Thu, 5 May 2022 17:28:49 +0200 Subject: [PATCH 088/100] polish python script in view --- modules/cnvpytor/view/main.nf | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/modules/cnvpytor/view/main.nf b/modules/cnvpytor/view/main.nf index 72726615..ad2249b8 100644 --- a/modules/cnvpytor/view/main.nf +++ b/modules/cnvpytor/view/main.nf @@ -29,16 +29,14 @@ process CNVPYTOR_VIEW { python3 < versions.yml From e4e4f8090caa7c2f3fd71caa62792a1ea9ff4b59 Mon Sep 17 00:00:00 2001 From: Ramprasad Neethiraj <20065894+ramprasadn@users.noreply.github.com> Date: Thu, 5 May 2022 23:59:12 +0200 Subject: [PATCH 089/100] combine multiple pytor --- modules/cnvpytor/view/main.nf | 16 +++++++++------- tests/modules/cnvpytor/view/main.nf | 6 +++--- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/modules/cnvpytor/view/main.nf b/modules/cnvpytor/view/main.nf index ad2249b8..1bb61a38 100644 --- a/modules/cnvpytor/view/main.nf +++ b/modules/cnvpytor/view/main.nf @@ -8,7 +8,7 @@ process CNVPYTOR_VIEW { 'quay.io/biocontainers/cnvpytor:1.2.1--pyhdfd78af_0' }" input: - tuple val(meta), path(pytor) + tuple val(meta), path(pytor_files) val bin_sizes val output_format @@ -23,17 +23,18 @@ process CNVPYTOR_VIEW { script: def output_suffix = output_format ?: 'vcf' - def bins = bin_sizes ?: '1000' + def bins = bin_sizes ?: '1000' + def input = pytor_files.join(" ") + def prefix = task.ext.prefix ?: "${meta.id}" """ python3 < versions.yml "${task.process}": diff --git a/tests/modules/cnvpytor/view/main.nf b/tests/modules/cnvpytor/view/main.nf index b865dd6d..3b99c314 100644 --- a/tests/modules/cnvpytor/view/main.nf +++ b/tests/modules/cnvpytor/view/main.nf @@ -8,7 +8,7 @@ workflow test_cnvpytor_view { input = [ [ id:'test'], // meta map - file(params.test_data['homo_sapiens']['illumina']['test_pytor'], checkIfExists: true) + [file(params.test_data['homo_sapiens']['illumina']['test_pytor'], checkIfExists: true)] ] bin_sizes = "10000 100000" @@ -20,7 +20,7 @@ workflow test_cnvpytor_view_tsvout { input = [ [ id:'test'], // meta map - file(params.test_data['homo_sapiens']['illumina']['test_pytor'], checkIfExists: true) + [file(params.test_data['homo_sapiens']['illumina']['test_pytor'], checkIfExists: true)] ] output_suffix = "tsv" @@ -32,7 +32,7 @@ workflow test_cnvpytor_view_stub { input = [ [ id:'test'], // meta map - file(params.test_data['homo_sapiens']['illumina']['test_pytor'], checkIfExists: true) + [file(params.test_data['homo_sapiens']['illumina']['test_pytor'], checkIfExists: true)] ] bin_sizes = [] From af73544010cc9563ec7d7160aeb825ae28ec217f Mon Sep 17 00:00:00 2001 From: Ramprasad Neethiraj <20065894+ramprasadn@users.noreply.github.com> Date: Fri, 6 May 2022 00:13:49 +0200 Subject: [PATCH 090/100] update meta --- modules/cnvpytor/view/meta.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/cnvpytor/view/meta.yml b/modules/cnvpytor/view/meta.yml index 1392e90e..e4e68fad 100644 --- a/modules/cnvpytor/view/meta.yml +++ b/modules/cnvpytor/view/meta.yml @@ -17,9 +17,9 @@ input: description: | Groovy Map containing sample information e.g. [ id:'test' ] - - pytor: + - pytor_files: type: file - description: pytor file containing read depth data + description: pytor file containing cnv calls. To merge calls from multiple samples use a list of files. pattern: "*.{pytor}" - bin_sizes: type: string From 313d76e00525c8e975dabce0c34973fd53c3f4dd Mon Sep 17 00:00:00 2001 From: Ramprasad Neethiraj <20065894+ramprasadn@users.noreply.github.com> Date: Fri, 6 May 2022 00:18:16 +0200 Subject: [PATCH 091/100] update svdb version --- modules/svdb/merge/main.nf | 6 +++--- modules/svdb/query/main.nf | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/modules/svdb/merge/main.nf b/modules/svdb/merge/main.nf index 4a39940c..0d56fea2 100644 --- a/modules/svdb/merge/main.nf +++ b/modules/svdb/merge/main.nf @@ -2,10 +2,10 @@ process SVDB_MERGE { tag "$meta.id" label 'process_medium' - conda (params.enable_conda ? "bioconda::svdb=2.6.0" : null) + conda (params.enable_conda ? "bioconda::svdb=2.6.1" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/svdb:2.6.0--py39h5371cbf_0': - 'quay.io/biocontainers/svdb:2.6.0--py39h5371cbf_0' }" + 'https://depot.galaxyproject.org/singularity/svdb:2.6.1--py39h5371cbf_0': + 'quay.io/biocontainers/svdb:2.6.1--py39h5371cbf_0' }" input: tuple val(meta), path(vcfs) diff --git a/modules/svdb/query/main.nf b/modules/svdb/query/main.nf index c669b5a5..dbab5259 100644 --- a/modules/svdb/query/main.nf +++ b/modules/svdb/query/main.nf @@ -2,10 +2,10 @@ process SVDB_QUERY { tag "$meta.id" label 'process_medium' - conda (params.enable_conda ? "bioconda::svdb=2.6.0" : null) + conda (params.enable_conda ? "bioconda::svdb=2.6.1" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/svdb:2.6.0--py39h5371cbf_0': - 'quay.io/biocontainers/svdb:2.6.0--py39h5371cbf_0' }" + 'https://depot.galaxyproject.org/singularity/svdb:2.6.1--py39h5371cbf_0': + 'quay.io/biocontainers/svdb:2.6.1--py39h5371cbf_0' }" input: tuple val(meta), path(vcf) From 853b623969357753468365aa538eb92b2bcb8ce9 Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Fri, 6 May 2022 09:20:40 +0200 Subject: [PATCH 092/100] new module: md5sum --- modules/md5sum/main.nf | 35 +++++++++++++++++++++++++ modules/md5sum/meta.yml | 39 ++++++++++++++++++++++++++++ tests/config/pytest_modules.yml | 12 ++++++--- tests/modules/md5sum/main.nf | 15 +++++++++++ tests/modules/md5sum/nextflow.config | 3 +++ tests/modules/md5sum/test.yml | 8 ++++++ 6 files changed, 108 insertions(+), 4 deletions(-) create mode 100644 modules/md5sum/main.nf create mode 100644 modules/md5sum/meta.yml create mode 100644 tests/modules/md5sum/main.nf create mode 100644 tests/modules/md5sum/nextflow.config create mode 100644 tests/modules/md5sum/test.yml diff --git a/modules/md5sum/main.nf b/modules/md5sum/main.nf new file mode 100644 index 00000000..0b101811 --- /dev/null +++ b/modules/md5sum/main.nf @@ -0,0 +1,35 @@ +process MD5SUM { + tag "$meta.id" + label 'process_low' + + if (params.enable_conda) { + exit 1, "Conda environments cannot be used when using bcl-convert. Please use docker or singularity containers." + } + container "debian:bullseye-slim" + + input: + tuple val(meta), path(file) + + output: + tuple val(meta), path("*.md5"), emit: checksum + 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}" + + """ + md5sum \\ + $args \\ + ${file} \\ + > ${file}.md5 + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + md5sum: \$(echo \$(md5sum --version 2>&1 | head -n 1| sed 's/^.*) //;' )) + END_VERSIONS + """ +} diff --git a/modules/md5sum/meta.yml b/modules/md5sum/meta.yml new file mode 100644 index 00000000..d4f1939d --- /dev/null +++ b/modules/md5sum/meta.yml @@ -0,0 +1,39 @@ +name: "md5sum" +description: Create an MD5 (128-bit) checksum +keywords: + - checksum +tools: + - "md5sum": + description: Create an MD5 (128-bit) checksum + homepage: "https://www.gnu.org" + documentation: "https://man7.org/linux/man-pages/man1/md5sum.1.html" + licence: GPLv3+ + +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - file: + type: file + description: Any file + pattern: "*.*" + +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" + - checksum: + type: file + description: File containing checksum + pattern: "*.md5" + +authors: + - "@matthdsm" diff --git a/tests/config/pytest_modules.yml b/tests/config/pytest_modules.yml index 81f98d59..a5a7c083 100644 --- a/tests/config/pytest_modules.yml +++ b/tests/config/pytest_modules.yml @@ -1058,10 +1058,6 @@ krona/kronadb: - modules/krona/kronadb/** - tests/modules/krona/kronadb/** -krona/ktupdatetaxonomy: - - modules/krona/ktupdatetaxonomy/** - - tests/modules/krona/ktupdatetaxonomy/** - krona/ktimporttaxonomy: - modules/krona/ktimporttaxonomy/** - tests/modules/krona/ktimporttaxonomy/** @@ -1070,6 +1066,10 @@ krona/ktimporttext: - modules/krona/ktimporttext/** - tests/modules/krona/ktimporttext/** +krona/ktupdatetaxonomy: + - modules/krona/ktupdatetaxonomy/** + - tests/modules/krona/ktupdatetaxonomy/** + last/dotplot: - modules/last/dotplot/** - tests/modules/last/dotplot/** @@ -1190,6 +1190,10 @@ maxbin2: - modules/maxbin2/** - tests/modules/maxbin2/** +md5sum: + - modules/md5sum/** + - tests/modules/md5sum/** + medaka: - modules/medaka/** - tests/modules/medaka/** diff --git a/tests/modules/md5sum/main.nf b/tests/modules/md5sum/main.nf new file mode 100644 index 00000000..f90642b6 --- /dev/null +++ b/tests/modules/md5sum/main.nf @@ -0,0 +1,15 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { MD5SUM } from '../../../modules/md5sum/main.nf' + +workflow test_md5sum { + + input = [ + [ id:'test', single_end:false ], // meta map + file(params.test_data['sarscov2']['illumina']['test_paired_end_bam'], checkIfExists: true) + ] + + MD5SUM ( input ) +} diff --git a/tests/modules/md5sum/nextflow.config b/tests/modules/md5sum/nextflow.config new file mode 100644 index 00000000..0293c16f --- /dev/null +++ b/tests/modules/md5sum/nextflow.config @@ -0,0 +1,3 @@ +process { + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } +} diff --git a/tests/modules/md5sum/test.yml b/tests/modules/md5sum/test.yml new file mode 100644 index 00000000..1e6517a7 --- /dev/null +++ b/tests/modules/md5sum/test.yml @@ -0,0 +1,8 @@ +- name: md5sum test_md5sum + command: nextflow run tests/modules/md5sum -entry test_md5sum -c tests/config/nextflow.config + tags: + - md5sum + files: + - path: output/md5sum/test.paired_end.bam.md5 + md5sum: 1163095be8fdfb2acb3cc6c027389c4b + - path: output/md5sum/versions.yml From 09e729ad414bc51d91b487edf720e7bb9b80abb7 Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Fri, 6 May 2022 10:28:14 +0200 Subject: [PATCH 093/100] added sha256sum --- modules/shasum/main.nf | 35 ++++++++++++++++++++++++ modules/shasum/meta.yml | 40 ++++++++++++++++++++++++++++ tests/config/pytest_modules.yml | 4 +++ tests/modules/shasum/main.nf | 15 +++++++++++ tests/modules/shasum/nextflow.config | 5 ++++ tests/modules/shasum/test.yml | 8 ++++++ 6 files changed, 107 insertions(+) create mode 100644 modules/shasum/main.nf create mode 100644 modules/shasum/meta.yml create mode 100644 tests/modules/shasum/main.nf create mode 100644 tests/modules/shasum/nextflow.config create mode 100644 tests/modules/shasum/test.yml diff --git a/modules/shasum/main.nf b/modules/shasum/main.nf new file mode 100644 index 00000000..a2c37da7 --- /dev/null +++ b/modules/shasum/main.nf @@ -0,0 +1,35 @@ +process SHASUM { + tag "$meta.id" + label 'process_low' + + if (params.enable_conda) { + exit 1, "Conda environments cannot be used when using bcl-convert. Please use docker or singularity containers." + } + container "debian:bullseye-slim" + + input: + tuple val(meta), path(file) + + output: + tuple val(meta), path("*.sha256"), emit: checksum + 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}" + + """ + sha256sum \\ + $args \\ + ${file} \\ + > ${file}.sha256 + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + sha256sum: \$(echo \$(sha256sum --version 2>&1 | head -n 1| sed 's/^.*) //;' )) + END_VERSIONS + """ +} diff --git a/modules/shasum/meta.yml b/modules/shasum/meta.yml new file mode 100644 index 00000000..f16e0771 --- /dev/null +++ b/modules/shasum/meta.yml @@ -0,0 +1,40 @@ +name: "shasum" +description: Print SHA256 (256-bit) checksums. +keywords: + - checksum + - sha256 +tools: + - "md5sum": + description: Create an SHA256 (256-bit) checksum. + homepage: "https://www.gnu.org" + documentation: "https://linux.die.net/man/1/shasum" + licence: GPLv3+ + +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - file: + type: file + description: Any file + pattern: "*.*" + +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" + - checksum: + type: file + description: File containing checksum + pattern: "*.sha256" + +authors: + - "@matthdsm" diff --git a/tests/config/pytest_modules.yml b/tests/config/pytest_modules.yml index a5a7c083..effe6fe2 100644 --- a/tests/config/pytest_modules.yml +++ b/tests/config/pytest_modules.yml @@ -1739,6 +1739,10 @@ seqwish/induce: - modules/seqwish/induce/** - tests/modules/seqwish/induce/** +shasum: + - modules/shasum/** + - tests/modules/shasum/** + shigatyper: - modules/shigatyper/** - tests/modules/shigatyper/** diff --git a/tests/modules/shasum/main.nf b/tests/modules/shasum/main.nf new file mode 100644 index 00000000..817ea6f0 --- /dev/null +++ b/tests/modules/shasum/main.nf @@ -0,0 +1,15 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { SHASUM } from '../../../modules/shasum/main.nf' + +workflow test_shasum { + + input = [ + [ id:'test', single_end:false ], // meta map + file(params.test_data['sarscov2']['illumina']['test_paired_end_bam'], checkIfExists: true) + ] + + SHASUM ( input ) +} diff --git a/tests/modules/shasum/nextflow.config b/tests/modules/shasum/nextflow.config new file mode 100644 index 00000000..50f50a7a --- /dev/null +++ b/tests/modules/shasum/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/shasum/test.yml b/tests/modules/shasum/test.yml new file mode 100644 index 00000000..6778d156 --- /dev/null +++ b/tests/modules/shasum/test.yml @@ -0,0 +1,8 @@ +- name: shasum test_shasum + command: nextflow run tests/modules/shasum -entry test_shasum -c tests/config/nextflow.config + tags: + - shasum + files: + - path: output/shasum/test.paired_end.bam.sha256 + md5sum: 138a19e100f09fc975ea1b717da9b6dd + - path: output/shasum/versions.yml From 77d825e0439c4d9a1d68a329c97012e4b99f3e40 Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Fri, 6 May 2022 10:39:13 +0200 Subject: [PATCH 094/100] fix copy paste errors --- modules/md5sum/main.nf | 2 +- modules/shasum/main.nf | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/md5sum/main.nf b/modules/md5sum/main.nf index 0b101811..2cdb8bf6 100644 --- a/modules/md5sum/main.nf +++ b/modules/md5sum/main.nf @@ -3,7 +3,7 @@ process MD5SUM { label 'process_low' if (params.enable_conda) { - exit 1, "Conda environments cannot be used when using bcl-convert. Please use docker or singularity containers." + exit 1, "Conda environments cannot be used when using md5sum. Please use docker or singularity containers." } container "debian:bullseye-slim" diff --git a/modules/shasum/main.nf b/modules/shasum/main.nf index a2c37da7..e7a18da6 100644 --- a/modules/shasum/main.nf +++ b/modules/shasum/main.nf @@ -3,7 +3,7 @@ process SHASUM { label 'process_low' if (params.enable_conda) { - exit 1, "Conda environments cannot be used when using bcl-convert. Please use docker or singularity containers." + exit 1, "Conda environments cannot be used when using sha256sum. Please use docker or singularity containers." } container "debian:bullseye-slim" From 1c7205d68389a899ee6b4f8c11343701c2c07ce8 Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Fri, 6 May 2022 10:44:51 +0200 Subject: [PATCH 095/100] fixed container definitions --- modules/md5sum/main.nf | 8 ++++---- modules/shasum/main.nf | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/modules/md5sum/main.nf b/modules/md5sum/main.nf index 2cdb8bf6..7b66625e 100644 --- a/modules/md5sum/main.nf +++ b/modules/md5sum/main.nf @@ -2,10 +2,10 @@ process MD5SUM { tag "$meta.id" label 'process_low' - if (params.enable_conda) { - exit 1, "Conda environments cannot be used when using md5sum. Please use docker or singularity containers." - } - container "debian:bullseye-slim" + conda (params.enable_conda ? "conda-forge::coreutils=8.25" : null) + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/coreutils:8.31--h14c3975_0' : + 'quay.io/biocontainers/coreutils:8.31--h14c3975_0' }" input: tuple val(meta), path(file) diff --git a/modules/shasum/main.nf b/modules/shasum/main.nf index e7a18da6..11f9376c 100644 --- a/modules/shasum/main.nf +++ b/modules/shasum/main.nf @@ -2,10 +2,10 @@ process SHASUM { tag "$meta.id" label 'process_low' - if (params.enable_conda) { - exit 1, "Conda environments cannot be used when using sha256sum. Please use docker or singularity containers." - } - container "debian:bullseye-slim" + conda (params.enable_conda ? "conda-forge::coreutils=8.25" : null) + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/coreutils:8.31--h14c3975_0' : + 'quay.io/biocontainers/coreutils:8.31--h14c3975_0' }" input: tuple val(meta), path(file) From 1ccea5ff4d3dffbf9a8e53032481cc9246d4e23d Mon Sep 17 00:00:00 2001 From: Ramprasad Neethiraj <20065894+ramprasadn@users.noreply.github.com> Date: Fri, 6 May 2022 10:56:58 +0200 Subject: [PATCH 096/100] remove prefix def in callcnvs --- modules/cnvpytor/callcnvs/main.nf | 1 - 1 file changed, 1 deletion(-) diff --git a/modules/cnvpytor/callcnvs/main.nf b/modules/cnvpytor/callcnvs/main.nf index 092f6def..69c9d40e 100644 --- a/modules/cnvpytor/callcnvs/main.nf +++ b/modules/cnvpytor/callcnvs/main.nf @@ -20,7 +20,6 @@ process CNVPYTOR_CALLCNVS { script: def bins = bin_sizes ?: '1000' - def prefix = task.ext.prefix ?: "${meta.id}" """ cnvpytor \\ -root $pytor \\ From bd1b80f36e1b9a978e598e4b47f6705ede34da37 Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Fri, 6 May 2022 11:07:05 +0200 Subject: [PATCH 097/100] fix software definitions --- modules/md5sum/main.nf | 6 +++--- modules/shasum/main.nf | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/modules/md5sum/main.nf b/modules/md5sum/main.nf index 7b66625e..2b516f1b 100644 --- a/modules/md5sum/main.nf +++ b/modules/md5sum/main.nf @@ -2,10 +2,10 @@ process MD5SUM { tag "$meta.id" label 'process_low' - conda (params.enable_conda ? "conda-forge::coreutils=8.25" : null) + conda (params.enable_conda ? "conda-forge::coreutils=9.1" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/coreutils:8.31--h14c3975_0' : - 'quay.io/biocontainers/coreutils:8.31--h14c3975_0' }" + 'https://depot.galaxyproject.org/singularity/ubuntu:20.04' : + 'ubuntu:20.04' }" input: tuple val(meta), path(file) diff --git a/modules/shasum/main.nf b/modules/shasum/main.nf index 11f9376c..0e288435 100644 --- a/modules/shasum/main.nf +++ b/modules/shasum/main.nf @@ -2,10 +2,10 @@ process SHASUM { tag "$meta.id" label 'process_low' - conda (params.enable_conda ? "conda-forge::coreutils=8.25" : null) + conda (params.enable_conda ? "conda-forge::coreutils=9.1" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/coreutils:8.31--h14c3975_0' : - 'quay.io/biocontainers/coreutils:8.31--h14c3975_0' }" + 'https://depot.galaxyproject.org/singularity/ubuntu:20.04' : + 'ubuntu:20.04' }" input: tuple val(meta), path(file) From 35c5828f43b50bc029b20b133d3878b3bc16ca9d Mon Sep 17 00:00:00 2001 From: Mahesh Binzer-Panchal Date: Fri, 6 May 2022 11:48:21 +0000 Subject: [PATCH 098/100] Add --auto-lineage option and remove single_end Co-authored-by: Jill V. Hagey, PhD --- modules/busco/main.nf | 5 +-- tests/modules/busco/main.nf | 67 ++++++++++++++++++++++++++---------- tests/modules/busco/test.yml | 30 ++++++++++++++++ 3 files changed, 82 insertions(+), 20 deletions(-) diff --git a/modules/busco/main.nf b/modules/busco/main.nf index 8c1b1dad..f0713862 100644 --- a/modules/busco/main.nf +++ b/modules/busco/main.nf @@ -9,7 +9,7 @@ process BUSCO { input: tuple val(meta), path('tmp_input/*') - each lineage // Required: lineage to check against + each lineage // Required: lineage to check against, "auto" enables --auto-lineage instead path busco_lineages_path // Recommended: path to busco lineages - downloads if not set path config_file // Optional: busco configuration file @@ -27,6 +27,7 @@ process BUSCO { def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}-${lineage}" def busco_config = config_file ? "--config $config_file" : '' + def busco_lineage = lineage.equals('auto') ? '--auto-lineage' : "--lineage_dataset ${lineage}" def busco_lineage_dir = busco_lineages_path ? "--offline --download_path ${busco_lineages_path}" : '' """ # Nextflow changes the container --entrypoint to /bin/bash (container default entrypoint: /usr/local/env-execute) @@ -63,7 +64,7 @@ process BUSCO { --cpu $task.cpus \\ --in "\$INPUT_SEQS" \\ --out ${prefix}-busco \\ - --lineage_dataset $lineage \\ + $busco_lineage \\ $busco_lineage_dir \\ $busco_config \\ $args diff --git a/tests/modules/busco/main.nf b/tests/modules/busco/main.nf index f0201d21..e290b965 100644 --- a/tests/modules/busco/main.nf +++ b/tests/modules/busco/main.nf @@ -4,28 +4,59 @@ nextflow.enable.dsl = 2 include { BUSCO } from '../../../modules/busco/main.nf' -// This tests genome decompression, empty input channels and data download workflow test_busco_genome_single_fasta { input = [ - [ id:'test', single_end:false ], // meta map + [ id:'test' ], // meta map file( params.test_data['bacteroides_fragilis']['genome']['genome_fna_gz'], checkIfExists: true) ] BUSCO ( input, - ['bacteria_odb10', 'bacteroidetes_odb10'], + ['auto','bacteria_odb10', 'bacteroidetes_odb10'], // Launch with auto to use --auto-lineage, and specified lineages [], // Download busco lineage [], // No config ) /* Output tree: - /tmp/tmpisa3ktco/busco/ - ├── short_summary.specific.bacteria_odb10.genome.fna.json -> /tmp/tmpm91x0mn2/8a/ff5c15baba0942cca15a8d53e98009/short_summary.specific.bacteria_odb10.genome.fna.json - ├── short_summary.specific.bacteria_odb10.genome.fna.txt -> /tmp/tmpm91x0mn2/8a/ff5c15baba0942cca15a8d53e98009/short_summary.specific.bacteria_odb10.genome.fna.txt - ├── short_summary.specific.bacteroidetes_odb10.genome.fna.json -> /tmp/tmpm91x0mn2/91/3abf602561d35fcd917711402977a3/short_summary.specific.bacteroidetes_odb10.genome.fna.json - ├── short_summary.specific.bacteroidetes_odb10.genome.fna.txt -> /tmp/tmpm91x0mn2/91/3abf602561d35fcd917711402977a3/short_summary.specific.bacteroidetes_odb10.genome.fna.txt - ├── test-bacteria_odb10-busco -> /tmp/tmpm91x0mn2/8a/ff5c15baba0942cca15a8d53e98009/test-bacteria_odb10-busco/ + /tmp/tmp846crjv2/busco/ + ├── short_summary.generic.bacteria_odb10.genome.fna.json -> /tmp/tmpi6af66j1/18/8be22ecd7a71471ff5082bd512972b/short_summary.generic.bacteria_odb10.genome.fna.json + ├── short_summary.generic.bacteria_odb10.genome.fna.txt -> /tmp/tmpi6af66j1/18/8be22ecd7a71471ff5082bd512972b/short_summary.generic.bacteria_odb10.genome.fna.txt + ├── short_summary.specific.bacteria_odb10.genome.fna.json -> /tmp/tmpi6af66j1/45/107812e983a8e695c380ebc215e7d9/short_summary.specific.bacteria_odb10.genome.fna.json + ├── short_summary.specific.bacteria_odb10.genome.fna.txt -> /tmp/tmpi6af66j1/45/107812e983a8e695c380ebc215e7d9/short_summary.specific.bacteria_odb10.genome.fna.txt + ├── short_summary.specific.bacteroidales_odb10.genome.fna.json -> /tmp/tmpi6af66j1/18/8be22ecd7a71471ff5082bd512972b/short_summary.specific.bacteroidales_odb10.genome.fna.json + ├── short_summary.specific.bacteroidales_odb10.genome.fna.txt -> /tmp/tmpi6af66j1/18/8be22ecd7a71471ff5082bd512972b/short_summary.specific.bacteroidales_odb10.genome.fna.txt + ├── short_summary.specific.bacteroidetes_odb10.genome.fna.json -> /tmp/tmpi6af66j1/a2/eb4a34894f3ac5554759ad6c9f652b/short_summary.specific.bacteroidetes_odb10.genome.fna.json + ├── short_summary.specific.bacteroidetes_odb10.genome.fna.txt -> /tmp/tmpi6af66j1/a2/eb4a34894f3ac5554759ad6c9f652b/short_summary.specific.bacteroidetes_odb10.genome.fna.txt + ├── test-auto-busco -> /tmp/tmpi6af66j1/18/8be22ecd7a71471ff5082bd512972b/test-auto-busco/ + │ ├── genome.fna/ + │ │ ├── auto_lineage/ + │ │ │ ├── run_archaea_odb10/ + │ │ │ ├── run_bacteria_odb10/ + │ │ │ └── run_eukaryota_odb10/ + │ │ ├── logs/ + │ │ │ ├── hmmsearch_err.log + │ │ │ ├── hmmsearch_out.log + │ │ │ ├── metaeuk_err.log + │ │ │ ├── metaeuk_out.log + │ │ │ ├── prodigal_err.log + │ │ │ ├── prodigal_out.log + │ │ │ ├── sepp_err.log + │ │ │ └── sepp_out.log + │ │ ├── prodigal_output/ + │ │ │ └── predicted_genes/ + │ │ ├── run_bacteria_odb10 -> /tmp/tmpi6af66j1/18/8be22ecd7a71471ff5082bd512972b/test-auto-busco/genome.fna/auto_lineage/run_bacteria_odb10/ [recursive, not followed] + │ │ └── run_bacteroidales_odb10/ + │ │ ├── busco_sequences/ + │ │ ├── full_table.tsv + │ │ ├── hmmer_output/ + │ │ ├── missing_busco_list.tsv + │ │ ├── short_summary.json + │ │ └── short_summary.txt + │ └── logs/ + │ └── busco.log + ├── test-auto-busco.batch_summary.txt -> /tmp/tmpi6af66j1/18/8be22ecd7a71471ff5082bd512972b/test-auto-busco.batch_summary.txt + ├── test-bacteria_odb10-busco -> /tmp/tmpi6af66j1/45/107812e983a8e695c380ebc215e7d9/test-bacteria_odb10-busco/ │ ├── genome.fna/ │ │ ├── logs/ │ │ │ ├── hmmsearch_err.log @@ -43,8 +74,8 @@ workflow test_busco_genome_single_fasta { │ │ └── short_summary.txt │ └── logs/ │ └── busco.log - ├── test-bacteria_odb10-busco.batch_summary.txt -> /tmp/tmpm91x0mn2/8a/ff5c15baba0942cca15a8d53e98009/test-bacteria_odb10-busco.batch_summary.txt - ├── test-bacteroidetes_odb10-busco -> /tmp/tmpm91x0mn2/91/3abf602561d35fcd917711402977a3/test-bacteroidetes_odb10-busco/ + ├── test-bacteria_odb10-busco.batch_summary.txt -> /tmp/tmpi6af66j1/45/107812e983a8e695c380ebc215e7d9/test-bacteria_odb10-busco.batch_summary.txt + ├── test-bacteroidetes_odb10-busco -> /tmp/tmpi6af66j1/a2/eb4a34894f3ac5554759ad6c9f652b/test-bacteroidetes_odb10-busco/ │ ├── genome.fna/ │ │ ├── logs/ │ │ │ ├── hmmsearch_err.log @@ -62,8 +93,8 @@ workflow test_busco_genome_single_fasta { │ │ └── short_summary.txt │ └── logs/ │ └── busco.log - ├── test-bacteroidetes_odb10-busco.batch_summary.txt -> /tmp/tmpm91x0mn2/91/3abf602561d35fcd917711402977a3/test-bacteroidetes_odb10-busco.batch_summary.txt - └── versions.yml -> /tmp/tmpm91x0mn2/91/3abf602561d35fcd917711402977a3/versions.yml + ├── test-bacteroidetes_odb10-busco.batch_summary.txt -> /tmp/tmpi6af66j1/a2/eb4a34894f3ac5554759ad6c9f652b/test-bacteroidetes_odb10-busco.batch_summary.txt + └── versions.yml -> /tmp/tmpi6af66j1/18/8be22ecd7a71471ff5082bd512972b/versions.yml */ } @@ -71,7 +102,7 @@ workflow test_busco_genome_single_fasta { workflow test_busco_genome_multi_fasta { input = [ - [ id:'test', single_end:false ], // meta map + [ id:'test' ], // meta map [ file( params.test_data['bacteroides_fragilis']['genome']['genome_fna_gz'], checkIfExists: true), file( params.test_data['candidatus_portiera_aleyrodidarum']['genome']['genome_fasta'], checkIfExists: true) @@ -133,7 +164,7 @@ workflow test_busco_genome_multi_fasta { workflow test_busco_eukaryote_metaeuk { input = [ - [ id:'test', single_end:false ], // meta map + [ id:'test' ], // meta map file( params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true) ] @@ -174,7 +205,7 @@ workflow test_busco_eukaryote_metaeuk { workflow test_busco_eukaryote_augustus { input = [ - [ id:'test', single_end:false ], // meta map + [ id:'test' ], // meta map file( params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true) ] @@ -218,7 +249,7 @@ workflow test_busco_eukaryote_augustus { workflow test_busco_protein { input = [ - [ id:'test', single_end:false ], // meta map + [ id:'test' ], // meta map file( params.test_data['candidatus_portiera_aleyrodidarum']['genome']['proteome_fasta'], checkIfExists: true) ] @@ -254,7 +285,7 @@ workflow test_busco_protein { workflow test_busco_transcriptome { input = [ - [ id:'test', single_end:false ], // meta map + [ id:'test' ], // meta map file( params.test_data['bacteroides_fragilis']['illumina']['test1_contigs_fa_gz'], checkIfExists: true) ] diff --git a/tests/modules/busco/test.yml b/tests/modules/busco/test.yml index 43b810ba..2a801e64 100644 --- a/tests/modules/busco/test.yml +++ b/tests/modules/busco/test.yml @@ -3,6 +3,20 @@ tags: - busco files: + - path: output/busco/short_summary.generic.bacteria_odb10.genome.fna.json + contains: + - "one_line_summary" + - "input_file" + - "mode" + - "dataset" + - path: output/busco/short_summary.generic.bacteria_odb10.genome.fna.txt + contains: + - "BUSCO version" + - "The lineage dataset is" + - "BUSCO was run in mode" + - "Complete BUSCOs" + - "Missing BUSCOs" + - "Dependencies and versions" - path: output/busco/short_summary.specific.bacteria_odb10.genome.fna.json contains: - "one_line_summary" @@ -17,6 +31,20 @@ - "Complete BUSCOs" - "Missing BUSCOs" - "Dependencies and versions" + - path: output/busco/short_summary.specific.bacteroidales_odb10.genome.fna.json + contains: + - "one_line_summary" + - "input_file" + - "mode" + - "dataset" + - path: output/busco/short_summary.specific.bacteroidales_odb10.genome.fna.txt + contains: + - "BUSCO version" + - "The lineage dataset is" + - "BUSCO was run in mode" + - "Complete BUSCOs" + - "Missing BUSCOs" + - "Dependencies and versions" - path: output/busco/short_summary.specific.bacteroidetes_odb10.genome.fna.json contains: - "one_line_summary" @@ -31,6 +59,8 @@ - "Complete BUSCOs" - "Missing BUSCOs" - "Dependencies and versions" + - path: output/busco/test-auto-busco.batch_summary.txt + md5sum: 32f7765c310f33555c31c7a3e64c990e - path: output/busco/test-bacteria_odb10-busco.batch_summary.txt md5sum: e50690742e9ae6abdd2bf99334ff9e12 - path: output/busco/test-bacteroidetes_odb10-busco.batch_summary.txt From 9fa6b6c1fc930830c1d819a9273b4ec12ffacb0a Mon Sep 17 00:00:00 2001 From: Mahesh Binzer-Panchal Date: Fri, 6 May 2022 11:56:19 +0000 Subject: [PATCH 099/100] Update meta.yml --- modules/busco/meta.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/busco/meta.yml b/modules/busco/meta.yml index 19c2c991..ef8c5245 100644 --- a/modules/busco/meta.yml +++ b/modules/busco/meta.yml @@ -26,7 +26,7 @@ input: pattern: "*.{fasta,fna,fa,fasta.gz,fna.gz,fa.gz}" - lineage: type: value - description: The BUSCO lineage to use. + description: The BUSCO lineage to use, or "auto" to automatically select lineage - busco_lineages_path: type: directory description: Path to local BUSCO lineages directory. From 7a85760d080d74ea8b883f9255a6d3861fd7d44b Mon Sep 17 00:00:00 2001 From: Mahesh Binzer-Panchal Date: Fri, 6 May 2022 13:33:27 +0000 Subject: [PATCH 100/100] remove 'auto' test --- tests/modules/busco/main.nf | 48 +++++++++++++++++++++++++++++++++++- tests/modules/busco/test.yml | 30 ---------------------- 2 files changed, 47 insertions(+), 31 deletions(-) diff --git a/tests/modules/busco/main.nf b/tests/modules/busco/main.nf index e290b965..598e148a 100644 --- a/tests/modules/busco/main.nf +++ b/tests/modules/busco/main.nf @@ -13,12 +13,58 @@ workflow test_busco_genome_single_fasta { BUSCO ( input, - ['auto','bacteria_odb10', 'bacteroidetes_odb10'], // Launch with auto to use --auto-lineage, and specified lineages + ['bacteria_odb10', 'bacteroidetes_odb10'], // Launch with 'auto' to use --auto-lineage, and specified lineages // 'auto' removed from test due to memory issues [], // Download busco lineage [], // No config ) /* Output tree: + /tmp/tmpyz_hi62i/busco/ + ├── short_summary.specific.bacteria_odb10.genome.fna.json -> /tmp/tmpza_0dth3/33/7d8c9b2c8931d9ad6a67aa843895e7/short_summary.specific.bacteria_odb10.genome.fna.json + ├── short_summary.specific.bacteria_odb10.genome.fna.txt -> /tmp/tmpza_0dth3/33/7d8c9b2c8931d9ad6a67aa843895e7/short_summary.specific.bacteria_odb10.genome.fna.txt + ├── short_summary.specific.bacteroidetes_odb10.genome.fna.json -> /tmp/tmpza_0dth3/6a/e95a0cd21785ce33d63b8f73a68a51/short_summary.specific.bacteroidetes_odb10.genome.fna.json + ├── short_summary.specific.bacteroidetes_odb10.genome.fna.txt -> /tmp/tmpza_0dth3/6a/e95a0cd21785ce33d63b8f73a68a51/short_summary.specific.bacteroidetes_odb10.genome.fna.txt + ├── test-bacteria_odb10-busco -> /tmp/tmpza_0dth3/33/7d8c9b2c8931d9ad6a67aa843895e7/test-bacteria_odb10-busco/ + │ ├── genome.fna/ + │ │ ├── logs/ + │ │ │ ├── hmmsearch_err.log + │ │ │ ├── hmmsearch_out.log + │ │ │ ├── prodigal_err.log + │ │ │ └── prodigal_out.log + │ │ ├── prodigal_output/ + │ │ │ └── predicted_genes/ + │ │ └── run_bacteria_odb10/ + │ │ ├── busco_sequences/ + │ │ ├── full_table.tsv + │ │ ├── hmmer_output/ + │ │ ├── missing_busco_list.tsv + │ │ ├── short_summary.json + │ │ └── short_summary.txt + │ └── logs/ + │ └── busco.log + ├── test-bacteria_odb10-busco.batch_summary.txt -> /tmp/tmpza_0dth3/33/7d8c9b2c8931d9ad6a67aa843895e7/test-bacteria_odb10-busco.batch_summary.txt + ├── test-bacteroidetes_odb10-busco -> /tmp/tmpza_0dth3/6a/e95a0cd21785ce33d63b8f73a68a51/test-bacteroidetes_odb10-busco/ + │ ├── genome.fna/ + │ │ ├── logs/ + │ │ │ ├── hmmsearch_err.log + │ │ │ ├── hmmsearch_out.log + │ │ │ ├── prodigal_err.log + │ │ │ └── prodigal_out.log + │ │ ├── prodigal_output/ + │ │ │ └── predicted_genes/ + │ │ └── run_bacteroidetes_odb10/ + │ │ ├── busco_sequences/ + │ │ ├── full_table.tsv + │ │ ├── hmmer_output/ + │ │ ├── missing_busco_list.tsv + │ │ ├── short_summary.json + │ │ └── short_summary.txt + │ └── logs/ + │ └── busco.log + ├── test-bacteroidetes_odb10-busco.batch_summary.txt -> /tmp/tmpza_0dth3/6a/e95a0cd21785ce33d63b8f73a68a51/test-bacteroidetes_odb10-busco.batch_summary.txt + └── versions.yml -> /tmp/tmpza_0dth3/6a/e95a0cd21785ce33d63b8f73a68a51/versions.yml + + Former Output tree -w 'auto': /tmp/tmp846crjv2/busco/ ├── short_summary.generic.bacteria_odb10.genome.fna.json -> /tmp/tmpi6af66j1/18/8be22ecd7a71471ff5082bd512972b/short_summary.generic.bacteria_odb10.genome.fna.json ├── short_summary.generic.bacteria_odb10.genome.fna.txt -> /tmp/tmpi6af66j1/18/8be22ecd7a71471ff5082bd512972b/short_summary.generic.bacteria_odb10.genome.fna.txt diff --git a/tests/modules/busco/test.yml b/tests/modules/busco/test.yml index 2a801e64..43b810ba 100644 --- a/tests/modules/busco/test.yml +++ b/tests/modules/busco/test.yml @@ -3,20 +3,6 @@ tags: - busco files: - - path: output/busco/short_summary.generic.bacteria_odb10.genome.fna.json - contains: - - "one_line_summary" - - "input_file" - - "mode" - - "dataset" - - path: output/busco/short_summary.generic.bacteria_odb10.genome.fna.txt - contains: - - "BUSCO version" - - "The lineage dataset is" - - "BUSCO was run in mode" - - "Complete BUSCOs" - - "Missing BUSCOs" - - "Dependencies and versions" - path: output/busco/short_summary.specific.bacteria_odb10.genome.fna.json contains: - "one_line_summary" @@ -31,20 +17,6 @@ - "Complete BUSCOs" - "Missing BUSCOs" - "Dependencies and versions" - - path: output/busco/short_summary.specific.bacteroidales_odb10.genome.fna.json - contains: - - "one_line_summary" - - "input_file" - - "mode" - - "dataset" - - path: output/busco/short_summary.specific.bacteroidales_odb10.genome.fna.txt - contains: - - "BUSCO version" - - "The lineage dataset is" - - "BUSCO was run in mode" - - "Complete BUSCOs" - - "Missing BUSCOs" - - "Dependencies and versions" - path: output/busco/short_summary.specific.bacteroidetes_odb10.genome.fna.json contains: - "one_line_summary" @@ -59,8 +31,6 @@ - "Complete BUSCOs" - "Missing BUSCOs" - "Dependencies and versions" - - path: output/busco/test-auto-busco.batch_summary.txt - md5sum: 32f7765c310f33555c31c7a3e64c990e - path: output/busco/test-bacteria_odb10-busco.batch_summary.txt md5sum: e50690742e9ae6abdd2bf99334ff9e12 - path: output/busco/test-bacteroidetes_odb10-busco.batch_summary.txt