From 024c992ca77d6bf5e4baddae30a38cd14d526042 Mon Sep 17 00:00:00 2001 From: Nicolas Vannieuwkerke Date: Wed, 27 Apr 2022 11:12:58 +0200 Subject: [PATCH 01/37] created the module --- modules/vardictjava/main.nf | 77 +++++++++++++++++++++++ modules/vardictjava/meta.yml | 51 +++++++++++++++ tests/config/pytest_modules.yml | 4 ++ tests/modules/vardictjava/main.nf | 15 +++++ tests/modules/vardictjava/nextflow.config | 8 +++ tests/modules/vardictjava/test.yml | 12 ++++ 6 files changed, 167 insertions(+) create mode 100644 modules/vardictjava/main.nf create mode 100644 modules/vardictjava/meta.yml create mode 100644 tests/modules/vardictjava/main.nf create mode 100644 tests/modules/vardictjava/nextflow.config create mode 100644 tests/modules/vardictjava/test.yml diff --git a/modules/vardictjava/main.nf b/modules/vardictjava/main.nf new file mode 100644 index 00000000..d52e15dd --- /dev/null +++ b/modules/vardictjava/main.nf @@ -0,0 +1,77 @@ +// TODO nf-core: If in doubt look at other nf-core/modules to see how we are doing things! :) +// https://github.com/nf-core/modules/tree/master/modules +// You can also ask for help via your pull request or on the #modules channel on the nf-core Slack workspace: +// https://nf-co.re/join +// TODO nf-core: A module file SHOULD only define input and output files as command-line parameters. +// All other parameters MUST be provided using the "task.ext" directive, see here: +// https://www.nextflow.io/docs/latest/process.html#ext +// where "task.ext" is a string. +// Any parameters that need to be evaluated in the context of a particular sample +// e.g. single-end/paired-end data MUST also be defined and evaluated appropriately. +// TODO nf-core: Software that can be piped together SHOULD be added to separate module files +// unless there is a run-time, storage advantage in implementing in this way +// e.g. it's ok to have a single module for bwa to output BAM instead of SAM: +// bwa mem | samtools view -B -T ref.fasta +// TODO nf-core: Optional inputs are not currently supported by Nextflow. However, using an empty +// list (`[]`) instead of a file can be used to work around this issue. + +process VARDICTJAVA { + tag "$meta.id" + label 'process_medium' + + // TODO nf-core: List required Conda package(s). + // Software MUST be pinned to channel (i.e. "bioconda"), version (i.e. "1.10"). + // For Conda, the build (i.e. "h9402c20_2") must be EXCLUDED to support installation on different operating systems. + // TODO nf-core: See section in main README for further information regarding finding and adding container addresses to the section below. + conda (params.enable_conda ? "bioconda::vardict-java=1.8.3" : null) + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/vardict-java:1.8.3--hdfd78af_0': + 'quay.io/biocontainers/vardict-java:1.8.3--hdfd78af_0' }" + + input: + // TODO nf-core: Where applicable all sample-specific information e.g. "id", "single_end", "read_group" + // MUST be provided as an input via a Groovy Map called "meta". + // This information may not be required in some instances e.g. indexing reference genome files: + // https://github.com/nf-core/modules/blob/master/modules/bwa/index/main.nf + // TODO nf-core: Where applicable please provide/convert compressed files as input/output + // e.g. "*.fastq.gz" and NOT "*.fastq", "*.bam" and NOT "*.sam" etc. + tuple val(meta), path(bam) + path(reference_fasta) + path(regions_of_interest) + + output: + // TODO nf-core: Named file extensions MUST be emitted for ALL output channels + tuple val(meta), path("*.bam"), emit: bam + // TODO nf-core: List additional required output channels/values here + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + // TODO nf-core: Where possible, a command MUST be provided to obtain the version number of the software e.g. 1.10 + // If the software is unable to output a version number on the command-line then it can be manually specified + // e.g. https://github.com/nf-core/modules/blob/master/modules/homer/annotatepeaks/main.nf + // Each software used MUST provide the software name and version number in the YAML version file (versions.yml) + // TODO nf-core: It MUST be possible to pass additional parameters to the tool as a command-line string via the "task.ext.args" directive + // TODO nf-core: If the tool supports multi-threading then you MUST provide the appropriate parameter + // using the Nextflow "task" variable e.g. "--threads $task.cpus" + // TODO nf-core: Please replace the example samtools command below with your module's command + // TODO nf-core: Please indent the command appropriately (4 spaces!!) to help with readability ;) + """ + vardict-java \\ + $args \\ + -b $bam \\ + -th $task.cpus \\ + -n $prefix \\ + -G $reference_fasta \\ + $regions_of_interest \\ + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + vardictjava: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//' )) + END_VERSIONS + """ +} diff --git a/modules/vardictjava/meta.yml b/modules/vardictjava/meta.yml new file mode 100644 index 00000000..e8c55de3 --- /dev/null +++ b/modules/vardictjava/meta.yml @@ -0,0 +1,51 @@ +name: "vardictjava" +## TODO nf-core: Add a description of the module and list keywords +description: write your description here +keywords: + - sort +tools: + - "vardictjava": + ## TODO nf-core: Add a description and other details for the software below + description: "Java port of the VarDict variant discovery program" + homepage: "None" + documentation: "None" + tool_dev_url: "None" + doi: "" + licence: "['MIT']" + +## TODO nf-core: Add a description of all of the variables used as input +input: + # Only when we have meta + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + # + ## TODO nf-core: Delete / customise this example input + - bam: + type: file + description: BAM/CRAM/SAM file + pattern: "*.{bam,cram,sam}" + +## TODO nf-core: Add a description of all of the variables used as output +output: + #Only when we have meta + - 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" + ## TODO nf-core: Delete / customise this example output + - bam: + type: file + description: Sorted BAM/CRAM/SAM file + pattern: "*.{bam,cram,sam}" + +authors: + - "@nvnieuwk" diff --git a/tests/config/pytest_modules.yml b/tests/config/pytest_modules.yml index 4d8ce0b5..8ca9f2e2 100644 --- a/tests/config/pytest_modules.yml +++ b/tests/config/pytest_modules.yml @@ -1908,6 +1908,10 @@ unzip: - modules/unzip/** - tests/modules/unzip/** +vardictjava: + - modules/vardictjava/** + - tests/modules/vardictjava/** + variantbam: - modules/variantbam/** - tests/modules/variantbam/** diff --git a/tests/modules/vardictjava/main.nf b/tests/modules/vardictjava/main.nf new file mode 100644 index 00000000..8a714b2b --- /dev/null +++ b/tests/modules/vardictjava/main.nf @@ -0,0 +1,15 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { VARDICTJAVA } from '../../../modules/vardictjava/main.nf' + +workflow test_vardictjava { + + input = [ + [ id:'test', single_end:false ], // meta map + file(params.test_data['homo_sapiens']['illumina']['test_paired_end_bam'], checkIfExists: true) + ] + + VARDICTJAVA ( input ) +} diff --git a/tests/modules/vardictjava/nextflow.config b/tests/modules/vardictjava/nextflow.config new file mode 100644 index 00000000..5dc176a9 --- /dev/null +++ b/tests/modules/vardictjava/nextflow.config @@ -0,0 +1,8 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + + withName: VARDICTJAVA { + ext.args = '' + } +} \ No newline at end of file diff --git a/tests/modules/vardictjava/test.yml b/tests/modules/vardictjava/test.yml new file mode 100644 index 00000000..73c647af --- /dev/null +++ b/tests/modules/vardictjava/test.yml @@ -0,0 +1,12 @@ +## TODO nf-core: Please run the following command to build this file: +# nf-core modules create-test-yml vardictjava +- name: "vardictjava" + command: nextflow run ./tests/modules/vardictjava -entry test_vardictjava -c ./tests/config/nextflow.config -c ./tests/modules/vardictjava/nextflow.config + tags: + - "vardictjava" + # + files: + - path: "output/vardictjava/test.bam" + md5sum: e667c7caad0bc4b7ac383fd023c654fc + - path: output/vardictjava/versions.yml + md5sum: a01fe51bc4c6a3a6226fbf77b2c7cf3b From d57664b576d2433deed1b0fb742f3a3da05d5046 Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Wed, 27 Apr 2022 11:18:58 +0200 Subject: [PATCH 02/37] cleanup TODO's --- modules/vardictjava/main.nf | 39 +------------------------------------ 1 file changed, 1 insertion(+), 38 deletions(-) diff --git a/modules/vardictjava/main.nf b/modules/vardictjava/main.nf index d52e15dd..80beb540 100644 --- a/modules/vardictjava/main.nf +++ b/modules/vardictjava/main.nf @@ -1,48 +1,19 @@ -// TODO nf-core: If in doubt look at other nf-core/modules to see how we are doing things! :) -// https://github.com/nf-core/modules/tree/master/modules -// You can also ask for help via your pull request or on the #modules channel on the nf-core Slack workspace: -// https://nf-co.re/join -// TODO nf-core: A module file SHOULD only define input and output files as command-line parameters. -// All other parameters MUST be provided using the "task.ext" directive, see here: -// https://www.nextflow.io/docs/latest/process.html#ext -// where "task.ext" is a string. -// Any parameters that need to be evaluated in the context of a particular sample -// e.g. single-end/paired-end data MUST also be defined and evaluated appropriately. -// TODO nf-core: Software that can be piped together SHOULD be added to separate module files -// unless there is a run-time, storage advantage in implementing in this way -// e.g. it's ok to have a single module for bwa to output BAM instead of SAM: -// bwa mem | samtools view -B -T ref.fasta -// TODO nf-core: Optional inputs are not currently supported by Nextflow. However, using an empty -// list (`[]`) instead of a file can be used to work around this issue. - process VARDICTJAVA { tag "$meta.id" label 'process_medium' - // TODO nf-core: List required Conda package(s). - // Software MUST be pinned to channel (i.e. "bioconda"), version (i.e. "1.10"). - // For Conda, the build (i.e. "h9402c20_2") must be EXCLUDED to support installation on different operating systems. - // TODO nf-core: See section in main README for further information regarding finding and adding container addresses to the section below. conda (params.enable_conda ? "bioconda::vardict-java=1.8.3" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? 'https://depot.galaxyproject.org/singularity/vardict-java:1.8.3--hdfd78af_0': 'quay.io/biocontainers/vardict-java:1.8.3--hdfd78af_0' }" input: - // TODO nf-core: Where applicable all sample-specific information e.g. "id", "single_end", "read_group" - // MUST be provided as an input via a Groovy Map called "meta". - // This information may not be required in some instances e.g. indexing reference genome files: - // https://github.com/nf-core/modules/blob/master/modules/bwa/index/main.nf - // TODO nf-core: Where applicable please provide/convert compressed files as input/output - // e.g. "*.fastq.gz" and NOT "*.fastq", "*.bam" and NOT "*.sam" etc. tuple val(meta), path(bam) path(reference_fasta) path(regions_of_interest) output: - // TODO nf-core: Named file extensions MUST be emitted for ALL output channels tuple val(meta), path("*.bam"), emit: bam - // TODO nf-core: List additional required output channels/values here path "versions.yml" , emit: versions when: @@ -51,15 +22,7 @@ process VARDICTJAVA { script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" - // TODO nf-core: Where possible, a command MUST be provided to obtain the version number of the software e.g. 1.10 - // If the software is unable to output a version number on the command-line then it can be manually specified - // e.g. https://github.com/nf-core/modules/blob/master/modules/homer/annotatepeaks/main.nf - // Each software used MUST provide the software name and version number in the YAML version file (versions.yml) - // TODO nf-core: It MUST be possible to pass additional parameters to the tool as a command-line string via the "task.ext.args" directive - // TODO nf-core: If the tool supports multi-threading then you MUST provide the appropriate parameter - // using the Nextflow "task" variable e.g. "--threads $task.cpus" - // TODO nf-core: Please replace the example samtools command below with your module's command - // TODO nf-core: Please indent the command appropriately (4 spaces!!) to help with readability ;) + """ vardict-java \\ $args \\ From 7956d38e61a8efdd2fffcb6cf33f4a02ad73bc50 Mon Sep 17 00:00:00 2001 From: Nicolas Vannieuwkerke Date: Wed, 27 Apr 2022 13:18:46 +0200 Subject: [PATCH 03/37] Fixed the test on nextflow level --- modules/vardictjava/main.nf | 4 +-- modules/vardictjava/meta.yml | 46 ++++++++++++++++++------------ tests/modules/vardictjava/main.nf | 8 ++++-- tests/modules/vardictjava/test.yml | 2 +- 4 files changed, 36 insertions(+), 24 deletions(-) diff --git a/modules/vardictjava/main.nf b/modules/vardictjava/main.nf index 80beb540..8170bf76 100644 --- a/modules/vardictjava/main.nf +++ b/modules/vardictjava/main.nf @@ -13,7 +13,7 @@ process VARDICTJAVA { path(regions_of_interest) output: - tuple val(meta), path("*.bam"), emit: bam + tuple val(meta), path("*.vcf"), emit: vcf path "versions.yml" , emit: versions when: @@ -34,7 +34,7 @@ process VARDICTJAVA { cat <<-END_VERSIONS > versions.yml "${task.process}": - vardictjava: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//' )) + vardictjava: \$(echo 1.8.3) END_VERSIONS """ } diff --git a/modules/vardictjava/meta.yml b/modules/vardictjava/meta.yml index e8c55de3..7820a877 100644 --- a/modules/vardictjava/meta.yml +++ b/modules/vardictjava/meta.yml @@ -1,19 +1,19 @@ name: "vardictjava" -## TODO nf-core: Add a description of the module and list keywords -description: write your description here + +description: The Java port of the VarDict variant caller keywords: - - sort + - variant calling + - VarDict + - AstraZeneca tools: - "vardictjava": - ## TODO nf-core: Add a description and other details for the software below description: "Java port of the VarDict variant discovery program" - homepage: "None" - documentation: "None" - tool_dev_url: "None" - doi: "" + homepage: "https://github.com/AstraZeneca-NGS/VarDictJava" + documentation: "https://github.com/AstraZeneca-NGS/VarDictJava" + tool_dev_url: "https://github.com/AstraZeneca-NGS/VarDictJava" + doi: "10.1093/nar/gkw227 " licence: "['MIT']" -## TODO nf-core: Add a description of all of the variables used as input input: # Only when we have meta - meta: @@ -21,14 +21,22 @@ input: description: | Groovy Map containing sample information e.g. [ id:'test', single_end:false ] - # - ## TODO nf-core: Delete / customise this example input + - bam: type: file - description: BAM/CRAM/SAM file - pattern: "*.{bam,cram,sam}" + description: BAM/SAM file + pattern: "*.{bam,sam}" + + - reference_fasta: + type: file + description: FASTA of the reference genome + pattern: "*.{fa,fasta}" + + - regions_of_interest: + type: file + description: BED with the regions of interest + pattern: "*.bed" -## TODO nf-core: Add a description of all of the variables used as output output: #Only when we have meta - meta: @@ -36,16 +44,16 @@ output: description: | Groovy Map containing sample information e.g. [ id:'test', single_end:false ] - # + - versions: type: file description: File containing software versions pattern: "versions.yml" - ## TODO nf-core: Delete / customise this example output - - bam: + + - vcf: type: file - description: Sorted BAM/CRAM/SAM file - pattern: "*.{bam,cram,sam}" + description: VCF file output + pattern: "*.vcf" authors: - "@nvnieuwk" diff --git a/tests/modules/vardictjava/main.nf b/tests/modules/vardictjava/main.nf index 8a714b2b..7511b529 100644 --- a/tests/modules/vardictjava/main.nf +++ b/tests/modules/vardictjava/main.nf @@ -8,8 +8,12 @@ workflow test_vardictjava { input = [ [ id:'test', single_end:false ], // meta map - file(params.test_data['homo_sapiens']['illumina']['test_paired_end_bam'], checkIfExists: true) + file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true) ] - VARDICTJAVA ( input ) + VARDICTJAVA ( + input, + file(params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true), + file(params.test_data['homo_sapiens']['genome']['genome_bed'], checkIfExists: true) + ) } diff --git a/tests/modules/vardictjava/test.yml b/tests/modules/vardictjava/test.yml index 73c647af..001a56e8 100644 --- a/tests/modules/vardictjava/test.yml +++ b/tests/modules/vardictjava/test.yml @@ -6,7 +6,7 @@ - "vardictjava" # files: - - path: "output/vardictjava/test.bam" + - path: "output/vardictjava/test.vcf" md5sum: e667c7caad0bc4b7ac383fd023c654fc - path: output/vardictjava/versions.yml md5sum: a01fe51bc4c6a3a6226fbf77b2c7cf3b From 85c49a971f91208ead572212be8475f5e7518feb Mon Sep 17 00:00:00 2001 From: Nicolas Vannieuwkerke Date: Thu, 28 Apr 2022 09:07:52 +0200 Subject: [PATCH 04/37] Fixed an issue with wrong file order --- modules/vardictjava/main.nf | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/modules/vardictjava/main.nf b/modules/vardictjava/main.nf index 8170bf76..855784db 100644 --- a/modules/vardictjava/main.nf +++ b/modules/vardictjava/main.nf @@ -8,9 +8,8 @@ process VARDICTJAVA { 'quay.io/biocontainers/vardict-java:1.8.3--hdfd78af_0' }" input: - tuple val(meta), path(bam) + tuple val(meta), path(bam), path(regions_of_interest) path(reference_fasta) - path(regions_of_interest) output: tuple val(meta), path("*.vcf"), emit: vcf @@ -24,6 +23,9 @@ process VARDICTJAVA { def prefix = task.ext.prefix ?: "${meta.id}" """ + head -n 20 $reference_fasta + cat $reference_fasta | wc -l + vardict-java \\ $args \\ -b $bam \\ @@ -31,10 +33,11 @@ process VARDICTJAVA { -n $prefix \\ -G $reference_fasta \\ $regions_of_interest \\ + > ${prefix}.vcf cat <<-END_VERSIONS > versions.yml "${task.process}": - vardictjava: \$(echo 1.8.3) + vardict-java: \$(echo 1.8.3) END_VERSIONS """ } From db43095b1a1530af1e3cac7f3e7211c52d87bbd7 Mon Sep 17 00:00:00 2001 From: Nicolas Vannieuwkerke Date: Thu, 28 Apr 2022 09:18:15 +0200 Subject: [PATCH 05/37] Split the bed file into a seperate input --- modules/vardictjava/main.nf | 8 +++----- tests/modules/vardictjava/main.nf | 14 +++++++------- 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/modules/vardictjava/main.nf b/modules/vardictjava/main.nf index 855784db..e1098b22 100644 --- a/modules/vardictjava/main.nf +++ b/modules/vardictjava/main.nf @@ -8,7 +8,8 @@ process VARDICTJAVA { 'quay.io/biocontainers/vardict-java:1.8.3--hdfd78af_0' }" input: - tuple val(meta), path(bam), path(regions_of_interest) + tuple val(meta), path(bam) + path(regions_of_interest) path(reference_fasta) output: @@ -23,14 +24,11 @@ process VARDICTJAVA { def prefix = task.ext.prefix ?: "${meta.id}" """ - head -n 20 $reference_fasta - cat $reference_fasta | wc -l - vardict-java \\ $args \\ -b $bam \\ -th $task.cpus \\ - -n $prefix \\ + -N $prefix \\ -G $reference_fasta \\ $regions_of_interest \\ > ${prefix}.vcf diff --git a/tests/modules/vardictjava/main.nf b/tests/modules/vardictjava/main.nf index 7511b529..647c8bba 100644 --- a/tests/modules/vardictjava/main.nf +++ b/tests/modules/vardictjava/main.nf @@ -6,14 +6,14 @@ include { VARDICTJAVA } from '../../../modules/vardictjava/main.nf' workflow test_vardictjava { - input = [ + bam_input_ch = Channel.of([ [ id:'test', single_end:false ], // meta map file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true) - ] + ]) - VARDICTJAVA ( - input, - file(params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true), - file(params.test_data['homo_sapiens']['genome']['genome_bed'], checkIfExists: true) - ) + bed = file(params.test_data['homo_sapiens']['genome']['genome_bed'], checkIfExists: true) + + fasta = file(params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true) + + VARDICTJAVA ( bam_input_ch, bed, fasta ) } From def580ddb7af11619f8f0757ef5af5ed156ed6a4 Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Thu, 28 Apr 2022 09:28:57 +0200 Subject: [PATCH 06/37] Add gzip for compressed output --- modules/vardictjava/main.nf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/vardictjava/main.nf b/modules/vardictjava/main.nf index e1098b22..425c1706 100644 --- a/modules/vardictjava/main.nf +++ b/modules/vardictjava/main.nf @@ -31,7 +31,7 @@ process VARDICTJAVA { -N $prefix \\ -G $reference_fasta \\ $regions_of_interest \\ - > ${prefix}.vcf + | gzip -c > ${prefix}.vcf.gz cat <<-END_VERSIONS > versions.yml "${task.process}": From 484c8f5dfa40a2117997afcd8434bcd52ff4fe4e Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Thu, 28 Apr 2022 09:29:27 +0200 Subject: [PATCH 07/37] Update meta.yml --- modules/vardictjava/meta.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/vardictjava/meta.yml b/modules/vardictjava/meta.yml index 7820a877..5bc21b55 100644 --- a/modules/vardictjava/meta.yml +++ b/modules/vardictjava/meta.yml @@ -53,7 +53,7 @@ output: - vcf: type: file description: VCF file output - pattern: "*.vcf" + pattern: "*.vcf.gz" authors: - "@nvnieuwk" From 9df830f79dc70a347578120e797a4e3160dfc66d Mon Sep 17 00:00:00 2001 From: Nicolas Vannieuwkerke Date: Thu, 28 Apr 2022 10:23:07 +0200 Subject: [PATCH 08/37] Added the .bai and .fai files --- modules/vardictjava/main.nf | 8 ++++---- tests/modules/vardictjava/main.nf | 12 ++++++++---- tests/modules/vardictjava/test.yml | 15 ++++++--------- 3 files changed, 18 insertions(+), 17 deletions(-) diff --git a/modules/vardictjava/main.nf b/modules/vardictjava/main.nf index 425c1706..c370b6ef 100644 --- a/modules/vardictjava/main.nf +++ b/modules/vardictjava/main.nf @@ -8,12 +8,12 @@ process VARDICTJAVA { 'quay.io/biocontainers/vardict-java:1.8.3--hdfd78af_0' }" input: - tuple val(meta), path(bam) + tuple val(meta), path(bam), path(bai) path(regions_of_interest) - path(reference_fasta) + tuple path(reference_fasta), path(reference_fai) output: - tuple val(meta), path("*.vcf"), emit: vcf + tuple val(meta), path("*.vcf.gz"), emit: vcf path "versions.yml" , emit: versions when: @@ -30,7 +30,7 @@ process VARDICTJAVA { -th $task.cpus \\ -N $prefix \\ -G $reference_fasta \\ - $regions_of_interest \\ + $regions_of_interest | gzip -c > ${prefix}.vcf.gz cat <<-END_VERSIONS > versions.yml diff --git a/tests/modules/vardictjava/main.nf b/tests/modules/vardictjava/main.nf index 647c8bba..89eec407 100644 --- a/tests/modules/vardictjava/main.nf +++ b/tests/modules/vardictjava/main.nf @@ -8,12 +8,16 @@ workflow test_vardictjava { bam_input_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'], checkIfExists: true), + file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_bam_bai'], checkIfExists: true) ]) - bed = file(params.test_data['homo_sapiens']['genome']['genome_bed'], checkIfExists: true) + bed = file(params.test_data['homo_sapiens']['genome']['genome_bed_gz'], checkIfExists: true) - fasta = file(params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true) + reference = Channel.of([ + file(params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true), + file(params.test_data['homo_sapiens']['genome']['genome_fasta_fai'], checkIfExists: true) + ]) - VARDICTJAVA ( bam_input_ch, bed, fasta ) + VARDICTJAVA ( bam_input_ch, bed, reference ) } diff --git a/tests/modules/vardictjava/test.yml b/tests/modules/vardictjava/test.yml index 001a56e8..77aa9047 100644 --- a/tests/modules/vardictjava/test.yml +++ b/tests/modules/vardictjava/test.yml @@ -1,12 +1,9 @@ -## TODO nf-core: Please run the following command to build this file: -# nf-core modules create-test-yml vardictjava -- name: "vardictjava" - command: nextflow run ./tests/modules/vardictjava -entry test_vardictjava -c ./tests/config/nextflow.config -c ./tests/modules/vardictjava/nextflow.config +- name: vardictjava test_vardictjava + command: nextflow run tests/modules/vardictjava -entry test_vardictjava -c tests/config/nextflow.config tags: - - "vardictjava" - # + - vardictjava files: - - path: "output/vardictjava/test.vcf" - md5sum: e667c7caad0bc4b7ac383fd023c654fc + - path: output/vardictjava/test.vcf.gz + md5sum: 2179dcaee6183495b421293f42db11b5 - path: output/vardictjava/versions.yml - md5sum: a01fe51bc4c6a3a6226fbf77b2c7cf3b + md5sum: aac455b8c9c9194c5fed80e4fd495b96 From 45b4a61a15c8b7ac6c29a447ccc1ece9f08f8efe Mon Sep 17 00:00:00 2001 From: Nicolas Vannieuwkerke Date: Thu, 28 Apr 2022 13:31:37 +0200 Subject: [PATCH 09/37] Some small updates --- modules/vardictjava/main.nf | 2 +- tests/modules/vardictjava/main.nf | 8 ++++---- tests/modules/vardictjava/test.yml | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/modules/vardictjava/main.nf b/modules/vardictjava/main.nf index c370b6ef..26833436 100644 --- a/modules/vardictjava/main.nf +++ b/modules/vardictjava/main.nf @@ -30,7 +30,7 @@ process VARDICTJAVA { -th $task.cpus \\ -N $prefix \\ -G $reference_fasta \\ - $regions_of_interest + $regions_of_interest \\ | gzip -c > ${prefix}.vcf.gz cat <<-END_VERSIONS > versions.yml diff --git a/tests/modules/vardictjava/main.nf b/tests/modules/vardictjava/main.nf index 89eec407..d392358a 100644 --- a/tests/modules/vardictjava/main.nf +++ b/tests/modules/vardictjava/main.nf @@ -6,15 +6,15 @@ include { VARDICTJAVA } from '../../../modules/vardictjava/main.nf' workflow test_vardictjava { - bam_input_ch = Channel.of([ - [ id:'test', single_end:false ], // meta map + bam_input_ch = Channel.value([ + [ id:'test' ], // 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) ]) - bed = file(params.test_data['homo_sapiens']['genome']['genome_bed_gz'], checkIfExists: true) + bed = Channel.value(file(params.test_data['homo_sapiens']['genome']['genome_bed'], checkIfExists: true)) - reference = Channel.of([ + reference = Channel.value([ file(params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true), file(params.test_data['homo_sapiens']['genome']['genome_fasta_fai'], checkIfExists: true) ]) diff --git a/tests/modules/vardictjava/test.yml b/tests/modules/vardictjava/test.yml index 77aa9047..0bd21f4e 100644 --- a/tests/modules/vardictjava/test.yml +++ b/tests/modules/vardictjava/test.yml @@ -4,6 +4,6 @@ - vardictjava files: - path: output/vardictjava/test.vcf.gz - md5sum: 2179dcaee6183495b421293f42db11b5 + md5sum: 7029066c27ac6f5ef18d660d5741979a - path: output/vardictjava/versions.yml md5sum: aac455b8c9c9194c5fed80e4fd495b96 From 8c98a78d2a0e12d081184736e17ccde3feee3f44 Mon Sep 17 00:00:00 2001 From: Nicolas Vannieuwkerke Date: Thu, 28 Apr 2022 14:07:55 +0200 Subject: [PATCH 10/37] Fixed the issue with the BED file --- modules/vardictjava/main.nf | 1 + tests/modules/vardictjava/test.yml | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/vardictjava/main.nf b/modules/vardictjava/main.nf index 26833436..d6b4f1dd 100644 --- a/modules/vardictjava/main.nf +++ b/modules/vardictjava/main.nf @@ -26,6 +26,7 @@ process VARDICTJAVA { """ vardict-java \\ $args \\ + -c 1 -S 2 -E 3 \\ -b $bam \\ -th $task.cpus \\ -N $prefix \\ diff --git a/tests/modules/vardictjava/test.yml b/tests/modules/vardictjava/test.yml index 0bd21f4e..77aa9047 100644 --- a/tests/modules/vardictjava/test.yml +++ b/tests/modules/vardictjava/test.yml @@ -4,6 +4,6 @@ - vardictjava files: - path: output/vardictjava/test.vcf.gz - md5sum: 7029066c27ac6f5ef18d660d5741979a + md5sum: 2179dcaee6183495b421293f42db11b5 - path: output/vardictjava/versions.yml md5sum: aac455b8c9c9194c5fed80e4fd495b96 From bf186044716cb0621f31ccc4727ad4a0fb7c81b9 Mon Sep 17 00:00:00 2001 From: Nicolas Vannieuwkerke Date: Thu, 28 Apr 2022 14:29:37 +0200 Subject: [PATCH 11/37] fix for a linting issue --- modules/vardictjava/main.nf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/vardictjava/main.nf b/modules/vardictjava/main.nf index d6b4f1dd..3e036ebd 100644 --- a/modules/vardictjava/main.nf +++ b/modules/vardictjava/main.nf @@ -14,7 +14,7 @@ process VARDICTJAVA { output: tuple val(meta), path("*.vcf.gz"), emit: vcf - path "versions.yml" , emit: versions + path "versions.yml" , emit: versions when: task.ext.when == null || task.ext.when From 40e6e5273de785042fc1b4d6fc1d7510729a7789 Mon Sep 17 00:00:00 2001 From: Nicolas Vannieuwkerke Date: Thu, 28 Apr 2022 14:30:04 +0200 Subject: [PATCH 12/37] fix for a linting issue --- modules/vardictjava/meta.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/modules/vardictjava/meta.yml b/modules/vardictjava/meta.yml index 5bc21b55..39368f81 100644 --- a/modules/vardictjava/meta.yml +++ b/modules/vardictjava/meta.yml @@ -15,7 +15,6 @@ tools: licence: "['MIT']" input: - # Only when we have meta - meta: type: map description: | @@ -38,7 +37,6 @@ input: pattern: "*.bed" output: - #Only when we have meta - meta: type: map description: | From 6678ad4426664076d912dab488ea641f44c1fdb6 Mon Sep 17 00:00:00 2001 From: Nicolas Vannieuwkerke Date: Thu, 28 Apr 2022 14:54:20 +0200 Subject: [PATCH 13/37] Added a header to the VCF --- modules/vardictjava/main.nf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/vardictjava/main.nf b/modules/vardictjava/main.nf index 3e036ebd..a28cb539 100644 --- a/modules/vardictjava/main.nf +++ b/modules/vardictjava/main.nf @@ -26,7 +26,7 @@ process VARDICTJAVA { """ vardict-java \\ $args \\ - -c 1 -S 2 -E 3 \\ + -c 1 -S 2 -E 3 -h \\ -b $bam \\ -th $task.cpus \\ -N $prefix \\ From bdff37c3d7c880f599af223504808306e75e2d76 Mon Sep 17 00:00:00 2001 From: Nicolas Vannieuwkerke Date: Thu, 28 Apr 2022 15:33:27 +0200 Subject: [PATCH 14/37] Added the statistical tests and conversion to vcf --- modules/vardictjava/main.nf | 7 ++++++- tests/modules/vardictjava/nextflow.config | 1 + tests/modules/vardictjava/test.yml | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/modules/vardictjava/main.nf b/modules/vardictjava/main.nf index a28cb539..92051074 100644 --- a/modules/vardictjava/main.nf +++ b/modules/vardictjava/main.nf @@ -21,17 +21,22 @@ process VARDICTJAVA { script: def args = task.ext.args ?: '' + def args_conversion = task.ext.args_conversion ?: '' def prefix = task.ext.prefix ?: "${meta.id}" """ vardict-java \\ $args \\ - -c 1 -S 2 -E 3 -h \\ + -c 1 -S 2 -E 3 \\ -b $bam \\ -th $task.cpus \\ -N $prefix \\ -G $reference_fasta \\ $regions_of_interest \\ + | teststrandbias.R \\ + | var2vcf_valid.pl \\ + $args_conversion \\ + -N $prefix \\ | gzip -c > ${prefix}.vcf.gz cat <<-END_VERSIONS > versions.yml diff --git a/tests/modules/vardictjava/nextflow.config b/tests/modules/vardictjava/nextflow.config index 5dc176a9..fc698f59 100644 --- a/tests/modules/vardictjava/nextflow.config +++ b/tests/modules/vardictjava/nextflow.config @@ -4,5 +4,6 @@ process { withName: VARDICTJAVA { ext.args = '' + ext.args_conversion = '' } } \ No newline at end of file diff --git a/tests/modules/vardictjava/test.yml b/tests/modules/vardictjava/test.yml index 77aa9047..549d688e 100644 --- a/tests/modules/vardictjava/test.yml +++ b/tests/modules/vardictjava/test.yml @@ -4,6 +4,6 @@ - vardictjava files: - path: output/vardictjava/test.vcf.gz - md5sum: 2179dcaee6183495b421293f42db11b5 + md5sum: 3f1f227afc532bddeb58f16fd3013fc8 - path: output/vardictjava/versions.yml md5sum: aac455b8c9c9194c5fed80e4fd495b96 From d626a1dcd3ca759c2c398efe49642a39d843ecd7 Mon Sep 17 00:00:00 2001 From: Nicolas Vannieuwkerke Date: Thu, 28 Apr 2022 15:41:43 +0200 Subject: [PATCH 15/37] Removed a whitespace in meta.yml... --- modules/vardictjava/meta.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/vardictjava/meta.yml b/modules/vardictjava/meta.yml index 39368f81..e3b2efe7 100644 --- a/modules/vardictjava/meta.yml +++ b/modules/vardictjava/meta.yml @@ -25,7 +25,7 @@ input: type: file description: BAM/SAM file pattern: "*.{bam,sam}" - + - reference_fasta: type: file description: FASTA of the reference genome From 4b04ca22ddc577951bc59a693e247c6ff5949dd7 Mon Sep 17 00:00:00 2001 From: Nicolas Vannieuwkerke Date: Thu, 28 Apr 2022 16:38:49 +0200 Subject: [PATCH 16/37] Variable name change for var2vcf conversion arguments --- modules/vardictjava/main.nf | 4 ++-- tests/modules/vardictjava/nextflow.config | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/vardictjava/main.nf b/modules/vardictjava/main.nf index 92051074..08318c29 100644 --- a/modules/vardictjava/main.nf +++ b/modules/vardictjava/main.nf @@ -21,7 +21,7 @@ process VARDICTJAVA { script: def args = task.ext.args ?: '' - def args_conversion = task.ext.args_conversion ?: '' + def args2 = task.ext.args2 ?: '' def prefix = task.ext.prefix ?: "${meta.id}" """ @@ -35,7 +35,7 @@ process VARDICTJAVA { $regions_of_interest \\ | teststrandbias.R \\ | var2vcf_valid.pl \\ - $args_conversion \\ + $args2 \\ -N $prefix \\ | gzip -c > ${prefix}.vcf.gz diff --git a/tests/modules/vardictjava/nextflow.config b/tests/modules/vardictjava/nextflow.config index fc698f59..e08201cc 100644 --- a/tests/modules/vardictjava/nextflow.config +++ b/tests/modules/vardictjava/nextflow.config @@ -4,6 +4,6 @@ process { withName: VARDICTJAVA { ext.args = '' - ext.args_conversion = '' + ext.args2 = '' } } \ No newline at end of file From 6b64f9cb6c3dd3577931cc3cd032d6fb730000ce Mon Sep 17 00:00:00 2001 From: Lucpen Date: Mon, 2 May 2022 10:34:14 +0200 Subject: [PATCH 17/37] feat added stub to modules --- modules/gatk4/mergebamalignment/main.nf | 11 +++++++++++ modules/gatk4/mutect2/main.nf | 14 ++++++++++++++ modules/gatk4/revertsam/main.nf | 11 +++++++++++ modules/gatk4/samtofastq/main.nf | 13 +++++++++++++ modules/samtools/view/main.nf | 12 ++++++++++++ 5 files changed, 61 insertions(+) diff --git a/modules/gatk4/mergebamalignment/main.nf b/modules/gatk4/mergebamalignment/main.nf index 7ba9ccda..5c36b4ba 100644 --- a/modules/gatk4/mergebamalignment/main.nf +++ b/modules/gatk4/mergebamalignment/main.nf @@ -43,4 +43,15 @@ process GATK4_MERGEBAMALIGNMENT { gatk4: \$(echo \$(gatk --version 2>&1) | sed 's/^.*(GATK) v//; s/ .*\$//') END_VERSIONS """ + + stub: + def prefix = task.ext.prefix ?: "${meta.id}" + """ + touch ${prefix}.bam + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + gatk4: \$(echo \$(gatk --version 2>&1) | sed 's/^.*(GATK) v//; s/ .*\$//') + END_VERSIONS + """ } diff --git a/modules/gatk4/mutect2/main.nf b/modules/gatk4/mutect2/main.nf index 4a1f5768..a214b57d 100644 --- a/modules/gatk4/mutect2/main.nf +++ b/modules/gatk4/mutect2/main.nf @@ -57,4 +57,18 @@ process GATK4_MUTECT2 { gatk4: \$(echo \$(gatk --version 2>&1) | sed 's/^.*(GATK) v//; s/ .*\$//') END_VERSIONS """ + + stub: + def prefix = task.ext.prefix ?: "${meta.id}" + """ + touch ${prefix}.vcf.gz + touch ${prefix}.tbi + touch ${prefix}.stats + touch ${prefix}.f1r2.tar.gz + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + gatk4: \$(echo \$(gatk --version 2>&1) | sed 's/^.*(GATK) v//; s/ .*\$//') + END_VERSIONS + """ } diff --git a/modules/gatk4/revertsam/main.nf b/modules/gatk4/revertsam/main.nf index 4e8e9ddc..3084658d 100644 --- a/modules/gatk4/revertsam/main.nf +++ b/modules/gatk4/revertsam/main.nf @@ -39,4 +39,15 @@ process GATK4_REVERTSAM { gatk4: \$(echo \$(gatk --version 2>&1) | sed 's/^.*(GATK) v//; s/ .*\$//') END_VERSIONS """ + + stub: + def prefix = task.ext.prefix ?: "${meta.id}" + """ + touch ${prefix}.reverted.bam + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + gatk4: \$(echo \$(gatk --version 2>&1) | sed 's/^.*(GATK) v//; s/ .*\$//') + END_VERSIONS + """ } diff --git a/modules/gatk4/samtofastq/main.nf b/modules/gatk4/samtofastq/main.nf index 8553e419..d8d94d69 100644 --- a/modules/gatk4/samtofastq/main.nf +++ b/modules/gatk4/samtofastq/main.nf @@ -40,4 +40,17 @@ process GATK4_SAMTOFASTQ { gatk4: \$(echo \$(gatk --version 2>&1) | sed 's/^.*(GATK) v//; s/ .*\$//') END_VERSIONS """ + + stub: + def prefix = task.ext.prefix ?: "${meta.id}" + """ + touch ${prefix}.fastq.gz + touch ${prefix}_1.fastq.gz + touch ${prefix}_2.fastq.gz + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + gatk4: \$(echo \$(gatk --version 2>&1) | sed 's/^.*(GATK) v//; s/ .*\$//') + END_VERSIONS + """ } diff --git a/modules/samtools/view/main.nf b/modules/samtools/view/main.nf index 11cfb74b..55194e88 100644 --- a/modules/samtools/view/main.nf +++ b/modules/samtools/view/main.nf @@ -41,4 +41,16 @@ process SAMTOOLS_VIEW { samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//') END_VERSIONS """ + + stub: + def prefix = task.ext.prefix ?: "${meta.id}" + """ + touch ${prefix}.bam + touch ${prefix}.cram + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//') + END_VERSIONS + """ } From 8a5bcbc325d20f081c9a722bc47f380df43448b7 Mon Sep 17 00:00:00 2001 From: Lucpen Date: Mon, 2 May 2022 11:06:08 +0200 Subject: [PATCH 18/37] fix the stub of gatk4_revertsam --- modules/gatk4/revertsam/main.nf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/gatk4/revertsam/main.nf b/modules/gatk4/revertsam/main.nf index 3084658d..162aa0fa 100644 --- a/modules/gatk4/revertsam/main.nf +++ b/modules/gatk4/revertsam/main.nf @@ -43,7 +43,7 @@ process GATK4_REVERTSAM { stub: def prefix = task.ext.prefix ?: "${meta.id}" """ - touch ${prefix}.reverted.bam + touch ${prefix}.bam cat <<-END_VERSIONS > versions.yml "${task.process}": From 08d5acbeb6c9e1b113ef3a0f4d32a6a1dbe522fe Mon Sep 17 00:00:00 2001 From: Lucpen Date: Mon, 2 May 2022 11:59:08 +0200 Subject: [PATCH 19/37] feat added tests for stubs --- tests/modules/gatk4/mergebamalignment/main.nf | 11 +++++++++++ tests/modules/gatk4/mergebamalignment/test.yml | 9 +++++++++ tests/modules/gatk4/mutect2/main.nf | 18 ++++++++++++++++++ tests/modules/gatk4/mutect2/test.yml | 11 +++++++++++ tests/modules/gatk4/revertsam/main.nf | 8 ++++++++ tests/modules/gatk4/revertsam/test.yml | 9 +++++++++ tests/modules/gatk4/samtofastq/main.nf | 8 ++++++++ tests/modules/gatk4/samtofastq/test.yml | 10 ++++++++++ tests/modules/samtools/view/main.nf | 9 +++++++++ tests/modules/samtools/view/test.yml | 8 ++++++++ 10 files changed, 101 insertions(+) diff --git a/tests/modules/gatk4/mergebamalignment/main.nf b/tests/modules/gatk4/mergebamalignment/main.nf index 8a38c129..ebedad9b 100644 --- a/tests/modules/gatk4/mergebamalignment/main.nf +++ b/tests/modules/gatk4/mergebamalignment/main.nf @@ -14,3 +14,14 @@ workflow test_gatk4_mergebamalignment { GATK4_MERGEBAMALIGNMENT ( input, fasta, dict ) } + +workflow test_gatk4_mergebamalignment_stubs { + input = [ [ id:'test' ], // meta map + file(params.test_data['sarscov2']['illumina']['test_single_end_bam'], checkIfExists: true), + file(params.test_data['sarscov2']['illumina']['test_unaligned_bam'], checkIfExists: true) + ] + fasta = file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) + dict = file(params.test_data['sarscov2']['genome']['genome_dict'], checkIfExists: true) + + GATK4_MERGEBAMALIGNMENT ( input, fasta, dict ) +} diff --git a/tests/modules/gatk4/mergebamalignment/test.yml b/tests/modules/gatk4/mergebamalignment/test.yml index b1bb32b2..84a67654 100644 --- a/tests/modules/gatk4/mergebamalignment/test.yml +++ b/tests/modules/gatk4/mergebamalignment/test.yml @@ -7,3 +7,12 @@ - path: output/gatk4/test.bam md5sum: e6f1b343700b7ccb94e81ae127433988 - path: output/gatk4/versions.yml + +- name: gatk4 mergebamalignment test_gatk4_mergebamalignment_stubs + command: nextflow run ./tests/modules/gatk4/mergebamalignment -entry test_gatk4_mergebamalignment -c ./tests/config/nextflow.config -c ./tests/modules/gatk4/mergebamalignment/nextflow.config -stub-run + tags: + - gatk4 + - gatk4/mergebamalignment + files: + - path: output/gatk4/test.bam + - path: output/gatk4/versions.yml diff --git a/tests/modules/gatk4/mutect2/main.nf b/tests/modules/gatk4/mutect2/main.nf index 0b4339f0..619d28b8 100644 --- a/tests/modules/gatk4/mutect2/main.nf +++ b/tests/modules/gatk4/mutect2/main.nf @@ -118,3 +118,21 @@ workflow test_gatk4_mutect2_mitochondria { GATK4_MUTECT2_MITO ( input, fasta, fai, dict, [], [], [], [] ) } + +workflow test_gatk4_mutect2_tumor_single_stubs { + input = [ [ id:'test'], // meta map + [ file(params.test_data['homo_sapiens']['illumina']['test2_paired_end_recalibrated_sorted_bam'], checkIfExists: true)], + [ file(params.test_data['homo_sapiens']['illumina']['test2_paired_end_recalibrated_sorted_bam_bai'], checkIfExists: true)], + [] + ] + + fasta = file(params.test_data['homo_sapiens']['genome']['genome_21_fasta'], checkIfExists: true) + fai = file(params.test_data['homo_sapiens']['genome']['genome_21_fasta_fai'], checkIfExists: true) + dict = file(params.test_data['homo_sapiens']['genome']['genome_21_dict'], checkIfExists: true) + germline_resource = file(params.test_data['homo_sapiens']['genome']['gnomad_r2_1_1_21_vcf_gz'], checkIfExists: true) + germline_resource_tbi = file(params.test_data['homo_sapiens']['genome']['gnomad_r2_1_1_21_vcf_gz_tbi'], checkIfExists: true) + panel_of_normals = file(params.test_data['homo_sapiens']['genome']['mills_and_1000g_indels_21_vcf_gz'], checkIfExists: true) + panel_of_normals_tbi = file(params.test_data['homo_sapiens']['genome']['mills_and_1000g_indels_21_vcf_gz_tbi'], checkIfExists: true) + + GATK4_MUTECT2 ( input, fasta, fai, dict, germline_resource, germline_resource_tbi, panel_of_normals, panel_of_normals_tbi ) +} diff --git a/tests/modules/gatk4/mutect2/test.yml b/tests/modules/gatk4/mutect2/test.yml index 3cefce09..9232cedd 100644 --- a/tests/modules/gatk4/mutect2/test.yml +++ b/tests/modules/gatk4/mutect2/test.yml @@ -69,3 +69,14 @@ md5sum: fc6ea14ca2da346babe78161beea28c9 - path: output/gatk4/test.vcf.gz.tbi - path: output/gatk4/versions.yml + +- name: gatk4 mutect2 test_gatk4_mutect2_tumor_single_stubs + command: nextflow run ./tests/modules/gatk4/mutect2 -entry test_gatk4_mutect2_tumor_single -c ./tests/config/nextflow.config -c ./tests/modules/gatk4/mutect2/nextflow.config -stub-run + tags: + - gatk4 + - gatk4/mutect2 + files: + - path: output/gatk4/test.vcf.gz + - path: output/gatk4/test.vcf.gz.stats + - path: output/gatk4/test.vcf.gz.tbi + - path: output/gatk4/versions.yml diff --git a/tests/modules/gatk4/revertsam/main.nf b/tests/modules/gatk4/revertsam/main.nf index ab5dddee..5b14d471 100644 --- a/tests/modules/gatk4/revertsam/main.nf +++ b/tests/modules/gatk4/revertsam/main.nf @@ -11,3 +11,11 @@ workflow test_gatk4_revertsam { GATK4_REVERTSAM ( input ) } + +workflow test_gatk4_revertsam_stubs { + input = [ [ id:'test' ], // meta map + file(params.test_data['sarscov2']['illumina']['test_paired_end_bam'], checkIfExists: true) + ] + + GATK4_REVERTSAM ( input ) +} diff --git a/tests/modules/gatk4/revertsam/test.yml b/tests/modules/gatk4/revertsam/test.yml index 2ebdb685..89e78659 100644 --- a/tests/modules/gatk4/revertsam/test.yml +++ b/tests/modules/gatk4/revertsam/test.yml @@ -7,3 +7,12 @@ - path: output/gatk4/test.reverted.bam md5sum: f783a88deb45c3a2c20ca12cbe1c5652 - path: output/gatk4/versions.yml + +- name: gatk4 revertsam test_gatk4_revertsam_stubs + command: nextflow run ./tests/modules/gatk4/revertsam -entry test_gatk4_revertsam -c ./tests/config/nextflow.config -c ./tests/modules/gatk4/revertsam/nextflow.config -stub-run + tags: + - gatk4 + - gatk4/revertsam + files: + - path: output/gatk4/test.reverted.bam + - path: output/gatk4/versions.yml diff --git a/tests/modules/gatk4/samtofastq/main.nf b/tests/modules/gatk4/samtofastq/main.nf index 26a8ce2d..aad80057 100644 --- a/tests/modules/gatk4/samtofastq/main.nf +++ b/tests/modules/gatk4/samtofastq/main.nf @@ -19,3 +19,11 @@ workflow test_gatk4_samtofastq_paired_end { GATK4_SAMTOFASTQ ( input ) } + +workflow test_gatk4_samtofastq_paired_end_stubs { + input = [ [ id:'test', single_end: false ], // meta map + [ file(params.test_data['sarscov2']['illumina']['test_paired_end_bam'], checkIfExists: true) ] + ] + + GATK4_SAMTOFASTQ ( input ) +} diff --git a/tests/modules/gatk4/samtofastq/test.yml b/tests/modules/gatk4/samtofastq/test.yml index eb25f33b..1288a270 100644 --- a/tests/modules/gatk4/samtofastq/test.yml +++ b/tests/modules/gatk4/samtofastq/test.yml @@ -19,3 +19,13 @@ - path: output/gatk4/test_2.fastq.gz md5sum: 613bf64c023609e1c62ad6ce9e4be8d7 - path: output/gatk4/versions.yml + +- name: gatk4 samtofastq test_gatk4_samtofastq_paired_end_stubs + command: nextflow run ./tests/modules/gatk4/samtofastq -entry test_gatk4_samtofastq_paired_end -c ./tests/config/nextflow.config -c ./tests/modules/gatk4/samtofastq/nextflow.config -stub-run + tags: + - gatk4 + - gatk4/samtofastq + files: + - path: output/gatk4/test_1.fastq.gz + - path: output/gatk4/test_2.fastq.gz + - path: output/gatk4/versions.yml diff --git a/tests/modules/samtools/view/main.nf b/tests/modules/samtools/view/main.nf index 9c239066..0e3f597e 100644 --- a/tests/modules/samtools/view/main.nf +++ b/tests/modules/samtools/view/main.nf @@ -22,3 +22,12 @@ workflow test_samtools_view_cram { SAMTOOLS_VIEW ( input, fasta ) } + +workflow test_samtools_view_stubs { + input = [ [ id:'test', single_end:false ], // meta map + file(params.test_data['sarscov2']['illumina']['test_paired_end_bam'], checkIfExists: true), + [] + ] + + SAMTOOLS_VIEW ( input, [] ) +} diff --git a/tests/modules/samtools/view/test.yml b/tests/modules/samtools/view/test.yml index 1287d455..2718130e 100644 --- a/tests/modules/samtools/view/test.yml +++ b/tests/modules/samtools/view/test.yml @@ -14,3 +14,11 @@ - samtools files: - path: output/samtools/test.cram + +- name: samtools view test_samtools_view_stubs + command: nextflow run ./tests/modules/samtools/view -entry test_samtools_view -c ./tests/config/nextflow.config -c ./tests/modules/samtools/view/nextflow.config -stub-run + tags: + - samtools/view + - samtools + files: + - path: output/samtools/test.bam From f231291e7730654158cbd3f10b82c292e27fa273 Mon Sep 17 00:00:00 2001 From: Lucpen Date: Mon, 2 May 2022 12:58:12 +0200 Subject: [PATCH 20/37] fix gatk4_reversam test --- modules/gatk4/revertsam/main.nf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/gatk4/revertsam/main.nf b/modules/gatk4/revertsam/main.nf index 162aa0fa..3084658d 100644 --- a/modules/gatk4/revertsam/main.nf +++ b/modules/gatk4/revertsam/main.nf @@ -43,7 +43,7 @@ process GATK4_REVERTSAM { stub: def prefix = task.ext.prefix ?: "${meta.id}" """ - touch ${prefix}.bam + touch ${prefix}.reverted.bam cat <<-END_VERSIONS > versions.yml "${task.process}": From de40c1bf54b79efb4aa2396ded7f8f457cf33c02 Mon Sep 17 00:00:00 2001 From: Lucpen Date: Mon, 2 May 2022 13:15:01 +0200 Subject: [PATCH 21/37] chore removing file from test --- tests/modules/gatk4/mergebamalignment/main.nf | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/modules/gatk4/mergebamalignment/main.nf b/tests/modules/gatk4/mergebamalignment/main.nf index ebedad9b..0eb6876d 100644 --- a/tests/modules/gatk4/mergebamalignment/main.nf +++ b/tests/modules/gatk4/mergebamalignment/main.nf @@ -16,12 +16,12 @@ workflow test_gatk4_mergebamalignment { } workflow test_gatk4_mergebamalignment_stubs { - input = [ [ id:'test' ], // meta map - file(params.test_data['sarscov2']['illumina']['test_single_end_bam'], checkIfExists: true), - file(params.test_data['sarscov2']['illumina']['test_unaligned_bam'], checkIfExists: true) + input = [ [ id:'test' ], // meta map + "test_foo.bam", + "test_bar.bam" ] - fasta = file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) - dict = file(params.test_data['sarscov2']['genome']['genome_dict'], checkIfExists: true) + fasta = "genome.fasta" + dict = "genome.fasta.dict" GATK4_MERGEBAMALIGNMENT ( input, fasta, dict ) } From 3a4e415fe21982ccb39807d71c16e7d6ad0a1c1a Mon Sep 17 00:00:00 2001 From: Lucpen Date: Mon, 2 May 2022 13:30:18 +0200 Subject: [PATCH 22/37] chores adding dummy files for stubs --- tests/modules/gatk4/mutect2/main.nf | 18 +++++++++--------- tests/modules/gatk4/revertsam/main.nf | 2 +- tests/modules/gatk4/samtofastq/main.nf | 2 +- tests/modules/samtools/view/main.nf | 2 +- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/tests/modules/gatk4/mutect2/main.nf b/tests/modules/gatk4/mutect2/main.nf index 619d28b8..251e1987 100644 --- a/tests/modules/gatk4/mutect2/main.nf +++ b/tests/modules/gatk4/mutect2/main.nf @@ -121,18 +121,18 @@ workflow test_gatk4_mutect2_mitochondria { workflow test_gatk4_mutect2_tumor_single_stubs { input = [ [ id:'test'], // meta map - [ file(params.test_data['homo_sapiens']['illumina']['test2_paired_end_recalibrated_sorted_bam'], checkIfExists: true)], - [ file(params.test_data['homo_sapiens']['illumina']['test2_paired_end_recalibrated_sorted_bam_bai'], checkIfExists: true)], + [ "foo.bam" ], + [ "foo.bam.bai" ], [] ] - fasta = file(params.test_data['homo_sapiens']['genome']['genome_21_fasta'], checkIfExists: true) - fai = file(params.test_data['homo_sapiens']['genome']['genome_21_fasta_fai'], checkIfExists: true) - dict = file(params.test_data['homo_sapiens']['genome']['genome_21_dict'], checkIfExists: true) - germline_resource = file(params.test_data['homo_sapiens']['genome']['gnomad_r2_1_1_21_vcf_gz'], checkIfExists: true) - germline_resource_tbi = file(params.test_data['homo_sapiens']['genome']['gnomad_r2_1_1_21_vcf_gz_tbi'], checkIfExists: true) - panel_of_normals = file(params.test_data['homo_sapiens']['genome']['mills_and_1000g_indels_21_vcf_gz'], checkIfExists: true) - panel_of_normals_tbi = file(params.test_data['homo_sapiens']['genome']['mills_and_1000g_indels_21_vcf_gz_tbi'], checkIfExists: true) + fasta = "genome.fasta" + fai = "genome.fasta.fai" + dict = "genome.fasta.dict" + germline_resource = "genome_gnomAD.r2.1.1.vcf.gz" + germline_resource_tbi = "genome_gnomAD.r2.1.1.vcf.gz.tbi" + panel_of_normals = "genome_mills_and_1000G.indels.hg38.vcf.gz" + panel_of_normals_tbi = "genome_mills_and_1000G.indels.hg38.vcf.gz.tbi" GATK4_MUTECT2 ( input, fasta, fai, dict, germline_resource, germline_resource_tbi, panel_of_normals, panel_of_normals_tbi ) } diff --git a/tests/modules/gatk4/revertsam/main.nf b/tests/modules/gatk4/revertsam/main.nf index 5b14d471..738ecd8f 100644 --- a/tests/modules/gatk4/revertsam/main.nf +++ b/tests/modules/gatk4/revertsam/main.nf @@ -14,7 +14,7 @@ workflow test_gatk4_revertsam { workflow test_gatk4_revertsam_stubs { input = [ [ id:'test' ], // meta map - file(params.test_data['sarscov2']['illumina']['test_paired_end_bam'], checkIfExists: true) + "foo_paired_end.bam" ] GATK4_REVERTSAM ( input ) diff --git a/tests/modules/gatk4/samtofastq/main.nf b/tests/modules/gatk4/samtofastq/main.nf index aad80057..79d04c7c 100644 --- a/tests/modules/gatk4/samtofastq/main.nf +++ b/tests/modules/gatk4/samtofastq/main.nf @@ -22,7 +22,7 @@ workflow test_gatk4_samtofastq_paired_end { workflow test_gatk4_samtofastq_paired_end_stubs { input = [ [ id:'test', single_end: false ], // meta map - [ file(params.test_data['sarscov2']['illumina']['test_paired_end_bam'], checkIfExists: true) ] + [ "foo_paired_end.bam" ] ] GATK4_SAMTOFASTQ ( input ) diff --git a/tests/modules/samtools/view/main.nf b/tests/modules/samtools/view/main.nf index 0e3f597e..bdad1078 100644 --- a/tests/modules/samtools/view/main.nf +++ b/tests/modules/samtools/view/main.nf @@ -25,7 +25,7 @@ workflow test_samtools_view_cram { workflow test_samtools_view_stubs { input = [ [ id:'test', single_end:false ], // meta map - file(params.test_data['sarscov2']['illumina']['test_paired_end_bam'], checkIfExists: true), + "foo_paired_end.bam", [] ] From da82e06354c34bf6381a86e5af195b24d7ef98ee Mon Sep 17 00:00:00 2001 From: Lucpen Date: Mon, 2 May 2022 14:16:07 +0200 Subject: [PATCH 23/37] fix gatk4_mutect2 test --- tests/modules/gatk4/mutect2/main.nf | 14 +++++++++----- tests/modules/gatk4/mutect2/test.yml | 5 +++-- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/tests/modules/gatk4/mutect2/main.nf b/tests/modules/gatk4/mutect2/main.nf index 251e1987..486b78ad 100644 --- a/tests/modules/gatk4/mutect2/main.nf +++ b/tests/modules/gatk4/mutect2/main.nf @@ -119,10 +119,14 @@ workflow test_gatk4_mutect2_mitochondria { GATK4_MUTECT2_MITO ( input, fasta, fai, dict, [], [], [], [] ) } -workflow test_gatk4_mutect2_tumor_single_stubs { - input = [ [ id:'test'], // meta map - [ "foo.bam" ], - [ "foo.bam.bai" ], +workflow test_gatk4_mutect2_tumor_normal_pair_f1r2_stubs { + input = [ [ id:'test', normal_id:'normal', tumor_id:'tumour' ], // meta map + [ "foo_parired.bam", + "foo_parired2.bam" + ], + [ "foo_parired.bam.bai", + "foo_parired2.bam.bai" + ], [] ] @@ -134,5 +138,5 @@ workflow test_gatk4_mutect2_tumor_single_stubs { panel_of_normals = "genome_mills_and_1000G.indels.hg38.vcf.gz" panel_of_normals_tbi = "genome_mills_and_1000G.indels.hg38.vcf.gz.tbi" - GATK4_MUTECT2 ( input, fasta, fai, dict, germline_resource, germline_resource_tbi, panel_of_normals, panel_of_normals_tbi ) + GATK4_MUTECT2_F1R2 ( input, fasta, fai, dict, germline_resource, germline_resource_tbi, panel_of_normals, panel_of_normals_tbi ) } diff --git a/tests/modules/gatk4/mutect2/test.yml b/tests/modules/gatk4/mutect2/test.yml index 9232cedd..3853801d 100644 --- a/tests/modules/gatk4/mutect2/test.yml +++ b/tests/modules/gatk4/mutect2/test.yml @@ -70,12 +70,13 @@ - path: output/gatk4/test.vcf.gz.tbi - path: output/gatk4/versions.yml -- name: gatk4 mutect2 test_gatk4_mutect2_tumor_single_stubs - command: nextflow run ./tests/modules/gatk4/mutect2 -entry test_gatk4_mutect2_tumor_single -c ./tests/config/nextflow.config -c ./tests/modules/gatk4/mutect2/nextflow.config -stub-run +- name: gatk4 mutect2 test_gatk4_mutect2_tumor_normal_pair_f1r2_stubs + command: nextflow run ./tests/modules/gatk4/mutect2 -entry test_gatk4_mutect2_tumor_normal_pair_f1r2 -c ./tests/config/nextflow.config -c ./tests/modules/gatk4/mutect2/nextflow.config -stub-run tags: - gatk4 - gatk4/mutect2 files: + - path: output/gatk4/test.f1r2.tar.gz - path: output/gatk4/test.vcf.gz - path: output/gatk4/test.vcf.gz.stats - path: output/gatk4/test.vcf.gz.tbi From ed4dd1a928ebf4308efb720de878045f7773f8e2 Mon Sep 17 00:00:00 2001 From: ljmesi <37740329+ljmesi@users.noreply.github.com> Date: Mon, 2 May 2022 14:16:12 +0200 Subject: [PATCH 24/37] Add additional handling of fq.gz file name suffix --- modules/metaphlan3/main.nf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/metaphlan3/main.nf b/modules/metaphlan3/main.nf index 3fc6b277..bff0eb9a 100644 --- a/modules/metaphlan3/main.nf +++ b/modules/metaphlan3/main.nf @@ -23,7 +23,7 @@ process METAPHLAN3 { script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" - def input_type = ("$input".endsWith(".fastq.gz")) ? "--input_type fastq" : ("$input".contains(".fasta")) ? "--input_type fasta" : ("$input".endsWith(".bowtie2out.txt")) ? "--input_type bowtie2out" : "--input_type sam" + def input_type = ("$input".endsWith(".fastq.gz") || "$input".endsWith(".fq.gz")) ? "--input_type fastq" : ("$input".contains(".fasta")) ? "--input_type fasta" : ("$input".endsWith(".bowtie2out.txt")) ? "--input_type bowtie2out" : "--input_type sam" def input_data = ("$input_type".contains("fastq")) && !meta.single_end ? "${input[0]},${input[1]}" : "$input" def bowtie2_out = "$input_type" == "--input_type bowtie2out" || "$input_type" == "--input_type sam" ? '' : "--bowtie2out ${prefix}.bowtie2out.txt" From 62c6123ec48e15b42bd60b344603a83b658054d8 Mon Sep 17 00:00:00 2001 From: Lucpen Date: Mon, 2 May 2022 15:11:57 +0200 Subject: [PATCH 25/37] fix gatk4_mutect2 test by changing main.nf --- modules/gatk4/mutect2/main.nf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/gatk4/mutect2/main.nf b/modules/gatk4/mutect2/main.nf index a214b57d..9969ad70 100644 --- a/modules/gatk4/mutect2/main.nf +++ b/modules/gatk4/mutect2/main.nf @@ -62,8 +62,8 @@ process GATK4_MUTECT2 { def prefix = task.ext.prefix ?: "${meta.id}" """ touch ${prefix}.vcf.gz - touch ${prefix}.tbi - touch ${prefix}.stats + touch ${prefix}.vcf.gz.tbi + touch ${prefix}.vcf.gz.stats touch ${prefix}.f1r2.tar.gz cat <<-END_VERSIONS > versions.yml From 50cc136a7810323f2c802ff3bcc1bf54c85d57a9 Mon Sep 17 00:00:00 2001 From: Lucpen Date: Mon, 2 May 2022 15:14:05 +0200 Subject: [PATCH 26/37] Update tests/modules/gatk4/mutect2/main.nf fix spelling mistake Co-authored-by: Maxime U. Garcia --- tests/modules/gatk4/mutect2/main.nf | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/modules/gatk4/mutect2/main.nf b/tests/modules/gatk4/mutect2/main.nf index 486b78ad..310e9ca1 100644 --- a/tests/modules/gatk4/mutect2/main.nf +++ b/tests/modules/gatk4/mutect2/main.nf @@ -121,11 +121,11 @@ workflow test_gatk4_mutect2_mitochondria { workflow test_gatk4_mutect2_tumor_normal_pair_f1r2_stubs { input = [ [ id:'test', normal_id:'normal', tumor_id:'tumour' ], // meta map - [ "foo_parired.bam", - "foo_parired2.bam" + [ "foo_paired.bam", + "foo_paired2.bam" ], - [ "foo_parired.bam.bai", - "foo_parired2.bam.bai" + [ "foo_paired.bam.bai", + "foo_paired2.bam.bai" ], [] ] From b8a59c2b173cf0d987effc8a3e1cd547307a6085 Mon Sep 17 00:00:00 2001 From: Nicolas Vannieuwkerke Date: Tue, 3 May 2022 08:20:10 +0200 Subject: [PATCH 27/37] Fixed version annotation --- modules/vardictjava/main.nf | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/vardictjava/main.nf b/modules/vardictjava/main.nf index 08318c29..682c26be 100644 --- a/modules/vardictjava/main.nf +++ b/modules/vardictjava/main.nf @@ -24,6 +24,8 @@ process VARDICTJAVA { def args2 = task.ext.args2 ?: '' def prefix = task.ext.prefix ?: "${meta.id}" + def VERSION = '1.8.3' + """ vardict-java \\ $args \\ @@ -41,7 +43,8 @@ process VARDICTJAVA { cat <<-END_VERSIONS > versions.yml "${task.process}": - vardict-java: \$(echo 1.8.3) + vardict-java: \$VERSION + var2vcf_valid.pl: \$(echo \$(var2vcf_valid.pl -h | sed -n 2p | awk '{ print \$2 }')) END_VERSIONS """ } From 9a10e5beb56904061e0b728fea55c8246af74997 Mon Sep 17 00:00:00 2001 From: Nicolas Vannieuwkerke Date: Tue, 3 May 2022 08:29:46 +0200 Subject: [PATCH 28/37] Added the missing inputs in meta.yml + correct notation --- modules/vardictjava/main.nf | 10 +++++----- modules/vardictjava/meta.yml | 16 ++++++++++++++-- tests/modules/vardictjava/nextflow.config | 4 ---- tests/modules/vardictjava/test.yml | 2 +- 4 files changed, 20 insertions(+), 12 deletions(-) diff --git a/modules/vardictjava/main.nf b/modules/vardictjava/main.nf index 682c26be..14964989 100644 --- a/modules/vardictjava/main.nf +++ b/modules/vardictjava/main.nf @@ -9,8 +9,8 @@ process VARDICTJAVA { input: tuple val(meta), path(bam), path(bai) - path(regions_of_interest) - tuple path(reference_fasta), path(reference_fai) + path(bed) + tuple path(fasta), path(fasta_fai) output: tuple val(meta), path("*.vcf.gz"), emit: vcf @@ -33,8 +33,8 @@ process VARDICTJAVA { -b $bam \\ -th $task.cpus \\ -N $prefix \\ - -G $reference_fasta \\ - $regions_of_interest \\ + -G $fasta \\ + $bed \\ | teststrandbias.R \\ | var2vcf_valid.pl \\ $args2 \\ @@ -43,7 +43,7 @@ process VARDICTJAVA { cat <<-END_VERSIONS > versions.yml "${task.process}": - vardict-java: \$VERSION + vardict-java: $VERSION var2vcf_valid.pl: \$(echo \$(var2vcf_valid.pl -h | sed -n 2p | awk '{ print \$2 }')) END_VERSIONS """ diff --git a/modules/vardictjava/meta.yml b/modules/vardictjava/meta.yml index e3b2efe7..42480bc1 100644 --- a/modules/vardictjava/meta.yml +++ b/modules/vardictjava/meta.yml @@ -25,17 +25,29 @@ input: type: file description: BAM/SAM file pattern: "*.{bam,sam}" + + - bai: + type: file + description: Index of the BAM file + pattern: "*.bai" - - reference_fasta: + - fasta: type: file description: FASTA of the reference genome pattern: "*.{fa,fasta}" - - regions_of_interest: + - fasta_fai: + type: file + description: The index of the FASTA of the reference genome + pattern: "*.fai" + + - bed: type: file description: BED with the regions of interest pattern: "*.bed" + + output: - meta: type: map diff --git a/tests/modules/vardictjava/nextflow.config b/tests/modules/vardictjava/nextflow.config index e08201cc..50f50a7a 100644 --- a/tests/modules/vardictjava/nextflow.config +++ b/tests/modules/vardictjava/nextflow.config @@ -2,8 +2,4 @@ process { publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } - withName: VARDICTJAVA { - ext.args = '' - ext.args2 = '' - } } \ No newline at end of file diff --git a/tests/modules/vardictjava/test.yml b/tests/modules/vardictjava/test.yml index 549d688e..8cb29c4e 100644 --- a/tests/modules/vardictjava/test.yml +++ b/tests/modules/vardictjava/test.yml @@ -6,4 +6,4 @@ - path: output/vardictjava/test.vcf.gz md5sum: 3f1f227afc532bddeb58f16fd3013fc8 - path: output/vardictjava/versions.yml - md5sum: aac455b8c9c9194c5fed80e4fd495b96 + md5sum: 9b62c431a4f2680412b61c7071bdb1cd From 71c5d213742b56c62a75b6f34b1f734e073f415e Mon Sep 17 00:00:00 2001 From: Nicolas Vannieuwkerke Date: Tue, 3 May 2022 08:34:12 +0200 Subject: [PATCH 29/37] ran prettier --- modules/vardictjava/meta.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/modules/vardictjava/meta.yml b/modules/vardictjava/meta.yml index 42480bc1..83675fdc 100644 --- a/modules/vardictjava/meta.yml +++ b/modules/vardictjava/meta.yml @@ -25,10 +25,10 @@ input: type: file description: BAM/SAM file pattern: "*.{bam,sam}" - + - bai: type: file - description: Index of the BAM file + description: Index of the BAM file pattern: "*.bai" - fasta: @@ -46,8 +46,6 @@ input: description: BED with the regions of interest pattern: "*.bed" - - output: - meta: type: map From d33253513fcd8900db9480450496886ea1f17adb Mon Sep 17 00:00:00 2001 From: Nicolas Vannieuwkerke Date: Tue, 3 May 2022 10:15:30 +0200 Subject: [PATCH 30/37] put the version on top of the file --- modules/vardictjava/main.nf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/vardictjava/main.nf b/modules/vardictjava/main.nf index 14964989..454b86a4 100644 --- a/modules/vardictjava/main.nf +++ b/modules/vardictjava/main.nf @@ -1,3 +1,5 @@ +def VERSION = '1.8.3' + process VARDICTJAVA { tag "$meta.id" label 'process_medium' @@ -24,8 +26,6 @@ process VARDICTJAVA { def args2 = task.ext.args2 ?: '' def prefix = task.ext.prefix ?: "${meta.id}" - def VERSION = '1.8.3' - """ vardict-java \\ $args \\ From 7c89af359c19131d2f9e8d32bd6ebb0dd682e4d2 Mon Sep 17 00:00:00 2001 From: nvnieuwk <101190534+nvnieuwk@users.noreply.github.com> Date: Tue, 3 May 2022 10:15:51 +0200 Subject: [PATCH 31/37] Update modules/vardictjava/meta.yml Co-authored-by: James A. Fellows Yates --- modules/vardictjava/meta.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/modules/vardictjava/meta.yml b/modules/vardictjava/meta.yml index 83675fdc..63a52611 100644 --- a/modules/vardictjava/meta.yml +++ b/modules/vardictjava/meta.yml @@ -20,7 +20,6 @@ input: description: | Groovy Map containing sample information e.g. [ id:'test', single_end:false ] - - bam: type: file description: BAM/SAM file From 2dff193b543d78c1176d19c6f9c42385caa131c2 Mon Sep 17 00:00:00 2001 From: nvnieuwk <101190534+nvnieuwk@users.noreply.github.com> Date: Tue, 3 May 2022 10:15:59 +0200 Subject: [PATCH 32/37] Update modules/vardictjava/meta.yml Co-authored-by: James A. Fellows Yates --- modules/vardictjava/meta.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/modules/vardictjava/meta.yml b/modules/vardictjava/meta.yml index 63a52611..a0af9fcc 100644 --- a/modules/vardictjava/meta.yml +++ b/modules/vardictjava/meta.yml @@ -29,7 +29,6 @@ input: type: file description: Index of the BAM file pattern: "*.bai" - - fasta: type: file description: FASTA of the reference genome From 3cdbdf50fc6423826e4aeed8fef8e1f75a19f621 Mon Sep 17 00:00:00 2001 From: nvnieuwk <101190534+nvnieuwk@users.noreply.github.com> Date: Tue, 3 May 2022 10:16:14 +0200 Subject: [PATCH 33/37] Update modules/vardictjava/meta.yml Co-authored-by: James A. Fellows Yates --- modules/vardictjava/meta.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/modules/vardictjava/meta.yml b/modules/vardictjava/meta.yml index a0af9fcc..3afa7e62 100644 --- a/modules/vardictjava/meta.yml +++ b/modules/vardictjava/meta.yml @@ -24,7 +24,6 @@ input: type: file description: BAM/SAM file pattern: "*.{bam,sam}" - - bai: type: file description: Index of the BAM file From 1609dfc96dd1ff205f1cac511b8dabb64f8a3db6 Mon Sep 17 00:00:00 2001 From: nvnieuwk <101190534+nvnieuwk@users.noreply.github.com> Date: Tue, 3 May 2022 10:16:20 +0200 Subject: [PATCH 34/37] Update modules/vardictjava/meta.yml Co-authored-by: James A. Fellows Yates --- modules/vardictjava/meta.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/modules/vardictjava/meta.yml b/modules/vardictjava/meta.yml index 3afa7e62..325ce1ca 100644 --- a/modules/vardictjava/meta.yml +++ b/modules/vardictjava/meta.yml @@ -32,7 +32,6 @@ input: type: file description: FASTA of the reference genome pattern: "*.{fa,fasta}" - - fasta_fai: type: file description: The index of the FASTA of the reference genome From 01085b3e090b0e64ed0db23a93e00bd891a11639 Mon Sep 17 00:00:00 2001 From: nvnieuwk <101190534+nvnieuwk@users.noreply.github.com> Date: Tue, 3 May 2022 10:16:30 +0200 Subject: [PATCH 35/37] Update modules/vardictjava/meta.yml Co-authored-by: James A. Fellows Yates --- modules/vardictjava/meta.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/modules/vardictjava/meta.yml b/modules/vardictjava/meta.yml index 325ce1ca..5be27690 100644 --- a/modules/vardictjava/meta.yml +++ b/modules/vardictjava/meta.yml @@ -36,7 +36,6 @@ input: type: file description: The index of the FASTA of the reference genome pattern: "*.fai" - - bed: type: file description: BED with the regions of interest From 11c6faf433d19803a1a9c198c83bde5ce5ae9706 Mon Sep 17 00:00:00 2001 From: nvnieuwk <101190534+nvnieuwk@users.noreply.github.com> Date: Tue, 3 May 2022 10:16:36 +0200 Subject: [PATCH 36/37] Update modules/vardictjava/meta.yml Co-authored-by: James A. Fellows Yates --- modules/vardictjava/meta.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/modules/vardictjava/meta.yml b/modules/vardictjava/meta.yml index 5be27690..196b090e 100644 --- a/modules/vardictjava/meta.yml +++ b/modules/vardictjava/meta.yml @@ -47,7 +47,6 @@ output: description: | Groovy Map containing sample information e.g. [ id:'test', single_end:false ] - - versions: type: file description: File containing software versions From 818764128039936e8d94df70427667638b0276a9 Mon Sep 17 00:00:00 2001 From: nvnieuwk <101190534+nvnieuwk@users.noreply.github.com> Date: Tue, 3 May 2022 10:16:45 +0200 Subject: [PATCH 37/37] Update modules/vardictjava/meta.yml Co-authored-by: James A. Fellows Yates --- modules/vardictjava/meta.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/modules/vardictjava/meta.yml b/modules/vardictjava/meta.yml index 196b090e..59fba966 100644 --- a/modules/vardictjava/meta.yml +++ b/modules/vardictjava/meta.yml @@ -51,7 +51,6 @@ output: type: file description: File containing software versions pattern: "versions.yml" - - vcf: type: file description: VCF file output