Skip to content

Commit

Permalink
Added nf-test for hmmer/hmmfetch (#6574)
Browse files Browse the repository at this point in the history
  • Loading branch information
GallVp authored Sep 5, 2024
1 parent dab11bf commit 9763456
Show file tree
Hide file tree
Showing 6 changed files with 281 additions and 77 deletions.
115 changes: 115 additions & 0 deletions modules/nf-core/hmmer/hmmfetch/tests/main.nf.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@

nextflow_process {

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

tag "modules"
tag "modules_nfcore"
tag "hmmer"
tag "hmmer/hmmfetch"

test("test-hmmer-hmmfetch-key") {

when {
process {
"""
input[0] = [
[ id:'test', single_end:false ],
file('https://raw.githubusercontent.com/tseemann/barrnap/master/db/arc.hmm')
]
input[1] = '16S_rRNA'
input[2] = []
input[3] = []
"""
}
}

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

test("test-hmmer-hmmfetch-keyfile") {

when {
process {
"""
keyfile = Channel.of('16S_rRNA', '23S_rRNA').collectFile(name: 'keys.txt', newLine: true)
input[0] = [
[ id:'test', single_end:false ],
file('https://raw.githubusercontent.com/tseemann/barrnap/master/db/arc.hmm')
]
input[1] = []
input[2] = keyfile
input[3] = []
"""
}
}

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

test("test-hmmer-hmmfetch-index") {

when {
process {
"""
input[0] = [
[ id:'test', single_end:false ],
file('https://raw.githubusercontent.com/tseemann/barrnap/master/db/arc.hmm')
]
input[1] = []
input[2] = []
input[3] = []
"""
}
}

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

test("test-hmmer-hmmfetch-index-stub") {
options '-stub'
when {
process {
"""
input[0] = [
[ id:'test', single_end:false ],
file('https://raw.githubusercontent.com/tseemann/barrnap/master/db/arc.hmm')
]
input[1] = []
input[2] = []
input[3] = []
"""
}
}

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

}
166 changes: 166 additions & 0 deletions modules/nf-core/hmmer/hmmfetch/tests/main.nf.test.snap
Original file line number Diff line number Diff line change
@@ -0,0 +1,166 @@
{
"test-hmmer-hmmfetch-index": {
"content": [
{
"0": [

],
"1": [
[
{
"id": "test",
"single_end": false
},
"arc.hmm.ssi:md5,17a7bb35662baabb5b1474660d072fb6"
]
],
"2": [
"versions.yml:md5,ca18131840322abff960ba5c09f91a5a"
],
"hmm": [

],
"index": [
[
{
"id": "test",
"single_end": false
},
"arc.hmm.ssi:md5,17a7bb35662baabb5b1474660d072fb6"
]
],
"versions": [
"versions.yml:md5,ca18131840322abff960ba5c09f91a5a"
]
}
],
"meta": {
"nf-test": "0.9.0",
"nextflow": "24.04.4"
},
"timestamp": "2024-09-05T21:24:45.824243"
},
"test-hmmer-hmmfetch-index-stub": {
"content": [
{
"0": [
[
{
"id": "test",
"single_end": false
},
"test.hmm:md5,d41d8cd98f00b204e9800998ecf8427e"
]
],
"1": [

],
"2": [
"versions.yml:md5,ca18131840322abff960ba5c09f91a5a"
],
"hmm": [
[
{
"id": "test",
"single_end": false
},
"test.hmm:md5,d41d8cd98f00b204e9800998ecf8427e"
]
],
"index": [

],
"versions": [
"versions.yml:md5,ca18131840322abff960ba5c09f91a5a"
]
}
],
"meta": {
"nf-test": "0.9.0",
"nextflow": "24.04.4"
},
"timestamp": "2024-09-05T21:24:50.535566"
},
"test-hmmer-hmmfetch-keyfile": {
"content": [
{
"0": [
[
{
"id": "test",
"single_end": false
},
"test.hmm:md5,0e5c7e77342ec91bc6fac2a7a0228d08"
]
],
"1": [

],
"2": [
"versions.yml:md5,ca18131840322abff960ba5c09f91a5a"
],
"hmm": [
[
{
"id": "test",
"single_end": false
},
"test.hmm:md5,0e5c7e77342ec91bc6fac2a7a0228d08"
]
],
"index": [

],
"versions": [
"versions.yml:md5,ca18131840322abff960ba5c09f91a5a"
]
}
],
"meta": {
"nf-test": "0.9.0",
"nextflow": "24.04.4"
},
"timestamp": "2024-09-05T21:29:44.506723"
},
"test-hmmer-hmmfetch-key": {
"content": [
{
"0": [
[
{
"id": "test",
"single_end": false
},
"test.hmm:md5,0328406a7469af6f24e2157b0367705f"
]
],
"1": [

],
"2": [
"versions.yml:md5,ca18131840322abff960ba5c09f91a5a"
],
"hmm": [
[
{
"id": "test",
"single_end": false
},
"test.hmm:md5,0328406a7469af6f24e2157b0367705f"
]
],
"index": [

],
"versions": [
"versions.yml:md5,ca18131840322abff960ba5c09f91a5a"
]
}
],
"meta": {
"nf-test": "0.9.0",
"nextflow": "24.04.4"
},
"timestamp": "2024-09-05T21:24:38.347449"
}
}
3 changes: 0 additions & 3 deletions tests/config/pytest_modules.yml
Original file line number Diff line number Diff line change
Expand Up @@ -359,9 +359,6 @@ hmmer/hmmalign:
hmmer/hmmbuild:
- modules/nf-core/hmmer/hmmbuild/**
- tests/modules/nf-core/hmmer/hmmbuild/**
hmmer/hmmfetch:
- modules/nf-core/hmmer/hmmfetch/**
- tests/modules/nf-core/hmmer/hmmfetch/**
hmtnote/annotate:
- modules/nf-core/hmtnote/annotate/**
- tests/modules/nf-core/hmtnote/annotate/**
Expand Down
40 changes: 0 additions & 40 deletions tests/modules/nf-core/hmmer/hmmfetch/main.nf

This file was deleted.

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

This file was deleted.

29 changes: 0 additions & 29 deletions tests/modules/nf-core/hmmer/hmmfetch/test.yml

This file was deleted.

0 comments on commit 9763456

Please sign in to comment.