diff --git a/modules/nf-core/gatk4/svcluster/environment.yml b/modules/nf-core/gatk4/svcluster/environment.yml index 1b9535b8d9c..d88cfebdc95 100644 --- a/modules/nf-core/gatk4/svcluster/environment.yml +++ b/modules/nf-core/gatk4/svcluster/environment.yml @@ -4,4 +4,4 @@ channels: - bioconda - defaults dependencies: - - bioconda::gatk4=4.4.0.0 + - bioconda::gatk4=4.5.0.0 diff --git a/modules/nf-core/gatk4/svcluster/main.nf b/modules/nf-core/gatk4/svcluster/main.nf index 240429a2e2b..855dd700f89 100644 --- a/modules/nf-core/gatk4/svcluster/main.nf +++ b/modules/nf-core/gatk4/svcluster/main.nf @@ -4,8 +4,8 @@ process GATK4_SVCLUSTER { conda "${moduleDir}/environment.yml" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/gatk4:4.4.0.0--py36hdfd78af_0': - 'biocontainers/gatk4:4.4.0.0--py36hdfd78af_0' }" + 'https://depot.galaxyproject.org/singularity/gatk4:4.5.0.0--py36hdfd78af_0': + 'biocontainers/gatk4:4.5.0.0--py36hdfd78af_0' }" input: tuple val(meta), path(vcfs), path(indices) diff --git a/modules/nf-core/gatk4/svcluster/tests/main.nf.test b/modules/nf-core/gatk4/svcluster/tests/main.nf.test new file mode 100644 index 00000000000..5adb103fa8c --- /dev/null +++ b/modules/nf-core/gatk4/svcluster/tests/main.nf.test @@ -0,0 +1,51 @@ +nextflow_process { + + name "Test Process GATK4_SVCLUSTER" + script "../main.nf" + process "GATK4_SVCLUSTER" + + tag "modules" + tag "modules_nfcore" + tag "manta" + tag "manta/germline" + tag "gatk4" + tag "gatk4/svcluster" + + test("test_gatk4_svcluster") { + setup { + run("MANTA_GERMLINE") { + script "../../../manta/germline/main.nf" + process { + """ + input[0] = Channel.of([ [ id:'test' ], file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_cram'], checkIfExists: true), file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_cram_crai'], checkIfExists: true), [], []]) + input[1] = Channel.value([ [ id:'test' ], file(params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true)]) + input[2] = Channel.value([ [ id:'test' ], file(params.test_data['homo_sapiens']['genome']['genome_fasta_fai'], checkIfExists: true)]) + input[3] = [] + """ + } + } + } + + when { + process { + """ + input[0] = MANTA_GERMLINE.out.diploid_sv_vcf.combine(MANTA_GERMLINE.out.diploid_sv_vcf_tbi, by: 0) + input[1] = file("https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/delete_me/svcluster/samples_ploidy.tsv", checkIfExists:true) + input[2] = Channel.value(file(params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true)) + input[3] = Channel.value(file(params.test_data['homo_sapiens']['genome']['genome_fasta_fai'], checkIfExists: true)) + input[4] = Channel.value(file(params.test_data['homo_sapiens']['genome']['genome_dict'], checkIfExists: true)) + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot( + file(process.out.clustered_vcf.get(0).get(1)).name, + process.out.clustered_vcf_index.get(0).get(1), + ).match("test_gatk4_svcluster") } + ) + } + } +} \ No newline at end of file diff --git a/modules/nf-core/gatk4/svcluster/tests/main.nf.test.snap b/modules/nf-core/gatk4/svcluster/tests/main.nf.test.snap new file mode 100644 index 00000000000..365ca28e810 --- /dev/null +++ b/modules/nf-core/gatk4/svcluster/tests/main.nf.test.snap @@ -0,0 +1,13 @@ +{ + "test_gatk4_svcluster": { + "content": [ + "test.vcf.gz", + "test.vcf.gz.tbi:md5,e7ca7e9fe76ce12198fd54ec9a64fad4" + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-02-15T09:58:39.264182036" + } +} \ No newline at end of file diff --git a/modules/nf-core/gatk4/svcluster/tests/nextflow.config b/modules/nf-core/gatk4/svcluster/tests/nextflow.config new file mode 100644 index 00000000000..11ec85a5fc3 --- /dev/null +++ b/modules/nf-core/gatk4/svcluster/tests/nextflow.config @@ -0,0 +1,6 @@ +process { + withName: MANTA_GERMLINE { + enabled: false + ] + } +} diff --git a/modules/nf-core/gatk4/svcluster/tests/tags.yml b/modules/nf-core/gatk4/svcluster/tests/tags.yml new file mode 100644 index 00000000000..e8171af4e58 --- /dev/null +++ b/modules/nf-core/gatk4/svcluster/tests/tags.yml @@ -0,0 +1,3 @@ +gatk4/svcluster: + - "modules/nf-core/gatk4/svcluster/**" + - "modules/nf-core/manta/germline/**" diff --git a/tests/config/pytest_modules.yml b/tests/config/pytest_modules.yml index 76c16def26a..2bdbbaa070b 100644 --- a/tests/config/pytest_modules.yml +++ b/tests/config/pytest_modules.yml @@ -858,9 +858,6 @@ gatk4/splitcram: gatk4/splitintervals: - modules/nf-core/gatk4/splitintervals/** - tests/modules/nf-core/gatk4/splitintervals/** -gatk4/svcluster: - - modules/nf-core/gatk4/svcluster/** - - tests/modules/nf-core/gatk4/svcluster/** gatk4/variantfiltration: - modules/nf-core/gatk4/variantfiltration/** - tests/modules/nf-core/gatk4/variantfiltration/** diff --git a/tests/modules/nf-core/gatk4/svcluster/main.nf b/tests/modules/nf-core/gatk4/svcluster/main.nf deleted file mode 100644 index 87b6783805b..00000000000 --- a/tests/modules/nf-core/gatk4/svcluster/main.nf +++ /dev/null @@ -1,48 +0,0 @@ -#!/usr/bin/env nextflow - -nextflow.enable.dsl = 2 - -include { GATK4_SVCLUSTER } from '../../../../../modules/nf-core/gatk4/svcluster/main.nf' -include { MANTA_GERMLINE } from '../../../../../modules/nf-core/manta/germline/main.nf' - -workflow test_gatk4_svcluster { - - input = Channel.of([ - [ id:'normal' ], // meta map - file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_cram'], checkIfExists: true), - file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_cram_crai'], checkIfExists: true), - [], - [] - ], - [ - [ id:'tumor' ], // meta map - file(params.test_data['homo_sapiens']['illumina']['test2_paired_end_sorted_cram'], checkIfExists: true), - file(params.test_data['homo_sapiens']['illumina']['test2_paired_end_sorted_cram_crai'], checkIfExists: true), - [], - [] - ]) - - fasta = Channel.of([ [ id:'test' ], file(params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true)]) - fasta_fai = Channel.of([ [ id:'test' ], file(params.test_data['homo_sapiens']['genome']['genome_fasta_fai'], checkIfExists: true)]) - dict = Channel.of([ [ id:'test' ], file(params.test_data['homo_sapiens']['genome']['genome_dict'], checkIfExists: true)]) - - MANTA_GERMLINE( - input, - fasta, - fasta_fai - ) - - svcluster_input = MANTA_GERMLINE.out.diploid_sv_vcf.combine( - MANTA_GERMLINE.out.diploid_sv_vcf_tbi, by: 0 - ).map({ meta, vcf, tbi -> [ [id:'test'], vcf, tbi ]}).groupTuple() - - ploidy = file("https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/delete_me/svcluster/samples_ploidy.tsv", checkIfExists:true) - - GATK4_SVCLUSTER ( - svcluster_input, - ploidy, - fasta.map{ meta, fasta -> [fasta] }, - fasta_fai.map{ meta, fasta_fai -> [fasta_fai] }, - dict.map{ meta, dict -> [dict] } - ) -} diff --git a/tests/modules/nf-core/gatk4/svcluster/nextflow.config b/tests/modules/nf-core/gatk4/svcluster/nextflow.config deleted file mode 100644 index 0ac2f94616a..00000000000 --- a/tests/modules/nf-core/gatk4/svcluster/nextflow.config +++ /dev/null @@ -1,11 +0,0 @@ -process { - - publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } - - withName: MANTA_GERMLINE { - publishDir = [ - enabled: false - ] - } - -} diff --git a/tests/modules/nf-core/gatk4/svcluster/test.yml b/tests/modules/nf-core/gatk4/svcluster/test.yml deleted file mode 100644 index 5c7e4034483..00000000000 --- a/tests/modules/nf-core/gatk4/svcluster/test.yml +++ /dev/null @@ -1,10 +0,0 @@ -- name: gatk4 svcluster test_gatk4_svcluster - command: nextflow run ./tests/modules/nf-core/gatk4/svcluster -entry test_gatk4_svcluster -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/gatk4/svcluster/nextflow.config - tags: - - gatk4 - - gatk4/svcluster - files: - - path: output/gatk4/test.vcf.gz - - path: output/gatk4/test.vcf.gz.tbi - md5sum: e7ca7e9fe76ce12198fd54ec9a64fad4 - - path: output/gatk4/versions.yml