diff --git a/modules/nf-core/hypo/meta.yml b/modules/nf-core/hypo/meta.yml index 36a7e714f752..002b418f5c8c 100644 --- a/modules/nf-core/hypo/meta.yml +++ b/modules/nf-core/hypo/meta.yml @@ -12,7 +12,7 @@ tools: documentation: "https://github.com/kensung-lab/hypo/blob/master/README.md" tool_dev_url: "https://github.com/kensung-lab/hypo" doi: "10.1101/2019.12.19.882506" - licence: "['GPL v3']" + licence: ["GPL v3"] input: - meta: type: map diff --git a/modules/nf-core/hypo/tests/main.nf.test b/modules/nf-core/hypo/tests/main.nf.test new file mode 100644 index 000000000000..06fb15906f07 --- /dev/null +++ b/modules/nf-core/hypo/tests/main.nf.test @@ -0,0 +1,76 @@ + +nextflow_process { + + name "Test Process HYPO" + script "../main.nf" + process "HYPO" + + tag "modules" + tag "modules_nfcore" + tag "hypo" + + test("test-hypo") { + + when { + process { + """ + input[0] = [ + [ id:'test', single_end:false ], // meta map + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/bam/test.paired_end.bam', checkIfExists: true) + ] + input[1] = [ + [ id:'test', single_end:false ], // meta map + [ + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_2.fastq.gz', checkIfExists: true) + ] + ] + input[2] = file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true) + input[3] = 29903 + input[4] = 5 + + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + } + + test("test-hypo-stub") { + options '-stub' + when { + process { + """ + input[0] = [ + [ id:'test', single_end:false ], // meta map + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/bam/test.paired_end.bam', checkIfExists: true) + ] + input[1] = [ + [ id:'test', single_end:false ], // meta map + [ + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_2.fastq.gz', checkIfExists: true) + ] + ] + input[2] = file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true) + input[3] = 29903 + input[4] = 5 + + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + } + +} diff --git a/modules/nf-core/hypo/tests/main.nf.test.snap b/modules/nf-core/hypo/tests/main.nf.test.snap new file mode 100644 index 000000000000..999ec08c13df --- /dev/null +++ b/modules/nf-core/hypo/tests/main.nf.test.snap @@ -0,0 +1,72 @@ +{ + "test-hypo-stub": { + "content": [ + { + "0": [ + [ + { + "id": "test", + "single_end": false + }, + "test.fasta:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "1": [ + "versions.yml:md5,9529d9976a97d2d8e2d1cc00035906c9" + ], + "fasta": [ + [ + { + "id": "test", + "single_end": false + }, + "test.fasta:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "versions": [ + "versions.yml:md5,9529d9976a97d2d8e2d1cc00035906c9" + ] + } + ], + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.04.4" + }, + "timestamp": "2024-09-05T21:15:49.822312" + }, + "test-hypo": { + "content": [ + { + "0": [ + [ + { + "id": "test", + "single_end": false + }, + "test.fasta:md5,d326ff4fc91e25617c43d678f68187ad" + ] + ], + "1": [ + "versions.yml:md5,9529d9976a97d2d8e2d1cc00035906c9" + ], + "fasta": [ + [ + { + "id": "test", + "single_end": false + }, + "test.fasta:md5,d326ff4fc91e25617c43d678f68187ad" + ] + ], + "versions": [ + "versions.yml:md5,9529d9976a97d2d8e2d1cc00035906c9" + ] + } + ], + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.04.4" + }, + "timestamp": "2024-09-05T21:15:37.149543" + } +} \ No newline at end of file diff --git a/tests/config/pytest_modules.yml b/tests/config/pytest_modules.yml index 9da0e502f277..acdb090f30e2 100644 --- a/tests/config/pytest_modules.yml +++ b/tests/config/pytest_modules.yml @@ -362,9 +362,6 @@ hmtnote/annotate: homer/makeucscfile: - modules/nf-core/homer/makeucscfile/** - tests/modules/nf-core/homer/makeucscfile/** -hypo: - - modules/nf-core/hypo/** - - tests/modules/nf-core/hypo/** icountmini/metagene: - modules/nf-core/icountmini/metagene/** - tests/modules/nf-core/icountmini/metagene/** diff --git a/tests/modules/nf-core/hypo/main.nf b/tests/modules/nf-core/hypo/main.nf deleted file mode 100644 index 89b169fc58eb..000000000000 --- a/tests/modules/nf-core/hypo/main.nf +++ /dev/null @@ -1,24 +0,0 @@ -#!/usr/bin/env nextflow - -nextflow.enable.dsl = 2 - -include { HYPO } from '../../../../modules/nf-core/hypo/main.nf' - -workflow test_hypo { - - bam_sr = [ - [ id:'test', single_end:false ], // meta map - file(params.test_data['sarscov2']['illumina']['test_paired_end_bam'], checkIfExists: true) - ] - reads = [ - [ id:'test', single_end:false ], // meta map - [ - file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true), - file(params.test_data['sarscov2']['illumina']['test_2_fastq_gz'], checkIfExists: true) - ] - ] - draft = file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) - genome_size = 29903 - reads_coverage = 5 - HYPO ( bam_sr, reads, draft, genome_size, reads_coverage ) -} diff --git a/tests/modules/nf-core/hypo/nextflow.config b/tests/modules/nf-core/hypo/nextflow.config deleted file mode 100644 index 50f50a7a3579..000000000000 --- a/tests/modules/nf-core/hypo/nextflow.config +++ /dev/null @@ -1,5 +0,0 @@ -process { - - publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } - -} \ No newline at end of file diff --git a/tests/modules/nf-core/hypo/test.yml b/tests/modules/nf-core/hypo/test.yml deleted file mode 100644 index f298d04ea897..000000000000 --- a/tests/modules/nf-core/hypo/test.yml +++ /dev/null @@ -1,9 +0,0 @@ -- name: "hypo" - command: nextflow run ./tests/modules/nf-core/hypo -entry test_hypo -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/hypo/nextflow.config - tags: - - "hypo" - files: - - path: "output/hypo/test.fasta" - md5sum: d326ff4fc91e25617c43d678f68187ad - - path: "output/hypo/versions.yml" - md5sum: 34233e4c5530683bf3c9e890e2b20e91