diff --git a/modules/nf-core/blat/tests/main.nf.test b/modules/nf-core/blat/tests/main.nf.test new file mode 100644 index 00000000000..8b07e5cf72f --- /dev/null +++ b/modules/nf-core/blat/tests/main.nf.test @@ -0,0 +1,75 @@ + +nextflow_process { + + name "Test Process BLAT" + script "../main.nf" + process "BLAT" + config "./nextflow.config" + + tag "modules" + tag "modules_nfcore" + tag "blat" + tag "seqtk/seq" + + setup { + run("SEQTK_SEQ") { + script "../../seqtk/seq/main.nf" + process { + """ + input[0] = [ + [ id:'test', single_end:false ], // meta map + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true) + ] + + """ + } + } + } + + test("test-blat") { + + when { + process { + """ + input[0] = SEQTK_SEQ.out.fastx + input[1] = [ + [ id:'sarscov2' ], + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true) + ] + + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + } + + test("test-blat-stub") { + options '-stub' + when { + process { + """ + input[0] = SEQTK_SEQ.out.fastx + input[1] = [ + [ id:'sarscov2' ], + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true) + ] + + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + } + +} diff --git a/modules/nf-core/blat/tests/main.nf.test.snap b/modules/nf-core/blat/tests/main.nf.test.snap new file mode 100644 index 00000000000..d46a3320a6e --- /dev/null +++ b/modules/nf-core/blat/tests/main.nf.test.snap @@ -0,0 +1,72 @@ +{ + "test-blat": { + "content": [ + { + "0": [ + [ + { + "id": "test", + "single_end": false + }, + "test.psl:md5,6e2e5b3be48c84877f3c54b32bb9ec33" + ] + ], + "1": [ + "versions.yml:md5,d9cde833b3f9cf6d359ef0f8a119380a" + ], + "psl": [ + [ + { + "id": "test", + "single_end": false + }, + "test.psl:md5,6e2e5b3be48c84877f3c54b32bb9ec33" + ] + ], + "versions": [ + "versions.yml:md5,d9cde833b3f9cf6d359ef0f8a119380a" + ] + } + ], + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.04.4" + }, + "timestamp": "2024-09-06T20:38:03.56409" + }, + "test-blat-stub": { + "content": [ + { + "0": [ + [ + { + "id": "test", + "single_end": false + }, + "test.psl:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "1": [ + "versions.yml:md5,d9cde833b3f9cf6d359ef0f8a119380a" + ], + "psl": [ + [ + { + "id": "test", + "single_end": false + }, + "test.psl:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "versions": [ + "versions.yml:md5,d9cde833b3f9cf6d359ef0f8a119380a" + ] + } + ], + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.04.4" + }, + "timestamp": "2024-09-06T20:38:09.736595" + } +} \ No newline at end of file diff --git a/modules/nf-core/blat/tests/nextflow.config b/modules/nf-core/blat/tests/nextflow.config new file mode 100644 index 00000000000..58bc3f25502 --- /dev/null +++ b/modules/nf-core/blat/tests/nextflow.config @@ -0,0 +1,5 @@ +process { + withName: SEQTK_SEQ { + ext.args = '-A' + } +} \ No newline at end of file diff --git a/tests/config/pytest_modules.yml b/tests/config/pytest_modules.yml index fda0a092c3f..e8273e4aa4c 100644 --- a/tests/config/pytest_modules.yml +++ b/tests/config/pytest_modules.yml @@ -52,9 +52,6 @@ bedtools/unionbedg: biohansel: - modules/nf-core/biohansel/** - tests/modules/nf-core/biohansel/** -blat: - - modules/nf-core/blat/** - - tests/modules/nf-core/blat/** cadd: - modules/nf-core/cadd/** - tests/modules/nf-core/cadd/** diff --git a/tests/modules/nf-core/blat/main.nf b/tests/modules/nf-core/blat/main.nf deleted file mode 100644 index ad4184d084c..00000000000 --- a/tests/modules/nf-core/blat/main.nf +++ /dev/null @@ -1,21 +0,0 @@ -#!/usr/bin/env nextflow - -nextflow.enable.dsl = 2 - -include { SEQTK_SEQ } from '../../../../modules/nf-core/seqtk/seq/main.nf' -include { BLAT } from '../../../../modules/nf-core/blat/main.nf' - -workflow test_blat { - - input = [ - [ id:'test', single_end:false ], // meta map - file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true) - ] - sequences = [ - [ id:'sarscov2' ], - file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) - ] - - SEQTK_SEQ ( input ) - BLAT ( SEQTK_SEQ.out.fastx, sequences ) -} diff --git a/tests/modules/nf-core/blat/nextflow.config b/tests/modules/nf-core/blat/nextflow.config deleted file mode 100644 index f688ab59e76..00000000000 --- a/tests/modules/nf-core/blat/nextflow.config +++ /dev/null @@ -1,9 +0,0 @@ -process { - - publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } - - withName: SEQTK_SEQ { - ext.args = '-A' - } - -} \ No newline at end of file diff --git a/tests/modules/nf-core/blat/test.yml b/tests/modules/nf-core/blat/test.yml deleted file mode 100644 index 0d8377d889e..00000000000 --- a/tests/modules/nf-core/blat/test.yml +++ /dev/null @@ -1,8 +0,0 @@ -- name: blat test_blat - command: nextflow run ./tests/modules/nf-core/blat -entry test_blat -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/blat/nextflow.config - tags: - - blat - files: - - path: output/blat/test.psl - md5sum: 6e2e5b3be48c84877f3c54b32bb9ec33 - - path: output/blat/versions.yml