Skip to content

Commit

Permalink
Added nf-test for hypo (#6571)
Browse files Browse the repository at this point in the history
* Added nf-test for hypo

* Removed defaults
  • Loading branch information
GallVp authored Sep 5, 2024
1 parent c1b71e1 commit 04d7c59
Show file tree
Hide file tree
Showing 8 changed files with 149 additions and 43 deletions.
1 change: 0 additions & 1 deletion modules/nf-core/hypo/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,5 @@ name: hypo
channels:
- conda-forge
- bioconda
- defaults
dependencies:
- bioconda::hypo=1.0.3
2 changes: 1 addition & 1 deletion modules/nf-core/hypo/meta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
76 changes: 76 additions & 0 deletions modules/nf-core/hypo/tests/main.nf.test
Original file line number Diff line number Diff line change
@@ -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() }
)
}
}

}
72 changes: 72 additions & 0 deletions modules/nf-core/hypo/tests/main.nf.test.snap
Original file line number Diff line number Diff line change
@@ -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"
}
}
3 changes: 0 additions & 3 deletions tests/config/pytest_modules.yml
Original file line number Diff line number Diff line change
Expand Up @@ -353,9 +353,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/**
Expand Down
24 changes: 0 additions & 24 deletions tests/modules/nf-core/hypo/main.nf

This file was deleted.

5 changes: 0 additions & 5 deletions tests/modules/nf-core/hypo/nextflow.config

This file was deleted.

9 changes: 0 additions & 9 deletions tests/modules/nf-core/hypo/test.yml

This file was deleted.

0 comments on commit 04d7c59

Please sign in to comment.