diff --git a/modules/nf-core/gatk4/intervallisttools/tests/main.nf.test b/modules/nf-core/gatk4/intervallisttools/tests/main.nf.test new file mode 100644 index 000000000000..2891bf9e4b19 --- /dev/null +++ b/modules/nf-core/gatk4/intervallisttools/tests/main.nf.test @@ -0,0 +1,72 @@ +nextflow_process { + + name "Test Process GATK4_INTERVALLISTTOOLS" + script "../main.nf" + process "GATK4_INTERVALLISTTOOLS" + config "./nextflow.config" + + tag "modules" + tag "modules_nfcore" + tag "gatk4" + tag "gatk4/bedtointervallist" + tag "gatk4/intervallisttools" + + setup { + run("GATK4_BEDTOINTERVALLIST") { + script "../../bedtointervallist/main.nf" + process { + """ + input[0] = [ + [ id:'test' ], // meta map + [file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/bed/test.bed', checkIfExists: true)] + ] + input[1] = [ + [ id:'dict' ], // meta map + [file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.dict', checkIfExists: true)] + ] + """ + } + } + } + + test("test_gatk4_intervallisttools") { + + when { + process { + """ + input[0] = GATK4_BEDTOINTERVALLIST.out.interval_list + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() }, + ) + } + + } + + test("test_gatk4_intervallisttools -stub") { + + options "-stub" + + when { + process { + """ + input[0] = GATK4_BEDTOINTERVALLIST.out.interval_list + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() }, + ) + } + + } + +} diff --git a/modules/nf-core/gatk4/intervallisttools/tests/main.nf.test.snap b/modules/nf-core/gatk4/intervallisttools/tests/main.nf.test.snap new file mode 100644 index 000000000000..7718ed003829 --- /dev/null +++ b/modules/nf-core/gatk4/intervallisttools/tests/main.nf.test.snap @@ -0,0 +1,88 @@ +{ + "test_gatk4_intervallisttools": { + "content": [ + { + "0": [ + [ + { + "id": "test" + }, + [ + "1scattered.interval_list:md5,64f6665f9fbd257e4a300ec602f4e995", + "2scattered.interval_list:md5,f515c3da0c6accfd8e7dc33df50855c5", + "3scattered.interval_list:md5,7a918e8c9211b54334587793e8cbae53", + "4scattered.interval_list:md5,1b93105227a7dc81f07101a1efd31498" + ] + ] + ], + "1": [ + "versions.yml:md5,ff682cc9ad70d65a80280df57b316b03" + ], + "interval_list": [ + [ + { + "id": "test" + }, + [ + "1scattered.interval_list:md5,64f6665f9fbd257e4a300ec602f4e995", + "2scattered.interval_list:md5,f515c3da0c6accfd8e7dc33df50855c5", + "3scattered.interval_list:md5,7a918e8c9211b54334587793e8cbae53", + "4scattered.interval_list:md5,1b93105227a7dc81f07101a1efd31498" + ] + ] + ], + "versions": [ + "versions.yml:md5,ff682cc9ad70d65a80280df57b316b03" + ] + } + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.04.2" + }, + "timestamp": "2024-05-22T21:26:22.252885" + }, + "test_gatk4_intervallisttools -stub": { + "content": [ + { + "0": [ + [ + { + "id": "test" + }, + [ + "1scattered.interval_list:md5,d41d8cd98f00b204e9800998ecf8427e", + "2scattered.interval_list:md5,d41d8cd98f00b204e9800998ecf8427e", + "3scattered.interval_list:md5,d41d8cd98f00b204e9800998ecf8427e", + "4scattered.interval_list:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ] + ], + "1": [ + "versions.yml:md5,ff682cc9ad70d65a80280df57b316b03" + ], + "interval_list": [ + [ + { + "id": "test" + }, + [ + "1scattered.interval_list:md5,d41d8cd98f00b204e9800998ecf8427e", + "2scattered.interval_list:md5,d41d8cd98f00b204e9800998ecf8427e", + "3scattered.interval_list:md5,d41d8cd98f00b204e9800998ecf8427e", + "4scattered.interval_list:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ] + ], + "versions": [ + "versions.yml:md5,ff682cc9ad70d65a80280df57b316b03" + ] + } + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.04.2" + }, + "timestamp": "2024-05-22T22:15:11.772344" + } +} \ No newline at end of file diff --git a/tests/modules/nf-core/gatk4/intervallisttools/nextflow.config b/modules/nf-core/gatk4/intervallisttools/tests/nextflow.config similarity index 64% rename from tests/modules/nf-core/gatk4/intervallisttools/nextflow.config rename to modules/nf-core/gatk4/intervallisttools/tests/nextflow.config index b751ad9bc1db..b24b20db0f22 100644 --- a/tests/modules/nf-core/gatk4/intervallisttools/nextflow.config +++ b/modules/nf-core/gatk4/intervallisttools/tests/nextflow.config @@ -1,9 +1,5 @@ process { - - publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } - withName: GATK4_INTERVALLISTTOOLS { ext.args = '--SCATTER_COUNT 6 --SUBDIVISION_MODE BALANCING_WITHOUT_INTERVAL_SUBDIVISION_WITH_OVERFLOW --UNIQUE true --SORT true' } - } diff --git a/modules/nf-core/gatk4/intervallisttools/tests/tags.yml b/modules/nf-core/gatk4/intervallisttools/tests/tags.yml new file mode 100644 index 000000000000..bf85ff5fac37 --- /dev/null +++ b/modules/nf-core/gatk4/intervallisttools/tests/tags.yml @@ -0,0 +1,2 @@ +gatk4/intervallisttools: + - "modules/nf-core/gatk4/intervallisttools/**" diff --git a/tests/config/pytest_modules.yml b/tests/config/pytest_modules.yml index c237ed4a13dd..3e7840d1fcd7 100644 --- a/tests/config/pytest_modules.yml +++ b/tests/config/pytest_modules.yml @@ -618,9 +618,6 @@ gatk4/germlinecnvcaller: gatk4/intervallisttobed: - modules/nf-core/gatk4/intervallisttobed/** - tests/modules/nf-core/gatk4/intervallisttobed/** -gatk4/intervallisttools: - - modules/nf-core/gatk4/intervallisttools/** - - tests/modules/nf-core/gatk4/intervallisttools/** gatk4/learnreadorientationmodel: - modules/nf-core/gatk4/learnreadorientationmodel/** - tests/modules/nf-core/gatk4/learnreadorientationmodel/** diff --git a/tests/modules/nf-core/gatk4/intervallisttools/main.nf b/tests/modules/nf-core/gatk4/intervallisttools/main.nf deleted file mode 100644 index 44b153625148..000000000000 --- a/tests/modules/nf-core/gatk4/intervallisttools/main.nf +++ /dev/null @@ -1,19 +0,0 @@ -#!/usr/bin/env nextflow - -nextflow.enable.dsl = 2 - -include { GATK4_BEDTOINTERVALLIST } from '../../../../../modules/nf-core/gatk4/bedtointervallist/main.nf' -include { GATK4_INTERVALLISTTOOLS } from '../../../../../modules/nf-core/gatk4/intervallisttools/main.nf' - -workflow test_gatk4_intervallisttools { - - input = [ - [ id:'test' ], - file(params.test_data['sarscov2']['genome']['test_bed'], checkIfExists: true) - ] - dict = Channel.fromPath(file(params.test_data['sarscov2']['genome']['genome_dict'], checkIfExists: true)) - .map{ dict -> [ [id:'test'], dict ] } - - GATK4_BEDTOINTERVALLIST ( input, dict ) - GATK4_INTERVALLISTTOOLS ( GATK4_BEDTOINTERVALLIST.out.interval_list ) -} diff --git a/tests/modules/nf-core/gatk4/intervallisttools/test.yml b/tests/modules/nf-core/gatk4/intervallisttools/test.yml deleted file mode 100644 index 7d326171518e..000000000000 --- a/tests/modules/nf-core/gatk4/intervallisttools/test.yml +++ /dev/null @@ -1,17 +0,0 @@ -- name: gatk4 intervallisttools test_gatk4_intervallisttools - command: nextflow run ./tests/modules/nf-core/gatk4/intervallisttools -entry test_gatk4_intervallisttools -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/gatk4/intervallisttools/nextflow.config - tags: - - gatk4 - - gatk4/intervallisttools - files: - - path: output/gatk4/test.interval_list - md5sum: e51101c9357fb2d59fd30e370eefa39c - - path: output/gatk4/test_split/temp_0001_of_6/1scattered.interval_list - md5sum: 64f6665f9fbd257e4a300ec602f4e995 - - path: output/gatk4/test_split/temp_0002_of_6/2scattered.interval_list - md5sum: f515c3da0c6accfd8e7dc33df50855c5 - - path: output/gatk4/test_split/temp_0003_of_6/3scattered.interval_list - md5sum: 7a918e8c9211b54334587793e8cbae53 - - path: output/gatk4/test_split/temp_0004_of_6/4scattered.interval_list - md5sum: 1b93105227a7dc81f07101a1efd31498 - - path: output/gatk4/versions.yml