Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added nf-test for hmtnote/annotate #6526

Open
wants to merge 12 commits into
base: master
Choose a base branch
from
5 changes: 4 additions & 1 deletion modules/nf-core/hmtnote/annotate/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,7 @@ channels:
- conda-forge
- bioconda
dependencies:
- bioconda::hmtnote=0.7.2
- conda-forge::python=3.6 # Locked with the container
- conda-forge::pip=21.3.1
- pip:
- hmtnote==0.7.2
62 changes: 62 additions & 0 deletions modules/nf-core/hmtnote/annotate/tests/main.nf.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@

nextflow_process {

name "Test Process HMTNOTE_ANNOTATE"
script "../main.nf"
process "HMTNOTE_ANNOTATE"
config "./nextflow.config"

tag "modules"
tag "modules_nfcore"
tag "hmtnote"
tag "hmtnote/annotate"

test("test-hmtnote-annotate") {

when {
process {
"""
input[0] = [
[ id:'test' ], // meta map
file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test.vcf', checkIfExists: true)
]

"""
}
}

then {
assertAll(
{ assert process.success },
{ assert snapshot(
path(process.out.vcf[0][1]).vcf.variantsMD5,
process.out.versions
).match()
}
)
}
}

test("test-hmtnote-annotate-stub") {
options '-stub'
when {
process {
"""
input[0] = [
[ id:'test' ], // meta map
file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test.vcf', checkIfExists: true)
]

"""
}
}

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

}
48 changes: 48 additions & 0 deletions modules/nf-core/hmtnote/annotate/tests/main.nf.test.snap
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
{
"test-hmtnote-annotate": {
"content": [
"98d1056442ec88659f26dfb1251b6f74",
[
"versions.yml:md5,8ee58af72515ea6d362a7721c3ba1340"
]
],
"meta": {
"nf-test": "0.9.0",
"nextflow": "24.04.4"
},
"timestamp": "2024-09-02T13:58:45.987177"
},
"test-hmtnote-annotate-stub": {
"content": [
{
"0": [
[
{
"id": "test"
},
"test_annotated.vcf:md5,d41d8cd98f00b204e9800998ecf8427e"
]
],
"1": [
"versions.yml:md5,8ee58af72515ea6d362a7721c3ba1340"
],
"vcf": [
[
{
"id": "test"
},
"test_annotated.vcf:md5,d41d8cd98f00b204e9800998ecf8427e"
]
],
"versions": [
"versions.yml:md5,8ee58af72515ea6d362a7721c3ba1340"
]
}
],
"meta": {
"nf-test": "0.9.0",
"nextflow": "24.04.4"
},
"timestamp": "2024-09-02T13:58:54.748392"
}
}
5 changes: 5 additions & 0 deletions modules/nf-core/hmtnote/annotate/tests/nextflow.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
process {
withName: HMTNOTE_ANNOTATE {
ext.args = '--basic --variab'
}
}
3 changes: 0 additions & 3 deletions tests/config/pytest_modules.yml
Original file line number Diff line number Diff line change
Expand Up @@ -185,9 +185,6 @@ hmmer/eslalimask:
hmmer/eslreformat:
- modules/nf-core/hmmer/eslreformat/**
- tests/modules/nf-core/hmmer/eslreformat/**
hmtnote/annotate:
- modules/nf-core/hmtnote/annotate/**
- tests/modules/nf-core/hmtnote/annotate/**
icountmini/metagene:
- modules/nf-core/icountmini/metagene/**
- tests/modules/nf-core/icountmini/metagene/**
Expand Down
14 changes: 0 additions & 14 deletions tests/modules/nf-core/hmtnote/annotate/main.nf

This file was deleted.

7 changes: 0 additions & 7 deletions tests/modules/nf-core/hmtnote/annotate/nextflow.config

This file was deleted.

6 changes: 0 additions & 6 deletions tests/modules/nf-core/hmtnote/annotate/test.yml

This file was deleted.

Loading