From e3285528aca2733ff2d544cb5e5fcc34599226f3 Mon Sep 17 00:00:00 2001 From: Harshil Patel Date: Mon, 3 Jan 2022 18:00:46 +0000 Subject: [PATCH 01/20] Fix modules warned or failed with nf-core modules lint (#1191) --- modules/ataqv/ataqv/main.nf | 2 +- modules/bcftools/index/main.nf | 2 +- modules/bowtie2/build/main.nf | 2 +- modules/cutadapt/main.nf | 2 +- modules/fgbio/fastqtobam/main.nf | 2 +- modules/gtdbtk/classifywf/main.nf | 1 + modules/idr/main.nf | 2 +- modules/jupyternotebook/main.nf | 2 +- modules/krona/kronadb/main.nf | 2 -- modules/malt/run/main.nf | 3 +-- modules/paraclu/main.nf | 2 +- modules/pirate/main.nf | 2 +- modules/porechop/main.nf | 2 +- modules/rmarkdownnotebook/main.nf | 2 +- modules/spatyper/main.nf | 2 +- tests/config/pytest_modules.yml | 8 ++++++++ 16 files changed, 22 insertions(+), 16 deletions(-) diff --git a/modules/ataqv/ataqv/main.nf b/modules/ataqv/ataqv/main.nf index 20525e85..fbd623f4 100644 --- a/modules/ataqv/ataqv/main.nf +++ b/modules/ataqv/ataqv/main.nf @@ -5,7 +5,7 @@ process ATAQV_ATAQV { conda (params.enable_conda ? "bioconda::ataqv=1.2.1" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? 'https://depot.galaxyproject.org/singularity/ataqv:1.2.1--py39ha23c084_2' : - 'quay.io/biocontainers/ataqv:1.2.1--py36hfdecbe1_2' }" + 'quay.io/biocontainers/ataqv:1.2.1--py39ha23c084_2' }" input: tuple val(meta), path(bam), path(bai), path(peak_file) diff --git a/modules/bcftools/index/main.nf b/modules/bcftools/index/main.nf index 0cdebf31..ba6b9639 100644 --- a/modules/bcftools/index/main.nf +++ b/modules/bcftools/index/main.nf @@ -13,7 +13,7 @@ process BCFTOOLS_INDEX { output: tuple val(meta), path("*.csi"), optional:true, emit: csi tuple val(meta), path("*.tbi"), optional:true, emit: tbi - path "versions.yml" , emit: version + path "versions.yml" , emit: versions script: def args = task.ext.args ?: '' diff --git a/modules/bowtie2/build/main.nf b/modules/bowtie2/build/main.nf index c0cbcd79..da2e9ed5 100644 --- a/modules/bowtie2/build/main.nf +++ b/modules/bowtie2/build/main.nf @@ -5,7 +5,7 @@ process BOWTIE2_BUILD { conda (params.enable_conda ? 'bioconda::bowtie2=2.4.4' : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? 'https://depot.galaxyproject.org/singularity/bowtie2:2.4.4--py39hbb4e92a_0' : - 'quay.io/biocontainers/bowtie2:2.4.4--py36hd4290be_0' }" + 'quay.io/biocontainers/bowtie2:2.4.4--py39hbb4e92a_0' }" input: path fasta diff --git a/modules/cutadapt/main.nf b/modules/cutadapt/main.nf index 89105715..74c42768 100644 --- a/modules/cutadapt/main.nf +++ b/modules/cutadapt/main.nf @@ -5,7 +5,7 @@ process CUTADAPT { conda (params.enable_conda ? 'bioconda::cutadapt=3.4' : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? 'https://depot.galaxyproject.org/singularity/cutadapt:3.4--py39h38f01e4_1' : - 'quay.io/biocontainers/cutadapt:3.4--py37h73a75cf_1' }" + 'quay.io/biocontainers/cutadapt:3.4--py39h38f01e4_1' }" input: tuple val(meta), path(reads) diff --git a/modules/fgbio/fastqtobam/main.nf b/modules/fgbio/fastqtobam/main.nf index 126c3dd8..3060d715 100644 --- a/modules/fgbio/fastqtobam/main.nf +++ b/modules/fgbio/fastqtobam/main.nf @@ -13,7 +13,7 @@ process FGBIO_FASTQTOBAM { output: tuple val(meta), path("*_umi_converted.bam"), emit: umibam - path "versions.yml" , emit: version + path "versions.yml" , emit: versions script: def args = task.ext.args ?: '' diff --git a/modules/gtdbtk/classifywf/main.nf b/modules/gtdbtk/classifywf/main.nf index 4a4b3a01..009efa8d 100644 --- a/modules/gtdbtk/classifywf/main.nf +++ b/modules/gtdbtk/classifywf/main.nf @@ -2,6 +2,7 @@ def VERSION = '1.5.0' // Version information not provided by tool on CLI process GTDBTK_CLASSIFYWF { tag "${meta.assembler}-${meta.id}" + label 'process_medium' conda (params.enable_conda ? "bioconda::gtdbtk=1.5.0" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? diff --git a/modules/idr/main.nf b/modules/idr/main.nf index 44b07be4..7e377878 100644 --- a/modules/idr/main.nf +++ b/modules/idr/main.nf @@ -5,7 +5,7 @@ process IDR { conda (params.enable_conda ? "bioconda::idr=2.0.4.2" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? 'https://depot.galaxyproject.org/singularity/idr:2.0.4.2--py39hcbe4a3b_5' : - 'quay.io/biocontainers/idr:2.0.4.2--py38h9af456f_5' }" + 'quay.io/biocontainers/idr:2.0.4.2--py39hcbe4a3b_5' }" input: path peaks diff --git a/modules/jupyternotebook/main.nf b/modules/jupyternotebook/main.nf index e4bdf98b..871d6ccd 100644 --- a/modules/jupyternotebook/main.nf +++ b/modules/jupyternotebook/main.nf @@ -9,7 +9,7 @@ process JUPYTERNOTEBOOK { //ipykernel, jupytext, papermill and nbconvert Python packages. conda (params.enable_conda ? "ipykernel=6.0.3 jupytext=1.11.4 nbconvert=6.1.0 papermill=2.3.3 matplotlib=3.4.2" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/mulled-v2-514b1a5d280c7043110b2a8d0a87b57ba392a963%3A879972fc8bdc81ee92f2bce3b4805d89a772bf84-0' : + 'https://depot.galaxyproject.org/singularity/mulled-v2-514b1a5d280c7043110b2a8d0a87b57ba392a963:879972fc8bdc81ee92f2bce3b4805d89a772bf84-0' : 'quay.io/biocontainers/mulled-v2-514b1a5d280c7043110b2a8d0a87b57ba392a963:879972fc8bdc81ee92f2bce3b4805d89a772bf84-0' }" input: diff --git a/modules/krona/kronadb/main.nf b/modules/krona/kronadb/main.nf index ca7fc3d3..d8156035 100644 --- a/modules/krona/kronadb/main.nf +++ b/modules/krona/kronadb/main.nf @@ -8,8 +8,6 @@ process KRONA_KRONADB { 'https://depot.galaxyproject.org/singularity/krona:2.7.1--pl526_5' : 'quay.io/biocontainers/krona:2.7.1--pl526_5' }" - input: - output: path 'taxonomy/taxonomy.tab', emit: db path "versions.yml" , emit: versions diff --git a/modules/malt/run/main.nf b/modules/malt/run/main.nf index 8b8f05cc..5e81667e 100644 --- a/modules/malt/run/main.nf +++ b/modules/malt/run/main.nf @@ -1,6 +1,5 @@ process MALT_RUN { - - label 'process_high_memory' + label 'process_high' conda (params.enable_conda ? "bioconda::malt=0.53" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? diff --git a/modules/paraclu/main.nf b/modules/paraclu/main.nf index 1623ea89..cc16674e 100644 --- a/modules/paraclu/main.nf +++ b/modules/paraclu/main.nf @@ -6,7 +6,7 @@ process PARACLU { conda (params.enable_conda ? "bioconda::paraclu=10" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/paraclu%3A10--h9a82719_1' : + 'https://depot.galaxyproject.org/singularity/paraclu:10--h9a82719_1' : 'quay.io/biocontainers/paraclu:10--h9a82719_1' }" input: diff --git a/modules/pirate/main.nf b/modules/pirate/main.nf index 70de52e6..c7d7476c 100644 --- a/modules/pirate/main.nf +++ b/modules/pirate/main.nf @@ -4,7 +4,7 @@ process PIRATE { conda (params.enable_conda ? "bioconda::pirate=1.0.4" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/pirate%3A1.0.4--hdfd78af_1' : + 'https://depot.galaxyproject.org/singularity/pirate:1.0.4--hdfd78af_1' : 'quay.io/biocontainers/pirate:1.0.4--hdfd78af_1' }" input: diff --git a/modules/porechop/main.nf b/modules/porechop/main.nf index 249efad9..f5ad93f8 100644 --- a/modules/porechop/main.nf +++ b/modules/porechop/main.nf @@ -5,7 +5,7 @@ process PORECHOP { conda (params.enable_conda ? "bioconda::porechop=0.2.4" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? 'https://depot.galaxyproject.org/singularity/porechop:0.2.4--py39h7cff6ad_2' : - 'quay.io/biocontainers/porechop:0.2.4--py38h8c62d01_2' }" + 'quay.io/biocontainers/porechop:0.2.4--py39h7cff6ad_2' }" input: tuple val(meta), path(reads) diff --git a/modules/rmarkdownnotebook/main.nf b/modules/rmarkdownnotebook/main.nf index f8183216..18d8e150 100644 --- a/modules/rmarkdownnotebook/main.nf +++ b/modules/rmarkdownnotebook/main.nf @@ -9,7 +9,7 @@ process RMARKDOWNNOTEBOOK { //yaml and rmarkdown R packages. conda (params.enable_conda ? "r-base=4.1.0 r-rmarkdown=2.9 r-yaml=2.2.1" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/mulled-v2-31ad840d814d356e5f98030a4ee308a16db64ec5%3A0e852a1e4063fdcbe3f254ac2c7469747a60e361-0' : + 'https://depot.galaxyproject.org/singularity/mulled-v2-31ad840d814d356e5f98030a4ee308a16db64ec5:0e852a1e4063fdcbe3f254ac2c7469747a60e361-0' : 'quay.io/biocontainers/mulled-v2-31ad840d814d356e5f98030a4ee308a16db64ec5:0e852a1e4063fdcbe3f254ac2c7469747a60e361-0' }" input: diff --git a/modules/spatyper/main.nf b/modules/spatyper/main.nf index e0ba8d13..d04fd265 100644 --- a/modules/spatyper/main.nf +++ b/modules/spatyper/main.nf @@ -4,7 +4,7 @@ process SPATYPER { conda (params.enable_conda ? "bioconda::spatyper=0.3.3" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/spatyper%3A0.3.3--pyhdfd78af_3' : + 'https://depot.galaxyproject.org/singularity/spatyper:0.3.3--pyhdfd78af_3' : 'quay.io/biocontainers/spatyper:0.3.3--pyhdfd78af_3' }" input: diff --git a/tests/config/pytest_modules.yml b/tests/config/pytest_modules.yml index 9ebaa99a..5088d85a 100644 --- a/tests/config/pytest_modules.yml +++ b/tests/config/pytest_modules.yml @@ -282,6 +282,14 @@ cellranger/gtf: - modules/cellranger/gtf/** - tests/modules/cellranger/gtf/** +cellranger/mkfastq: + - modules/cellranger/mkfastq/** + - tests/modules/cellranger/mkfastq/** + +cellranger/mkgtf: + - modules/cellranger/mkgtf/** + - tests/modules/cellranger/mkgtf/** + cellranger/mkref: - modules/cellranger/mkref/** - tests/modules/cellranger/mkref/** From bf5edb86148d881965c62eafef08c09a5a4a62ba Mon Sep 17 00:00:00 2001 From: "Robert A. Petit III" Date: Tue, 4 Jan 2022 11:29:49 -0500 Subject: [PATCH 02/20] add module for mash dist (#1193) * add module for mash dist * fix lint Co-authored-by: Gregor Sturm --- modules/mash/dist/main.nf | 34 +++++++++++++++++++ modules/mash/dist/meta.yml | 45 +++++++++++++++++++++++++ tests/config/pytest_modules.yml | 4 +++ tests/modules/mash/dist/main.nf | 16 +++++++++ tests/modules/mash/dist/nextflow.config | 5 +++ tests/modules/mash/dist/test.yml | 10 ++++++ 6 files changed, 114 insertions(+) create mode 100644 modules/mash/dist/main.nf create mode 100644 modules/mash/dist/meta.yml create mode 100644 tests/modules/mash/dist/main.nf create mode 100644 tests/modules/mash/dist/nextflow.config create mode 100644 tests/modules/mash/dist/test.yml diff --git a/modules/mash/dist/main.nf b/modules/mash/dist/main.nf new file mode 100644 index 00000000..323bd339 --- /dev/null +++ b/modules/mash/dist/main.nf @@ -0,0 +1,34 @@ +process MASH_DIST { + tag "$meta.id" + label 'process_low' + + conda (params.enable_conda ? "bioconda::mash=2.3" : null) + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/mash:2.3--he348c14_1' : + 'quay.io/biocontainers/mash:2.3--he348c14_1' }" + + input: + tuple val(meta), path(query) + path reference + + output: + tuple val(meta), path("*.txt"), emit: dist + path "versions.yml" , emit: versions + + script: + def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + """ + mash \\ + dist \\ + -p $task.cpus \\ + $args \\ + $reference \\ + $query > ${prefix}.txt + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + mash: \$(mash --version 2>&1) + END_VERSIONS + """ +} diff --git a/modules/mash/dist/meta.yml b/modules/mash/dist/meta.yml new file mode 100644 index 00000000..8cbaa63c --- /dev/null +++ b/modules/mash/dist/meta.yml @@ -0,0 +1,45 @@ +name: mash_dist +description: Calculate Mash distances between reference and query seqeunces +keywords: + - mash/dist +tools: + - mash: + description: Fast sequence distance estimator that uses MinHash + homepage: https://github.com/marbl/Mash + documentation: https://mash.readthedocs.io/en/latest/sketches.html + tool_dev_url: https://github.com/marbl/Mash + doi: "10.1186/s13059-016-0997-x" + licence: ['https://github.com/marbl/Mash/blob/master/LICENSE.txt'] + +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - reference: + type: file + description: FASTA, FASTQ or Mash sketch + pattern: "*.{fasta,fasta.gz,fastq,fastq.gz,msh}" + - query: + type: file + description: FASTA, FASTQ or Mash sketch + pattern: "*.{fasta,fasta.gz,fastq,fastq.gz,msh}" + +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" + - dist: + type: file + description: The results from mash dist + pattern: "*.txt" + +authors: + - "@rpetit3" diff --git a/tests/config/pytest_modules.yml b/tests/config/pytest_modules.yml index 5088d85a..a5b9b47e 100644 --- a/tests/config/pytest_modules.yml +++ b/tests/config/pytest_modules.yml @@ -900,6 +900,10 @@ mapdamage2: - modules/mapdamage2/** - tests/modules/mapdamage2/** +mash/dist: + - modules/mash/dist/** + - tests/modules/mash/dist/** + mash/sketch: - modules/mash/sketch/** - tests/modules/mash/sketch/** diff --git a/tests/modules/mash/dist/main.nf b/tests/modules/mash/dist/main.nf new file mode 100644 index 00000000..10c9c9fa --- /dev/null +++ b/tests/modules/mash/dist/main.nf @@ -0,0 +1,16 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { MASH_DIST } from '../../../../modules/mash/dist/main.nf' + +workflow test_mash_dist { + + input = [ + [ id:'test', single_end:false ], // meta map + file(params.test_data['sarscov2']['illumina']['contigs_fasta'], checkIfExists: true) + ] + + reference = file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) + MASH_DIST ( input, reference ) +} diff --git a/tests/modules/mash/dist/nextflow.config b/tests/modules/mash/dist/nextflow.config new file mode 100644 index 00000000..50f50a7a --- /dev/null +++ b/tests/modules/mash/dist/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/mash/dist/test.yml b/tests/modules/mash/dist/test.yml new file mode 100644 index 00000000..2602f87d --- /dev/null +++ b/tests/modules/mash/dist/test.yml @@ -0,0 +1,10 @@ +- name: mash dist test_mash_dist + command: nextflow run tests/modules/mash/dist -entry test_mash_dist -c tests/config/nextflow.config + tags: + - mash + - mash/dist + files: + - path: output/mash/test.txt + md5sum: 1dfd5b53e1996f9fdb9d260b3e81c4d6 + - path: output/mash/versions.yml + md5sum: f786d48a9af59e823d19c171969d0d50 From 2d4b0f77873e15b79599cc77ff92acbb880f3ac2 Mon Sep 17 00:00:00 2001 From: Gwenna Breton Date: Wed, 5 Jan 2022 12:15:54 +0100 Subject: [PATCH 03/20] Bcftools sort new syntax (#1169) * Added files for bcftools/sort * Fixed output format and removed md5 checksum * Change input to avoid identical in/output names * Created rows for bcftools/sort in pytest_modules.yml --- modules/bcftools/sort/main.nf | 32 +++++++++++++++ modules/bcftools/sort/meta.yml | 43 +++++++++++++++++++++ tests/config/pytest_modules.yml | 4 ++ tests/modules/bcftools/sort/main.nf | 15 +++++++ tests/modules/bcftools/sort/nextflow.config | 5 +++ tests/modules/bcftools/sort/test.yml | 10 +++++ 6 files changed, 109 insertions(+) create mode 100644 modules/bcftools/sort/main.nf create mode 100644 modules/bcftools/sort/meta.yml create mode 100644 tests/modules/bcftools/sort/main.nf create mode 100644 tests/modules/bcftools/sort/nextflow.config create mode 100644 tests/modules/bcftools/sort/test.yml diff --git a/modules/bcftools/sort/main.nf b/modules/bcftools/sort/main.nf new file mode 100644 index 00000000..2fcadc98 --- /dev/null +++ b/modules/bcftools/sort/main.nf @@ -0,0 +1,32 @@ +process BCFTOOLS_SORT { + tag "$meta.id" + label 'process_medium' + + conda (params.enable_conda ? "bioconda::bcftools=1.14" : null) + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/bcftools:1.14--h88f3f91_0': + 'quay.io/biocontainers/bcftools:1.14--h88f3f91_0' }" + + input: + tuple val(meta), path(vcf) + + output: + tuple val(meta), path("*.gz"), emit: vcf + path "versions.yml" , emit: versions + + script: + def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + """ + bcftools \\ + sort \\ + --output ${prefix}.vcf.gz \\ + $args \\ + $vcf + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + bcftools: \$(bcftools --version 2>&1 | head -n1 | sed 's/^.*bcftools //; s/ .*\$//') + END_VERSIONS + """ +} diff --git a/modules/bcftools/sort/meta.yml b/modules/bcftools/sort/meta.yml new file mode 100644 index 00000000..af894e82 --- /dev/null +++ b/modules/bcftools/sort/meta.yml @@ -0,0 +1,43 @@ +name: bcftools_sort +description: Sorts VCF files +keywords: + - sorting + - VCF + - variant calling +tools: + - sort: + description: Sort VCF files by coordinates. + homepage: http://samtools.github.io/bcftools/bcftools.html + documentation: http://www.htslib.org/doc/bcftools.html + tool_dev_url: https://github.com/samtools/bcftools + doi: "10.1093/bioinformatics/btp352" + licence: ['MIT'] + +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - vcf: + type: file + description: The VCF/BCF file to be sorted + pattern: "*.{vcf.gz,vcf,bcf}" + +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" + - vcf: + type: file + description: Sorted VCF file + pattern: "*.{vcf.gz}" + +authors: + - "@Gwennid" diff --git a/tests/config/pytest_modules.yml b/tests/config/pytest_modules.yml index a5b9b47e..2938d311 100644 --- a/tests/config/pytest_modules.yml +++ b/tests/config/pytest_modules.yml @@ -114,6 +114,10 @@ bcftools/reheader: - modules/bcftools/reheader/** - tests/modules/bcftools/reheader/** +bcftools/sort: + - modules/bcftools/sort/** + - tests/modules/bcftools/sort/** + bcftools/stats: - modules/bcftools/stats/** - tests/modules/bcftools/stats/** diff --git a/tests/modules/bcftools/sort/main.nf b/tests/modules/bcftools/sort/main.nf new file mode 100644 index 00000000..fadb8270 --- /dev/null +++ b/tests/modules/bcftools/sort/main.nf @@ -0,0 +1,15 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { BCFTOOLS_SORT } from '../../../../modules/bcftools/sort/main.nf' + +workflow test_bcftools_sort { + + input = [ + [ id:'test' ], // meta map + file(params.test_data['sarscov2']['illumina']['test_vcf'], checkIfExists: true) + ] + + BCFTOOLS_SORT ( input ) +} diff --git a/tests/modules/bcftools/sort/nextflow.config b/tests/modules/bcftools/sort/nextflow.config new file mode 100644 index 00000000..50f50a7a --- /dev/null +++ b/tests/modules/bcftools/sort/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/bcftools/sort/test.yml b/tests/modules/bcftools/sort/test.yml new file mode 100644 index 00000000..694fc307 --- /dev/null +++ b/tests/modules/bcftools/sort/test.yml @@ -0,0 +1,10 @@ +- name: bcftools sort test_bcftools_sort + command: nextflow run tests/modules/bcftools/sort -entry test_bcftools_sort -c tests/config/nextflow.config + tags: + - bcftools + - bcftools/sort + files: + - path: output/bcftools/test.vcf.gz + md5sum: fc178eb342a91dc0d1d568601ad8f8e2 + - path: output/bcftools/versions.yml + md5sum: f1bb553befa5108f81135b8fec613b6b From c4549c0ecd1b02473471b507fd88a9fd5289d91c Mon Sep 17 00:00:00 2001 From: emnilsson Date: Thu, 6 Jan 2022 17:41:36 +0100 Subject: [PATCH 04/20] Editing the CAT/CAT module to handle single files (#1196) * Removed if-statement to only run on more than 1 file, now it will run on single files as well. * Added a test for running the cat_cat module on a single file. * Created a new test.yml with nf-core modules create-test-yml -t cat/cat * Edited test.yml to not include paths and md5sums for versions.yml, and also removed sometimes variable md5sums --- modules/cat/cat/main.nf | 44 ++++++++++++++++------------------ tests/modules/cat/cat/main.nf | 9 +++++++ tests/modules/cat/cat/test.yml | 8 +++++++ 3 files changed, 38 insertions(+), 23 deletions(-) diff --git a/modules/cat/cat/main.nf b/modules/cat/cat/main.nf index 0c087270..2efe20a5 100644 --- a/modules/cat/cat/main.nf +++ b/modules/cat/cat/main.nf @@ -18,30 +18,28 @@ process CAT_CAT { def args = task.ext.args ?: '' def args2 = task.ext.args2 ?: '' def file_list = files_in.collect { it.toString() } - if (file_list.size > 1) { - // | input | output | command1 | command2 | - // |-----------|------------|----------|----------| - // | gzipped | gzipped | cat | | - // | ungzipped | ungzipped | cat | | - // | gzipped | ungzipped | zcat | | - // | ungzipped | gzipped | cat | pigz | + // | input | output | command1 | command2 | + // |-----------|------------|----------|----------| + // | gzipped | gzipped | cat | | + // | ungzipped | ungzipped | cat | | + // | gzipped | ungzipped | zcat | | + // | ungzipped | gzipped | cat | pigz | - def in_zip = file_list[0].endsWith('.gz') - def out_zip = file_out.endsWith('.gz') - def command1 = (in_zip && !out_zip) ? 'zcat' : 'cat' - def command2 = (!in_zip && out_zip) ? "| pigz -c -p $task.cpus $args2" : '' - """ - $command1 \\ - $args \\ - ${file_list.join(' ')} \\ - $command2 \\ - > $file_out + def in_zip = file_list[0].endsWith('.gz') + def out_zip = file_out.endsWith('.gz') + def command1 = (in_zip && !out_zip) ? 'zcat' : 'cat' + def command2 = (!in_zip && out_zip) ? "| pigz -c -p $task.cpus $args2" : '' + """ + $command1 \\ + $args \\ + ${file_list.join(' ')} \\ + $command2 \\ + > $file_out - cat <<-END_VERSIONS > versions.yml - "${task.process}": - pigz: \$( pigz --version 2>&1 | sed 's/pigz //g' ) - END_VERSIONS - """ - } + cat <<-END_VERSIONS > versions.yml + "${task.process}": + pigz: \$( pigz --version 2>&1 | sed 's/pigz //g' ) + END_VERSIONS + """ } diff --git a/tests/modules/cat/cat/main.nf b/tests/modules/cat/cat/main.nf index 430c71fa..1fd56851 100644 --- a/tests/modules/cat/cat/main.nf +++ b/tests/modules/cat/cat/main.nf @@ -43,3 +43,12 @@ workflow test_cat_unzipped_zipped { CAT_CAT ( input, 'cat.txt.gz' ) } + +workflow test_cat_one_file_unzipped_zipped { + + input = [ + file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true), + ] + + CAT_CAT ( input, 'cat.txt.gz' ) +} diff --git a/tests/modules/cat/cat/test.yml b/tests/modules/cat/cat/test.yml index d7973042..1244d8d2 100644 --- a/tests/modules/cat/cat/test.yml +++ b/tests/modules/cat/cat/test.yml @@ -31,3 +31,11 @@ - cat/cat files: - path: output/cat/cat.txt.gz + +- name: cat one file unzipped zipped + command: nextflow run ./tests/modules/cat/cat -entry test_cat_one_file_unzipped_zipped -c ./tests/config/nextflow.config -c ./tests/modules/cat/cat/nextflow.config + tags: + - cat + - cat/cat + files: + - path: output/cat/cat.txt.gz From e751e5040af57e1b4e06ed4e0f3efe6de25c1683 Mon Sep 17 00:00:00 2001 From: Harshil Patel Date: Fri, 7 Jan 2022 17:52:39 +0000 Subject: [PATCH 05/20] Bump software versions for viralrecon modules (#1198) * Bump software versions for viralrecon modules * Remove custom params.save_unaligned from bowtie2_align * Unify samtools modules and error if input and output names are the same * Fix ALL the tests --- modules/bcftools/concat/main.nf | 6 ++-- modules/bcftools/consensus/main.nf | 6 ++-- modules/bcftools/filter/main.nf | 6 ++-- modules/bcftools/index/main.nf | 6 ++-- modules/bcftools/isec/main.nf | 6 ++-- modules/bcftools/merge/main.nf | 6 ++-- modules/bcftools/mpileup/main.nf | 6 ++-- modules/bcftools/norm/main.nf | 6 ++-- modules/bcftools/query/main.nf | 6 ++-- modules/bcftools/reheader/main.nf | 6 ++-- modules/bcftools/stats/main.nf | 6 ++-- modules/bcftools/view/main.nf | 6 ++-- modules/bowtie2/align/main.nf | 5 ++-- modules/fastp/main.nf | 6 ++-- modules/minia/main.nf | 6 ++-- modules/nanoplot/main.nf | 6 ++-- modules/pangolin/main.nf | 6 ++-- modules/picard/collecthsmetrics/main.nf | 6 ++-- modules/picard/collectmultiplemetrics/main.nf | 6 ++-- modules/picard/collectwgsmetrics/main.nf | 6 ++-- modules/picard/filtersamreads/main.nf | 6 ++-- modules/picard/markduplicates/main.nf | 6 ++-- modules/picard/mergesamfiles/main.nf | 6 ++-- modules/picard/sortsam/main.nf | 6 ++-- modules/samtools/ampliconclip/main.nf | 5 ++-- modules/samtools/bam2fq/main.nf | 5 ++-- modules/samtools/depth/main.nf | 3 +- modules/samtools/faidx/main.nf | 9 ++++-- modules/samtools/fastq/main.nf | 5 ++-- modules/samtools/fixmate/main.nf | 1 - modules/samtools/flagstat/main.nf | 7 ++++- modules/samtools/idxstats/main.nf | 6 +++- modules/samtools/index/main.nf | 6 +++- modules/samtools/merge/main.nf | 10 +++++-- modules/samtools/sort/main.nf | 1 + modules/samtools/stats/main.nf | 7 ++++- modules/samtools/view/main.nf | 9 +++++- tests/modules/bcftools/concat/test.yml | 2 +- tests/modules/bcftools/mpileup/test.yml | 6 ++-- tests/modules/bcftools/stats/test.yml | 2 +- tests/modules/bowtie2/align/main.nf | 6 ++-- tests/modules/fastp/test.yml | 28 +++++++++---------- tests/modules/pangolin/test.yml | 2 +- tests/modules/samtools/stats/test.yml | 2 +- 44 files changed, 151 insertions(+), 114 deletions(-) diff --git a/modules/bcftools/concat/main.nf b/modules/bcftools/concat/main.nf index cebd2443..d02e7605 100644 --- a/modules/bcftools/concat/main.nf +++ b/modules/bcftools/concat/main.nf @@ -2,10 +2,10 @@ process BCFTOOLS_CONCAT { tag "$meta.id" label 'process_medium' - conda (params.enable_conda ? "bioconda::bcftools=1.11" : null) + conda (params.enable_conda ? 'bioconda::bcftools=1.14' : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/bcftools:1.11--h7c999a4_0' : - 'quay.io/biocontainers/bcftools:1.11--h7c999a4_0' }" + 'https://depot.galaxyproject.org/singularity/bcftools:1.14--h88f3f91_0' : + 'quay.io/biocontainers/bcftools:1.14--h88f3f91_0' }" input: tuple val(meta), path(vcfs) diff --git a/modules/bcftools/consensus/main.nf b/modules/bcftools/consensus/main.nf index 4633790e..5d7cd74f 100644 --- a/modules/bcftools/consensus/main.nf +++ b/modules/bcftools/consensus/main.nf @@ -2,10 +2,10 @@ process BCFTOOLS_CONSENSUS { tag "$meta.id" label 'process_medium' - conda (params.enable_conda ? 'bioconda::bcftools=1.13' : null) + conda (params.enable_conda ? 'bioconda::bcftools=1.14' : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/bcftools:1.13--h3a49de5_0' : - 'quay.io/biocontainers/bcftools:1.13--h3a49de5_0' }" + 'https://depot.galaxyproject.org/singularity/bcftools:1.14--h88f3f91_0' : + 'quay.io/biocontainers/bcftools:1.14--h88f3f91_0' }" input: tuple val(meta), path(vcf), path(tbi), path(fasta) diff --git a/modules/bcftools/filter/main.nf b/modules/bcftools/filter/main.nf index 95e0249a..98b422b1 100644 --- a/modules/bcftools/filter/main.nf +++ b/modules/bcftools/filter/main.nf @@ -2,10 +2,10 @@ process BCFTOOLS_FILTER { tag "$meta.id" label 'process_medium' - conda (params.enable_conda ? 'bioconda::bcftools=1.13' : null) + conda (params.enable_conda ? 'bioconda::bcftools=1.14' : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/bcftools:1.13--h3a49de5_0' : - 'quay.io/biocontainers/bcftools:1.13--h3a49de5_0' }" + 'https://depot.galaxyproject.org/singularity/bcftools:1.14--h88f3f91_0' : + 'quay.io/biocontainers/bcftools:1.14--h88f3f91_0' }" input: tuple val(meta), path(vcf) diff --git a/modules/bcftools/index/main.nf b/modules/bcftools/index/main.nf index ba6b9639..e5275003 100644 --- a/modules/bcftools/index/main.nf +++ b/modules/bcftools/index/main.nf @@ -2,10 +2,10 @@ process BCFTOOLS_INDEX { tag "$meta.id" label 'process_low' - conda (params.enable_conda ? 'bioconda::bcftools=1.13' : null) + conda (params.enable_conda ? 'bioconda::bcftools=1.14' : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/bcftools:1.13--h3a49de5_0' : - 'quay.io/biocontainers/bcftools:1.13--h3a49de5_0' }" + 'https://depot.galaxyproject.org/singularity/bcftools:1.14--h88f3f91_0' : + 'quay.io/biocontainers/bcftools:1.14--h88f3f91_0' }" input: tuple val(meta), path(vcf) diff --git a/modules/bcftools/isec/main.nf b/modules/bcftools/isec/main.nf index 08323f28..fdde3022 100644 --- a/modules/bcftools/isec/main.nf +++ b/modules/bcftools/isec/main.nf @@ -2,10 +2,10 @@ process BCFTOOLS_ISEC { tag "$meta.id" label 'process_medium' - conda (params.enable_conda ? 'bioconda::bcftools=1.13' : null) + conda (params.enable_conda ? 'bioconda::bcftools=1.14' : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/bcftools:1.13--h3a49de5_0' : - 'quay.io/biocontainers/bcftools:1.13--h3a49de5_0' }" + 'https://depot.galaxyproject.org/singularity/bcftools:1.14--h88f3f91_0' : + 'quay.io/biocontainers/bcftools:1.14--h88f3f91_0' }" input: tuple val(meta), path(vcfs), path(tbis) diff --git a/modules/bcftools/merge/main.nf b/modules/bcftools/merge/main.nf index bfb0f162..f1c02e8d 100644 --- a/modules/bcftools/merge/main.nf +++ b/modules/bcftools/merge/main.nf @@ -2,10 +2,10 @@ process BCFTOOLS_MERGE { tag "$meta.id" label 'process_medium' - conda (params.enable_conda ? 'bioconda::bcftools=1.13' : null) + conda (params.enable_conda ? 'bioconda::bcftools=1.14' : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/bcftools:1.13--h3a49de5_0' : - 'quay.io/biocontainers/bcftools:1.13--h3a49de5_0' }" + 'https://depot.galaxyproject.org/singularity/bcftools:1.14--h88f3f91_0' : + 'quay.io/biocontainers/bcftools:1.14--h88f3f91_0' }" input: tuple val(meta), path(vcfs), path(tbis) diff --git a/modules/bcftools/mpileup/main.nf b/modules/bcftools/mpileup/main.nf index 8a209a66..3583aac4 100644 --- a/modules/bcftools/mpileup/main.nf +++ b/modules/bcftools/mpileup/main.nf @@ -2,10 +2,10 @@ process BCFTOOLS_MPILEUP { tag "$meta.id" label 'process_medium' - conda (params.enable_conda ? 'bioconda::bcftools=1.13' : null) + conda (params.enable_conda ? 'bioconda::bcftools=1.14' : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/bcftools:1.13--h3a49de5_0' : - 'quay.io/biocontainers/bcftools:1.13--h3a49de5_0' }" + 'https://depot.galaxyproject.org/singularity/bcftools:1.14--h88f3f91_0' : + 'quay.io/biocontainers/bcftools:1.14--h88f3f91_0' }" input: tuple val(meta), path(bam) diff --git a/modules/bcftools/norm/main.nf b/modules/bcftools/norm/main.nf index 95da56db..e8bf6324 100644 --- a/modules/bcftools/norm/main.nf +++ b/modules/bcftools/norm/main.nf @@ -2,10 +2,10 @@ process BCFTOOLS_NORM { tag "$meta.id" label 'process_medium' - conda (params.enable_conda ? "bioconda::bcftools=1.13" : null) + conda (params.enable_conda ? 'bioconda::bcftools=1.14' : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/bcftools:1.13--h3a49de5_0' : - 'quay.io/biocontainers/bcftools:1.13--h3a49de5_0' }" + 'https://depot.galaxyproject.org/singularity/bcftools:1.14--h88f3f91_0' : + 'quay.io/biocontainers/bcftools:1.14--h88f3f91_0' }" input: tuple val(meta), path(vcf) diff --git a/modules/bcftools/query/main.nf b/modules/bcftools/query/main.nf index d1098f99..5f4135f4 100644 --- a/modules/bcftools/query/main.nf +++ b/modules/bcftools/query/main.nf @@ -2,10 +2,10 @@ process BCFTOOLS_QUERY { tag "$meta.id" label 'process_medium' - conda (params.enable_conda ? "bioconda::bcftools=1.13" : null) + conda (params.enable_conda ? 'bioconda::bcftools=1.14' : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/bcftools:1.13--h3a49de5_0' : - 'quay.io/biocontainers/bcftools:1.13--h3a49de5_0' }" + 'https://depot.galaxyproject.org/singularity/bcftools:1.14--h88f3f91_0' : + 'quay.io/biocontainers/bcftools:1.14--h88f3f91_0' }" input: tuple val(meta), path(vcf), path(index) diff --git a/modules/bcftools/reheader/main.nf b/modules/bcftools/reheader/main.nf index 018431a9..e6d9025d 100644 --- a/modules/bcftools/reheader/main.nf +++ b/modules/bcftools/reheader/main.nf @@ -2,10 +2,10 @@ process BCFTOOLS_REHEADER { tag "$meta.id" label 'process_low' - conda (params.enable_conda ? "bioconda::bcftools=1.13" : null) + conda (params.enable_conda ? 'bioconda::bcftools=1.14' : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/bcftools:1.13--h3a49de5_0' : - 'quay.io/biocontainers/bcftools:1.13--h3a49de5_0' }" + 'https://depot.galaxyproject.org/singularity/bcftools:1.14--h88f3f91_0' : + 'quay.io/biocontainers/bcftools:1.14--h88f3f91_0' }" input: tuple val(meta), path(vcf) diff --git a/modules/bcftools/stats/main.nf b/modules/bcftools/stats/main.nf index 67e8dca7..54a28bce 100644 --- a/modules/bcftools/stats/main.nf +++ b/modules/bcftools/stats/main.nf @@ -2,10 +2,10 @@ process BCFTOOLS_STATS { tag "$meta.id" label 'process_medium' - conda (params.enable_conda ? 'bioconda::bcftools=1.13' : null) + conda (params.enable_conda ? 'bioconda::bcftools=1.14' : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/bcftools:1.13--h3a49de5_0' : - 'quay.io/biocontainers/bcftools:1.13--h3a49de5_0' }" + 'https://depot.galaxyproject.org/singularity/bcftools:1.14--h88f3f91_0' : + 'quay.io/biocontainers/bcftools:1.14--h88f3f91_0' }" input: tuple val(meta), path(vcf) diff --git a/modules/bcftools/view/main.nf b/modules/bcftools/view/main.nf index f37c1ab9..7056ecdb 100644 --- a/modules/bcftools/view/main.nf +++ b/modules/bcftools/view/main.nf @@ -2,10 +2,10 @@ process BCFTOOLS_VIEW { tag "$meta.id" label 'process_medium' - conda (params.enable_conda ? "bioconda::bcftools=1.13" : null) + conda (params.enable_conda ? 'bioconda::bcftools=1.14' : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/bcftools:1.13--h3a49de5_0' : - 'quay.io/biocontainers/bcftools:1.13--h3a49de5_0' }" + 'https://depot.galaxyproject.org/singularity/bcftools:1.14--h88f3f91_0' : + 'quay.io/biocontainers/bcftools:1.14--h88f3f91_0' }" input: tuple val(meta), path(vcf), path(index) diff --git a/modules/bowtie2/align/main.nf b/modules/bowtie2/align/main.nf index 41c8a6bf..04f817ec 100644 --- a/modules/bowtie2/align/main.nf +++ b/modules/bowtie2/align/main.nf @@ -10,6 +10,7 @@ process BOWTIE2_ALIGN { input: tuple val(meta), path(reads) path index + val save_unaligned output: tuple val(meta), path('*.bam'), emit: bam @@ -22,7 +23,7 @@ process BOWTIE2_ALIGN { def args2 = task.ext.args2 ?: '' def prefix = task.ext.prefix ?: "${meta.id}" if (meta.single_end) { - def unaligned = params.save_unaligned ? "--un-gz ${prefix}.unmapped.fastq.gz" : '' + def unaligned = save_unaligned ? "--un-gz ${prefix}.unmapped.fastq.gz" : '' """ INDEX=`find -L ./ -name "*.rev.1.bt2" | sed 's/.rev.1.bt2//'` bowtie2 \\ @@ -42,7 +43,7 @@ process BOWTIE2_ALIGN { END_VERSIONS """ } else { - def unaligned = params.save_unaligned ? "--un-conc-gz ${prefix}.unmapped.fastq.gz" : '' + def unaligned = save_unaligned ? "--un-conc-gz ${prefix}.unmapped.fastq.gz" : '' """ INDEX=`find -L ./ -name "*.rev.1.bt2" | sed 's/.rev.1.bt2//'` bowtie2 \\ diff --git a/modules/fastp/main.nf b/modules/fastp/main.nf index 33603842..a406036a 100644 --- a/modules/fastp/main.nf +++ b/modules/fastp/main.nf @@ -2,10 +2,10 @@ process FASTP { tag "$meta.id" label 'process_medium' - conda (params.enable_conda ? 'bioconda::fastp=0.20.1' : null) + conda (params.enable_conda ? 'bioconda::fastp=0.23.2' : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/fastp:0.20.1--h8b12597_0' : - 'quay.io/biocontainers/fastp:0.20.1--h8b12597_0' }" + 'https://depot.galaxyproject.org/singularity/fastp:0.23.2--h79da9fb_0' : + 'quay.io/biocontainers/fastp:0.23.2--h79da9fb_0' }" input: tuple val(meta), path(reads) diff --git a/modules/minia/main.nf b/modules/minia/main.nf index ceff67c5..968cafa5 100644 --- a/modules/minia/main.nf +++ b/modules/minia/main.nf @@ -2,10 +2,10 @@ process MINIA { tag "$meta.id" label 'process_high' - conda (params.enable_conda ? "bioconda::minia=3.2.4" : null) + conda (params.enable_conda ? "bioconda::minia=3.2.6" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/minia:3.2.4--he513fc3_0' : - 'quay.io/biocontainers/minia:3.2.4--he513fc3_0' }" + 'https://depot.galaxyproject.org/singularity/minia:3.2.6--h9a82719_0' : + 'quay.io/biocontainers/minia:3.2.6--h9a82719_0' }" input: tuple val(meta), path(reads) diff --git a/modules/nanoplot/main.nf b/modules/nanoplot/main.nf index 36577d8a..c3fb8a37 100644 --- a/modules/nanoplot/main.nf +++ b/modules/nanoplot/main.nf @@ -2,10 +2,10 @@ process NANOPLOT { tag "$meta.id" label 'process_low' - conda (params.enable_conda ? 'bioconda::nanoplot=1.38.0' : null) + conda (params.enable_conda ? 'bioconda::nanoplot=1.39.0' : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/nanoplot:1.38.0--pyhdfd78af_0' : - 'quay.io/biocontainers/nanoplot:1.38.0--pyhdfd78af_0' }" + 'https://depot.galaxyproject.org/singularity/nanoplot:1.39.0--pyhdfd78af_0' : + 'quay.io/biocontainers/nanoplot:1.39.0--pyhdfd78af_0' }" input: tuple val(meta), path(ontfile) diff --git a/modules/pangolin/main.nf b/modules/pangolin/main.nf index 5ee2b2e0..40d6d78e 100644 --- a/modules/pangolin/main.nf +++ b/modules/pangolin/main.nf @@ -2,10 +2,10 @@ process PANGOLIN { tag "$meta.id" label 'process_medium' - conda (params.enable_conda ? 'bioconda::pangolin=3.1.11' : null) + conda (params.enable_conda ? 'bioconda::pangolin=3.1.17' : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/pangolin:3.1.11--pyhdfd78af_1' : - 'quay.io/biocontainers/pangolin:3.1.11--pyhdfd78af_1' }" + 'https://depot.galaxyproject.org/singularity/pangolin:3.1.17--pyhdfd78af_0' : + 'quay.io/biocontainers/pangolin:3.1.17--pyhdfd78af_0' }" input: tuple val(meta), path(fasta) diff --git a/modules/picard/collecthsmetrics/main.nf b/modules/picard/collecthsmetrics/main.nf index 9dabc3aa..ae3e4d96 100644 --- a/modules/picard/collecthsmetrics/main.nf +++ b/modules/picard/collecthsmetrics/main.nf @@ -2,10 +2,10 @@ process PICARD_COLLECTHSMETRICS { tag "$meta.id" label 'process_medium' - conda (params.enable_conda ? "bioconda::picard=2.26.7" : null) + conda (params.enable_conda ? "bioconda::picard=2.26.10" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/picard:2.26.7--hdfd78af_0' : - 'quay.io/biocontainers/picard:2.26.7--hdfd78af_0' }" + 'https://depot.galaxyproject.org/singularity/picard:2.26.10--hdfd78af_0' : + 'quay.io/biocontainers/picard:2.26.10--hdfd78af_0' }" input: tuple val(meta), path(bam) diff --git a/modules/picard/collectmultiplemetrics/main.nf b/modules/picard/collectmultiplemetrics/main.nf index 481761e3..9511f7a4 100644 --- a/modules/picard/collectmultiplemetrics/main.nf +++ b/modules/picard/collectmultiplemetrics/main.nf @@ -2,10 +2,10 @@ process PICARD_COLLECTMULTIPLEMETRICS { tag "$meta.id" label 'process_medium' - conda (params.enable_conda ? "bioconda::picard=2.26.7" : null) + conda (params.enable_conda ? "bioconda::picard=2.26.10" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/picard:2.26.7--hdfd78af_0' : - 'quay.io/biocontainers/picard:2.26.7--hdfd78af_0' }" + 'https://depot.galaxyproject.org/singularity/picard:2.26.10--hdfd78af_0' : + 'quay.io/biocontainers/picard:2.26.10--hdfd78af_0' }" input: tuple val(meta), path(bam) diff --git a/modules/picard/collectwgsmetrics/main.nf b/modules/picard/collectwgsmetrics/main.nf index 361ca1b5..dd9da1b6 100644 --- a/modules/picard/collectwgsmetrics/main.nf +++ b/modules/picard/collectwgsmetrics/main.nf @@ -2,10 +2,10 @@ process PICARD_COLLECTWGSMETRICS { tag "$meta.id" label 'process_medium' - conda (params.enable_conda ? "bioconda::picard=2.26.7" : null) + conda (params.enable_conda ? "bioconda::picard=2.26.10" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/picard:2.26.7--hdfd78af_0' : - 'quay.io/biocontainers/picard:2.26.7--hdfd78af_0' }" + 'https://depot.galaxyproject.org/singularity/picard:2.26.10--hdfd78af_0' : + 'quay.io/biocontainers/picard:2.26.10--hdfd78af_0' }" input: tuple val(meta), path(bam), path(bai) diff --git a/modules/picard/filtersamreads/main.nf b/modules/picard/filtersamreads/main.nf index 70bd2fa7..6a9c9c72 100644 --- a/modules/picard/filtersamreads/main.nf +++ b/modules/picard/filtersamreads/main.nf @@ -2,10 +2,10 @@ process PICARD_FILTERSAMREADS { tag "$meta.id" label 'process_low' - conda (params.enable_conda ? "bioconda::picard=2.26.7" : null) + conda (params.enable_conda ? "bioconda::picard=2.26.10" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/picard:2.26.7--hdfd78af_0' : - 'quay.io/biocontainers/picard:2.26.7--hdfd78af_0' }" + 'https://depot.galaxyproject.org/singularity/picard:2.26.10--hdfd78af_0' : + 'quay.io/biocontainers/picard:2.26.10--hdfd78af_0' }" input: tuple val(meta), path(bam), path(readlist) diff --git a/modules/picard/markduplicates/main.nf b/modules/picard/markduplicates/main.nf index 3087bff4..7990d7e6 100644 --- a/modules/picard/markduplicates/main.nf +++ b/modules/picard/markduplicates/main.nf @@ -2,10 +2,10 @@ process PICARD_MARKDUPLICATES { tag "$meta.id" label 'process_medium' - conda (params.enable_conda ? "bioconda::picard=2.26.7" : null) + conda (params.enable_conda ? "bioconda::picard=2.26.10" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/picard:2.26.7--hdfd78af_0' : - 'quay.io/biocontainers/picard:2.26.7--hdfd78af_0' }" + 'https://depot.galaxyproject.org/singularity/picard:2.26.10--hdfd78af_0' : + 'quay.io/biocontainers/picard:2.26.10--hdfd78af_0' }" input: tuple val(meta), path(bam) diff --git a/modules/picard/mergesamfiles/main.nf b/modules/picard/mergesamfiles/main.nf index 952d6331..96616a44 100644 --- a/modules/picard/mergesamfiles/main.nf +++ b/modules/picard/mergesamfiles/main.nf @@ -2,10 +2,10 @@ process PICARD_MERGESAMFILES { tag "$meta.id" label 'process_medium' - conda (params.enable_conda ? "bioconda::picard=2.26.7" : null) + conda (params.enable_conda ? "bioconda::picard=2.26.10" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/picard:2.26.7--hdfd78af_0' : - 'quay.io/biocontainers/picard:2.26.7--hdfd78af_0' }" + 'https://depot.galaxyproject.org/singularity/picard:2.26.10--hdfd78af_0' : + 'quay.io/biocontainers/picard:2.26.10--hdfd78af_0' }" input: tuple val(meta), path(bams) diff --git a/modules/picard/sortsam/main.nf b/modules/picard/sortsam/main.nf index 7728484c..6676eed6 100644 --- a/modules/picard/sortsam/main.nf +++ b/modules/picard/sortsam/main.nf @@ -2,10 +2,10 @@ process PICARD_SORTSAM { tag "$meta.id" label 'process_low' - conda (params.enable_conda ? "bioconda::picard=2.26.7" : null) + conda (params.enable_conda ? "bioconda::picard=2.26.10" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/picard:2.26.7--hdfd78af_0' : - 'quay.io/biocontainers/picard:2.26.7--hdfd78af_0' }" + 'https://depot.galaxyproject.org/singularity/picard:2.26.10--hdfd78af_0' : + 'quay.io/biocontainers/picard:2.26.10--hdfd78af_0' }" input: tuple val(meta), path(bam) diff --git a/modules/samtools/ampliconclip/main.nf b/modules/samtools/ampliconclip/main.nf index 55a2f736..e553f218 100644 --- a/modules/samtools/ampliconclip/main.nf +++ b/modules/samtools/ampliconclip/main.nf @@ -22,8 +22,9 @@ process SAMTOOLS_AMPLICONCLIP { script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" - def rejects = save_cliprejects ? "--rejects-file ${prefix}.cliprejects.bam" : "" - def stats = save_clipstats ? "-f ${prefix}.clipstats.txt" : "" + def rejects = save_cliprejects ? "--rejects-file ${prefix}.cliprejects.bam" : "" + def stats = save_clipstats ? "-f ${prefix}.clipstats.txt" : "" + if ("$bam" == "${prefix}.bam") error "Input and output names are the same, use \"task.ext.prefix\" to disambiguate!" """ samtools \\ ampliconclip \\ diff --git a/modules/samtools/bam2fq/main.nf b/modules/samtools/bam2fq/main.nf index 689eb960..32588dd7 100644 --- a/modules/samtools/bam2fq/main.nf +++ b/modules/samtools/bam2fq/main.nf @@ -9,11 +9,11 @@ process SAMTOOLS_BAM2FQ { input: tuple val(meta), path(inputbam) - val(split) + val split output: tuple val(meta), path("*.fq.gz"), emit: reads - path "versions.yml" , emit: versions + path "versions.yml" , emit: versions script: def args = task.ext.args ?: '' @@ -50,5 +50,4 @@ process SAMTOOLS_BAM2FQ { END_VERSIONS """ } - } diff --git a/modules/samtools/depth/main.nf b/modules/samtools/depth/main.nf index ebf029aa..50b2ed5d 100644 --- a/modules/samtools/depth/main.nf +++ b/modules/samtools/depth/main.nf @@ -12,12 +12,11 @@ process SAMTOOLS_DEPTH { output: tuple val(meta), path("*.tsv"), emit: tsv - path "versions.yml" , emit: versions + path "versions.yml" , emit: versions script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" - """ samtools \\ depth \\ diff --git a/modules/samtools/faidx/main.nf b/modules/samtools/faidx/main.nf index d8308b03..58c445d8 100644 --- a/modules/samtools/faidx/main.nf +++ b/modules/samtools/faidx/main.nf @@ -11,13 +11,16 @@ process SAMTOOLS_FAIDX { tuple val(meta), path(fasta) output: - tuple val(meta), path ("*.fai") , emit: fai - path "versions.yml" , emit: versions + tuple val(meta), path ("*.fai"), emit: fai + path "versions.yml" , emit: versions script: def args = task.ext.args ?: '' """ - samtools faidx $fasta + samtools \\ + faidx \\ + $fasta + cat <<-END_VERSIONS > versions.yml "${task.process}": samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//') diff --git a/modules/samtools/fastq/main.nf b/modules/samtools/fastq/main.nf index 212e804e..a2dae087 100644 --- a/modules/samtools/fastq/main.nf +++ b/modules/samtools/fastq/main.nf @@ -18,13 +18,14 @@ process SAMTOOLS_FASTQ { def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" def endedness = meta.single_end ? "-0 ${prefix}.fastq.gz" : "-1 ${prefix}_1.fastq.gz -2 ${prefix}_2.fastq.gz" - """ - samtools fastq \\ + samtools \\ + fastq \\ $args \\ --threads ${task.cpus-1} \\ $endedness \\ $bam + cat <<-END_VERSIONS > versions.yml "${task.process}": samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//') diff --git a/modules/samtools/fixmate/main.nf b/modules/samtools/fixmate/main.nf index d108f8d6..89ac666d 100644 --- a/modules/samtools/fixmate/main.nf +++ b/modules/samtools/fixmate/main.nf @@ -18,7 +18,6 @@ process SAMTOOLS_FIXMATE { def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" if ("$bam" == "${prefix}.bam") error "Input and output names are the same, use \"task.ext.prefix\" to disambiguate!" - """ samtools \\ fixmate \\ diff --git a/modules/samtools/flagstat/main.nf b/modules/samtools/flagstat/main.nf index 03721d0b..119adf77 100644 --- a/modules/samtools/flagstat/main.nf +++ b/modules/samtools/flagstat/main.nf @@ -17,7 +17,12 @@ process SAMTOOLS_FLAGSTAT { script: def args = task.ext.args ?: '' """ - samtools flagstat --threads ${task.cpus-1} $bam > ${bam}.flagstat + samtools \\ + flagstat \\ + --threads ${task.cpus-1} \\ + $bam \\ + > ${bam}.flagstat + cat <<-END_VERSIONS > versions.yml "${task.process}": samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//') diff --git a/modules/samtools/idxstats/main.nf b/modules/samtools/idxstats/main.nf index cd068679..fc54e676 100644 --- a/modules/samtools/idxstats/main.nf +++ b/modules/samtools/idxstats/main.nf @@ -17,7 +17,11 @@ process SAMTOOLS_IDXSTATS { script: def args = task.ext.args ?: '' """ - samtools idxstats $bam > ${bam}.idxstats + samtools \\ + idxstats \\ + $bam \\ + > ${bam}.idxstats + cat <<-END_VERSIONS > versions.yml "${task.process}": samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//') diff --git a/modules/samtools/index/main.nf b/modules/samtools/index/main.nf index db025a8f..c4fa2c63 100644 --- a/modules/samtools/index/main.nf +++ b/modules/samtools/index/main.nf @@ -19,7 +19,11 @@ process SAMTOOLS_INDEX { script: def args = task.ext.args ?: '' """ - samtools index -@ ${task.cpus-1} $args $input + samtools \\ + index \\ + -@ ${task.cpus-1} \\ + $args \\ + $input cat <<-END_VERSIONS > versions.yml "${task.process}": diff --git a/modules/samtools/merge/main.nf b/modules/samtools/merge/main.nf index fcfcf61f..a318bfc4 100644 --- a/modules/samtools/merge/main.nf +++ b/modules/samtools/merge/main.nf @@ -12,7 +12,7 @@ process SAMTOOLS_MERGE { path fasta output: - tuple val(meta), path("${prefix}.bam"), optional:true, emit: bam + tuple val(meta), path("${prefix}.bam") , optional:true, emit: bam tuple val(meta), path("${prefix}.cram"), optional:true, emit: cram path "versions.yml" , emit: versions @@ -22,7 +22,13 @@ process SAMTOOLS_MERGE { def file_type = input_files[0].getExtension() def reference = fasta ? "--reference ${fasta}" : "" """ - samtools merge --threads ${task.cpus-1} $args ${reference} ${prefix}.${file_type} $input_files + samtools \\ + merge \\ + --threads ${task.cpus-1} \\ + $args \\ + ${reference} \\ + ${prefix}.${file_type} \\ + $input_files cat <<-END_VERSIONS > versions.yml "${task.process}": diff --git a/modules/samtools/sort/main.nf b/modules/samtools/sort/main.nf index 0c2cf25e..42c7bbf4 100644 --- a/modules/samtools/sort/main.nf +++ b/modules/samtools/sort/main.nf @@ -17,6 +17,7 @@ process SAMTOOLS_SORT { script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" + if ("$bam" == "${prefix}.bam") error "Input and output names are the same, use \"task.ext.prefix\" to disambiguate!" """ samtools sort $args -@ $task.cpus -o ${prefix}.bam -T $prefix $bam cat <<-END_VERSIONS > versions.yml diff --git a/modules/samtools/stats/main.nf b/modules/samtools/stats/main.nf index 83c87002..7209070d 100644 --- a/modules/samtools/stats/main.nf +++ b/modules/samtools/stats/main.nf @@ -19,7 +19,12 @@ process SAMTOOLS_STATS { def args = task.ext.args ?: '' def reference = fasta ? "--reference ${fasta}" : "" """ - samtools stats --threads ${task.cpus-1} ${reference} ${input} > ${input}.stats + samtools \\ + stats \\ + --threads ${task.cpus-1} \\ + ${reference} \\ + ${input} \\ + > ${input}.stats cat <<-END_VERSIONS > versions.yml "${task.process}": diff --git a/modules/samtools/view/main.nf b/modules/samtools/view/main.nf index 619b84dc..fb31f70b 100644 --- a/modules/samtools/view/main.nf +++ b/modules/samtools/view/main.nf @@ -21,8 +21,15 @@ process SAMTOOLS_VIEW { def prefix = task.ext.prefix ?: "${meta.id}" def reference = fasta ? "--reference ${fasta} -C" : "" def file_type = input.getExtension() + if ("$input" == "${prefix}.${file_type}") error "Input and output names are the same, use \"task.ext.prefix\" to disambiguate!" """ - samtools view --threads ${task.cpus-1} ${reference} $args $input > ${prefix}.${file_type} + samtools \\ + view \\ + --threads ${task.cpus-1} \\ + ${reference} \\ + $args \\ + $input \\ + > ${prefix}.${file_type} cat <<-END_VERSIONS > versions.yml "${task.process}": diff --git a/tests/modules/bcftools/concat/test.yml b/tests/modules/bcftools/concat/test.yml index fee6158f..7d04ebc6 100644 --- a/tests/modules/bcftools/concat/test.yml +++ b/tests/modules/bcftools/concat/test.yml @@ -5,4 +5,4 @@ - bcftools files: - path: output/bcftools/test3.vcf.gz - md5sum: c400c7458524d889e0967b06ed72534f + md5sum: 35c88bfaad20101062e98beb217d7137 diff --git a/tests/modules/bcftools/mpileup/test.yml b/tests/modules/bcftools/mpileup/test.yml index f081c543..e3a515e6 100644 --- a/tests/modules/bcftools/mpileup/test.yml +++ b/tests/modules/bcftools/mpileup/test.yml @@ -5,8 +5,8 @@ - bcftools files: - path: output/bcftools/test.bcftools_stats.txt - md5sum: 74863ef525eef8d87e3119146d281bcf + md5sum: 72c506e633413c6b439f95336933984e - path: output/bcftools/test.vcf.gz.tbi - md5sum: 0772419c5d819b4caa4aebfcad010c6e + md5sum: ae0f17dcc2cb27034d848699b824c516 - path: output/bcftools/test.vcf.gz - md5sum: 9811674bb8da7ff30581319a910f2396 + md5sum: e9e520663875c66296f3bff0fa226c40 diff --git a/tests/modules/bcftools/stats/test.yml b/tests/modules/bcftools/stats/test.yml index d3587f95..59f3b991 100644 --- a/tests/modules/bcftools/stats/test.yml +++ b/tests/modules/bcftools/stats/test.yml @@ -5,4 +5,4 @@ - bcftools/stats files: - path: output/bcftools/test.bcftools_stats.txt - md5sum: d3543531396cf7012f13ebdce639cbc8 + md5sum: 1f948177196b09806782e1ee801463a2 diff --git a/tests/modules/bowtie2/align/main.nf b/tests/modules/bowtie2/align/main.nf index 8c8e3ab8..2d3945e5 100644 --- a/tests/modules/bowtie2/align/main.nf +++ b/tests/modules/bowtie2/align/main.nf @@ -13,9 +13,10 @@ workflow test_bowtie2_align_single_end { ] ] fasta = file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) + save_unaligned = false BOWTIE2_BUILD ( fasta ) - BOWTIE2_ALIGN ( input, BOWTIE2_BUILD.out.index ) + BOWTIE2_ALIGN ( input, BOWTIE2_BUILD.out.index, save_unaligned ) } workflow test_bowtie2_align_paired_end { @@ -27,7 +28,8 @@ workflow test_bowtie2_align_paired_end { ] ] fasta = file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) + save_unaligned = false BOWTIE2_BUILD ( fasta ) - BOWTIE2_ALIGN ( input, BOWTIE2_BUILD.out.index ) + BOWTIE2_ALIGN ( input, BOWTIE2_BUILD.out.index, save_unaligned ) } diff --git a/tests/modules/fastp/test.yml b/tests/modules/fastp/test.yml index cd7ddeed..0863259b 100644 --- a/tests/modules/fastp/test.yml +++ b/tests/modules/fastp/test.yml @@ -12,9 +12,9 @@ - "Q20 bases: 12922(92.9841%)" - "reads passed filter: 99" - path: output/fastp/test.trim.fastq.gz - md5sum: e2257263668dc8a75d95475099fb472d + md5sum: 4ce5c2b4db68a743cb0635ce7da3b9a4 - path: output/fastp/test.fastp.json - md5sum: e0d856ebb3da9e4462c3ce9683efe01d + md5sum: a517ba37b17a342b5428f2c1f8fe3dd7 - name: fastp test_fastp_paired_end command: nextflow run ./tests/modules/fastp -entry test_fastp_paired_end -c ./tests/config/nextflow.config -c ./tests/modules/fastp/nextflow.config @@ -33,9 +33,9 @@ contains: - '"passed_filter_reads": 198' - path: output/fastp/test_1.trim.fastq.gz - md5sum: e2257263668dc8a75d95475099fb472d + md5sum: 4ce5c2b4db68a743cb0635ce7da3b9a4 - path: output/fastp/test_2.trim.fastq.gz - md5sum: 9eff7203596580cc5e42aceab4a469df + md5sum: 532b190fb4dc7b2277ee5cf1464e598c - name: fastp test_fastp_single_end_trim_fail command: nextflow run ./tests/modules/fastp -entry test_fastp_single_end_trim_fail -c ./tests/config/nextflow.config -c ./tests/modules/fastp/nextflow.config @@ -51,11 +51,11 @@ - "Q20 bases: 12922(92.9841%)" - "reads passed filter: 99" - path: output/fastp/test.trim.fastq.gz - md5sum: e2257263668dc8a75d95475099fb472d + md5sum: 4ce5c2b4db68a743cb0635ce7da3b9a4 - path: output/fastp/test.fastp.json - md5sum: ee65a46d6e59fa556f112727b8a902ce + md5sum: 4be682c727942a45fc4c8600c28694a8 - path: output/fastp/test.fail.fastq.gz - md5sum: de315d397c994d8e66bafc7a8dc11070 + md5sum: b57f2026eb259a0b0c0b3960c270258d - name: fastp test_fastp_paired_end_trim_fail command: nextflow run ./tests/modules/fastp -entry test_fastp_paired_end_trim_fail -c ./tests/config/nextflow.config -c ./tests/modules/fastp/nextflow.config @@ -74,13 +74,13 @@ contains: - '"passed_filter_reads": 198' - path: output/fastp/test_1.trim.fastq.gz - md5sum: e2257263668dc8a75d95475099fb472d + md5sum: 4ce5c2b4db68a743cb0635ce7da3b9a4 - path: output/fastp/test_2.trim.fastq.gz - md5sum: 9eff7203596580cc5e42aceab4a469df + md5sum: 532b190fb4dc7b2277ee5cf1464e598c - path: output/fastp/test_1.fail.fastq.gz - md5sum: e62ff0123a74adfc6903d59a449cbdb0 + md5sum: d41d8cd98f00b204e9800998ecf8427e - path: output/fastp/test_2.fail.fastq.gz - md5sum: f52309b35a7c15cbd56a9c3906ef98a5 + md5sum: 72d0002841967676ac936d08746a9128 - name: fastp test_fastp_paired_end_merged command: nextflow run ./tests/modules/fastp -entry test_fastp_paired_end_merged -c ./tests/config/nextflow.config -c ./tests/modules/fastp/nextflow.config @@ -101,8 +101,8 @@ - "total reads: 75" - "total bases: 13683" - path: output/fastp/test.merged.fastq.gz - md5sum: ce88539076ced5aff11f866836ea1f40 + md5sum: 4955ca2c899729b17bd526d2626a8d73 - path: output/fastp/test_1.trim.fastq.gz - md5sum: 65d75c13abbfbfd993914e1379634100 + md5sum: 4a03721ee252b7c6e81e007550e6ab63 - path: output/fastp/test_2.trim.fastq.gz - md5sum: 0d87ce4d8ef29fb35f337eb0f6c9fcb4 + md5sum: 7a4ddf8485c147cd7aaf0d4f6cd57ace diff --git a/tests/modules/pangolin/test.yml b/tests/modules/pangolin/test.yml index c77e4912..15be6973 100644 --- a/tests/modules/pangolin/test.yml +++ b/tests/modules/pangolin/test.yml @@ -4,4 +4,4 @@ - pangolin files: - path: ./output/pangolin/test.pangolin.csv - md5sum: 4eaff46b5b11cd59fb44d4e8e7c4945e + md5sum: 2563856ee31ba2a4a05705ff940a28cc diff --git a/tests/modules/samtools/stats/test.yml b/tests/modules/samtools/stats/test.yml index 178eba72..d3444f02 100644 --- a/tests/modules/samtools/stats/test.yml +++ b/tests/modules/samtools/stats/test.yml @@ -14,4 +14,4 @@ - samtools files: - path: output/samtools/test.paired_end.recalibrated.sorted.cram.stats - md5sum: 62377b29c3f6253e37308a28d13a496d + md5sum: ab49e7380714b7033e374ba1114e5e54 From bdd8159c535e740ae6b831de6f28cc2ceda14ba9 Mon Sep 17 00:00:00 2001 From: Anthony Underwood Date: Tue, 11 Jan 2022 21:10:26 +0000 Subject: [PATCH 06/20] Add functionality to handle vbz compression (#1197) * Add functionality to handle vbz compression In order for nanopolish to be able handle the default compression for Mk1C Minions (vbz) it must be aware of where to find the plugin. Exporting the HDF5_PLUGIN_PATH found in the conda install (also used to make the biocontainer image) is the solution * Make the HDF5_PLUGIN_PATH more configurable Allow the HDF5_PLUGIN_PATH to be changed via a section in a config file e.g ``` params { modules { ..... 'nanopore_artic_minion' { ..... hd5_plugin_path = '/usr/local/lib/python3.6/site-packages/ont_fast5_api/vbz_plugin' } ...... } } ``` * Update modules/artic/minion/main.nf Co-authored-by: Harshil Patel --- modules/artic/minion/main.nf | 3 +++ 1 file changed, 3 insertions(+) diff --git a/modules/artic/minion/main.nf b/modules/artic/minion/main.nf index ce04fcc8..ed3c64d7 100644 --- a/modules/artic/minion/main.nf +++ b/modules/artic/minion/main.nf @@ -43,7 +43,10 @@ process ARTIC_MINION { summary = "" model = file(medaka_model).exists() ? "--medaka-model ./$medaka_model" : "--medaka-model $medaka_model" } + def hd5_plugin_path = task.ext.hd5_plugin_path ? "HDF5_PLUGIN_PATH=" + task.ext.hd5_plugin_path : "HDF5_PLUGIN_PATH=/usr/local/lib/python3.6/site-packages/ont_fast5_api/vbz_plugin" """ + $hd5_plugin_path + artic \\ minion \\ $args \\ From 30e64becaa1e6c807a09a49a6d3d457ff3cf7251 Mon Sep 17 00:00:00 2001 From: Mei Wu <25568561+projectoriented@users.noreply.github.com> Date: Tue, 11 Jan 2022 22:31:37 +0100 Subject: [PATCH 07/20] ucsc/wigtobigwig: add meta map (#1199) * add meta info * updated meta.yml * Apply suggestions from code review * Update test.yml Co-authored-by: Harshil Patel --- modules/ucsc/wigtobigwig/main.nf | 11 ++++++----- modules/ucsc/wigtobigwig/meta.yml | 6 ++++++ tests/modules/ucsc/wigtobigwig/main.nf | 3 ++- tests/modules/ucsc/wigtobigwig/test.yml | 2 ++ 4 files changed, 16 insertions(+), 6 deletions(-) diff --git a/modules/ucsc/wigtobigwig/main.nf b/modules/ucsc/wigtobigwig/main.nf index 4c596c9a..6a1847b6 100644 --- a/modules/ucsc/wigtobigwig/main.nf +++ b/modules/ucsc/wigtobigwig/main.nf @@ -1,7 +1,7 @@ def VERSION = '377' // Version information not provided by tool on CLI process UCSC_WIGTOBIGWIG { - tag '$wig' + tag "$meta.id" label 'process_medium' conda (params.enable_conda ? "bioconda::ucsc-wigtobigwig=377" : null) @@ -10,21 +10,22 @@ process UCSC_WIGTOBIGWIG { 'quay.io/biocontainers/ucsc-wigtobigwig:377--h0b8a92a_2' }" input: - path wig + tuple val(meta), path(wig) path sizes output: - path "*.bw" , emit: bw - path "versions.yml", emit: versions + tuple val(meta), path("*.bw"), emit: bw + path "versions.yml" , emit: versions script: def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" """ wigToBigWig \\ $args \\ $wig \\ $sizes \\ - ${wig.getSimpleName()}.bw + ${prefix}.bw cat <<-END_VERSIONS > versions.yml "${task.process}": diff --git a/modules/ucsc/wigtobigwig/meta.yml b/modules/ucsc/wigtobigwig/meta.yml index 4723ff2b..5ca94bb4 100644 --- a/modules/ucsc/wigtobigwig/meta.yml +++ b/modules/ucsc/wigtobigwig/meta.yml @@ -15,6 +15,11 @@ tools: licence: ['varies; see http://genome.ucsc.edu/license'] input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] - wig: type: file description: wig file @@ -35,3 +40,4 @@ output: authors: - "@jianhong" + - "@projectoriented" diff --git a/tests/modules/ucsc/wigtobigwig/main.nf b/tests/modules/ucsc/wigtobigwig/main.nf index 614d4150..2abbe5b2 100644 --- a/tests/modules/ucsc/wigtobigwig/main.nf +++ b/tests/modules/ucsc/wigtobigwig/main.nf @@ -6,7 +6,8 @@ include { UCSC_WIGTOBIGWIG } from '../../../../modules/ucsc/wigtobigwig/main.nf' workflow test_ucsc_wigtobigwig { - input = file(params.test_data['sarscov2']['illumina']['test_wig_gz'], checkIfExists: true) + input = [ [ id:'test', single_end:false ], // meta map, + file(params.test_data['sarscov2']['illumina']['test_wig_gz'], checkIfExists: true) ] sizes = file(params.test_data['sarscov2']['genome']['genome_sizes'], checkIfExists: true) diff --git a/tests/modules/ucsc/wigtobigwig/test.yml b/tests/modules/ucsc/wigtobigwig/test.yml index 08d4bce4..ea1e12b0 100644 --- a/tests/modules/ucsc/wigtobigwig/test.yml +++ b/tests/modules/ucsc/wigtobigwig/test.yml @@ -6,3 +6,5 @@ files: - path: output/ucsc/test.bw md5sum: b64af7003665dc51fae958216b06ed95 + - path: output/ucsc/versions.yml + md5sum: 7e14421c65faf5165389f34806acdb12 From 05ba4d901db380c6def3bc242ab18a2d88b25819 Mon Sep 17 00:00:00 2001 From: Subazini TK Date: Tue, 11 Jan 2022 22:39:21 +0100 Subject: [PATCH 08/20] samtools subsampling (#1194) Co-authored-by: Subazini Thankaswamy Kosalai Co-authored-by: Harshil Patel --- modules/samtools/view/main.nf | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modules/samtools/view/main.nf b/modules/samtools/view/main.nf index fb31f70b..cb205d0b 100644 --- a/modules/samtools/view/main.nf +++ b/modules/samtools/view/main.nf @@ -18,6 +18,7 @@ process SAMTOOLS_VIEW { script: def args = task.ext.args ?: '' + def args2 = task.ext.args2 ?: '' def prefix = task.ext.prefix ?: "${meta.id}" def reference = fasta ? "--reference ${fasta} -C" : "" def file_type = input.getExtension() @@ -29,6 +30,7 @@ process SAMTOOLS_VIEW { ${reference} \\ $args \\ $input \\ + $args2 \\ > ${prefix}.${file_type} cat <<-END_VERSIONS > versions.yml From 598d7abdb2a8df1aa3471c48d9186a9e3465983f Mon Sep 17 00:00:00 2001 From: FriederikeHanssen Date: Wed, 12 Jan 2022 13:55:54 +0100 Subject: [PATCH 09/20] Log4j again (#1202) * Log4j again * Update checksums --- modules/gatk4/applybqsr/main.nf | 6 +++--- modules/gatk4/applyvqsr/main.nf | 6 +++--- modules/gatk4/baserecalibrator/main.nf | 6 +++--- modules/gatk4/bedtointervallist/main.nf | 6 +++--- modules/gatk4/calculatecontamination/main.nf | 6 +++--- modules/gatk4/createsequencedictionary/main.nf | 6 +++--- modules/gatk4/createsomaticpanelofnormals/main.nf | 6 +++--- modules/gatk4/estimatelibrarycomplexity/main.nf | 6 +++--- modules/gatk4/fastqtosam/main.nf | 6 +++--- modules/gatk4/filtermutectcalls/main.nf | 6 +++--- modules/gatk4/gatherbqsrreports/main.nf | 6 +++--- modules/gatk4/genomicsdbimport/main.nf | 6 +++--- modules/gatk4/genotypegvcfs/main.nf | 6 +++--- modules/gatk4/getpileupsummaries/main.nf | 6 +++--- modules/gatk4/haplotypecaller/main.nf | 6 +++--- modules/gatk4/indexfeaturefile/main.nf | 6 +++--- modules/gatk4/intervallisttools/main.nf | 6 +++--- modules/gatk4/learnreadorientationmodel/main.nf | 6 +++--- modules/gatk4/markduplicates/main.nf | 6 +++--- modules/gatk4/mergebamalignment/main.nf | 6 +++--- modules/gatk4/mergevcfs/main.nf | 6 +++--- modules/gatk4/mutect2/main.nf | 6 +++--- modules/gatk4/revertsam/main.nf | 6 +++--- modules/gatk4/samtofastq/main.nf | 6 +++--- modules/gatk4/splitncigarreads/main.nf | 6 +++--- modules/gatk4/variantfiltration/main.nf | 6 +++--- modules/gatk4/variantrecalibrator/main.nf | 8 ++++---- tests/modules/gatk4/applybqsr/test.yml | 12 ++++++------ tests/modules/gatk4/applyvqsr/test.yml | 4 ++-- tests/modules/gatk4/calculatecontamination/test.yml | 6 +++--- tests/modules/gatk4/fastqtosam/test.yml | 4 ++-- tests/modules/gatk4/gatherbqsrreports/test.yml | 4 ++-- tests/modules/gatk4/genomicsdbimport/test.yml | 6 +++--- tests/modules/gatk4/indexfeaturefile/test.yml | 6 +++--- tests/modules/gatk4/markduplicates/test.yml | 12 ++++++------ tests/modules/gatk4/splitncigarreads/test.yml | 4 ++-- 36 files changed, 111 insertions(+), 111 deletions(-) diff --git a/modules/gatk4/applybqsr/main.nf b/modules/gatk4/applybqsr/main.nf index 22702211..c246190a 100644 --- a/modules/gatk4/applybqsr/main.nf +++ b/modules/gatk4/applybqsr/main.nf @@ -2,10 +2,10 @@ process GATK4_APPLYBQSR { tag "$meta.id" label 'process_low' - conda (params.enable_conda ? "bioconda::gatk4=4.2.4.0" : null) + conda (params.enable_conda ? "bioconda::gatk4=4.2.4.1" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/gatk4:4.2.4.0--hdfd78af_0' : - 'quay.io/biocontainers/gatk4:4.2.4.0--hdfd78af_0' }" + 'https://depot.galaxyproject.org/singularity/gatk4:4.2.4.1--hdfd78af_0' : + 'quay.io/biocontainers/gatk4:4.2.4.1--hdfd78af_0' }" input: tuple val(meta), path(input), path(input_index), path(bqsr_table), path(intervals) diff --git a/modules/gatk4/applyvqsr/main.nf b/modules/gatk4/applyvqsr/main.nf index 9e61ba4b..99233975 100644 --- a/modules/gatk4/applyvqsr/main.nf +++ b/modules/gatk4/applyvqsr/main.nf @@ -2,10 +2,10 @@ process GATK4_APPLYVQSR { tag "$meta.id" label 'process_low' - conda (params.enable_conda ? "bioconda::gatk4=4.2.4.0" : null) + conda (params.enable_conda ? "bioconda::gatk4=4.2.4.1" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/gatk4:4.2.4.0--hdfd78af_0' : - 'quay.io/biocontainers/gatk4:4.2.4.0--hdfd78af_0' }" + 'https://depot.galaxyproject.org/singularity/gatk4:4.2.4.1--hdfd78af_0' : + 'quay.io/biocontainers/gatk4:4.2.4.1--hdfd78af_0' }" input: tuple val(meta), path(vcf), path(tbi), path(recal), path(recalidx), path(tranches) diff --git a/modules/gatk4/baserecalibrator/main.nf b/modules/gatk4/baserecalibrator/main.nf index 3a26d6cc..42391d62 100644 --- a/modules/gatk4/baserecalibrator/main.nf +++ b/modules/gatk4/baserecalibrator/main.nf @@ -2,10 +2,10 @@ process GATK4_BASERECALIBRATOR { tag "$meta.id" label 'process_low' - conda (params.enable_conda ? "bioconda::gatk4=4.2.4.0" : null) + conda (params.enable_conda ? "bioconda::gatk4=4.2.4.1" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/gatk4:4.2.4.0--hdfd78af_0' : - 'quay.io/biocontainers/gatk4:4.2.4.0--hdfd78af_0' }" + 'https://depot.galaxyproject.org/singularity/gatk4:4.2.4.1--hdfd78af_0' : + 'quay.io/biocontainers/gatk4:4.2.4.1--hdfd78af_0' }" input: tuple val(meta), path(input), path(input_index), path(intervals) diff --git a/modules/gatk4/bedtointervallist/main.nf b/modules/gatk4/bedtointervallist/main.nf index 76d0f8a4..37f46f48 100644 --- a/modules/gatk4/bedtointervallist/main.nf +++ b/modules/gatk4/bedtointervallist/main.nf @@ -2,10 +2,10 @@ process GATK4_BEDTOINTERVALLIST { tag "$meta.id" label 'process_medium' - conda (params.enable_conda ? "bioconda::gatk4=4.2.4.0" : null) + conda (params.enable_conda ? "bioconda::gatk4=4.2.4.1" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/gatk4:4.2.4.0--hdfd78af_0' : - 'quay.io/biocontainers/gatk4:4.2.4.0--hdfd78af_0' }" + 'https://depot.galaxyproject.org/singularity/gatk4:4.2.4.1--hdfd78af_0' : + 'quay.io/biocontainers/gatk4:4.2.4.1--hdfd78af_0' }" input: tuple val(meta), path(bed) diff --git a/modules/gatk4/calculatecontamination/main.nf b/modules/gatk4/calculatecontamination/main.nf index 7fc88076..f4e98f64 100644 --- a/modules/gatk4/calculatecontamination/main.nf +++ b/modules/gatk4/calculatecontamination/main.nf @@ -2,10 +2,10 @@ process GATK4_CALCULATECONTAMINATION { tag "$meta.id" label 'process_low' - conda (params.enable_conda ? "bioconda::gatk4=4.2.4.0" : null) + conda (params.enable_conda ? "bioconda::gatk4=4.2.4.1" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/gatk4:4.2.4.0--hdfd78af_0' : - 'quay.io/biocontainers/gatk4:4.2.4.0--hdfd78af_0' }" + 'https://depot.galaxyproject.org/singularity/gatk4:4.2.4.1--hdfd78af_0' : + 'quay.io/biocontainers/gatk4:4.2.4.1--hdfd78af_0' }" input: tuple val(meta), path(pileup), path(matched) diff --git a/modules/gatk4/createsequencedictionary/main.nf b/modules/gatk4/createsequencedictionary/main.nf index 4d82a643..2cbd8948 100644 --- a/modules/gatk4/createsequencedictionary/main.nf +++ b/modules/gatk4/createsequencedictionary/main.nf @@ -2,10 +2,10 @@ process GATK4_CREATESEQUENCEDICTIONARY { tag "$fasta" label 'process_medium' - conda (params.enable_conda ? "bioconda::gatk4=4.2.4.0" : null) + conda (params.enable_conda ? "bioconda::gatk4=4.2.4.1" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/gatk4:4.2.4.0--hdfd78af_0' : - 'quay.io/biocontainers/gatk4:4.2.4.0--hdfd78af_0' }" + 'https://depot.galaxyproject.org/singularity/gatk4:4.2.4.1--hdfd78af_0' : + 'quay.io/biocontainers/gatk4:4.2.4.1--hdfd78af_0' }" input: path fasta diff --git a/modules/gatk4/createsomaticpanelofnormals/main.nf b/modules/gatk4/createsomaticpanelofnormals/main.nf index c094084f..8ab578c4 100644 --- a/modules/gatk4/createsomaticpanelofnormals/main.nf +++ b/modules/gatk4/createsomaticpanelofnormals/main.nf @@ -2,10 +2,10 @@ process GATK4_CREATESOMATICPANELOFNORMALS { tag "$meta.id" label 'process_low' - conda (params.enable_conda ? "bioconda::gatk4=4.2.4.0" : null) + conda (params.enable_conda ? "bioconda::gatk4=4.2.4.1" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/gatk4:4.2.4.0--hdfd78af_0' : - 'quay.io/biocontainers/gatk4:4.2.4.0--hdfd78af_0' }" + 'https://depot.galaxyproject.org/singularity/gatk4:4.2.4.1--hdfd78af_0' : + 'quay.io/biocontainers/gatk4:4.2.4.1--hdfd78af_0' }" input: tuple val(meta), path(genomicsdb) diff --git a/modules/gatk4/estimatelibrarycomplexity/main.nf b/modules/gatk4/estimatelibrarycomplexity/main.nf index 78079c20..744ebf21 100644 --- a/modules/gatk4/estimatelibrarycomplexity/main.nf +++ b/modules/gatk4/estimatelibrarycomplexity/main.nf @@ -2,10 +2,10 @@ process GATK4_ESTIMATELIBRARYCOMPLEXITY { tag "$meta.id" label 'process_medium' - conda (params.enable_conda ? "bioconda::gatk4=4.2.4.0" : null) + conda (params.enable_conda ? "bioconda::gatk4=4.2.4.1" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/gatk4:4.2.4.0--hdfd78af_0' : - 'quay.io/biocontainers/gatk4:4.2.4.0--hdfd78af_0' }" + 'https://depot.galaxyproject.org/singularity/gatk4:4.2.4.1--hdfd78af_0' : + 'quay.io/biocontainers/gatk4:4.2.4.1--hdfd78af_0' }" input: tuple val(meta), path(cram) diff --git a/modules/gatk4/fastqtosam/main.nf b/modules/gatk4/fastqtosam/main.nf index 2c13890f..f0116b41 100644 --- a/modules/gatk4/fastqtosam/main.nf +++ b/modules/gatk4/fastqtosam/main.nf @@ -2,10 +2,10 @@ process GATK4_FASTQTOSAM { tag "$meta.id" label 'process_medium' - conda (params.enable_conda ? "bioconda::gatk4=4.2.4.0" : null) + conda (params.enable_conda ? "bioconda::gatk4=4.2.4.1" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/gatk4:4.2.4.0--hdfd78af_0' : - 'quay.io/biocontainers/gatk4:4.2.4.0--hdfd78af_0' }" + 'https://depot.galaxyproject.org/singularity/gatk4:4.2.4.1--hdfd78af_0' : + 'quay.io/biocontainers/gatk4:4.2.4.1--hdfd78af_0' }" input: tuple val(meta), path(reads) diff --git a/modules/gatk4/filtermutectcalls/main.nf b/modules/gatk4/filtermutectcalls/main.nf index e68d01db..2f5f8dcb 100644 --- a/modules/gatk4/filtermutectcalls/main.nf +++ b/modules/gatk4/filtermutectcalls/main.nf @@ -2,10 +2,10 @@ process GATK4_FILTERMUTECTCALLS { tag "$meta.id" label 'process_low' - conda (params.enable_conda ? "bioconda::gatk4=4.2.4.0" : null) + conda (params.enable_conda ? "bioconda::gatk4=4.2.4.1" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/gatk4:4.2.4.0--hdfd78af_0' : - 'quay.io/biocontainers/gatk4:4.2.4.0--hdfd78af_0' }" + 'https://depot.galaxyproject.org/singularity/gatk4:4.2.4.1--hdfd78af_0' : + 'quay.io/biocontainers/gatk4:4.2.4.1--hdfd78af_0' }" input: tuple val(meta), path(vcf), path(tbi), path(stats), path(orientationbias), path(segmentation), path(contaminationfile), val(contaminationest) diff --git a/modules/gatk4/gatherbqsrreports/main.nf b/modules/gatk4/gatherbqsrreports/main.nf index 721f5634..b084ab00 100644 --- a/modules/gatk4/gatherbqsrreports/main.nf +++ b/modules/gatk4/gatherbqsrreports/main.nf @@ -2,10 +2,10 @@ process GATK4_GATHERBQSRREPORTS { tag "$meta.id" label 'process_medium' - conda (params.enable_conda ? "bioconda::gatk4=4.2.4.0" : null) + conda (params.enable_conda ? "bioconda::gatk4=4.2.4.1" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/gatk4:4.2.4.0--hdfd78af_0' : - 'quay.io/biocontainers/gatk4:4.2.4.0--hdfd78af_0' }" + 'https://depot.galaxyproject.org/singularity/gatk4:4.2.4.1--hdfd78af_0' : + 'quay.io/biocontainers/gatk4:4.2.4.1--hdfd78af_0' }" input: tuple val(meta), path(recal_table) diff --git a/modules/gatk4/genomicsdbimport/main.nf b/modules/gatk4/genomicsdbimport/main.nf index f1a606cb..94a589cd 100644 --- a/modules/gatk4/genomicsdbimport/main.nf +++ b/modules/gatk4/genomicsdbimport/main.nf @@ -2,10 +2,10 @@ process GATK4_GENOMICSDBIMPORT { tag "$meta.id" label 'process_low' - conda (params.enable_conda ? "bioconda::gatk4=4.2.4.0" : null) + conda (params.enable_conda ? "bioconda::gatk4=4.2.4.1" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/gatk4:4.2.4.0--hdfd78af_0' : - 'quay.io/biocontainers/gatk4:4.2.4.0--hdfd78af_0' }" + 'https://depot.galaxyproject.org/singularity/gatk4:4.2.4.1--hdfd78af_0' : + 'quay.io/biocontainers/gatk4:4.2.4.1--hdfd78af_0' }" input: tuple val(meta), path(vcf), path(tbi), path(intervalfile), val(intervalval), path(wspace) diff --git a/modules/gatk4/genotypegvcfs/main.nf b/modules/gatk4/genotypegvcfs/main.nf index f9107b1e..016da1f5 100644 --- a/modules/gatk4/genotypegvcfs/main.nf +++ b/modules/gatk4/genotypegvcfs/main.nf @@ -2,10 +2,10 @@ process GATK4_GENOTYPEGVCFS { tag "$meta.id" label 'process_medium' - conda (params.enable_conda ? "bioconda::gatk4=4.2.4.0" : null) + conda (params.enable_conda ? "bioconda::gatk4=4.2.4.1" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/gatk4:4.2.4.0--hdfd78af_0' : - 'quay.io/biocontainers/gatk4:4.2.4.0--hdfd78af_0' }" + 'https://depot.galaxyproject.org/singularity/gatk4:4.2.4.1--hdfd78af_0' : + 'quay.io/biocontainers/gatk4:4.2.4.1--hdfd78af_0' }" input: tuple val(meta), path(gvcf), path(gvcf_index), path(intervals) diff --git a/modules/gatk4/getpileupsummaries/main.nf b/modules/gatk4/getpileupsummaries/main.nf index 896e23bd..a81ae635 100644 --- a/modules/gatk4/getpileupsummaries/main.nf +++ b/modules/gatk4/getpileupsummaries/main.nf @@ -2,10 +2,10 @@ process GATK4_GETPILEUPSUMMARIES { tag "$meta.id" label 'process_low' - conda (params.enable_conda ? "bioconda::gatk4=4.2.4.0" : null) + conda (params.enable_conda ? "bioconda::gatk4=4.2.4.1" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/gatk4:4.2.4.0--hdfd78af_0' : - 'quay.io/biocontainers/gatk4:4.2.4.0--hdfd78af_0' }" + 'https://depot.galaxyproject.org/singularity/gatk4:4.2.4.1--hdfd78af_0' : + 'quay.io/biocontainers/gatk4:4.2.4.1--hdfd78af_0' }" input: tuple val(meta), path(bam), path(bai) diff --git a/modules/gatk4/haplotypecaller/main.nf b/modules/gatk4/haplotypecaller/main.nf index 8b4c0e64..8c22da68 100644 --- a/modules/gatk4/haplotypecaller/main.nf +++ b/modules/gatk4/haplotypecaller/main.nf @@ -2,10 +2,10 @@ process GATK4_HAPLOTYPECALLER { tag "$meta.id" label 'process_medium' - conda (params.enable_conda ? "bioconda::gatk4=4.2.4.0" : null) + conda (params.enable_conda ? "bioconda::gatk4=4.2.4.1" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/gatk4:4.2.4.0--hdfd78af_0' : - 'quay.io/biocontainers/gatk4:4.2.4.0--hdfd78af_0' }" + 'https://depot.galaxyproject.org/singularity/gatk4:4.2.4.1--hdfd78af_0' : + 'quay.io/biocontainers/gatk4:4.2.4.1--hdfd78af_0' }" input: tuple val(meta), path(input), path(input_index), path(intervals) diff --git a/modules/gatk4/indexfeaturefile/main.nf b/modules/gatk4/indexfeaturefile/main.nf index 63633e5f..ecd24173 100644 --- a/modules/gatk4/indexfeaturefile/main.nf +++ b/modules/gatk4/indexfeaturefile/main.nf @@ -2,10 +2,10 @@ process GATK4_INDEXFEATUREFILE { tag "$meta.id" label 'process_low' - conda (params.enable_conda ? "bioconda::gatk4=4.2.4.0" : null) + conda (params.enable_conda ? "bioconda::gatk4=4.2.4.1" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/gatk4:4.2.4.0--hdfd78af_0' : - 'quay.io/biocontainers/gatk4:4.2.4.0--hdfd78af_0' }" + 'https://depot.galaxyproject.org/singularity/gatk4:4.2.4.1--hdfd78af_0' : + 'quay.io/biocontainers/gatk4:4.2.4.1--hdfd78af_0' }" input: tuple val(meta), path(feature_file) diff --git a/modules/gatk4/intervallisttools/main.nf b/modules/gatk4/intervallisttools/main.nf index b1881932..17412160 100644 --- a/modules/gatk4/intervallisttools/main.nf +++ b/modules/gatk4/intervallisttools/main.nf @@ -2,10 +2,10 @@ process GATK4_INTERVALLISTTOOLS { tag "$meta.id" label 'process_medium' - conda (params.enable_conda ? "bioconda::gatk4=4.2.4.0" : null) + conda (params.enable_conda ? "bioconda::gatk4=4.2.4.1" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/gatk4:4.2.4.0--hdfd78af_0' : - 'quay.io/biocontainers/gatk4:4.2.4.0--hdfd78af_0' }" + 'https://depot.galaxyproject.org/singularity/gatk4:4.2.4.1--hdfd78af_0' : + 'quay.io/biocontainers/gatk4:4.2.4.1--hdfd78af_0' }" input: tuple val(meta), path(interval_list) diff --git a/modules/gatk4/learnreadorientationmodel/main.nf b/modules/gatk4/learnreadorientationmodel/main.nf index 961b6a75..d1bce19f 100644 --- a/modules/gatk4/learnreadorientationmodel/main.nf +++ b/modules/gatk4/learnreadorientationmodel/main.nf @@ -2,10 +2,10 @@ process GATK4_LEARNREADORIENTATIONMODEL { tag "$meta.id" label 'process_low' - conda (params.enable_conda ? "bioconda::gatk4=4.2.4.0" : null) + conda (params.enable_conda ? "bioconda::gatk4=4.2.4.1" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/gatk4:4.2.4.0--hdfd78af_0' : - 'quay.io/biocontainers/gatk4:4.2.4.0--hdfd78af_0' }" + 'https://depot.galaxyproject.org/singularity/gatk4:4.2.4.1--hdfd78af_0' : + 'quay.io/biocontainers/gatk4:4.2.4.1--hdfd78af_0' }" input: tuple val(meta), path(f1r2) diff --git a/modules/gatk4/markduplicates/main.nf b/modules/gatk4/markduplicates/main.nf index 5f6f127e..c101d042 100644 --- a/modules/gatk4/markduplicates/main.nf +++ b/modules/gatk4/markduplicates/main.nf @@ -2,10 +2,10 @@ process GATK4_MARKDUPLICATES { tag "$meta.id" label 'process_low' - conda (params.enable_conda ? "bioconda::gatk4=4.2.4.0" : null) + conda (params.enable_conda ? "bioconda::gatk4=4.2.4.1" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/gatk4:4.2.4.0--hdfd78af_0' : - 'quay.io/biocontainers/gatk4:4.2.4.0--hdfd78af_0' }" + 'https://depot.galaxyproject.org/singularity/gatk4:4.2.4.1--hdfd78af_0' : + 'quay.io/biocontainers/gatk4:4.2.4.1--hdfd78af_0' }" input: tuple val(meta), path(bams) diff --git a/modules/gatk4/mergebamalignment/main.nf b/modules/gatk4/mergebamalignment/main.nf index b13b9ae8..b0b9daa1 100644 --- a/modules/gatk4/mergebamalignment/main.nf +++ b/modules/gatk4/mergebamalignment/main.nf @@ -2,10 +2,10 @@ process GATK4_MERGEBAMALIGNMENT { tag "$meta.id" label 'process_low' - conda (params.enable_conda ? "bioconda::gatk4=4.2.4.0" : null) + conda (params.enable_conda ? "bioconda::gatk4=4.2.4.1" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/gatk4:4.2.4.0--hdfd78af_0' : - 'quay.io/biocontainers/gatk4:4.2.4.0--hdfd78af_0' }" + 'https://depot.galaxyproject.org/singularity/gatk4:4.2.4.1--hdfd78af_0' : + 'quay.io/biocontainers/gatk4:4.2.4.1--hdfd78af_0' }" input: tuple val(meta), path(aligned) diff --git a/modules/gatk4/mergevcfs/main.nf b/modules/gatk4/mergevcfs/main.nf index 9158a242..b2e584a8 100644 --- a/modules/gatk4/mergevcfs/main.nf +++ b/modules/gatk4/mergevcfs/main.nf @@ -2,10 +2,10 @@ process GATK4_MERGEVCFS { tag "$meta.id" label 'process_medium' - conda (params.enable_conda ? "bioconda::gatk4=4.2.4.0" : null) + conda (params.enable_conda ? "bioconda::gatk4=4.2.4.1" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/gatk4:4.2.4.0--hdfd78af_0' : - 'quay.io/biocontainers/gatk4:4.2.4.0--hdfd78af_0' }" + 'https://depot.galaxyproject.org/singularity/gatk4:4.2.4.1--hdfd78af_0' : + 'quay.io/biocontainers/gatk4:4.2.4.1--hdfd78af_0' }" input: tuple val(meta), path(vcfs) diff --git a/modules/gatk4/mutect2/main.nf b/modules/gatk4/mutect2/main.nf index 1abf44ea..c33cee18 100644 --- a/modules/gatk4/mutect2/main.nf +++ b/modules/gatk4/mutect2/main.nf @@ -2,10 +2,10 @@ process GATK4_MUTECT2 { tag "$meta.id" label 'process_medium' - conda (params.enable_conda ? "bioconda::gatk4=4.2.4.0" : null) + conda (params.enable_conda ? "bioconda::gatk4=4.2.4.1" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/gatk4:4.2.4.0--hdfd78af_0' : - 'quay.io/biocontainers/gatk4:4.2.4.0--hdfd78af_0' }" + 'https://depot.galaxyproject.org/singularity/gatk4:4.2.4.1--hdfd78af_0' : + 'quay.io/biocontainers/gatk4:4.2.4.1--hdfd78af_0' }" input: tuple val(meta) , path(input) , path(input_index) , val(which_norm) diff --git a/modules/gatk4/revertsam/main.nf b/modules/gatk4/revertsam/main.nf index 585d2063..5a13d61d 100644 --- a/modules/gatk4/revertsam/main.nf +++ b/modules/gatk4/revertsam/main.nf @@ -2,10 +2,10 @@ process GATK4_REVERTSAM { tag "$meta.id" label 'process_medium' - conda (params.enable_conda ? "bioconda::gatk4=4.2.4.0" : null) + conda (params.enable_conda ? "bioconda::gatk4=4.2.4.1" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/gatk4:4.2.4.0--hdfd78af_0' : - 'quay.io/biocontainers/gatk4:4.2.4.0--hdfd78af_0' }" + 'https://depot.galaxyproject.org/singularity/gatk4:4.2.4.1--hdfd78af_0' : + 'quay.io/biocontainers/gatk4:4.2.4.1--hdfd78af_0' }" input: tuple val(meta), path(bam) diff --git a/modules/gatk4/samtofastq/main.nf b/modules/gatk4/samtofastq/main.nf index 9b73299f..0a75f604 100644 --- a/modules/gatk4/samtofastq/main.nf +++ b/modules/gatk4/samtofastq/main.nf @@ -2,10 +2,10 @@ process GATK4_SAMTOFASTQ { tag "$meta.id" label 'process_medium' - conda (params.enable_conda ? "bioconda::gatk4=4.2.4.0" : null) + conda (params.enable_conda ? "bioconda::gatk4=4.2.4.1" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/gatk4:4.2.4.0--hdfd78af_0' : - 'quay.io/biocontainers/gatk4:4.2.4.0--hdfd78af_0' }" + 'https://depot.galaxyproject.org/singularity/gatk4:4.2.4.1--hdfd78af_0' : + 'quay.io/biocontainers/gatk4:4.2.4.1--hdfd78af_0' }" input: tuple val(meta), path(bam) diff --git a/modules/gatk4/splitncigarreads/main.nf b/modules/gatk4/splitncigarreads/main.nf index c27c393f..29483fb5 100644 --- a/modules/gatk4/splitncigarreads/main.nf +++ b/modules/gatk4/splitncigarreads/main.nf @@ -2,10 +2,10 @@ process GATK4_SPLITNCIGARREADS { tag "$meta.id" label 'process_medium' - conda (params.enable_conda ? "bioconda::gatk4=4.2.4.0" : null) + conda (params.enable_conda ? "bioconda::gatk4=4.2.4.1" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/gatk4:4.2.4.0--hdfd78af_0' : - 'quay.io/biocontainers/gatk4:4.2.4.0--hdfd78af_0' }" + 'https://depot.galaxyproject.org/singularity/gatk4:4.2.4.1--hdfd78af_0' : + 'quay.io/biocontainers/gatk4:4.2.4.1--hdfd78af_0' }" input: tuple val(meta), path(bam) diff --git a/modules/gatk4/variantfiltration/main.nf b/modules/gatk4/variantfiltration/main.nf index 32e4aae1..beaec0c0 100644 --- a/modules/gatk4/variantfiltration/main.nf +++ b/modules/gatk4/variantfiltration/main.nf @@ -2,10 +2,10 @@ process GATK4_VARIANTFILTRATION { tag "$meta.id" label 'process_medium' - conda (params.enable_conda ? "bioconda::gatk4=4.2.4.0" : null) + conda (params.enable_conda ? "bioconda::gatk4=4.2.4.1" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/gatk4:4.2.4.0--hdfd78af_0' : - 'quay.io/biocontainers/gatk4:4.2.4.0--hdfd78af_0' }" + 'https://depot.galaxyproject.org/singularity/gatk4:4.2.4.1--hdfd78af_0' : + 'quay.io/biocontainers/gatk4:4.2.4.1--hdfd78af_0' }" input: tuple val(meta), path(vcf), path(vcf_tbi) diff --git a/modules/gatk4/variantrecalibrator/main.nf b/modules/gatk4/variantrecalibrator/main.nf index 5641d6de..c4aa5535 100644 --- a/modules/gatk4/variantrecalibrator/main.nf +++ b/modules/gatk4/variantrecalibrator/main.nf @@ -2,10 +2,10 @@ process GATK4_VARIANTRECALIBRATOR { tag "$meta.id" label 'process_low' - conda (params.enable_conda ? "bioconda::gatk4=4.2.3.0" : null) - container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/gatk4:4.2.3.0--hdfd78af_0' : - 'quay.io/biocontainers/gatk4:4.2.3.0--hdfd78af_0' }" + conda (params.enable_conda ? "bioconda::gatk4=4.2.4.1" : null) + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/gatk4:4.2.4.1--hdfd78af_0' : + 'quay.io/biocontainers/gatk4:4.2.4.1--hdfd78af_0' }" input: tuple val(meta), path(vcf) , path(tbi) diff --git a/tests/modules/gatk4/applybqsr/test.yml b/tests/modules/gatk4/applybqsr/test.yml index b4aef7ab..7449c210 100644 --- a/tests/modules/gatk4/applybqsr/test.yml +++ b/tests/modules/gatk4/applybqsr/test.yml @@ -5,9 +5,9 @@ - gatk4/applybqsr files: - path: output/gatk4/test.bam - md5sum: 8fe7c4b5fcfb72d24ed8102eb26e42fb + md5sum: 908825edf1f229a072f91d8b753d95dd - path: output/gatk4/versions.yml - md5sum: 8a2fb7c7e38f24d3fefd5e84da701b00 + md5sum: b65c46529ae9658db0c596cbc26505c2 - name: gatk4 applybqsr test_gatk4_applybqsr_intervals command: nextflow run tests/modules/gatk4/applybqsr -entry test_gatk4_applybqsr_intervals -c tests/config/nextflow.config -c ./tests/modules/gatk4/applybqsr/nextflow.config @@ -16,9 +16,9 @@ - gatk4/applybqsr files: - path: output/gatk4/test.bam - md5sum: a7a1d1373ac1529abbc5e05359718ab1 + md5sum: 50f8a79c7d528e02470416f81eb582bc - path: output/gatk4/versions.yml - md5sum: 550eecbb88887fadf8c62c5992ae48af + md5sum: 17c8a40b3537e3400edebd1826d28385 - name: gatk4 applybqsr test_gatk4_applybqsr_cram command: nextflow run tests/modules/gatk4/applybqsr -entry test_gatk4_applybqsr_cram -c tests/config/nextflow.config -c ./tests/modules/gatk4/applybqsr/nextflow.config @@ -27,6 +27,6 @@ - gatk4/applybqsr files: - path: output/gatk4/test.cram - md5sum: b7659b3b2adaabbe73658dc059dbfdf6 + md5sum: cd8d4ba6181f714e74641adeb2f9aa1d - path: output/gatk4/versions.yml - md5sum: 57933f27b3a31b05af3f7c248d365396 + md5sum: 35218922e1929c699ea64de9f4c29fb5 diff --git a/tests/modules/gatk4/applyvqsr/test.yml b/tests/modules/gatk4/applyvqsr/test.yml index 577da79d..b2acc6d8 100644 --- a/tests/modules/gatk4/applyvqsr/test.yml +++ b/tests/modules/gatk4/applyvqsr/test.yml @@ -7,7 +7,7 @@ - path: output/gatk4/test.vcf.gz - path: output/gatk4/test.vcf.gz.tbi - path: output/gatk4/versions.yml - md5sum: 984c932ee9a5683b18e22a369aa5c9e7 + md5sum: 524a78cdfa56c8b09a4ff3f4cb278261 - name: gatk4 applyvqsr test_gatk4_applyvqsr_allele_specific command: nextflow run tests/modules/gatk4/applyvqsr -entry test_gatk4_applyvqsr_allele_specific -c tests/config/nextflow.config -c ./tests/modules/gatk4/applyvqsr/nextflow.config @@ -18,4 +18,4 @@ - path: output/gatk4/test.vcf.gz - path: output/gatk4/test.vcf.gz.tbi - path: output/gatk4/versions.yml - md5sum: 3b55f26c94c5f145f10ef4c5f83ec3cc + md5sum: 7a3c6e97628bd1f5f4e7fd429bf74a8e diff --git a/tests/modules/gatk4/calculatecontamination/test.yml b/tests/modules/gatk4/calculatecontamination/test.yml index 9370ffd4..d598d1c0 100644 --- a/tests/modules/gatk4/calculatecontamination/test.yml +++ b/tests/modules/gatk4/calculatecontamination/test.yml @@ -7,7 +7,7 @@ - path: output/gatk4/test.contamination.table md5sum: 46c708c943b453da89a3da08acfdb2a7 - path: output/gatk4/versions.yml - md5sum: 6f2396e71389cdfd184f91222c24fe8d + md5sum: 79575dc2e6a7f0361f2d8b090c496070 - name: gatk4 calculatecontamination test_gatk4_calculatecontamination_matched_pair command: nextflow run tests/modules/gatk4/calculatecontamination -entry test_gatk4_calculatecontamination_matched_pair -c tests/config/nextflow.config -c ./tests/modules/gatk4/calculatecontamination/nextflow.config @@ -18,7 +18,7 @@ - path: output/gatk4/test.contamination.table md5sum: 46c708c943b453da89a3da08acfdb2a7 - path: output/gatk4/versions.yml - md5sum: 26863fa1e7e7d50d1a10761eced26062 + md5sum: 733f15ef7eb504daec9fd8cd9beef71a - name: gatk4 calculatecontamination test_gatk4_calculatecontamination_segmentation command: nextflow run tests/modules/gatk4/calculatecontamination -entry test_gatk4_calculatecontamination_segmentation -c tests/config/nextflow.config -c ./tests/modules/gatk4/calculatecontamination/nextflow.config @@ -31,4 +31,4 @@ - path: output/gatk4/test.segmentation.table md5sum: f4643d9319bde4efbfbe516d6fb13052 - path: output/gatk4/versions.yml - md5sum: 8b1191953ff20660e06e2a5d79e96b02 + md5sum: 5396e33146addbe4a59d0f30cb573a3a diff --git a/tests/modules/gatk4/fastqtosam/test.yml b/tests/modules/gatk4/fastqtosam/test.yml index 912633b5..7f6357e8 100644 --- a/tests/modules/gatk4/fastqtosam/test.yml +++ b/tests/modules/gatk4/fastqtosam/test.yml @@ -6,7 +6,7 @@ files: - path: output/gatk4/test.bam - path: output/gatk4/versions.yml - md5sum: db3fa4b463427b08e32a5d8264be59c1 + md5sum: 03f3accdc3e3c392c1179213286a0b67 - name: gatk4 fastqtosam test_gatk4_fastqtosam_paired_end command: nextflow run tests/modules/gatk4/fastqtosam -entry test_gatk4_fastqtosam_paired_end -c tests/config/nextflow.config -c ./tests/modules/gatk4/fastqtosam/nextflow.config @@ -16,4 +16,4 @@ files: - path: output/gatk4/test.bam - path: output/gatk4/versions.yml - md5sum: f4e35e46a29d8faebda5e852f9d0a132 + md5sum: 144e7118d5f277ad5fba863213c810b0 diff --git a/tests/modules/gatk4/gatherbqsrreports/test.yml b/tests/modules/gatk4/gatherbqsrreports/test.yml index 38b8cf54..521f2197 100644 --- a/tests/modules/gatk4/gatherbqsrreports/test.yml +++ b/tests/modules/gatk4/gatherbqsrreports/test.yml @@ -7,7 +7,7 @@ - path: output/gatk4/test.table md5sum: 9603b69fdc3b5090de2e0dd78bfcc4bf - path: output/gatk4/versions.yml - md5sum: 2fa1214574359aa7c4e2212efbae3714 + md5sum: b53101f71b0763e80855703ba4e1f101 - name: gatk4 gatherbqsrreports test_gatk4_gatherbqsrreports_multiple command: nextflow run tests/modules/gatk4/gatherbqsrreports -entry test_gatk4_gatherbqsrreports_multiple -c tests/config/nextflow.config @@ -18,4 +18,4 @@ - path: output/gatk4/test.table md5sum: 0c1257eececf95db8ca378272d0f21f9 - path: output/gatk4/versions.yml - md5sum: 92c17a728cef6d458491bcec6dac3e0c + md5sum: 584a6ebf04f54abcfcf4c8255e13ff2a diff --git a/tests/modules/gatk4/genomicsdbimport/test.yml b/tests/modules/gatk4/genomicsdbimport/test.yml index 059a561a..d1a8f073 100644 --- a/tests/modules/gatk4/genomicsdbimport/test.yml +++ b/tests/modules/gatk4/genomicsdbimport/test.yml @@ -19,7 +19,7 @@ - path: output/gatk4/test/vidmap.json md5sum: 18d3f68bd2cb6f4474990507ff95017a - path: output/gatk4/versions.yml - md5sum: 92e9e7db68d22df72adc02e59fab1eb7 + md5sum: 6fffaf981f099659cf820277d1f3c606 - name: gatk4 genomicsdbimport test_gatk4_genomicsdbimport_get_intervalslist command: nextflow run tests/modules/gatk4/genomicsdbimport -entry test_gatk4_genomicsdbimport_get_intervalslist -c tests/config/nextflow.config -c ./tests/modules/gatk4/genomicsdbimport/nextflow.config @@ -30,7 +30,7 @@ - path: output/gatk4/test.interval_list md5sum: 4c85812ac15fc1cd29711a851d23c0bf - path: output/gatk4/versions.yml - md5sum: b3fcd07c2f498a2ad503912524d74294 + md5sum: 4a56022d6e08d54e8ba853637bf3b5f1 - path: output/untar/versions.yml md5sum: 8f080677b109aea2cfca50208b077534 @@ -55,6 +55,6 @@ - path: output/gatk4/test_genomicsdb/vidmap.json md5sum: 18d3f68bd2cb6f4474990507ff95017a - path: output/gatk4/versions.yml - md5sum: f204d259538a490b40c1fe787a3d6602 + md5sum: da6a815b7340683b1a56bdfd7e66d463 - path: output/untar/versions.yml md5sum: 9b2916aea9790bdf427c0cb38109110c diff --git a/tests/modules/gatk4/indexfeaturefile/test.yml b/tests/modules/gatk4/indexfeaturefile/test.yml index e4a7cd8a..04c71ea2 100644 --- a/tests/modules/gatk4/indexfeaturefile/test.yml +++ b/tests/modules/gatk4/indexfeaturefile/test.yml @@ -15,7 +15,7 @@ - path: output/gatk4/genome.bed.gz.tbi md5sum: 4bc51e2351a6e83f20e13be75861f941 - path: output/gatk4/versions.yml - md5sum: e574bd51e4c6d6ded5dcf3cd865dbf4a + md5sum: 9eb24dc17c96971b7991b3e154279aa7 - name: gatk4 indexfeaturefile test_gatk4_indexfeaturefile_vcf command: nextflow run tests/modules/gatk4/indexfeaturefile -entry test_gatk4_indexfeaturefile_vcf -c tests/config/nextflow.config -c ./tests/modules/gatk4/indexfeaturefile/nextflow.config @@ -25,7 +25,7 @@ files: - path: output/gatk4/test.genome.vcf.idx - path: output/gatk4/versions.yml - md5sum: fee70d33f4379ced035d8e851a3e08c6 + md5sum: f76543e715342bf1fcdeb20385e01fe9 - name: gatk4 indexfeaturefile test_gatk4_indexfeaturefile_vcf_gz command: nextflow run tests/modules/gatk4/indexfeaturefile -entry test_gatk4_indexfeaturefile_vcf_gz -c tests/config/nextflow.config @@ -36,4 +36,4 @@ - path: output/gatk4/test.genome.vcf.gz.tbi md5sum: fedd68eaddf8d31257853d9da8325bd3 - path: output/gatk4/versions.yml - md5sum: 29bddb019f0fe04218cfc07f8203e022 + md5sum: a5d988cf62648f700ffac7257e72b2c0 diff --git a/tests/modules/gatk4/markduplicates/test.yml b/tests/modules/gatk4/markduplicates/test.yml index d975113e..333de7c9 100644 --- a/tests/modules/gatk4/markduplicates/test.yml +++ b/tests/modules/gatk4/markduplicates/test.yml @@ -5,12 +5,12 @@ - gatk4/markduplicates files: - path: output/gatk4/test.bai - md5sum: e9c125e82553209933883b4fe2b8d7c2 + md5sum: c8f7a9e426c768577f88f59cb1336bf3 - path: output/gatk4/test.bam - md5sum: 1c6b1372121eddccd086456aa1c174bf + md5sum: fba0c99a0b087c90113a210e4465f91b - path: output/gatk4/test.metrics - path: output/gatk4/versions.yml - md5sum: 0e46677bdf1e5df892578cec6bc26dba + md5sum: dacbab0e112d2403b09df138d4e62895 - name: gatk4 markduplicates test_gatk4_markduplicates_multiple_bams command: nextflow run tests/modules/gatk4/markduplicates -entry test_gatk4_markduplicates_multiple_bams -c tests/config/nextflow.config -c ./tests/modules/gatk4/markduplicates/nextflow.config @@ -19,9 +19,9 @@ - gatk4/markduplicates files: - path: output/gatk4/test.bai - md5sum: bad71df9c876e72a5bc0a3e0fd755f92 + md5sum: 325932c51f6898b02dfec469c984ba28 - path: output/gatk4/test.bam - md5sum: d1b85fb578a97f05b484c0d241a9aaad + md5sum: f7cba8104e3a7024a5e00c02304f7dea - path: output/gatk4/test.metrics - path: output/gatk4/versions.yml - md5sum: 6844dc08e677455205e2270ac291c951 + md5sum: 14d0d085df7d2f9e770578d92c329299 diff --git a/tests/modules/gatk4/splitncigarreads/test.yml b/tests/modules/gatk4/splitncigarreads/test.yml index 47a2abe2..a18fbb04 100644 --- a/tests/modules/gatk4/splitncigarreads/test.yml +++ b/tests/modules/gatk4/splitncigarreads/test.yml @@ -5,6 +5,6 @@ - gatk4/splitncigarreads files: - path: output/gatk4/test.bam - md5sum: 03068d510523c996814256d9811dc272 + md5sum: 1d54057d9f403fba2068ac1aaa4b8a28 - path: output/gatk4/versions.yml - md5sum: de130e0ab817304404f296b2e512b3b8 + md5sum: f0f29af552075dc6bf8a13028e09f8e4 From b4c6b430d0ae4899551bb44dbb78d6270c31e0b2 Mon Sep 17 00:00:00 2001 From: Harshil Patel Date: Wed, 12 Jan 2022 16:43:26 +0000 Subject: [PATCH 10/20] Remove params call in ivar variants module (#1203) * Remove params call in ivar variants module * Update main.nf --- modules/ivar/variants/main.nf | 7 +++-- modules/ivar/variants/meta.yml | 3 ++ tests/modules/ivar/variants/main.nf | 48 ++++++++++++++--------------- 3 files changed, 31 insertions(+), 27 deletions(-) diff --git a/modules/ivar/variants/main.nf b/modules/ivar/variants/main.nf index ce4abd4d..fda6e0cc 100644 --- a/modules/ivar/variants/main.nf +++ b/modules/ivar/variants/main.nf @@ -11,6 +11,7 @@ process IVAR_VARIANTS { tuple val(meta), path(bam) path fasta path gff + val save_mpileup output: tuple val(meta), path("*.tsv") , emit: tsv @@ -21,14 +22,14 @@ process IVAR_VARIANTS { def args = task.ext.args ?: '' def args2 = task.ext.args2 ?: '' def prefix = task.ext.prefix ?: "${meta.id}" - def save_mpileup = params.save_mpileup ? "tee ${prefix}.mpileup |" : "" - def features = params.gff ? "-g $gff" : "" + def features = gff ? "-g $gff" : "" + def mpileup = save_mpileup ? "tee ${prefix}.mpileup |" : "" """ samtools mpileup \\ $args2 \\ --reference $fasta \\ $bam | \\ - $save_mpileup \\ + $mpileup \\ ivar variants \\ $args \\ $features \\ diff --git a/modules/ivar/variants/meta.yml b/modules/ivar/variants/meta.yml index fd3fce9e..7c4297ca 100644 --- a/modules/ivar/variants/meta.yml +++ b/modules/ivar/variants/meta.yml @@ -29,6 +29,9 @@ input: type: file description: A GFF file in the GFF3 format can be supplied to specify coordinates of open reading frames (ORFs). In absence of GFF file, amino acid translation will not be done. patter: "*.gff" + - save_mpileup: + type: boolean + description: Save mpileup file generated by ivar variants output: - meta: type: map diff --git a/tests/modules/ivar/variants/main.nf b/tests/modules/ivar/variants/main.nf index f603b5e5..96835c60 100644 --- a/tests/modules/ivar/variants/main.nf +++ b/tests/modules/ivar/variants/main.nf @@ -5,40 +5,40 @@ nextflow.enable.dsl = 2 include { IVAR_VARIANTS } from '../../../../modules/ivar/variants/main.nf' workflow test_ivar_variants_no_gff_no_mpileup { - params.gff = false - params.save_mpileup = false - input = [ [ id:'test'], - file(params.test_data['sarscov2']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true) - ] + input = [ + [ id:'test'], + file(params.test_data['sarscov2']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true) + ] fasta = file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) - dummy = file("dummy_file.txt") - - IVAR_VARIANTS ( input, fasta, dummy ) + gff = [] + save_mpileup = false + + IVAR_VARIANTS ( input, fasta, gff, save_mpileup ) } workflow test_ivar_variants_no_gff_with_mpileup { - params.gff = false - params.save_mpileup = true - input = [ [ id:'test'], - file(params.test_data['sarscov2']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true) - ] + input = [ + [ id:'test'], + file(params.test_data['sarscov2']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true) + ] fasta = file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) - dummy = file("dummy_file.txt") + gff = [] + save_mpileup = true - IVAR_VARIANTS ( input, fasta, dummy ) + IVAR_VARIANTS ( input, fasta, gff, save_mpileup ) } workflow test_ivar_variants_with_gff_with_mpileup { - params.gff = true - params.save_mpileup = true - - input = [ [ id:'test'], - file(params.test_data['sarscov2']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true) - ] + + input = [ + [ id:'test'], + file(params.test_data['sarscov2']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true) + ] fasta = file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) - gff = file(params.test_data['sarscov2']['genome']['genome_gff3'], checkIfExists: true) - - IVAR_VARIANTS ( input, fasta, gff ) + gff = file(params.test_data['sarscov2']['genome']['genome_gff3'], checkIfExists: true) + save_mpileup = true + + IVAR_VARIANTS ( input, fasta, gff, save_mpileup ) } From 4cc3921efbafe83f26b97b27c3edd8d0acc673e3 Mon Sep 17 00:00:00 2001 From: Simon Heumos Date: Wed, 12 Jan 2022 19:01:57 +0100 Subject: [PATCH 11/20] Add pangenome test data set keys (#1170) * Update seqwish to version 0.7.2 * seqwish can work with a comma-separated list of PAFs * level with nf-core/modules master branch * add pangenome test data keys * the odgi test data lives in its own folder Co-authored-by: Michael L Heuer Co-authored-by: Gregor Sturm --- tests/config/test_data.config | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/tests/config/test_data.config b/tests/config/test_data.config index fde5dc42..bcabf04e 100644 --- a/tests/config/test_data.config +++ b/tests/config/test_data.config @@ -149,6 +149,19 @@ params { justhusky_minimal_vcf_gz_tbi = "${test_data_dir}/genomics/homo_sapiens/genome/vcf/ped/justhusky_minimal.vcf.gz.tbi" } + 'pangenome' { + pangenome_fa = "${test_data_dir}/pangenomics/homo_sapiens/pangenome.fa" + pangenome_fa_gz = "${test_data_dir}/pangenomics/homo_sapiens/pangenome.fa.gz" + pangenome_paf = "${test_data_dir}/pangenomics/homo_sapiens/pangenome.paf" + pangenome_paf_gz = "${test_data_dir}/pangenomics/homo_sapiens/pangenome.paf.gz" + pangenome_seqwish_gfa = "${test_data_dir}/pangenomics/homo_sapiens/pangenome.seqwish.gfa" + pangenome_smoothxg_gfa = "${test_data_dir}/pangenomics/homo_sapiens/pangenome.smoothxg.gfa" + pangenome_gfaffix_gfa = "${test_data_dir}/pangenomics/homo_sapiens/pangenome.gfaffix.gfa" + 'odgi' { + pangenome_og = "${test_data_dir}/pangenomics/homo_sapiens/odgi/pangenome.og" + pangenome_lay = "${test_data_dir}/pangenomics/homo_sapiens/odgi/pangenome.lay" + } + } 'illumina' { test_paired_end_sorted_bam = "${test_data_dir}/genomics/homo_sapiens/illumina/bam/test.paired_end.sorted.bam" test_paired_end_sorted_bam_bai = "${test_data_dir}/genomics/homo_sapiens/illumina/bam/test.paired_end.sorted.bam.bai" From 104f896a268df93876c284fdc9e604015bcca243 Mon Sep 17 00:00:00 2001 From: Anthony Underwood Date: Thu, 13 Jan 2022 01:05:01 +0000 Subject: [PATCH 12/20] Artic vbz compression (#1205) * Add functionality to handle vbz compression In order for nanopolish to be able handle the default compression for Mk1C Minions (vbz) it must be aware of where to find the plugin. Exporting the HDF5_PLUGIN_PATH found in the conda install (also used to make the biocontainer image) is the solution * Make the HDF5_PLUGIN_PATH more configurable Allow the HDF5_PLUGIN_PATH to be changed via a section in a config file e.g ``` params { modules { ..... 'nanopore_artic_minion' { ..... hd5_plugin_path = '/usr/local/lib/python3.6/site-packages/ont_fast5_api/vbz_plugin' } ...... } } ``` * Update modules/artic/minion/main.nf * Export HDF5_PLUGIN_PATH The HDF5_PLUGIN_PATH variable should be exported for `artic minion` to use it Co-authored-by: Harshil Patel --- modules/artic/minion/main.nf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/artic/minion/main.nf b/modules/artic/minion/main.nf index ed3c64d7..c25ec0db 100644 --- a/modules/artic/minion/main.nf +++ b/modules/artic/minion/main.nf @@ -43,7 +43,7 @@ process ARTIC_MINION { summary = "" model = file(medaka_model).exists() ? "--medaka-model ./$medaka_model" : "--medaka-model $medaka_model" } - def hd5_plugin_path = task.ext.hd5_plugin_path ? "HDF5_PLUGIN_PATH=" + task.ext.hd5_plugin_path : "HDF5_PLUGIN_PATH=/usr/local/lib/python3.6/site-packages/ont_fast5_api/vbz_plugin" + def hd5_plugin_path = task.ext.hd5_plugin_path ? "export HDF5_PLUGIN_PATH=" + task.ext.hd5_plugin_path : "export HDF5_PLUGIN_PATH=/usr/local/lib/python3.6/site-packages/ont_fast5_api/vbz_plugin" """ $hd5_plugin_path From 3f9a0285816a2e0ae73a3875fb5ae4b409da5952 Mon Sep 17 00:00:00 2001 From: Harshil Patel Date: Thu, 13 Jan 2022 11:59:33 +0000 Subject: [PATCH 13/20] Bump mulled containers for kraken2 and bowtie2 (#1201) * Bump mulled containers for kraken2 and bowtie2 * Syntax update * Update modules/bowtie2/align/main.nf Co-authored-by: FriederikeHanssen Co-authored-by: FriederikeHanssen --- modules/bowtie2/align/main.nf | 14 +++++++------- modules/kraken2/kraken2/main.nf | 6 +++--- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/modules/bowtie2/align/main.nf b/modules/bowtie2/align/main.nf index 04f817ec..20b08f72 100644 --- a/modules/bowtie2/align/main.nf +++ b/modules/bowtie2/align/main.nf @@ -2,10 +2,10 @@ process BOWTIE2_ALIGN { tag "$meta.id" label 'process_high' - conda (params.enable_conda ? 'bioconda::bowtie2=2.4.2 bioconda::samtools=1.11 conda-forge::pigz=2.3.4' : null) + conda (params.enable_conda ? 'bioconda::bowtie2=2.4.4 bioconda::samtools=1.14 conda-forge::pigz=2.6' : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/mulled-v2-ac74a7f02cebcfcc07d8e8d1d750af9c83b4d45a:577a697be67b5ae9b16f637fd723b8263a3898b3-0' : - 'quay.io/biocontainers/mulled-v2-ac74a7f02cebcfcc07d8e8d1d750af9c83b4d45a:577a697be67b5ae9b16f637fd723b8263a3898b3-0' }" + 'https://depot.galaxyproject.org/singularity/mulled-v2-ac74a7f02cebcfcc07d8e8d1d750af9c83b4d45a:4d235f41348a00533f18e47c9669f1ecb327f629-0' : + 'quay.io/biocontainers/mulled-v2-ac74a7f02cebcfcc07d8e8d1d750af9c83b4d45a:4d235f41348a00533f18e47c9669f1ecb327f629-0' }" input: tuple val(meta), path(reads) @@ -13,10 +13,10 @@ process BOWTIE2_ALIGN { val save_unaligned output: - tuple val(meta), path('*.bam'), emit: bam - tuple val(meta), path('*.log'), emit: log - path "versions.yml" , emit: versions - tuple val(meta), path('*fastq.gz'), optional:true, emit: fastq + tuple val(meta), path('*.bam') , emit: bam + tuple val(meta), path('*.log') , emit: log + tuple val(meta), path('*fastq.gz'), emit: fastq, optional:true + path "versions.yml" , emit: versions script: def args = task.ext.args ?: '' diff --git a/modules/kraken2/kraken2/main.nf b/modules/kraken2/kraken2/main.nf index 3c4d1caf..eaabb229 100644 --- a/modules/kraken2/kraken2/main.nf +++ b/modules/kraken2/kraken2/main.nf @@ -2,10 +2,10 @@ process KRAKEN2_KRAKEN2 { tag "$meta.id" label 'process_high' - conda (params.enable_conda ? 'bioconda::kraken2=2.1.1 conda-forge::pigz=2.6' : null) + conda (params.enable_conda ? 'bioconda::kraken2=2.1.2 conda-forge::pigz=2.6' : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/mulled-v2-5799ab18b5fc681e75923b2450abaa969907ec98:941789bd7fe00db16531c26de8bf3c5c985242a5-0' : - 'quay.io/biocontainers/mulled-v2-5799ab18b5fc681e75923b2450abaa969907ec98:941789bd7fe00db16531c26de8bf3c5c985242a5-0' }" + 'https://depot.galaxyproject.org/singularity/mulled-v2-5799ab18b5fc681e75923b2450abaa969907ec98:87fc08d11968d081f3e8a37131c1f1f6715b6542-0' : + 'quay.io/biocontainers/mulled-v2-5799ab18b5fc681e75923b2450abaa969907ec98:87fc08d11968d081f3e8a37131c1f1f6715b6542-0' }" input: tuple val(meta), path(reads) From 280712419d6ef5e3fecdc6e9eb98f8746fcbe0b7 Mon Sep 17 00:00:00 2001 From: Harshil Patel Date: Fri, 14 Jan 2022 18:18:11 +0000 Subject: [PATCH 14/20] Add new vcflib/vcfuniq module (#1208) * Add new vcflib/vcfuniq module * Rename module from vcfutils to vcfuniq * Fix tests * Compress output by default * Fix ECLint --- modules/vcflib/vcfuniq/main.nf | 32 ++++++++++++++ modules/vcflib/vcfuniq/meta.yml | 46 ++++++++++++++++++++ tests/config/pytest_modules.yml | 4 ++ tests/modules/vcflib/vcfuniq/main.nf | 16 +++++++ tests/modules/vcflib/vcfuniq/nextflow.config | 9 ++++ tests/modules/vcflib/vcfuniq/test.yml | 8 ++++ 6 files changed, 115 insertions(+) create mode 100644 modules/vcflib/vcfuniq/main.nf create mode 100644 modules/vcflib/vcfuniq/meta.yml create mode 100644 tests/modules/vcflib/vcfuniq/main.nf create mode 100644 tests/modules/vcflib/vcfuniq/nextflow.config create mode 100644 tests/modules/vcflib/vcfuniq/test.yml diff --git a/modules/vcflib/vcfuniq/main.nf b/modules/vcflib/vcfuniq/main.nf new file mode 100644 index 00000000..37fc51bc --- /dev/null +++ b/modules/vcflib/vcfuniq/main.nf @@ -0,0 +1,32 @@ +def VERSION = '1.0.2' // Version information not provided by tool on CLI + +process VCFLIB_VCFUNIQ { + tag "$meta.id" + label 'process_low' + + conda (params.enable_conda ? "bioconda::vcflib=1.0.2" : null) + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/vcflib:1.0.2--h3198e80_5': + 'quay.io/biocontainers/vcflib:1.0.2--h3198e80_5' }" + + input: + tuple val(meta), path(vcf), path(tbi) + + output: + tuple val(meta), path("*.gz"), emit: vcf + path "versions.yml" , emit: versions + + script: + def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + """ + vcfuniq \\ + $vcf \\ + | bgzip -c $args > ${prefix}.vcf.gz + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + vcflib: $VERSION + END_VERSIONS + """ +} diff --git a/modules/vcflib/vcfuniq/meta.yml b/modules/vcflib/vcfuniq/meta.yml new file mode 100644 index 00000000..3bfc679b --- /dev/null +++ b/modules/vcflib/vcfuniq/meta.yml @@ -0,0 +1,46 @@ +name: vcflib_vcfuniq +description: List unique genotypes. Like GNU uniq, but for VCF records. Remove records which have the same position, ref, and alt as the previous record. +keywords: + - vcf + - uniq + - deduplicate +tools: + - vcflib: + description: Command-line tools for manipulating VCF files + homepage: https://github.com/vcflib/vcflib + documentation: https://github.com/vcflib/vcflib#USAGE + doi: "https://doi.org/10.1101/2021.05.21.445151" + licence: ['MIT'] + +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - vcf: + type: file + description: Compressed VCF file + pattern: "*.vcf.gz" + - tbi: + type: file + description: Index of VCF file + pattern: "*.vcf.gz.tbi" + +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" + - vcf: + type: file + description: Compressed VCF file + pattern: "*.vcf.gz" + +authors: + - "@drpatelh" diff --git a/tests/config/pytest_modules.yml b/tests/config/pytest_modules.yml index 2938d311..cc95a06c 100644 --- a/tests/config/pytest_modules.yml +++ b/tests/config/pytest_modules.yml @@ -1485,6 +1485,10 @@ variantbam: - modules/variantbam/** - tests/modules/variantbam/** +vcflib/vcfuniq: + - modules/vcflib/vcfuniq/** + - tests/modules/vcflib/vcfuniq/** + vcftools: - modules/vcftools/** - tests/modules/vcftools/** diff --git a/tests/modules/vcflib/vcfuniq/main.nf b/tests/modules/vcflib/vcfuniq/main.nf new file mode 100644 index 00000000..f2c8e6f8 --- /dev/null +++ b/tests/modules/vcflib/vcfuniq/main.nf @@ -0,0 +1,16 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { VCFLIB_VCFUNIQ } from '../../../../modules/vcflib/vcfuniq/main.nf' + +workflow test_vcflib_vcfuniq { + + input = [ + [ id:'test', single_end:false ], // meta map + file(params.test_data['sarscov2']['illumina']['test_vcf_gz'], checkIfExists: true), + file(params.test_data['sarscov2']['illumina']['test_vcf_gz_tbi'], checkIfExists: true) + ] + + VCFLIB_VCFUNIQ ( input ) +} diff --git a/tests/modules/vcflib/vcfuniq/nextflow.config b/tests/modules/vcflib/vcfuniq/nextflow.config new file mode 100644 index 00000000..ca824085 --- /dev/null +++ b/tests/modules/vcflib/vcfuniq/nextflow.config @@ -0,0 +1,9 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + + withName: VCFLIB_VCFUNIQ { + ext.prefix = { "${meta.id}.uniq" } + } + +} diff --git a/tests/modules/vcflib/vcfuniq/test.yml b/tests/modules/vcflib/vcfuniq/test.yml new file mode 100644 index 00000000..6d998225 --- /dev/null +++ b/tests/modules/vcflib/vcfuniq/test.yml @@ -0,0 +1,8 @@ +- name: vcflib vcfuniq + command: nextflow run ./tests/modules/vcflib/vcfuniq -entry test_vcflib_vcfuniq -c ./tests/config/nextflow.config -c ./tests/modules/vcflib/vcfuniq/nextflow.config + tags: + - vcflib + - vcflib/vcfuniq + files: + - path: output/vcflib/test.uniq.vcf.gz + md5sum: fc178eb342a91dc0d1d568601ad8f8e2 From c9587d76e2500f8eda2376ee2d5e7f62b1ce8688 Mon Sep 17 00:00:00 2001 From: Michael L Heuer Date: Mon, 17 Jan 2022 03:24:40 -0600 Subject: [PATCH 15/20] Update dsh-bio to version 2.0.7, add support for compressed GFA 1.0 format (#1207) * Update dsh-bio to version 2.0.7, add support for compressed GFA 1.0 format * fix ci failures Co-authored-by: Chris Cheshire --- modules/dshbio/exportsegments/main.nf | 10 +++---- modules/dshbio/exportsegments/meta.yml | 8 ++--- modules/dshbio/filterbed/main.nf | 6 ++-- modules/dshbio/filtergff3/main.nf | 6 ++-- modules/dshbio/splitbed/main.nf | 6 ++-- modules/dshbio/splitgff3/main.nf | 6 ++-- tests/config/test_data.config | 3 ++ tests/modules/dshbio/exportsegments/main.nf | 24 +++++++++++++++ tests/modules/dshbio/exportsegments/test.yml | 31 ++++++++++++++++++-- 9 files changed, 77 insertions(+), 23 deletions(-) diff --git a/modules/dshbio/exportsegments/main.nf b/modules/dshbio/exportsegments/main.nf index d506a4b6..0a1920a6 100644 --- a/modules/dshbio/exportsegments/main.nf +++ b/modules/dshbio/exportsegments/main.nf @@ -2,16 +2,16 @@ process DSHBIO_EXPORTSEGMENTS { tag "${meta.id}" label 'process_medium' - conda (params.enable_conda ? "bioconda::dsh-bio=2.0.6" : null) + conda (params.enable_conda ? "bioconda::dsh-bio=2.0.7" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/dsh-bio:2.0.6--hdfd78af_0' : - 'quay.io/biocontainers/dsh-bio:2.0.6--hdfd78af_0' }" + 'https://depot.galaxyproject.org/singularity/dsh-bio:2.0.7--hdfd78af_0' : + 'quay.io/biocontainers/dsh-bio:2.0.7--hdfd78af_0' }" input: tuple val(meta), path(gfa) output: - tuple val(meta), path("*.fa"), emit: fasta + tuple val(meta), path("*.fa.gz"), emit: fasta path "versions.yml" , emit: versions script: @@ -22,7 +22,7 @@ process DSHBIO_EXPORTSEGMENTS { export-segments \\ $args \\ -i $gfa \\ - -o ${prefix}.fa + -o ${prefix}.fa.gz cat <<-END_VERSIONS > versions.yml "${task.process}": diff --git a/modules/dshbio/exportsegments/meta.yml b/modules/dshbio/exportsegments/meta.yml index da5455c7..eddb6d09 100644 --- a/modules/dshbio/exportsegments/meta.yml +++ b/modules/dshbio/exportsegments/meta.yml @@ -21,8 +21,8 @@ input: e.g. [ id:'test', single_end:false ] - gfa: type: file - description: Assembly segments in GFA 1.0 format - pattern: "*.{gfa}" + description: Assembly segments in uncompressed or compressed GFA 1.0 format + pattern: "*.{gfa|gfa.bgz|gfa.gz|gfa.zst}" output: - meta: type: map @@ -31,8 +31,8 @@ output: e.g. [ id:'test', single_end:false ] - fasta: type: file - description: Assembly segment sequences in FASTA format - pattern: "*.{fa}" + description: Assembly segment sequences in gzipped FASTA format + pattern: "*.{fa.gz}" - versions: type: file description: File containing software versions diff --git a/modules/dshbio/filterbed/main.nf b/modules/dshbio/filterbed/main.nf index 6480f4a4..6efe07e8 100644 --- a/modules/dshbio/filterbed/main.nf +++ b/modules/dshbio/filterbed/main.nf @@ -2,10 +2,10 @@ process DSHBIO_FILTERBED { tag "${meta.id}" label 'process_medium' - conda (params.enable_conda ? "bioconda::dsh-bio=2.0.6" : null) + conda (params.enable_conda ? "bioconda::dsh-bio=2.0.7" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/dsh-bio:2.0.6--hdfd78af_0' : - 'quay.io/biocontainers/dsh-bio:2.0.6--hdfd78af_0' }" + 'https://depot.galaxyproject.org/singularity/dsh-bio:2.0.7--hdfd78af_0' : + 'quay.io/biocontainers/dsh-bio:2.0.7--hdfd78af_0' }" input: tuple val(meta), path(bed) diff --git a/modules/dshbio/filtergff3/main.nf b/modules/dshbio/filtergff3/main.nf index a0bbf3af..5214ce23 100644 --- a/modules/dshbio/filtergff3/main.nf +++ b/modules/dshbio/filtergff3/main.nf @@ -2,10 +2,10 @@ process DSHBIO_FILTERGFF3 { tag "${meta.id}" label 'process_medium' - conda (params.enable_conda ? "bioconda::dsh-bio=2.0.6" : null) + conda (params.enable_conda ? "bioconda::dsh-bio=2.0.7" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/dsh-bio:2.0.6--hdfd78af_0' : - 'quay.io/biocontainers/dsh-bio:2.0.6--hdfd78af_0' }" + 'https://depot.galaxyproject.org/singularity/dsh-bio:2.0.7--hdfd78af_0' : + 'quay.io/biocontainers/dsh-bio:2.0.7--hdfd78af_0' }" input: tuple val(meta), path(gff3) diff --git a/modules/dshbio/splitbed/main.nf b/modules/dshbio/splitbed/main.nf index 8dbf1104..c0ca6a8b 100644 --- a/modules/dshbio/splitbed/main.nf +++ b/modules/dshbio/splitbed/main.nf @@ -2,10 +2,10 @@ process DSHBIO_SPLITBED { tag "${meta.id}" label 'process_medium' - conda (params.enable_conda ? "bioconda::dsh-bio=2.0.6" : null) + conda (params.enable_conda ? "bioconda::dsh-bio=2.0.7" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/dsh-bio:2.0.6--hdfd78af_0' : - 'quay.io/biocontainers/dsh-bio:2.0.6--hdfd78af_0' }" + 'https://depot.galaxyproject.org/singularity/dsh-bio:2.0.7--hdfd78af_0' : + 'quay.io/biocontainers/dsh-bio:2.0.7--hdfd78af_0' }" input: tuple val(meta), path(bed) diff --git a/modules/dshbio/splitgff3/main.nf b/modules/dshbio/splitgff3/main.nf index fc868a39..012afec7 100644 --- a/modules/dshbio/splitgff3/main.nf +++ b/modules/dshbio/splitgff3/main.nf @@ -2,10 +2,10 @@ process DSHBIO_SPLITGFF3 { tag "${meta.id}" label 'process_medium' - conda (params.enable_conda ? "bioconda::dsh-bio=2.0.6" : null) + conda (params.enable_conda ? "bioconda::dsh-bio=2.0.7" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/dsh-bio:2.0.6--hdfd78af_0' : - 'quay.io/biocontainers/dsh-bio:2.0.6--hdfd78af_0' }" + 'https://depot.galaxyproject.org/singularity/dsh-bio:2.0.7--hdfd78af_0' : + 'quay.io/biocontainers/dsh-bio:2.0.7--hdfd78af_0' }" input: tuple val(meta), path(gff3) diff --git a/tests/config/test_data.config b/tests/config/test_data.config index bcabf04e..f453baa6 100644 --- a/tests/config/test_data.config +++ b/tests/config/test_data.config @@ -82,6 +82,9 @@ params { scaffolds_fasta = "${test_data_dir}/genomics/sarscov2/illumina/fasta/scaffolds.fasta" assembly_gfa = "${test_data_dir}/genomics/sarscov2/illumina/gfa/assembly.gfa" + assembly_gfa_bgz = "${test_data_dir}/genomics/sarscov2/illumina/gfa/assembly.gfa.bgz" + assembly_gfa_gz = "${test_data_dir}/genomics/sarscov2/illumina/gfa/assembly.gfa.gz" + assembly_gfa_zst = "${test_data_dir}/genomics/sarscov2/illumina/gfa/assembly.gfa.zst" test_single_end_bam_readlist_txt = "${test_data_dir}/genomics/sarscov2/illumina/picard/test.single_end.bam.readlist.txt" diff --git a/tests/modules/dshbio/exportsegments/main.nf b/tests/modules/dshbio/exportsegments/main.nf index c213dc54..0460950a 100644 --- a/tests/modules/dshbio/exportsegments/main.nf +++ b/tests/modules/dshbio/exportsegments/main.nf @@ -11,3 +11,27 @@ workflow test_dshbio_exportsegments { DSHBIO_EXPORTSEGMENTS ( input ) } + +workflow test_dshbio_exportsegments_bgz { + input = [ [ id:'test_bgz' ], // meta map + [ file(params.test_data['sarscov2']['illumina']['assembly_gfa_bgz'], checkIfExists: true) ] + ] + + DSHBIO_EXPORTSEGMENTS ( input ) +} + +workflow test_dshbio_exportsegments_gz { + input = [ [ id:'test_gz' ], // meta map + [ file(params.test_data['sarscov2']['illumina']['assembly_gfa_gz'], checkIfExists: true) ] + ] + + DSHBIO_EXPORTSEGMENTS ( input ) +} + +workflow test_dshbio_exportsegments_zst { + input = [ [ id:'test_zst' ], // meta map + [ file(params.test_data['sarscov2']['illumina']['assembly_gfa_zst'], checkIfExists: true) ] + ] + + DSHBIO_EXPORTSEGMENTS ( input ) +} diff --git a/tests/modules/dshbio/exportsegments/test.yml b/tests/modules/dshbio/exportsegments/test.yml index c811df03..85406f8f 100644 --- a/tests/modules/dshbio/exportsegments/test.yml +++ b/tests/modules/dshbio/exportsegments/test.yml @@ -4,5 +4,32 @@ - dshbio - dshbio/exportsegments files: - - path: ./output/dshbio/test.fa - md5sum: 19ed0b69970ed3fbb641c5c510ebef61 + - path: ./output/dshbio/test.fa.gz + md5sum: 2b8471e1ccf84169ccb75a1c1bb9109c + +- name: dshbio exportsegments bgz + command: nextflow run ./tests/modules/dshbio/exportsegments -entry test_dshbio_exportsegments_bgz -c ./tests/config/nextflow.config -c ./tests/modules/dshbio/exportsegments/nextflow.config + tags: + - dshbio + - dshbio/exportsegments + files: + - path: ./output/dshbio/test_bgz.fa.gz + md5sum: 2b8471e1ccf84169ccb75a1c1bb9109c + +- name: dshbio exportsegments gz + command: nextflow run ./tests/modules/dshbio/exportsegments -entry test_dshbio_exportsegments_gz -c ./tests/config/nextflow.config -c ./tests/modules/dshbio/exportsegments/nextflow.config + tags: + - dshbio + - dshbio/exportsegments + files: + - path: ./output/dshbio/test_gz.fa.gz + md5sum: 2b8471e1ccf84169ccb75a1c1bb9109c + +- name: dshbio exportsegments zst + command: nextflow run ./tests/modules/dshbio/exportsegments -entry test_dshbio_exportsegments_zst -c ./tests/config/nextflow.config -c ./tests/modules/dshbio/exportsegments/nextflow.config + tags: + - dshbio + - dshbio/exportsegments + files: + - path: ./output/dshbio/test_zst.fa.gz + md5sum: 2b8471e1ccf84169ccb75a1c1bb9109c From 6243c3792cd9d7b2dcdef67a204794e4dddef691 Mon Sep 17 00:00:00 2001 From: Abhinav Sharma Date: Mon, 17 Jan 2022 12:25:36 +0200 Subject: [PATCH 16/20] module: deepvariant (#572) * Add stubs for deepvariant [ci skip] * Update the stubs for deepvariant [ci skip] * functional with google docker image * cleanup * consume docker container within singularity executor * update the meta.yml file and ask for review * tweak the input channel shape and test data * tweak input data [ci skip] * update for the new syntax * remove the functions and rename meta vars * Update the arguments mechanism * update chr, region and checksum Co-authored-by: Gregor Sturm Co-authored-by: Maxime U. Garcia Co-authored-by: FriederikeHanssen --- modules/deepvariant/main.nf | 43 +++++++++++++++++ modules/deepvariant/meta.yml | 58 +++++++++++++++++++++++ tests/config/pytest_modules.yml | 4 ++ tests/modules/deepvariant/main.nf | 18 +++++++ tests/modules/deepvariant/nextflow.config | 10 ++++ tests/modules/deepvariant/test.yml | 9 ++++ 6 files changed, 142 insertions(+) create mode 100644 modules/deepvariant/main.nf create mode 100644 modules/deepvariant/meta.yml create mode 100644 tests/modules/deepvariant/main.nf create mode 100644 tests/modules/deepvariant/nextflow.config create mode 100644 tests/modules/deepvariant/test.yml diff --git a/modules/deepvariant/main.nf b/modules/deepvariant/main.nf new file mode 100644 index 00000000..0b455e1d --- /dev/null +++ b/modules/deepvariant/main.nf @@ -0,0 +1,43 @@ +process DEEPVARIANT { + tag "$meta.id" + label 'process_medium' + + + if (params.enable_conda) { + exit 1, "Conda environments cannot be used when using the DeepVariant tool. Please use docker or singularity containers." + } + + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'google/deepvariant:1.2.0' : + 'google/deepvariant:1.2.0' }" + + input: + tuple val(meta), path(bam), path(bai) + path(fasta) + path(fai) + + output: + tuple val(meta), path("*.vcf.gz") , emit: vcf + tuple val(meta), path("*g.vcf.gz"), emit: gvcf + path "versions.yml" , emit: versions + + script: + def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + + """ + /opt/deepvariant/bin/run_deepvariant \\ + --ref=${fasta} \\ + --reads=${bam} \\ + --output_vcf=${prefix}.vcf.gz \\ + --output_gvcf=${prefix}.g.vcf.gz \\ + ${args} \\ + --num_shards=${task.cpus} + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + deepvariant: \$(echo \$(/opt/deepvariant/bin/run_deepvariant --version) | sed 's/^.*version //; s/ .*\$//' ) + END_VERSIONS + """ + +} diff --git a/modules/deepvariant/meta.yml b/modules/deepvariant/meta.yml new file mode 100644 index 00000000..05269a3b --- /dev/null +++ b/modules/deepvariant/meta.yml @@ -0,0 +1,58 @@ +name: deepvariant +description: DeepVariant is an analysis pipeline that uses a deep neural network to call genetic variants from next-generation DNA sequencing data +keywords: + - variant calling + - machine learning +tools: + - deepvariant: + description: DeepVariant is an analysis pipeline that uses a deep neural network to call genetic variants from next-generation DNA sequencing data + homepage: https://github.com/google/deepvariant + documentation: https://github.com/google/deepvariant + tool_dev_url: https://github.com/google/deepvariant + doi: "https://doi.org/10.1038/nbt.4235" + licence: ['BSD-3-clause'] + +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - bam: + type: file + description: BAM file + pattern: "*.bam" + - bai: + type: file + description: Index of BAM file + pattern: "*.bai" + - fasta: + type: file + description: The reference fasta file + pattern: "*.fasta" + - fai: + type: file + description: Index of reference fasta file + pattern: "*.fai" + +output: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - vcf: + type: file + description: Compressed VCF file + pattern: "*.vcf.gz" + - gvcf: + type: file + description: Compressed GVCF file + pattern: "*.g.vcf.gz" + - version: + type: file + description: File containing software version + pattern: "*.{version.txt}" + +authors: + - "@abhi18av" diff --git a/tests/config/pytest_modules.yml b/tests/config/pytest_modules.yml index cc95a06c..80b27492 100644 --- a/tests/config/pytest_modules.yml +++ b/tests/config/pytest_modules.yml @@ -396,6 +396,10 @@ deeptools/plotprofile: - modules/deeptools/plotprofile/** - tests/modules/deeptools/plotprofile/** +deepvariant: + - modules/deepvariant/** + - tests/modules/deepvariant/** + delly/call: - modules/delly/call/** - tests/modules/delly/call/** diff --git a/tests/modules/deepvariant/main.nf b/tests/modules/deepvariant/main.nf new file mode 100644 index 00000000..fdf40274 --- /dev/null +++ b/tests/modules/deepvariant/main.nf @@ -0,0 +1,18 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { DEEPVARIANT } from '../../../modules/deepvariant/main.nf' + +workflow test_deepvariant { + + bam_tuple_ch = Channel.of([[ id:'test', single_end:false ], // meta map + file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true), + file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_bam_bai'], checkIfExists: true)]) + + fasta = file(params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true) + + fai = file(params.test_data['homo_sapiens']['genome']['genome_fasta_fai'], checkIfExists: true) + + DEEPVARIANT ( bam_tuple_ch, fasta, fai) +} diff --git a/tests/modules/deepvariant/nextflow.config b/tests/modules/deepvariant/nextflow.config new file mode 100644 index 00000000..17e91a8c --- /dev/null +++ b/tests/modules/deepvariant/nextflow.config @@ -0,0 +1,10 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + + withName: DEEPVARIANT { + ext.args = ' --regions=\"chr22:0-40001\" --model_type=WGS ' + ext.prefix = { "${meta.id}_out" } + } + +} diff --git a/tests/modules/deepvariant/test.yml b/tests/modules/deepvariant/test.yml new file mode 100644 index 00000000..874f5d1f --- /dev/null +++ b/tests/modules/deepvariant/test.yml @@ -0,0 +1,9 @@ +- name: deepvariant + command: nextflow run ./tests/modules/deepvariant -entry test_deepvariant -c tests/config/nextflow.config + tags: + - deepvariant + files: + - path: output/deepvariant/test_out.vcf.gz + md5sum: 66d86be7a9bafe1f5c6304ebee18ee20 + - path: output/deepvariant/test_out.g.vcf.gz + md5sum: 4ca868f0a4fdb17a280c3ed083d228e0 From 796dbb573e52403bb644a65f0639af0a121c90f1 Mon Sep 17 00:00:00 2001 From: Harshil Patel Date: Mon, 17 Jan 2022 10:46:15 +0000 Subject: [PATCH 17/20] Add nextclade/datasetget and nextclade/run modules (#1210) * Remove old nextclade module * Add nextclade/datasetget and nextclade/run modules * Fix ECLint * Add reference and tag as inputs to datasetget module * Fix tests * Adjust spacing --- modules/nextclade/datasetget/main.nf | 39 +++++++++++++++++ modules/nextclade/datasetget/meta.yml | 42 +++++++++++++++++++ modules/nextclade/main.nf | 40 ------------------ modules/nextclade/run/main.nf | 42 +++++++++++++++++++ modules/nextclade/{ => run}/meta.yml | 21 +++++----- tests/config/pytest_modules.yml | 10 +++-- tests/modules/nextclade/datasetget/main.nf | 14 +++++++ .../{ => datasetget}/nextflow.config | 4 +- tests/modules/nextclade/datasetget/test.yml | 20 +++++++++ tests/modules/nextclade/main.nf | 14 ------- tests/modules/nextclade/run/main.nf | 22 ++++++++++ tests/modules/nextclade/run/nextflow.config | 5 +++ tests/modules/nextclade/run/test.yml | 13 ++++++ tests/modules/nextclade/test.yml | 13 ------ 14 files changed, 217 insertions(+), 82 deletions(-) create mode 100644 modules/nextclade/datasetget/main.nf create mode 100644 modules/nextclade/datasetget/meta.yml delete mode 100755 modules/nextclade/main.nf create mode 100644 modules/nextclade/run/main.nf rename modules/nextclade/{ => run}/meta.yml (75%) mode change 100755 => 100644 create mode 100644 tests/modules/nextclade/datasetget/main.nf rename tests/modules/nextclade/{ => datasetget}/nextflow.config (95%) create mode 100644 tests/modules/nextclade/datasetget/test.yml delete mode 100755 tests/modules/nextclade/main.nf create mode 100644 tests/modules/nextclade/run/main.nf create mode 100644 tests/modules/nextclade/run/nextflow.config create mode 100644 tests/modules/nextclade/run/test.yml delete mode 100755 tests/modules/nextclade/test.yml diff --git a/modules/nextclade/datasetget/main.nf b/modules/nextclade/datasetget/main.nf new file mode 100644 index 00000000..55371168 --- /dev/null +++ b/modules/nextclade/datasetget/main.nf @@ -0,0 +1,39 @@ +process NEXTCLADE_DATASETGET { + tag "$dataset" + label 'process_low' + + conda (params.enable_conda ? "bioconda::nextclade=1.9.0" : null) + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/nextclade:1.9.0--h9ee0642_0' : + 'quay.io/biocontainers/nextclade:1.9.0--h9ee0642_0' }" + + input: + val dataset + val reference + val tag + + output: + path "$prefix" , emit: dataset + path "versions.yml", emit: versions + + script: + def args = task.ext.args ?: '' + prefix = task.ext.prefix ?: "${dataset}" + def fasta = reference ? "--reference ${reference}" : '' + def version = tag ? "--tag ${tag}" : '' + """ + nextclade \\ + dataset \\ + get \\ + $args \\ + --name $dataset \\ + $fasta \\ + $version \\ + --output-dir $prefix + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + nextclade: \$(nextclade --version 2>&1) + END_VERSIONS + """ +} diff --git a/modules/nextclade/datasetget/meta.yml b/modules/nextclade/datasetget/meta.yml new file mode 100644 index 00000000..1246d918 --- /dev/null +++ b/modules/nextclade/datasetget/meta.yml @@ -0,0 +1,42 @@ +name: nextclade_datasetget +description: Get dataset for SARS-CoV-2 genome clade assignment, mutation calling, and sequence quality checks (C++ implementation) +keywords: + - nextclade + - variant + - consensus +tools: + - nextclade: + description: SARS-CoV-2 genome clade assignment, mutation calling, and sequence quality checks + homepage: https://github.com/nextstrain/nextclade + documentation: https://github.com/nextstrain/nextclade + tool_dev_url: https://github.com/nextstrain/nextclade + doi: "" + licence: ['MIT'] + +input: + - dataset: + type: string + description: Name of dataset to retrieve. A list of available datasets can be obtained using the nextclade dataset list command. + pattern: ".+" + - reference: + type: string + description: Accession id to download dataset based on a particular reference sequence. A list of available datasets can be obtained using the nextclade dataset list command. + pattern: ".+" + - tag: + type: string + description: Version tag of the dataset to download. A list of available datasets can be obtained using the nextclade dataset list command. + pattern: ".+" + +output: + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" + - prefix: + type: path + description: A directory containing the dataset files needed for nextclade run + pattern: "prefix" + +authors: + - "@antunderwood" + - "@drpatelh" diff --git a/modules/nextclade/main.nf b/modules/nextclade/main.nf deleted file mode 100755 index f60af57b..00000000 --- a/modules/nextclade/main.nf +++ /dev/null @@ -1,40 +0,0 @@ -process NEXTCLADE { - tag "$meta.id" - label 'process_low' - - conda (params.enable_conda ? "bioconda::nextclade_js=0.14.4" : null) - container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/nextclade_js:0.14.4--h9ee0642_0' : - 'quay.io/biocontainers/nextclade_js:0.14.4--h9ee0642_0' }" - - input: - tuple val(meta), path(fasta) - - output: - tuple val(meta), path("${prefix}.csv") , emit: csv - tuple val(meta), path("${prefix}.json") , emit: json - tuple val(meta), path("${prefix}.tree.json") , emit: json_tree - tuple val(meta), path("${prefix}.tsv") , emit: tsv - tuple val(meta), path("${prefix}.clades.tsv"), optional:true, emit: tsv_clades - path "versions.yml" , emit: versions - - script: - def args = task.ext.args ?: '' - prefix = task.ext.prefix ?: "${meta.id}" - """ - nextclade \\ - $args \\ - --jobs $task.cpus \\ - --input-fasta $fasta \\ - --output-json ${prefix}.json \\ - --output-csv ${prefix}.csv \\ - --output-tsv ${prefix}.tsv \\ - --output-tsv-clades-only ${prefix}.clades.tsv \\ - --output-tree ${prefix}.tree.json - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - nextclade: \$(nextclade --version 2>&1) - END_VERSIONS - """ -} diff --git a/modules/nextclade/run/main.nf b/modules/nextclade/run/main.nf new file mode 100644 index 00000000..e29dd8ce --- /dev/null +++ b/modules/nextclade/run/main.nf @@ -0,0 +1,42 @@ +process NEXTCLADE_RUN { + tag "$meta.id" + label 'process_low' + + conda (params.enable_conda ? "bioconda::nextclade=1.9.0" : null) + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/nextclade:1.9.0--h9ee0642_0' : + 'quay.io/biocontainers/nextclade:1.9.0--h9ee0642_0' }" + + input: + tuple val(meta), path(fasta) + path dataset + + output: + tuple val(meta), path("${prefix}.csv") , emit: csv + tuple val(meta), path("${prefix}.tsv") , emit: tsv + tuple val(meta), path("${prefix}.json") , emit: json + tuple val(meta), path("${prefix}.tree.json"), emit: json_tree + path "versions.yml" , emit: versions + + script: + def args = task.ext.args ?: '' + prefix = task.ext.prefix ?: "${meta.id}" + """ + nextclade \\ + run \\ + $args \\ + --jobs $task.cpus \\ + --input-fasta $fasta \\ + --input-dataset $dataset \\ + --output-csv ${prefix}.csv \\ + --output-tsv ${prefix}.tsv \\ + --output-json ${prefix}.json \\ + --output-tree ${prefix}.tree.json \\ + --output-basename ${prefix} + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + nextclade: \$(nextclade --version 2>&1) + END_VERSIONS + """ +} diff --git a/modules/nextclade/meta.yml b/modules/nextclade/run/meta.yml old mode 100755 new mode 100644 similarity index 75% rename from modules/nextclade/meta.yml rename to modules/nextclade/run/meta.yml index 1b4a435a..40a863e6 --- a/modules/nextclade/meta.yml +++ b/modules/nextclade/run/meta.yml @@ -1,17 +1,17 @@ -name: nextclade -description: SARS-CoV-2 genome clade assignment, mutation calling, and sequence quality checks (Javascript implementation) +name: nextclade_run +description: SARS-CoV-2 genome clade assignment, mutation calling, and sequence quality checks (C++ implementation) keywords: - nextclade - variant - consensus tools: - nextclade: - description: SARS-CoV-2 genome clade assignment, mutation calling, and sequence quality checks (Javascript implementation) - homepage: https://clades.nextstrain.org - documentation: None + description: SARS-CoV-2 genome clade assignment, mutation calling, and sequence quality checks + homepage: https://github.com/nextstrain/nextclade + documentation: https://github.com/nextstrain/nextclade tool_dev_url: https://github.com/nextstrain/nextclade doi: "" - licence: ["MIT"] + licence: ['MIT'] input: - meta: @@ -19,6 +19,10 @@ input: description: | Groovy Map containing sample information e.g. [ id:'test', single_end:false ] + - dataset: + type: path + description: Path containing the dataset files obtained by running nextclade dataset get + pattern: "*" - fasta: type: file description: FASTA file containing one or more consensus sequences @@ -50,10 +54,7 @@ output: type: file description: TSV file containing nextclade results pattern: "*.{tsv}" - - tsv_clades: - type: file - description: TSV file containing nextclade results for clades only - pattern: "*.{clades.tsv}" authors: + - "@antunderwood" - "@drpatelh" diff --git a/tests/config/pytest_modules.yml b/tests/config/pytest_modules.yml index 80b27492..fc062e58 100644 --- a/tests/config/pytest_modules.yml +++ b/tests/config/pytest_modules.yml @@ -1017,9 +1017,13 @@ ncbigenomedownload: - modules/ncbigenomedownload/** - tests/modules/ncbigenomedownload/** -nextclade: - - modules/nextclade/** - - tests/modules/nextclade/** +nextclade/datasetget: + - modules/nextclade/datasetget/** + - tests/modules/nextclade/datasetget/** + +nextclade/run: + - modules/nextclade/run/** + - tests/modules/nextclade/run/** ngmaster: - modules/ngmaster/** diff --git a/tests/modules/nextclade/datasetget/main.nf b/tests/modules/nextclade/datasetget/main.nf new file mode 100644 index 00000000..0fc38a5b --- /dev/null +++ b/tests/modules/nextclade/datasetget/main.nf @@ -0,0 +1,14 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { NEXTCLADE_DATASETGET } from '../../../../modules/nextclade/datasetget/main.nf' + +workflow test_nextclade_datasetget { + + dataset = 'sars-cov-2' + reference = 'MN908947' + tag = '2022-01-05T19:54:31Z' + + NEXTCLADE_DATASETGET ( dataset, reference, tag ) +} diff --git a/tests/modules/nextclade/nextflow.config b/tests/modules/nextclade/datasetget/nextflow.config similarity index 95% rename from tests/modules/nextclade/nextflow.config rename to tests/modules/nextclade/datasetget/nextflow.config index 8730f1c4..50f50a7a 100644 --- a/tests/modules/nextclade/nextflow.config +++ b/tests/modules/nextclade/datasetget/nextflow.config @@ -1,5 +1,5 @@ process { publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } - -} + +} \ No newline at end of file diff --git a/tests/modules/nextclade/datasetget/test.yml b/tests/modules/nextclade/datasetget/test.yml new file mode 100644 index 00000000..7e798a11 --- /dev/null +++ b/tests/modules/nextclade/datasetget/test.yml @@ -0,0 +1,20 @@ +- name: nextclade datasetget + command: nextflow run ./tests/modules/nextclade/datasetget -entry test_nextclade_datasetget -c ./tests/config/nextflow.config -c ./tests/modules/nextclade/datasetget/nextflow.config + tags: + - nextclade + - nextclade/datasetget + files: + - path: output/nextclade/sars-cov-2/genemap.gff + md5sum: 21ebebfd0f416eeb959e55ebffd808e8 + - path: output/nextclade/sars-cov-2/primers.csv + md5sum: 5990c3483bf66ce607aeb90a44e7ef2e + - path: output/nextclade/sars-cov-2/qc.json + md5sum: 018fa0c0b0d2e824954e37e01495d549 + - path: output/nextclade/sars-cov-2/reference.fasta + md5sum: c7ce05f28e4ec0322c96f24e064ef55c + - path: output/nextclade/sars-cov-2/sequences.fasta + md5sum: 41129d255b99e0e92bdf20e866b99a1b + - path: output/nextclade/sars-cov-2/tag.json + md5sum: 2f6d8e806d9064571ee4188ef1304c9c + - path: output/nextclade/sars-cov-2/tree.json + md5sum: f8fb33ed62b59142ac20998eb599df6c \ No newline at end of file diff --git a/tests/modules/nextclade/main.nf b/tests/modules/nextclade/main.nf deleted file mode 100755 index 15750990..00000000 --- a/tests/modules/nextclade/main.nf +++ /dev/null @@ -1,14 +0,0 @@ -#!/usr/bin/env nextflow - -nextflow.enable.dsl = 2 - -include { NEXTCLADE } from '../../../modules/nextclade/main.nf' - -workflow test_nextclade { - input = [ - [ id:'test', single_end:false ], // meta map - file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) - ] - - NEXTCLADE ( input ) -} diff --git a/tests/modules/nextclade/run/main.nf b/tests/modules/nextclade/run/main.nf new file mode 100644 index 00000000..35b52317 --- /dev/null +++ b/tests/modules/nextclade/run/main.nf @@ -0,0 +1,22 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { NEXTCLADE_DATASETGET } from '../../../../modules/nextclade/datasetget/main.nf' +include { NEXTCLADE_RUN } from '../../../../modules/nextclade/run/main.nf' + +workflow test_nextclade_run { + + dataset = 'sars-cov-2' + reference = 'MN908947' + tag = '2022-01-05T19:54:31Z' + + NEXTCLADE_DATASETGET ( dataset, reference, tag ) + + input = [ + [ id:'test', single_end:false ], // meta map + file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) + ] + + NEXTCLADE_RUN ( input, NEXTCLADE_DATASETGET.out.dataset ) +} diff --git a/tests/modules/nextclade/run/nextflow.config b/tests/modules/nextclade/run/nextflow.config new file mode 100644 index 00000000..50f50a7a --- /dev/null +++ b/tests/modules/nextclade/run/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/nextclade/run/test.yml b/tests/modules/nextclade/run/test.yml new file mode 100644 index 00000000..37f7d8ae --- /dev/null +++ b/tests/modules/nextclade/run/test.yml @@ -0,0 +1,13 @@ +- name: nextclade run + command: nextflow run ./tests/modules/nextclade/run -entry test_nextclade_run -c ./tests/config/nextflow.config -c ./tests/modules/nextclade/run/nextflow.config + tags: + - nextclade + - nextclade/run + files: + - path: output/nextclade/test.json + - path: output/nextclade/test.csv + md5sum: 3b87a4da190ba2e1fdc8418dc3a7ffdb + - path: output/nextclade/test.tsv + md5sum: 449393288e8734a02def139c550a8d9b + - path: output/nextclade/test.tree.json + md5sum: 9c6e33cb7ff860bee6194847bd2c855c diff --git a/tests/modules/nextclade/test.yml b/tests/modules/nextclade/test.yml deleted file mode 100755 index 36218aad..00000000 --- a/tests/modules/nextclade/test.yml +++ /dev/null @@ -1,13 +0,0 @@ -- name: nextclade test_nextclade - command: nextflow run ./tests/modules/nextclade -entry test_nextclade -c ./tests/config/nextflow.config -c ./tests/modules/nextclade/nextflow.config - tags: - - nextclade - files: - - path: output/nextclade/test.json - md5sum: cab92830c5cb66076e7d6c054ea98362 - - path: output/nextclade/test.csv - md5sum: 4f7096df9be51f99a0d62a38653b29cf - - path: output/nextclade/test.tsv - md5sum: fe07dc4ffcd81742ca9bef93f88e8836 - - path: output/nextclade/test.tree.json - md5sum: 5c57dd724bc2b5cfde8f42a17ff2865a From 1287ba48fe6b2acb7449cfca387c91dc2ddf6538 Mon Sep 17 00:00:00 2001 From: FriederikeHanssen Date: Mon, 17 Jan 2022 16:40:31 +0100 Subject: [PATCH 18/20] Update version & add intervals usage (#1214) * Update version & add intervals usage * Fix config when passing intervals as file * Use proper paths --- modules/deepvariant/main.nf | 11 ++++++----- modules/deepvariant/meta.yml | 16 +++++++++------ tests/modules/deepvariant/main.nf | 24 ++++++++++++++++++++--- tests/modules/deepvariant/nextflow.config | 4 ++++ tests/modules/deepvariant/test.yml | 24 ++++++++++++++++++----- 5 files changed, 60 insertions(+), 19 deletions(-) diff --git a/modules/deepvariant/main.nf b/modules/deepvariant/main.nf index 0b455e1d..98345c83 100644 --- a/modules/deepvariant/main.nf +++ b/modules/deepvariant/main.nf @@ -8,11 +8,11 @@ process DEEPVARIANT { } container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'google/deepvariant:1.2.0' : - 'google/deepvariant:1.2.0' }" + 'google/deepvariant:1.3.0' : + 'google/deepvariant:1.3.0' }" input: - tuple val(meta), path(bam), path(bai) + tuple val(meta), path(input), path(index), path(intervals) path(fasta) path(fai) @@ -24,14 +24,16 @@ process DEEPVARIANT { script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" + def regions = intervals ? "--regions ${intervals}" : "" """ /opt/deepvariant/bin/run_deepvariant \\ --ref=${fasta} \\ - --reads=${bam} \\ + --reads=${input} \\ --output_vcf=${prefix}.vcf.gz \\ --output_gvcf=${prefix}.g.vcf.gz \\ ${args} \\ + ${regions} \\ --num_shards=${task.cpus} cat <<-END_VERSIONS > versions.yml @@ -39,5 +41,4 @@ process DEEPVARIANT { deepvariant: \$(echo \$(/opt/deepvariant/bin/run_deepvariant --version) | sed 's/^.*version //; s/ .*\$//' ) END_VERSIONS """ - } diff --git a/modules/deepvariant/meta.yml b/modules/deepvariant/meta.yml index 05269a3b..d4423d69 100644 --- a/modules/deepvariant/meta.yml +++ b/modules/deepvariant/meta.yml @@ -18,14 +18,18 @@ input: description: | Groovy Map containing sample information e.g. [ id:'test', single_end:false ] - - bam: + - input: type: file - description: BAM file - pattern: "*.bam" - - bai: + description: BAM/CRAM file + pattern: "*.bam/cram" + - index: type: file - description: Index of BAM file - pattern: "*.bai" + description: Index of BAM/CRAM file + pattern: "*.bai/crai" + - interval: + type: file + description: Interval file for targeted regions + pattern: "*.bed" - fasta: type: file description: The reference fasta file diff --git a/tests/modules/deepvariant/main.nf b/tests/modules/deepvariant/main.nf index fdf40274..3b1b90e6 100644 --- a/tests/modules/deepvariant/main.nf +++ b/tests/modules/deepvariant/main.nf @@ -2,13 +2,16 @@ nextflow.enable.dsl = 2 -include { DEEPVARIANT } from '../../../modules/deepvariant/main.nf' +include { DEEPVARIANT } from '../../../modules/deepvariant/main.nf' +include { DEEPVARIANT as DEEPVARIANT_INTERVALS } from '../../../modules/deepvariant/main.nf' workflow test_deepvariant { - bam_tuple_ch = Channel.of([[ id:'test', single_end:false ], // meta map + bam_tuple_ch = Channel.of([ [ id:'test', single_end:false ], // meta map file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true), - file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_bam_bai'], checkIfExists: true)]) + file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_bam_bai'], checkIfExists: true), + [] + ]) fasta = file(params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true) @@ -16,3 +19,18 @@ workflow test_deepvariant { DEEPVARIANT ( bam_tuple_ch, fasta, fai) } + +workflow test_deepvariant_cram_intervals { + + cram_tuple_ch = Channel.of([[ id:'test', single_end:false ], // meta map + file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_cram'], checkIfExists: true), + file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_cram_crai'], checkIfExists: true), + file(params.test_data['homo_sapiens']['genome']['genome_bed'], checkIfExists: true) + ]) + + fasta = file(params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true) + + fai = file(params.test_data['homo_sapiens']['genome']['genome_fasta_fai'], checkIfExists: true) + + DEEPVARIANT_INTERVALS ( cram_tuple_ch, fasta, fai) +} diff --git a/tests/modules/deepvariant/nextflow.config b/tests/modules/deepvariant/nextflow.config index 17e91a8c..a7e90c82 100644 --- a/tests/modules/deepvariant/nextflow.config +++ b/tests/modules/deepvariant/nextflow.config @@ -6,5 +6,9 @@ process { ext.args = ' --regions=\"chr22:0-40001\" --model_type=WGS ' ext.prefix = { "${meta.id}_out" } } + withName: DEEPVARIANT_INTERVALS { + ext.args = '--model_type=WGS ' + ext.prefix = { "${meta.id}_out" } + } } diff --git a/tests/modules/deepvariant/test.yml b/tests/modules/deepvariant/test.yml index 874f5d1f..30a0b1b3 100644 --- a/tests/modules/deepvariant/test.yml +++ b/tests/modules/deepvariant/test.yml @@ -1,9 +1,23 @@ -- name: deepvariant - command: nextflow run ./tests/modules/deepvariant -entry test_deepvariant -c tests/config/nextflow.config +- name: deepvariant test_deepvariant + command: nextflow run tests/modules/deepvariant -entry test_deepvariant -c tests/config/nextflow.config tags: - deepvariant files: - - path: output/deepvariant/test_out.vcf.gz - md5sum: 66d86be7a9bafe1f5c6304ebee18ee20 - path: output/deepvariant/test_out.g.vcf.gz - md5sum: 4ca868f0a4fdb17a280c3ed083d228e0 + md5sum: c4c65a3eaf62d6fbe0aba0a414318c8d + - path: output/deepvariant/test_out.vcf.gz + md5sum: ad964f68ac1d1b2720a9a4e0b6a3a389 + - path: output/deepvariant/versions.yml + md5sum: 51572055ca5c07fc4001b25a9c273bf8 + +- name: deepvariant test_deepvariant_cram_intervals + command: nextflow run tests/modules/deepvariant -entry test_deepvariant_cram_intervals -c tests/config/nextflow.config + tags: + - deepvariant + files: + - path: output/deepvariant/test_out.g.vcf.gz + md5sum: c4c65a3eaf62d6fbe0aba0a414318c8d + - path: output/deepvariant/test_out.vcf.gz + md5sum: ad964f68ac1d1b2720a9a4e0b6a3a389 + - path: output/deepvariant/versions.yml + md5sum: 7d9293db0d44423b114abc7116feb967 From 4e9cc84514651d5c3d5e13c5bd5ef5fc133e3989 Mon Sep 17 00:00:00 2001 From: Jose Espinosa-Carrasco Date: Tue, 18 Jan 2022 12:24:21 +0100 Subject: [PATCH 19/20] Bump chromap index version (#1216) * Bump chromap version * Update md5 hash * Remove md5 check, variable with conda --- modules/chromap/index/main.nf | 12 +++++------- tests/modules/chromap/index/test.yml | 1 - 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/modules/chromap/index/main.nf b/modules/chromap/index/main.nf index cafeca2f..61bcee10 100644 --- a/modules/chromap/index/main.nf +++ b/modules/chromap/index/main.nf @@ -1,13 +1,12 @@ -def VERSION = '0.1' // Version information not provided by tool on CLI - process CHROMAP_INDEX { tag '$fasta' label 'process_medium' - conda (params.enable_conda ? "bioconda::chromap=0.1 bioconda::samtools=1.13" : null) + conda (params.enable_conda ? "bioconda::chromap=0.1.5" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/mulled-v2-1f09f39f20b1c4ee36581dc81cc323c70e661633:2cad7c5aa775241887eff8714259714a39baf016-0' : - 'quay.io/biocontainers/mulled-v2-1f09f39f20b1c4ee36581dc81cc323c70e661633:2cad7c5aa775241887eff8714259714a39baf016-0' }" + 'https://depot.galaxyproject.org/singularity/chromap:0.1.5--h9a82719_0' : + 'quay.io/biocontainers/chromap:0.1.5--h9a82719_0' }" + input: path fasta @@ -29,8 +28,7 @@ process CHROMAP_INDEX { cat <<-END_VERSIONS > versions.yml "${task.process}": - chromap: $VERSION - samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//') + chromap: \$(echo \$(chromap --version 2>&1)) END_VERSIONS """ } diff --git a/tests/modules/chromap/index/test.yml b/tests/modules/chromap/index/test.yml index 74cfadfc..dde1aa1b 100644 --- a/tests/modules/chromap/index/test.yml +++ b/tests/modules/chromap/index/test.yml @@ -5,4 +5,3 @@ - chromap files: - path: output/chromap/genome.index - md5sum: f889d5f61d80823766af33277d27d386 From bb90e4fb78a977d469aad2a614c673b1981e7806 Mon Sep 17 00:00:00 2001 From: Harshil Patel Date: Tue, 18 Jan 2022 16:04:56 +0000 Subject: [PATCH 20/20] Remove bcftools and ivar module customisations (#1217) * Remove customisation from bcftools modules * Add save_mpileup option to bcftools/mpileup * Remove params.save_mpileup from ivar/consensus * Update meta.ymls --- modules/bcftools/consensus/main.nf | 9 +++++--- modules/bcftools/mpileup/main.nf | 9 ++++++-- modules/bcftools/mpileup/meta.yml | 4 ++++ modules/ivar/consensus/main.nf | 15 ++++++++------ modules/ivar/consensus/meta.yml | 4 ++++ modules/ivar/variants/main.nf | 12 ++++++----- modules/ivar/variants/meta.yml | 1 + tests/modules/bcftools/consensus/main.nf | 12 ++++++----- tests/modules/bcftools/mpileup/main.nf | 24 ++++++++++++++++++---- tests/modules/bcftools/mpileup/test.yml | 15 ++++++++++++++ tests/modules/ivar/consensus/main.nf | 26 ++++++++++++++++++------ tests/modules/ivar/consensus/test.yml | 13 +++++++++++- 12 files changed, 112 insertions(+), 32 deletions(-) diff --git a/modules/bcftools/consensus/main.nf b/modules/bcftools/consensus/main.nf index 5d7cd74f..040e6534 100644 --- a/modules/bcftools/consensus/main.nf +++ b/modules/bcftools/consensus/main.nf @@ -18,9 +18,12 @@ process BCFTOOLS_CONSENSUS { def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" """ - cat $fasta | bcftools consensus $vcf $args > ${prefix}.fa - header=\$(head -n 1 ${prefix}.fa | sed 's/>//g') - sed -i 's/\${header}/${meta.id}/g' ${prefix}.fa + cat $fasta \\ + | bcftools \\ + consensus \\ + $vcf \\ + $args \\ + > ${prefix}.fa cat <<-END_VERSIONS > versions.yml "${task.process}": diff --git a/modules/bcftools/mpileup/main.nf b/modules/bcftools/mpileup/main.nf index 3583aac4..cdd38eec 100644 --- a/modules/bcftools/mpileup/main.nf +++ b/modules/bcftools/mpileup/main.nf @@ -9,12 +9,14 @@ process BCFTOOLS_MPILEUP { input: tuple val(meta), path(bam) - path fasta + path fasta + val save_mpileup output: tuple val(meta), path("*.gz") , emit: vcf tuple val(meta), path("*.tbi") , emit: tbi tuple val(meta), path("*stats.txt"), emit: stats + tuple val(meta), path("*.mpileup") , emit: mpileup, optional: true path "versions.yml" , emit: versions script: @@ -22,13 +24,16 @@ process BCFTOOLS_MPILEUP { def args2 = task.ext.args2 ?: '' def args3 = task.ext.args3 ?: '' def prefix = task.ext.prefix ?: "${meta.id}" + def mpileup = save_mpileup ? "| tee ${prefix}.mpileup" : "" """ echo "${meta.id}" > sample_name.list - bcftools mpileup \\ + bcftools \\ + mpileup \\ --fasta-ref $fasta \\ $args \\ $bam \\ + $mpileup \\ | bcftools call --output-type v $args2 \\ | bcftools reheader --samples sample_name.list \\ | bcftools view --output-file ${prefix}.vcf.gz --output-type z $args3 diff --git a/modules/bcftools/mpileup/meta.yml b/modules/bcftools/mpileup/meta.yml index c31180ee..483d0e71 100644 --- a/modules/bcftools/mpileup/meta.yml +++ b/modules/bcftools/mpileup/meta.yml @@ -26,6 +26,10 @@ input: type: file description: FASTA reference file pattern: "*.{fasta,fa}" + - save_mpileup: + type: boolean + description: Save mpileup file generated by bcftools mpileup + patter: "*.mpileup" output: - meta: type: map diff --git a/modules/ivar/consensus/main.nf b/modules/ivar/consensus/main.nf index 58d97c8c..96d00ce2 100644 --- a/modules/ivar/consensus/main.nf +++ b/modules/ivar/consensus/main.nf @@ -9,7 +9,8 @@ process IVAR_CONSENSUS { input: tuple val(meta), path(bam) - path fasta + path fasta + val save_mpileup output: tuple val(meta), path("*.fa") , emit: fasta @@ -21,14 +22,16 @@ process IVAR_CONSENSUS { def args = task.ext.args ?: '' def args2 = task.ext.args2 ?: '' def prefix = task.ext.prefix ?: "${meta.id}" - def save_mpileup = params.save_mpileup ? "tee ${prefix}.mpileup |" : "" + def mpileup = save_mpileup ? "| tee ${prefix}.mpileup" : "" """ - samtools mpileup \\ + samtools \\ + mpileup \\ --reference $fasta \\ $args2 \\ - $bam | \\ - $save_mpileup \\ - ivar consensus \\ + $bam \\ + $mpileup \\ + | ivar \\ + consensus \\ $args \\ -p $prefix diff --git a/modules/ivar/consensus/meta.yml b/modules/ivar/consensus/meta.yml index 2ee5f2c6..aa08ad98 100644 --- a/modules/ivar/consensus/meta.yml +++ b/modules/ivar/consensus/meta.yml @@ -25,6 +25,10 @@ input: type: file description: The reference sequence used for mapping and generating the BAM file pattern: "*.fa" + - save_mpileup: + type: boolean + description: Save mpileup file generated by ivar consensus + patter: "*.mpileup" output: - meta: type: map diff --git a/modules/ivar/variants/main.nf b/modules/ivar/variants/main.nf index fda6e0cc..bb6e402b 100644 --- a/modules/ivar/variants/main.nf +++ b/modules/ivar/variants/main.nf @@ -23,14 +23,16 @@ process IVAR_VARIANTS { def args2 = task.ext.args2 ?: '' def prefix = task.ext.prefix ?: "${meta.id}" def features = gff ? "-g $gff" : "" - def mpileup = save_mpileup ? "tee ${prefix}.mpileup |" : "" + def mpileup = save_mpileup ? "| tee ${prefix}.mpileup" : "" """ - samtools mpileup \\ + samtools \\ + mpileup \\ $args2 \\ --reference $fasta \\ - $bam | \\ - $mpileup \\ - ivar variants \\ + $bam \\ + $mpileup \\ + | ivar \\ + variants \\ $args \\ $features \\ -r $fasta \\ diff --git a/modules/ivar/variants/meta.yml b/modules/ivar/variants/meta.yml index 7c4297ca..29cbd958 100644 --- a/modules/ivar/variants/meta.yml +++ b/modules/ivar/variants/meta.yml @@ -32,6 +32,7 @@ input: - save_mpileup: type: boolean description: Save mpileup file generated by ivar variants + patter: "*.mpileup" output: - meta: type: map diff --git a/tests/modules/bcftools/consensus/main.nf b/tests/modules/bcftools/consensus/main.nf index ab00fbce..b2ee899b 100644 --- a/tests/modules/bcftools/consensus/main.nf +++ b/tests/modules/bcftools/consensus/main.nf @@ -5,11 +5,13 @@ nextflow.enable.dsl = 2 include { BCFTOOLS_CONSENSUS } from '../../../../modules/bcftools/consensus/main.nf' workflow test_bcftools_consensus { - input = [ [ id:'test' ], // meta map - [ file(params.test_data['sarscov2']['illumina']['test_vcf_gz'], checkIfExists: true) ], - [ file(params.test_data['sarscov2']['illumina']['test_vcf_gz_tbi'], checkIfExists: true) ], - [ file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) ] - ] + + input = [ + [ id:'test' ], // meta map + file(params.test_data['sarscov2']['illumina']['test_vcf_gz'], checkIfExists: true), + file(params.test_data['sarscov2']['illumina']['test_vcf_gz_tbi'], checkIfExists: true), + file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) + ] BCFTOOLS_CONSENSUS ( input ) } diff --git a/tests/modules/bcftools/mpileup/main.nf b/tests/modules/bcftools/mpileup/main.nf index 813ca408..1568f157 100644 --- a/tests/modules/bcftools/mpileup/main.nf +++ b/tests/modules/bcftools/mpileup/main.nf @@ -5,9 +5,25 @@ nextflow.enable.dsl = 2 include { BCFTOOLS_MPILEUP } from '../../../../modules/bcftools/mpileup/main.nf' workflow test_bcftools_mpileup { - input = [ [ id:'test' ], // meta map - [ file(params.test_data['sarscov2']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true) ]] - fasta = [ file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) ] - BCFTOOLS_MPILEUP ( input, fasta ) + input = [ + [ id:'test' ], // meta map + [ file(params.test_data['sarscov2']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true) ] + ] + fasta = file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) + save_mpileup = false + + BCFTOOLS_MPILEUP ( input, fasta, save_mpileup ) +} + +workflow test_bcftools_save_mpileup { + + input = [ + [ id:'test' ], // meta map + [ file(params.test_data['sarscov2']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true) ] + ] + fasta = file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) + save_mpileup = true + + BCFTOOLS_MPILEUP ( input, fasta, save_mpileup ) } diff --git a/tests/modules/bcftools/mpileup/test.yml b/tests/modules/bcftools/mpileup/test.yml index e3a515e6..35c33553 100644 --- a/tests/modules/bcftools/mpileup/test.yml +++ b/tests/modules/bcftools/mpileup/test.yml @@ -10,3 +10,18 @@ md5sum: ae0f17dcc2cb27034d848699b824c516 - path: output/bcftools/test.vcf.gz md5sum: e9e520663875c66296f3bff0fa226c40 + +- name: bcftools mpileup test_bcftools_save_mpileup + command: nextflow run ./tests/modules/bcftools/mpileup -entry test_bcftools_save_mpileup -c ./tests/config/nextflow.config -c ./tests/modules/bcftools/mpileup/nextflow.config + tags: + - bcftools/mpileup + - bcftools + files: + - path: output/bcftools/test.bcftools_stats.txt + md5sum: 72c506e633413c6b439f95336933984e + - path: output/bcftools/test.vcf.gz.tbi + md5sum: ae0f17dcc2cb27034d848699b824c516 + - path: output/bcftools/test.vcf.gz + md5sum: e9e520663875c66296f3bff0fa226c40 + - path: output/bcftools/test.mpileup + md5sum: fe0e45a57ffdfb253ed6794f8356a3f0 diff --git a/tests/modules/ivar/consensus/main.nf b/tests/modules/ivar/consensus/main.nf index d0807984..27ac83f9 100644 --- a/tests/modules/ivar/consensus/main.nf +++ b/tests/modules/ivar/consensus/main.nf @@ -2,14 +2,28 @@ nextflow.enable.dsl = 2 -params.save_mpileup = true include { IVAR_CONSENSUS } from '../../../../modules/ivar/consensus/main.nf' workflow test_ivar_consensus { - input = [ [ id:'test'], - file(params.test_data['sarscov2']['illumina']['test_paired_end_bam'], checkIfExists: true) - ] + + input = [ + [ id:'test'], + file(params.test_data['sarscov2']['illumina']['test_paired_end_bam'], checkIfExists: true) + ] fasta = file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) - - IVAR_CONSENSUS ( input, fasta ) + save_mpileup = false + + IVAR_CONSENSUS ( input, fasta, save_mpileup) +} + +workflow test_ivar_consensus_mpileup { + + input = [ + [ id:'test'], + file(params.test_data['sarscov2']['illumina']['test_paired_end_bam'], checkIfExists: true) + ] + fasta = file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) + save_mpileup = true + + IVAR_CONSENSUS ( input, fasta, save_mpileup) } diff --git a/tests/modules/ivar/consensus/test.yml b/tests/modules/ivar/consensus/test.yml index caaa640f..c045eebb 100644 --- a/tests/modules/ivar/consensus/test.yml +++ b/tests/modules/ivar/consensus/test.yml @@ -1,5 +1,16 @@ -- name: ivar consensus +- name: ivar consensus test_ivar_consensus command: nextflow run ./tests/modules/ivar/consensus -entry test_ivar_consensus -c ./tests/config/nextflow.config -c ./tests/modules/ivar/consensus/nextflow.config + tags: + - ivar + - ivar/consensus + files: + - path: output/ivar/test.fa + md5sum: 9e21a64818f4302b4dece5480fa5e8b8 + - path: output/ivar/test.qual.txt + md5sum: 68b329da9893e34099c7d8ad5cb9c940 + +- name: ivar consensus test_ivar_consensus_mpileup + command: nextflow run ./tests/modules/ivar/consensus -entry test_ivar_consensus_mpileup -c ./tests/config/nextflow.config -c ./tests/modules/ivar/consensus/nextflow.config tags: - ivar - ivar/consensus