diff --git a/modules/nf-core/gatk4/genotypegvcfs/main.nf b/modules/nf-core/gatk4/genotypegvcfs/main.nf index 3a9fbb4e07a..f180f74975c 100644 --- a/modules/nf-core/gatk4/genotypegvcfs/main.nf +++ b/modules/nf-core/gatk4/genotypegvcfs/main.nf @@ -8,12 +8,12 @@ process GATK4_GENOTYPEGVCFS { 'biocontainers/gatk4:4.5.0.0--py36hdfd78af_0' }" input: - tuple val(meta), path(gvcf), path(gvcf_index), path(intervals), path(intervals_index) - path fasta - path fai - path dict - path dbsnp - path dbsnp_tbi + tuple val(meta), path(input), path(gvcf_index), path(intervals), path(intervals_index) + tuple val(meta2), path(fasta) + tuple val(meta3), path(fai) + tuple val(meta4), path(dict) + tuple val(meta5), path(dbsnp) + tuple val(meta6), path(dbsnp_tbi) output: tuple val(meta), path("*.vcf.gz"), emit: vcf @@ -26,7 +26,7 @@ process GATK4_GENOTYPEGVCFS { script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" - def gvcf_command = gvcf.name.endsWith(".vcf") || gvcf.name.endsWith(".vcf.gz") ? "$gvcf" : "gendb://$gvcf" + def input_command = input.name.endsWith(".vcf") || input.name.endsWith(".vcf.gz") ? "$input" : "gendb://$input" def dbsnp_command = dbsnp ? "--dbsnp $dbsnp" : "" def interval_command = intervals ? "--intervals $intervals" : "" @@ -39,7 +39,7 @@ process GATK4_GENOTYPEGVCFS { """ gatk --java-options "-Xmx${avail_mem}M -XX:-UsePerfData" \\ GenotypeGVCFs \\ - --variant $gvcf_command \\ + --variant $input_command \\ --output ${prefix}.vcf.gz \\ --reference $fasta \\ $interval_command \\ @@ -57,7 +57,7 @@ process GATK4_GENOTYPEGVCFS { def prefix = task.ext.prefix ?: "${meta.id}" """ - touch ${prefix}.vcf.gz + echo | gzip > ${prefix}.vcf.gz touch ${prefix}.vcf.gz.tbi cat <<-END_VERSIONS > versions.yml diff --git a/modules/nf-core/gatk4/genotypegvcfs/meta.yml b/modules/nf-core/gatk4/genotypegvcfs/meta.yml index 8f1e377eb91..eb704364b48 100644 --- a/modules/nf-core/gatk4/genotypegvcfs/meta.yml +++ b/modules/nf-core/gatk4/genotypegvcfs/meta.yml @@ -20,10 +20,10 @@ input: description: | Groovy Map containing sample information e.g. [ id:'test', single_end:false ] - - gvcf: + - input: type: file description: | - gVCF(.gz) file or to a GenomicsDB + gVCF(.gz) file or a GenomicsDB pattern: "*.{vcf,vcf.gz}" - gvcf_index: type: file @@ -36,22 +36,47 @@ input: - intervals_index: type: file description: Interval index file (optional) + - meta2: + type: map + description: | + Groovy Map containing fasta information + e.g. [ id:'test' ] - fasta: type: file description: Reference fasta file pattern: "*.fasta" + - meta3: + type: map + description: | + Groovy Map containing fai information + e.g. [ id:'test' ] - fai: type: file description: Reference fasta index file pattern: "*.fai" + - meta4: + type: map + description: | + Groovy Map containing dict information + e.g. [ id:'test' ] - dict: type: file description: Reference fasta sequence dict file pattern: "*.dict" + - meta5: + type: map + description: | + Groovy Map containing dbsnp information + e.g. [ id:'test' ] - dbsnp: type: file description: dbSNP VCF file pattern: "*.vcf.gz" + - meta6: + type: map + description: | + Groovy Map containing dbsnp tbi information + e.g. [ id:'test' ] - dbsnp_tbi: type: file description: dbSNP VCF index file diff --git a/modules/nf-core/gatk4/genotypegvcfs/tests/main.nf.test b/modules/nf-core/gatk4/genotypegvcfs/tests/main.nf.test new file mode 100644 index 00000000000..25bc2d3806b --- /dev/null +++ b/modules/nf-core/gatk4/genotypegvcfs/tests/main.nf.test @@ -0,0 +1,285 @@ +nextflow_process { + + name "Test Process GATK4_GENOTYPEGVCFS" + script "../main.nf" + process "GATK4_GENOTYPEGVCFS" + + tag "modules" + tag "modules_nfcore" + tag "gatk4" + tag "gatk4/genotypegvcfs" + tag "untar" + + setup { + run("UNTAR") { + script "../../../untar/main.nf" + process { + """ + input[0] = [ + [id:"test"], + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/gatk/test_genomicsdb.tar.gz', checkIfExists: true) + ] + """ + } + } + } + + test("homo_sapiens - [gvcf, idx, [], []], fasta, fai, dict, [], []") { + + when { + process { + """ + input[0] = [ + [id:"test"], + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/gvcf/test.genome.vcf', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/gvcf/test.genome.vcf.idx', checkIfExists: true), + [], + [] + ] + input[1] = [ + [id:"fasta"], + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta', checkIfExists:true) + ] + input[2] = [ + [id:"fai"], + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta.fai', checkIfExists:true) + ] + input[3] = [ + [id:"dict"], + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.dict', checkIfExists:true) + ] + input[4] = [[],[]] + input[5] = [[],[]] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot( + process.out.vcf.collect { [it[0], path(it[1]).vcf.variantsMD5] }, + process.out.tbi.collect { [it[0], file(it[1]).name] }, + process.out.versions + ).match() } + ) + } + + } + + test("homo_sapiens - [gvcf_gz, tbi, [], []], fasta, fai, dict, dbsnp, dbsnp_tbi") { + + when { + process { + """ + input[0] = [ + [id:"test"], + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/gvcf/test.genome.vcf.gz', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/gvcf/test.genome.vcf.gz.tbi', checkIfExists: true), + [], + [] + ] + input[1] = [ + [id:"fasta"], + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta', checkIfExists:true) + ] + input[2] = [ + [id:"fai"], + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta.fai', checkIfExists:true) + ] + input[3] = [ + [id:"dict"], + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.dict', checkIfExists:true) + ] + input[4] = [ + [id:"dbsnp"], + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/vcf/dbsnp_146.hg38.vcf.gz', checkIfExists:true) + ] + input[5] = [ + [id:"dbsnp"], + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/vcf/dbsnp_146.hg38.vcf.gz.tbi', checkIfExists:true) + ] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot( + process.out.vcf.collect { [it[0], path(it[1]).vcf.variantsMD5] }, + process.out.tbi.collect { [it[0], file(it[1]).name] }, + process.out.versions + ).match() } + ) + } + + } + + test("homo_sapiens - [gvcf_gz, tbi, bed, []], fasta, fai, dict, [], []") { + + when { + process { + """ + input[0] = [ + [id:"test"], + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/gvcf/test.genome.vcf.gz', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/gvcf/test.genome.vcf.gz.tbi', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.bed', checkIfExists:true), + [] + ] + input[1] = [ + [id:"fasta"], + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta', checkIfExists:true) + ] + input[2] = [ + [id:"fai"], + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta.fai', checkIfExists:true) + ] + input[3] = [ + [id:"dict"], + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.dict', checkIfExists:true) + ] + input[4] = [[],[]] + input[5] = [[],[]] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot( + process.out.vcf.collect { [it[0], path(it[1]).vcf.variantsMD5] }, + process.out.tbi.collect { [it[0], file(it[1]).name] }, + process.out.versions + ).match() } + ) + } + + } + + test("homo_sapiens - [gendb, [], [], []], fasta, fai, dict, [], []") { + + when { + process { + """ + input[0] = UNTAR.out.untar.map { meta, gendb -> [ meta, gendb, [], [], []] } + input[1] = [ + [id:"fasta"], + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta', checkIfExists:true) + ] + input[2] = [ + [id:"fai"], + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta.fai', checkIfExists:true) + ] + input[3] = [ + [id:"dict"], + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.dict', checkIfExists:true) + ] + input[4] = [[],[]] + input[5] = [[],[]] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot( + process.out.vcf.collect { [it[0], path(it[1]).vcf.variantsMD5] }, + process.out.tbi.collect { [it[0], file(it[1]).name] }, + process.out.versions + ).match() } + ) + } + + } + + test("homo_sapiens - [gendb, bed, [], []], fasta, fai, dict, [], []") { + + when { + process { + """ + input[0] = UNTAR.out.untar.map { meta, gendb -> + [ + meta, + gendb, + [], + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.bed', checkIfExists:true), + [] + ] + } + input[1] = [ + [id:"fasta"], + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta', checkIfExists:true) + ] + input[2] = [ + [id:"fai"], + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta.fai', checkIfExists:true) + ] + input[3] = [ + [id:"dict"], + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.dict', checkIfExists:true) + ] + input[4] = [[],[]] + input[5] = [[],[]] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot( + process.out.vcf.collect { [it[0], path(it[1]).vcf.variantsMD5] }, + process.out.tbi.collect { [it[0], file(it[1]).name] }, + process.out.versions + ).match() } + ) + } + + } + + test("homo_sapiens - [gvcf, idx, [], []], fasta, fai, dict, [], [] - stub") { + + options "-stub" + + when { + process { + """ + input[0] = [ + [id:"test"], + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/gvcf/test.genome.vcf', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/gvcf/test.genome.vcf.idx', checkIfExists: true), + [], + [] + ] + input[1] = [ + [id:"fasta"], + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta', checkIfExists:true) + ] + input[2] = [ + [id:"fai"], + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta.fai', checkIfExists:true) + ] + input[3] = [ + [id:"dict"], + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.dict', checkIfExists:true) + ] + input[4] = [[],[]] + input[5] = [[],[]] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + + } + +} diff --git a/modules/nf-core/gatk4/genotypegvcfs/tests/main.nf.test.snap b/modules/nf-core/gatk4/genotypegvcfs/tests/main.nf.test.snap new file mode 100644 index 00000000000..1621618e7a9 --- /dev/null +++ b/modules/nf-core/gatk4/genotypegvcfs/tests/main.nf.test.snap @@ -0,0 +1,191 @@ +{ + "homo_sapiens - [gendb, [], [], []], fasta, fai, dict, [], []": { + "content": [ + [ + [ + { + "id": "test" + }, + "1ab95fbc5ec55b208f3001572bec54fa" + ] + ], + [ + [ + { + "id": "test" + }, + "test.vcf.gz.tbi" + ] + ], + [ + "versions.yml:md5,3c16cbf71737813609ad10d901d92ab3" + ] + ], + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.04.4" + }, + "timestamp": "2024-09-04T14:27:24.926097884" + }, + "homo_sapiens - [gvcf, idx, [], []], fasta, fai, dict, [], []": { + "content": [ + [ + [ + { + "id": "test" + }, + "1ab95fbc5ec55b208f3001572bec54fa" + ] + ], + [ + [ + { + "id": "test" + }, + "test.vcf.gz.tbi" + ] + ], + [ + "versions.yml:md5,3c16cbf71737813609ad10d901d92ab3" + ] + ], + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.04.4" + }, + "timestamp": "2024-09-04T14:26:24.426228557" + }, + "homo_sapiens - [gvcf_gz, tbi, bed, []], fasta, fai, dict, [], []": { + "content": [ + [ + [ + { + "id": "test" + }, + "1ab95fbc5ec55b208f3001572bec54fa" + ] + ], + [ + [ + { + "id": "test" + }, + "test.vcf.gz.tbi" + ] + ], + [ + "versions.yml:md5,3c16cbf71737813609ad10d901d92ab3" + ] + ], + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.04.4" + }, + "timestamp": "2024-09-04T14:27:04.179308513" + }, + "homo_sapiens - [gvcf_gz, tbi, [], []], fasta, fai, dict, dbsnp, dbsnp_tbi": { + "content": [ + [ + [ + { + "id": "test" + }, + "9b7d476515e07e5486633c42abd86cc" + ] + ], + [ + [ + { + "id": "test" + }, + "test.vcf.gz.tbi" + ] + ], + [ + "versions.yml:md5,3c16cbf71737813609ad10d901d92ab3" + ] + ], + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.04.4" + }, + "timestamp": "2024-09-04T14:26:43.9088684" + }, + "homo_sapiens - [gvcf, idx, [], []], fasta, fai, dict, [], [] - stub": { + "content": [ + { + "0": [ + [ + { + "id": "test" + }, + "test.vcf.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ], + "1": [ + [ + { + "id": "test" + }, + "test.vcf.gz.tbi:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "2": [ + "versions.yml:md5,3c16cbf71737813609ad10d901d92ab3" + ], + "tbi": [ + [ + { + "id": "test" + }, + "test.vcf.gz.tbi:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "vcf": [ + [ + { + "id": "test" + }, + "test.vcf.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ], + "versions": [ + "versions.yml:md5,3c16cbf71737813609ad10d901d92ab3" + ] + } + ], + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.04.4" + }, + "timestamp": "2024-09-04T14:19:57.615552867" + }, + "homo_sapiens - [gendb, bed, [], []], fasta, fai, dict, [], []": { + "content": [ + [ + [ + { + "id": "test" + }, + "1ab95fbc5ec55b208f3001572bec54fa" + ] + ], + [ + [ + { + "id": "test" + }, + "test.vcf.gz.tbi" + ] + ], + [ + "versions.yml:md5,3c16cbf71737813609ad10d901d92ab3" + ] + ], + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.04.4" + }, + "timestamp": "2024-09-04T14:27:46.189794941" + } +} \ No newline at end of file diff --git a/tests/config/pytest_modules.yml b/tests/config/pytest_modules.yml index defa2252fed..27e6d8ed9ca 100644 --- a/tests/config/pytest_modules.yml +++ b/tests/config/pytest_modules.yml @@ -233,9 +233,6 @@ gatk4/determinegermlinecontigploidy: gatk4/filtervarianttranches: - modules/nf-core/gatk4/filtervarianttranches/** - tests/modules/nf-core/gatk4/filtervarianttranches/** -gatk4/genotypegvcfs: - - modules/nf-core/gatk4/genotypegvcfs/** - - tests/modules/nf-core/gatk4/genotypegvcfs/** gatk4/germlinecnvcaller: - modules/nf-core/gatk4/germlinecnvcaller/** - tests/modules/nf-core/gatk4/germlinecnvcaller/** diff --git a/tests/modules/nf-core/gatk4/genotypegvcfs/main.nf b/tests/modules/nf-core/gatk4/genotypegvcfs/main.nf deleted file mode 100644 index 06423b29d1d..00000000000 --- a/tests/modules/nf-core/gatk4/genotypegvcfs/main.nf +++ /dev/null @@ -1,182 +0,0 @@ -#!/usr/bin/env nextflow - -nextflow.enable.dsl = 2 - -include { GATK4_GENOTYPEGVCFS } from '../../../../../modules/nf-core/gatk4/genotypegvcfs/main.nf' -include { UNTAR } from '../../../../../modules/nf-core/untar/main.nf' - -// Basic parameters with uncompressed VCF input -workflow test_gatk4_genotypegvcfs_vcf_input { - - input = [ [ id:'test' ], // meta map - file(params.test_data['homo_sapiens']['illumina']['test_genome_vcf'], checkIfExists: true), - file(params.test_data['homo_sapiens']['illumina']['test_genome_vcf_idx'], 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) - dict = file(params.test_data['homo_sapiens']['genome']['genome_dict'], checkIfExists: true) - - GATK4_GENOTYPEGVCFS ( input, fasta, fai, dict, [], []) -} - -// Basic parameters with compressed VCF input -workflow test_gatk4_genotypegvcfs_gz_input { - - input = [ [ id:'test' ], // meta map - file(params.test_data['homo_sapiens']['illumina']['test_genome_vcf_gz'], checkIfExists: true), - file(params.test_data['homo_sapiens']['illumina']['test_genome_vcf_gz_tbi'], 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) - dict = file(params.test_data['homo_sapiens']['genome']['genome_dict'], checkIfExists: true) - - GATK4_GENOTYPEGVCFS ( input, fasta, fai, dict, [], []) -} - -// Basic parameters + optional dbSNP -workflow test_gatk4_genotypegvcfs_gz_input_dbsnp { - - input = [ [ id:'test' ], // meta map - file(params.test_data['homo_sapiens']['illumina']['test_genome_vcf_gz'], checkIfExists: true), - file(params.test_data['homo_sapiens']['illumina']['test_genome_vcf_gz_tbi'], 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) - dict = file(params.test_data['homo_sapiens']['genome']['genome_dict'], checkIfExists: true) - - dbsnp = file(params.test_data['homo_sapiens']['genome']['dbsnp_146_hg38_vcf_gz'], checkIfExists: true) - dbsnp_tbi = file(params.test_data['homo_sapiens']['genome']['dbsnp_146_hg38_vcf_gz_tbi'], checkIfExists: true) - - GATK4_GENOTYPEGVCFS ( input, fasta, fai, dict, dbsnp, dbsnp_tbi) -} - -// Basic parameters + optional intervals -workflow test_gatk4_genotypegvcfs_gz_input_intervals { - - input = [ [ id:'test' ], // meta map - file(params.test_data['homo_sapiens']['illumina']['test_genome_vcf_gz'], checkIfExists: true), - file(params.test_data['homo_sapiens']['illumina']['test_genome_vcf_gz_tbi'], 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) - dict = file(params.test_data['homo_sapiens']['genome']['genome_dict'], checkIfExists: true) - - GATK4_GENOTYPEGVCFS ( input, fasta, fai, dict, [], []) -} - -// Basic parameters + optional dbSNP + optional intervals -workflow test_gatk4_genotypegvcfs_gz_input_dbsnp_intervals { - - input = [ [ id:'test' ], // meta map - file(params.test_data['homo_sapiens']['illumina']['test_genome_vcf_gz'], checkIfExists: true), - file(params.test_data['homo_sapiens']['illumina']['test_genome_vcf_gz_tbi'], 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) - dict = file(params.test_data['homo_sapiens']['genome']['genome_dict'], checkIfExists: true) - - dbsnp = file(params.test_data['homo_sapiens']['genome']['dbsnp_146_hg38_vcf_gz'], checkIfExists: true) - dbsnp_tbi = file(params.test_data['homo_sapiens']['genome']['dbsnp_146_hg38_vcf_gz_tbi'], checkIfExists: true) - - GATK4_GENOTYPEGVCFS ( input, fasta, fai, dict, dbsnp, dbsnp_tbi ) -} - -// Basic parameters with GenomicsDB input -workflow test_gatk4_genotypegvcfs_gendb_input { - - 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) - dict = file(params.test_data['homo_sapiens']['genome']['genome_dict'], checkIfExists: true) - - test_genomicsdb = [ [], file(params.test_data['homo_sapiens']['illumina']['test_genomicsdb_tar_gz'], checkIfExists: true) ] - - UNTAR ( test_genomicsdb ) - gendb = UNTAR.out.untar.map{ it[1] }.collect() - gendb.add([]) - gendb.add([]) - gendb.add([]) - - input = Channel.of([ id:'test' ]).combine(gendb) - - GATK4_GENOTYPEGVCFS ( input, fasta, fai, dict, [], []) -} - -// Basic parameters with GenomicsDB + optional dbSNP -workflow test_gatk4_genotypegvcfs_gendb_input_dbsnp { - - 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) - dict = file(params.test_data['homo_sapiens']['genome']['genome_dict'], checkIfExists: true) - - dbsnp = file(params.test_data['homo_sapiens']['genome']['dbsnp_146_hg38_vcf_gz'], checkIfExists: true) - dbsnp_tbi = file(params.test_data['homo_sapiens']['genome']['dbsnp_146_hg38_vcf_gz_tbi'], checkIfExists: true) - - test_genomicsdb = [ [], file(params.test_data['homo_sapiens']['illumina']['test_genomicsdb_tar_gz'], checkIfExists: true) ] - - UNTAR ( test_genomicsdb ) - gendb = UNTAR.out.untar.map{ it[1] }.collect() - gendb.add([]) - gendb.add([]) - gendb.add([]) - input = Channel.of([ id:'test' ]).combine(gendb) - - GATK4_GENOTYPEGVCFS ( input, fasta, fai, dict, dbsnp, dbsnp_tbi) -} - -// Basic parameters with GenomicsDB + optional intervals -workflow test_gatk4_genotypegvcfs_gendb_input_intervals { - - 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) - dict = file(params.test_data['homo_sapiens']['genome']['genome_dict'], checkIfExists: true) - - test_genomicsdb = [ [], file(params.test_data['homo_sapiens']['illumina']['test_genomicsdb_tar_gz'], checkIfExists: true) ] - - UNTAR ( test_genomicsdb ) - gendb = UNTAR.out.untar.map{ it[1] }.collect() - gendb.add([]) - gendb.add([file(params.test_data['homo_sapiens']['genome']['genome_bed'], checkIfExists: true)]) - gendb.add([]) - - input = Channel.of([ id:'test' ]).combine(gendb) - - GATK4_GENOTYPEGVCFS ( input, fasta, fai, dict, [], [] ) -} - -// Basic parameters with GenomicsDB + optional dbSNP + optional intervals -workflow test_gatk4_genotypegvcfs_gendb_input_dbsnp_intervals { - - 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) - dict = file(params.test_data['homo_sapiens']['genome']['genome_dict'], checkIfExists: true) - - dbsnp = file(params.test_data['homo_sapiens']['genome']['dbsnp_146_hg38_vcf_gz'], checkIfExists: true) - dbsnp_tbi = file(params.test_data['homo_sapiens']['genome']['dbsnp_146_hg38_vcf_gz_tbi'], checkIfExists: true) - - test_genomicsdb = [ [], file(params.test_data['homo_sapiens']['illumina']['test_genomicsdb_tar_gz'], checkIfExists: true) ] - - UNTAR ( test_genomicsdb ) - gendb = UNTAR.out.untar.map{ it[1] }.collect() - gendb.add([]) - gendb.add([file(params.test_data['homo_sapiens']['genome']['genome_bed'], checkIfExists: true)]) - gendb.add([]) - - input = Channel.of([ id:'test' ]).combine(gendb) - - GATK4_GENOTYPEGVCFS ( input, fasta, fai, dict, dbsnp, dbsnp_tbi ) -} diff --git a/tests/modules/nf-core/gatk4/genotypegvcfs/nextflow.config b/tests/modules/nf-core/gatk4/genotypegvcfs/nextflow.config deleted file mode 100644 index 97396a74d92..00000000000 --- a/tests/modules/nf-core/gatk4/genotypegvcfs/nextflow.config +++ /dev/null @@ -1,9 +0,0 @@ -process { - - publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } - - withName: GATK4_GENOTYPEGVCFS { - ext.prefix = { "${meta.id}.genotyped" } - } - -} diff --git a/tests/modules/nf-core/gatk4/genotypegvcfs/test.yml b/tests/modules/nf-core/gatk4/genotypegvcfs/test.yml deleted file mode 100644 index ac39ddfeaba..00000000000 --- a/tests/modules/nf-core/gatk4/genotypegvcfs/test.yml +++ /dev/null @@ -1,119 +0,0 @@ -- name: gatk4 genotypegvcfs test_gatk4_genotypegvcfs_vcf_input - command: nextflow run ./tests/modules/nf-core/gatk4/genotypegvcfs -entry test_gatk4_genotypegvcfs_vcf_input -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/gatk4/genotypegvcfs/nextflow.config - tags: - - gatk4 - - gatk4/genotypegvcfs - files: - - path: output/gatk4/test.genotyped.vcf.gz - contains: - [ - "AC=1;AF=0.500;AN=2;BaseQRankSum=0.00;DP=211;ExcessHet=0.0000;FS=0.000;MLEAC=1;MLEAF=0.500;MQ=60.00;MQRankSum=0.00;QD=0.95;ReadPosRankSum=1.09;SOR=0.680", - ] - - path: output/gatk4/test.genotyped.vcf.gz.tbi - - path: output/gatk4/versions.yml - -- name: gatk4 genotypegvcfs test_gatk4_genotypegvcfs_gz_input - command: nextflow run ./tests/modules/nf-core/gatk4/genotypegvcfs -entry test_gatk4_genotypegvcfs_gz_input -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/gatk4/genotypegvcfs/nextflow.config - tags: - - gatk4 - - gatk4/genotypegvcfs - files: - - path: output/gatk4/test.genotyped.vcf.gz - contains: - [ - "AC=1;AF=0.500;AN=2;BaseQRankSum=0.00;DP=211;ExcessHet=0.0000;FS=0.000;MLEAC=1;MLEAF=0.500;MQ=60.00;MQRankSum=0.00;QD=0.95;ReadPosRankSum=1.09;SOR=0.680", - ] - - path: output/gatk4/test.genotyped.vcf.gz.tbi - - path: output/gatk4/versions.yml - -- name: gatk4 genotypegvcfs test_gatk4_genotypegvcfs_gz_input_dbsnp - command: nextflow run ./tests/modules/nf-core/gatk4/genotypegvcfs -entry test_gatk4_genotypegvcfs_gz_input_dbsnp -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/gatk4/genotypegvcfs/nextflow.config - tags: - - gatk4 - - gatk4/genotypegvcfs - files: - - path: output/gatk4/test.genotyped.vcf.gz - contains: - [ - "AC=1;AF=0.500;AN=2;BaseQRankSum=0.00;DB;DP=211;ExcessHet=0.0000;FS=0.000;MLEAC=1;MLEAF=0.500;MQ=60.00;MQRankSum=0.00;QD=0.95;ReadPosRankSum=1.09;SOR=0.680", - ] - - path: output/gatk4/test.genotyped.vcf.gz.tbi - - path: output/gatk4/versions.yml - -- name: gatk4 genotypegvcfs test_gatk4_genotypegvcfs_gz_input_intervals - command: nextflow run ./tests/modules/nf-core/gatk4/genotypegvcfs -entry test_gatk4_genotypegvcfs_gz_input_intervals -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/gatk4/genotypegvcfs/nextflow.config - tags: - - gatk4 - - gatk4/genotypegvcfs - files: - - path: output/gatk4/test.genotyped.vcf.gz - contains: - [ - "AC=1;AF=0.500;AN=2;BaseQRankSum=0.00;DP=211;ExcessHet=0.0000;FS=0.000;MLEAC=1;MLEAF=0.500;MQ=60.00;MQRankSum=0.00;QD=0.95;ReadPosRankSum=1.09;SOR=0.680", - ] - - path: output/gatk4/test.genotyped.vcf.gz.tbi - - path: output/gatk4/versions.yml - -- name: gatk4 genotypegvcfs test_gatk4_genotypegvcfs_gz_input_dbsnp_intervals - command: nextflow run ./tests/modules/nf-core/gatk4/genotypegvcfs -entry test_gatk4_genotypegvcfs_gz_input_dbsnp_intervals -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/gatk4/genotypegvcfs/nextflow.config - tags: - - gatk4 - - gatk4/genotypegvcfs - files: - - path: output/gatk4/test.genotyped.vcf.gz - contains: ["AC=2;AF=1.00;AN=2;DB;DP=20;ExcessHet=0.0000;FS=0.000;MLEAC=2;MLEAF=1.00;MQ=60.00;QD=24.05;SOR=0.693"] - - path: output/gatk4/test.genotyped.vcf.gz.tbi - - path: output/gatk4/versions.yml - -- name: gatk4 genotypegvcfs test_gatk4_genotypegvcfs_gendb_input - command: nextflow run ./tests/modules/nf-core/gatk4/genotypegvcfs -entry test_gatk4_genotypegvcfs_gendb_input -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/gatk4/genotypegvcfs/nextflow.config - tags: - - gatk4 - - gatk4/genotypegvcfs - files: - - path: output/gatk4/test.genotyped.vcf.gz - contains: - [ - "AC=1;AF=0.500;AN=2;BaseQRankSum=0.00;DP=211;ExcessHet=0.0000;FS=0.000;MLEAC=1;MLEAF=0.500;MQ=60.00;MQRankSum=0.00;QD=0.95;ReadPosRankSum=1.09;SOR=0.680", - ] - - path: output/gatk4/test.genotyped.vcf.gz.tbi - - path: output/gatk4/versions.yml - -- name: gatk4 genotypegvcfs test_gatk4_genotypegvcfs_gendb_input_dbsnp - command: nextflow run ./tests/modules/nf-core/gatk4/genotypegvcfs -entry test_gatk4_genotypegvcfs_gendb_input_dbsnp -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/gatk4/genotypegvcfs/nextflow.config - tags: - - gatk4 - - gatk4/genotypegvcfs - files: - - path: output/gatk4/test.genotyped.vcf.gz - contains: - [ - "AC=1;AF=0.500;AN=2;BaseQRankSum=0.00;DB;DP=211;ExcessHet=0.0000;FS=0.000;MLEAC=1;MLEAF=0.500;MQ=60.00;MQRankSum=0.00;QD=0.95;ReadPosRankSum=1.09;SOR=0.680", - ] - - path: output/gatk4/test.genotyped.vcf.gz.tbi - - path: output/gatk4/versions.yml - -- name: gatk4 genotypegvcfs test_gatk4_genotypegvcfs_gendb_input_intervals - command: nextflow run ./tests/modules/nf-core/gatk4/genotypegvcfs -entry test_gatk4_genotypegvcfs_gendb_input_intervals -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/gatk4/genotypegvcfs/nextflow.config - tags: - - gatk4 - - gatk4/genotypegvcfs - files: - - path: output/gatk4/test.genotyped.vcf.gz - contains: - [ - "AC=1;AF=0.500;AN=2;BaseQRankSum=0.00;DP=211;ExcessHet=0.0000;FS=0.000;MLEAC=1;MLEAF=0.500;MQ=60.00;MQRankSum=0.00;QD=0.95;ReadPosRankSum=1.09;SOR=0.680", - ] - - path: output/gatk4/test.genotyped.vcf.gz.tbi - - path: output/gatk4/versions.yml - -- name: gatk4 genotypegvcfs test_gatk4_genotypegvcfs_gendb_input_dbsnp_intervals - command: nextflow run ./tests/modules/nf-core/gatk4/genotypegvcfs -entry test_gatk4_genotypegvcfs_gendb_input_dbsnp_intervals -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/gatk4/genotypegvcfs/nextflow.config - tags: - - gatk4 - - gatk4/genotypegvcfs - files: - - path: output/gatk4/test.genotyped.vcf.gz - contains: ["AC=2;AF=1.00;AN=2;DP=2;ExcessHet=0.0000;FS=0.000;MLEAC=1;MLEAF=0.500;MQ=60.00;QD=18.66;SOR=0.693"] - - path: output/gatk4/test.genotyped.vcf.gz.tbi - - path: output/gatk4/versions.yml