From 6b64f9cb6c3dd3577931cc3cd032d6fb730000ce Mon Sep 17 00:00:00 2001 From: Lucpen Date: Mon, 2 May 2022 10:34:14 +0200 Subject: [PATCH 1/9] 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 2/9] 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 3/9] 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 4/9] 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 5/9] 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 6/9] 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 7/9] 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 62c6123ec48e15b42bd60b344603a83b658054d8 Mon Sep 17 00:00:00 2001 From: Lucpen Date: Mon, 2 May 2022 15:11:57 +0200 Subject: [PATCH 8/9] 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 9/9] 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" ], [] ]