Skip to content

Commit 0ef6a73

Browse files
committed
Add stub test for interproscan
1 parent e9c9c8a commit 0ef6a73

4 files changed

Lines changed: 206 additions & 67 deletions

File tree

modules/local/interproscan/main.nf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ process INTERPROSCAN {
6363
stub:
6464
def prefix = task.ext.prefix ?: "${meta.id}"
6565
"""
66-
echo '' > ${prefix}.{tsv,xml,gff3,json}
66+
touch ${prefix}.{tsv,xml,gff3,json}
6767
gzip ${prefix}.{tsv,xml,gff3,json}
6868
6969
cat <<-END_VERSIONS > versions.yml

modules/local/interproscan/tests/main.nf.test

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,31 @@ nextflow_process {
3535
)
3636
}
3737
}
38+
39+
test("stub") {
40+
tag "stub"
41+
options "-stub"
42+
43+
when {
44+
process {
45+
"""
46+
input[0] = [
47+
[ id:'test', single_end:false ], // meta map
48+
file("${moduleDir}/tests/fixtures/test.fasta", checkIfExists: true)
49+
]
50+
input[1] = [
51+
file("${moduleDir}/tests/fixtures/interproscan_db/data", type: 'dir', checkIfExists: true),
52+
"5.73-104.0"
53+
]
54+
"""
55+
}
56+
}
57+
58+
then {
59+
assertAll(
60+
{ assert process.success },
61+
{ assert snapshot(process.out).match() }
62+
)
63+
}
64+
}
3865
}

modules/local/interproscan/tests/main.nf.test.snap

Lines changed: 178 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,182 @@
11
{
2+
"stub": {
3+
"content": [
4+
{
5+
"0": [
6+
[
7+
{
8+
"id": "test",
9+
"single_end": false
10+
},
11+
"test.tsv.gz:md5,d41d8cd98f00b204e9800998ecf8427e"
12+
]
13+
],
14+
"1": [
15+
[
16+
{
17+
"id": "test",
18+
"single_end": false
19+
},
20+
"test.xml.gz:md5,d41d8cd98f00b204e9800998ecf8427e"
21+
]
22+
],
23+
"2": [
24+
[
25+
{
26+
"id": "test",
27+
"single_end": false
28+
},
29+
"test.gff3.gz:md5,d41d8cd98f00b204e9800998ecf8427e"
30+
]
31+
],
32+
"3": [
33+
[
34+
{
35+
"id": "test",
36+
"single_end": false
37+
},
38+
"test.json.gz:md5,d41d8cd98f00b204e9800998ecf8427e"
39+
]
40+
],
41+
"4": [
42+
"versions.yml:md5,7f61cf700565d5b1ab2ca54b0b72fc71"
43+
],
44+
"gff3": [
45+
[
46+
{
47+
"id": "test",
48+
"single_end": false
49+
},
50+
"test.gff3.gz:md5,d41d8cd98f00b204e9800998ecf8427e"
51+
]
52+
],
53+
"json": [
54+
[
55+
{
56+
"id": "test",
57+
"single_end": false
58+
},
59+
"test.json.gz:md5,d41d8cd98f00b204e9800998ecf8427e"
60+
]
61+
],
62+
"tsv": [
63+
[
64+
{
65+
"id": "test",
66+
"single_end": false
67+
},
68+
"test.tsv.gz:md5,d41d8cd98f00b204e9800998ecf8427e"
69+
]
70+
],
71+
"versions": [
72+
"versions.yml:md5,7f61cf700565d5b1ab2ca54b0b72fc71"
73+
],
74+
"xml": [
75+
[
76+
{
77+
"id": "test",
78+
"single_end": false
79+
},
80+
"test.xml.gz:md5,d41d8cd98f00b204e9800998ecf8427e"
81+
]
82+
]
83+
}
84+
],
85+
"meta": {
86+
"nf-test": "0.9.2",
87+
"nextflow": "25.04.1"
88+
},
89+
"timestamp": "2025-06-03T10:20:57.667222"
90+
},
91+
"test_interproscan": {
92+
"content": [
93+
{
94+
"0": [
95+
[
96+
{
97+
"id": "test",
98+
"single_end": false
99+
},
100+
"test.tsv.gz:md5,661955c0a94d4ce157c7d5ef20f577f5"
101+
]
102+
],
103+
"1": [
104+
[
105+
{
106+
"id": "test",
107+
"single_end": false
108+
},
109+
"test.xml.gz:md5,9beb149a99617063786988d589e2c643"
110+
]
111+
],
112+
"2": [
113+
[
114+
{
115+
"id": "test",
116+
"single_end": false
117+
},
118+
"test.gff3.gz:md5,2d4642079db375e6a7f993018c57a1f0"
119+
]
120+
],
121+
"3": [
122+
[
123+
{
124+
"id": "test",
125+
"single_end": false
126+
},
127+
"test.json.gz:md5,ddbacbf940ae30fb97d0a279b949a37c"
128+
]
129+
],
130+
"4": [
131+
"versions.yml:md5,7f61cf700565d5b1ab2ca54b0b72fc71"
132+
],
133+
"gff3": [
134+
[
135+
{
136+
"id": "test",
137+
"single_end": false
138+
},
139+
"test.gff3.gz:md5,2d4642079db375e6a7f993018c57a1f0"
140+
]
141+
],
142+
"json": [
143+
[
144+
{
145+
"id": "test",
146+
"single_end": false
147+
},
148+
"test.json.gz:md5,ddbacbf940ae30fb97d0a279b949a37c"
149+
]
150+
],
151+
"tsv": [
152+
[
153+
{
154+
"id": "test",
155+
"single_end": false
156+
},
157+
"test.tsv.gz:md5,661955c0a94d4ce157c7d5ef20f577f5"
158+
]
159+
],
160+
"versions": [
161+
"versions.yml:md5,7f61cf700565d5b1ab2ca54b0b72fc71"
162+
],
163+
"xml": [
164+
[
165+
{
166+
"id": "test",
167+
"single_end": false
168+
},
169+
"test.xml.gz:md5,9beb149a99617063786988d589e2c643"
170+
]
171+
]
172+
}
173+
],
174+
"meta": {
175+
"nf-test": "0.9.2",
176+
"nextflow": "25.04.1"
177+
},
178+
"timestamp": "2025-06-03T10:19:17.838985"
179+
},
2180
"interproscan": {
3181
"content": [
4182
{

modules/nf-core/interproscan/main.nf

Lines changed: 0 additions & 66 deletions
This file was deleted.

0 commit comments

Comments
 (0)