diff --git a/modules/nf-core/bedtools/makewindows/tests/main.nf.test b/modules/nf-core/bedtools/makewindows/tests/main.nf.test new file mode 100644 index 00000000000..b27e59b6e04 --- /dev/null +++ b/modules/nf-core/bedtools/makewindows/tests/main.nf.test @@ -0,0 +1,58 @@ + +nextflow_process { + + name "Test Process BEDTOOLS_MAKEWINDOWS" + script "../main.nf" + process "BEDTOOLS_MAKEWINDOWS" + config "./nextflow.config" + + tag "modules" + tag "modules_nfcore" + tag "bedtools" + tag "bedtools/makewindows" + + test("test-bedtools-makewindows-bed") { + + when { + process { + """ + input[0] = [ + [ id:'test2'], + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/bed/test.bed', checkIfExists: true) + ] + + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + } + + test("test-bedtools-makewindows-fai") { + + when { + process { + """ + input[0] = [ + [ id:'test2'], + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta.fai', checkIfExists: true) + ] + + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + } + +} diff --git a/modules/nf-core/bedtools/makewindows/tests/main.nf.test.snap b/modules/nf-core/bedtools/makewindows/tests/main.nf.test.snap new file mode 100644 index 00000000000..22cfbc17253 --- /dev/null +++ b/modules/nf-core/bedtools/makewindows/tests/main.nf.test.snap @@ -0,0 +1,68 @@ +{ + "test-bedtools-makewindows-fai": { + "content": [ + { + "0": [ + [ + { + "id": "test2" + }, + "test2.bed:md5,622d1f62786fe4239b76c53168f21c54" + ] + ], + "1": [ + "versions.yml:md5,f797078cc8b8bac7e6906685d4867be5" + ], + "bed": [ + [ + { + "id": "test2" + }, + "test2.bed:md5,622d1f62786fe4239b76c53168f21c54" + ] + ], + "versions": [ + "versions.yml:md5,f797078cc8b8bac7e6906685d4867be5" + ] + } + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.4" + }, + "timestamp": "2024-08-26T14:03:31.430455" + }, + "test-bedtools-makewindows-bed": { + "content": [ + { + "0": [ + [ + { + "id": "test2" + }, + "test2.bed:md5,0cf6ed2b6f470cd44a247da74ca4fe4e" + ] + ], + "1": [ + "versions.yml:md5,f797078cc8b8bac7e6906685d4867be5" + ], + "bed": [ + [ + { + "id": "test2" + }, + "test2.bed:md5,0cf6ed2b6f470cd44a247da74ca4fe4e" + ] + ], + "versions": [ + "versions.yml:md5,f797078cc8b8bac7e6906685d4867be5" + ] + } + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.4" + }, + "timestamp": "2024-08-26T14:03:27.118372" + } +} \ No newline at end of file diff --git a/modules/nf-core/bedtools/makewindows/tests/nextflow.config b/modules/nf-core/bedtools/makewindows/tests/nextflow.config new file mode 100644 index 00000000000..fa16733f166 --- /dev/null +++ b/modules/nf-core/bedtools/makewindows/tests/nextflow.config @@ -0,0 +1,5 @@ +process { + withName: BEDTOOLS_MAKEWINDOWS { + ext.args = '-w 50 ' + } +} diff --git a/tests/config/pytest_modules.yml b/tests/config/pytest_modules.yml index 4aea9c2af1e..dbeafd70771 100644 --- a/tests/config/pytest_modules.yml +++ b/tests/config/pytest_modules.yml @@ -103,9 +103,6 @@ bedtools/intersect: bedtools/jaccard: - modules/nf-core/bedtools/jaccard/** - tests/modules/nf-core/bedtools/jaccard/** -bedtools/makewindows: - - modules/nf-core/bedtools/makewindows/** - - tests/modules/nf-core/bedtools/makewindows/** bedtools/maskfasta: - modules/nf-core/bedtools/maskfasta/** - tests/modules/nf-core/bedtools/maskfasta/** diff --git a/tests/modules/nf-core/bedtools/makewindows/main.nf b/tests/modules/nf-core/bedtools/makewindows/main.nf deleted file mode 100644 index 13b59ea54e1..00000000000 --- a/tests/modules/nf-core/bedtools/makewindows/main.nf +++ /dev/null @@ -1,25 +0,0 @@ -#!/usr/bin/env nextflow - -nextflow.enable.dsl = 2 - -include { BEDTOOLS_MAKEWINDOWS } from '../../../../../modules/nf-core/bedtools/makewindows/main.nf' - -workflow test_bedtools_makewindows_bed { - - input = [ - [ id:'test2'], - file(params.test_data['sarscov2']['genome']['test_bed'], checkIfExists: true) - ] - - BEDTOOLS_MAKEWINDOWS ( input ) -} - -workflow test_bedtools_makewindows_fai { - - input = [ - [ id:'test2'], - file(params.test_data['sarscov2']['genome']['genome_fasta_fai'], checkIfExists: true) - ] - - BEDTOOLS_MAKEWINDOWS ( input ) -} diff --git a/tests/modules/nf-core/bedtools/makewindows/nextflow.config b/tests/modules/nf-core/bedtools/makewindows/nextflow.config deleted file mode 100644 index e8b8c3eae29..00000000000 --- a/tests/modules/nf-core/bedtools/makewindows/nextflow.config +++ /dev/null @@ -1,9 +0,0 @@ -process { - - publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } - - withName: BEDTOOLS_MAKEWINDOWS { - ext.args = '-w 50 ' - } - -} diff --git a/tests/modules/nf-core/bedtools/makewindows/test.yml b/tests/modules/nf-core/bedtools/makewindows/test.yml deleted file mode 100644 index f286c65abaa..00000000000 --- a/tests/modules/nf-core/bedtools/makewindows/test.yml +++ /dev/null @@ -1,19 +0,0 @@ -- name: bedtools makewindows test_bedtools_makewindows_bed - command: nextflow run ./tests/modules/nf-core/bedtools/makewindows -entry test_bedtools_makewindows_bed -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/bedtools/makewindows/nextflow.config - tags: - - bedtools/makewindows - - bedtools - files: - - path: output/bedtools/test2.bed - md5sum: 0cf6ed2b6f470cd44a247da74ca4fe4e - - path: output/bedtools/versions.yml - -- name: bedtools makewindows test_bedtools_makewindows_fai - command: nextflow run ./tests/modules/nf-core/bedtools/makewindows -entry test_bedtools_makewindows_fai -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/bedtools/makewindows/nextflow.config - tags: - - bedtools/makewindows - - bedtools - files: - - path: output/bedtools/test2.bed - md5sum: 622d1f62786fe4239b76c53168f21c54 - - path: output/bedtools/versions.yml