Skip to content

Commit

Permalink
Added nf-test for haplogrep2/classify (#6572)
Browse files Browse the repository at this point in the history
  • Loading branch information
GallVp authored Sep 5, 2024
1 parent 1991441 commit dab11bf
Show file tree
Hide file tree
Showing 7 changed files with 135 additions and 43 deletions.
6 changes: 4 additions & 2 deletions modules/nf-core/haplogrep2/classify/meta.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
name: "haplogrep2_classify"
description: classification into haplogroups
keywords:
- haplogroups.
- haplogroups
- classify
- mtDNA
tools:
- "haplogrep2":
description: "A tool for mtDNA haplogroup classification."
homepage: "https://github.com/seppinho/haplogrep-cmd"
documentation: "https://github.com/seppinho/haplogrep-cmd"
tool_dev_url: "https://github.com/seppinho/haplogrep-cmd"
licence: "['MIT']"
licence: ["MIT"]
input:
- meta:
type: map
Expand Down
59 changes: 59 additions & 0 deletions modules/nf-core/haplogrep2/classify/tests/main.nf.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@

nextflow_process {

name "Test Process HAPLOGREP2_CLASSIFY"
script "../main.nf"
process "HAPLOGREP2_CLASSIFY"

tag "modules"
tag "modules_nfcore"
tag "haplogrep2"
tag "haplogrep2/classify"

test("test-haplogrep2-classify") {

when {
process {
"""
input[0] = [
[ id:'test', single_end:false ], // meta map
file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/vcf/NA12878_chrM.vcf.gz', checkIfExists: true)
]
input[1] = 'vcf'
"""
}
}

then {
assertAll(
{ assert process.success },
{ assert snapshot(process.out).match() }
)
}
}

test("test-haplogrep2-classify-stub") {
options '-stub'
when {
process {
"""
input[0] = [
[ id:'test', single_end:false ], // meta map
file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/vcf/NA12878_chrM.vcf.gz', checkIfExists: true)
]
input[1] = 'vcf'
"""
}
}

then {
assertAll(
{ assert process.success },
{ assert snapshot(process.out).match() }
)
}
}

}
72 changes: 72 additions & 0 deletions modules/nf-core/haplogrep2/classify/tests/main.nf.test.snap
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
{
"test-haplogrep2-classify": {
"content": [
{
"0": [
[
{
"id": "test",
"single_end": false
},
"test.txt:md5,cf9a4cf886e75233083313d8758566a0"
]
],
"1": [
"versions.yml:md5,b89c2ae3ff8722a536c4042ed4330f25"
],
"txt": [
[
{
"id": "test",
"single_end": false
},
"test.txt:md5,cf9a4cf886e75233083313d8758566a0"
]
],
"versions": [
"versions.yml:md5,b89c2ae3ff8722a536c4042ed4330f25"
]
}
],
"meta": {
"nf-test": "0.9.0",
"nextflow": "24.04.4"
},
"timestamp": "2024-09-05T21:15:54.953862"
},
"test-haplogrep2-classify-stub": {
"content": [
{
"0": [
[
{
"id": "test",
"single_end": false
},
"test.txt:md5,d41d8cd98f00b204e9800998ecf8427e"
]
],
"1": [
"versions.yml:md5,b89c2ae3ff8722a536c4042ed4330f25"
],
"txt": [
[
{
"id": "test",
"single_end": false
},
"test.txt:md5,d41d8cd98f00b204e9800998ecf8427e"
]
],
"versions": [
"versions.yml:md5,b89c2ae3ff8722a536c4042ed4330f25"
]
}
],
"meta": {
"nf-test": "0.9.0",
"nextflow": "24.04.4"
},
"timestamp": "2024-09-05T21:12:30.597805"
}
}
3 changes: 0 additions & 3 deletions tests/config/pytest_modules.yml
Original file line number Diff line number Diff line change
Expand Up @@ -335,9 +335,6 @@ gunc/run:
hapibd:
- modules/nf-core/hapibd/**
- tests/modules/nf-core/hapibd/**
haplogrep2/classify:
- modules/nf-core/haplogrep2/classify/**
- tests/modules/nf-core/haplogrep2/classify/**
hicexplorer/hicpca:
- modules/nf-core/hicexplorer/hicpca/**
- tests/modules/nf-core/hicexplorer/hicpca/**
Expand Down
16 changes: 0 additions & 16 deletions tests/modules/nf-core/haplogrep2/classify/main.nf

This file was deleted.

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

This file was deleted.

17 changes: 0 additions & 17 deletions tests/modules/nf-core/haplogrep2/classify/test.yml

This file was deleted.

0 comments on commit dab11bf

Please sign in to comment.