Skip to content

Commit be4f907

Browse files
authored
ltrfinder: Added test to verify graceful handling of no ltr input (#5979)
1 parent 78575b0 commit be4f907

File tree

3 files changed

+69
-22
lines changed

3 files changed

+69
-22
lines changed

modules/nf-core/ltrfinder/tests/main.nf.test

+26-6
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ nextflow_process {
1919
"""
2020
input[0] = [
2121
[ id:'test' ], // meta map
22-
file(params.test_data['actinidia_chinensis']['genome']['genome_21_fasta_gz'], checkIfExists: true)
22+
file(params.modules_testdata_base_path + 'genomics/eukaryotes/actinidia_chinensis/genome/chr1/genome.fasta.gz', checkIfExists: true)
2323
]
2424
"""
2525
}
@@ -37,8 +37,29 @@ nextflow_process {
3737
then {
3838
assertAll(
3939
{ assert process.success },
40-
{ assert snapshot(process.out).match() },
41-
{ assert snapshot(path(process.out.versions[0]).text).match("versions") }
40+
{ assert snapshot(process.out).match() }
41+
)
42+
}
43+
44+
}
45+
46+
test("sarscov2-genome_fasta-no_ltr") {
47+
48+
when {
49+
process {
50+
"""
51+
input[0] = [
52+
[ id:'test' ],
53+
file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true)
54+
]
55+
"""
56+
}
57+
}
58+
59+
then {
60+
assertAll(
61+
{ assert process.success },
62+
{ assert snapshot(process.out).match() }
4263
)
4364
}
4465

@@ -53,7 +74,7 @@ nextflow_process {
5374
"""
5475
input[0] = [
5576
[ id:'test' ], // meta map
56-
file(params.test_data['actinidia_chinensis']['genome']['genome_21_fasta_gz'], checkIfExists: true)
77+
file(params.modules_testdata_base_path + 'genomics/eukaryotes/actinidia_chinensis/genome/chr1/genome.fasta.gz', checkIfExists: true)
5778
]
5879
"""
5980
}
@@ -62,8 +83,7 @@ nextflow_process {
6283
then {
6384
assertAll(
6485
{ assert process.success },
65-
{ assert snapshot(process.out).match() },
66-
{ assert snapshot(path(process.out.versions[0]).text).match("stub_versions") }
86+
{ assert snapshot(process.out).match() }
6787
)
6888
}
6989

modules/nf-core/ltrfinder/tests/main.nf.test.snap

+43-14
Original file line numberDiff line numberDiff line change
@@ -48,15 +48,54 @@
4848
},
4949
"timestamp": "2024-02-16T09:14:38.509965"
5050
},
51-
"versions": {
51+
"sarscov2-genome_fasta-no_ltr": {
5252
"content": [
53-
"\"LTRFINDER\":\n LTR_FINDER_parallel: v1.1\n ltr_finder: v1.07\n"
53+
{
54+
"0": [
55+
[
56+
{
57+
"id": "test"
58+
},
59+
"test.scn:md5,2ce449dff751e59dbc292b6888491954"
60+
]
61+
],
62+
"1": [
63+
[
64+
{
65+
"id": "test"
66+
},
67+
"test.gff3:md5,bddeb04277af08b5850e64708e8af02a"
68+
]
69+
],
70+
"2": [
71+
"versions.yml:md5,7b24225b810fa88cfb2a887de11be333"
72+
],
73+
"gff": [
74+
[
75+
{
76+
"id": "test"
77+
},
78+
"test.gff3:md5,bddeb04277af08b5850e64708e8af02a"
79+
]
80+
],
81+
"scn": [
82+
[
83+
{
84+
"id": "test"
85+
},
86+
"test.scn:md5,2ce449dff751e59dbc292b6888491954"
87+
]
88+
],
89+
"versions": [
90+
"versions.yml:md5,7b24225b810fa88cfb2a887de11be333"
91+
]
92+
}
5493
],
5594
"meta": {
5695
"nf-test": "0.8.4",
57-
"nextflow": "23.10.1"
96+
"nextflow": "24.04.2"
5897
},
59-
"timestamp": "2024-02-16T09:16:55.301422"
98+
"timestamp": "2024-07-16T13:03:03.505263"
6099
},
61100
"stub": {
62101
"content": [
@@ -106,15 +145,5 @@
106145
"nextflow": "23.10.1"
107146
},
108147
"timestamp": "2024-02-16T09:14:43.054758"
109-
},
110-
"stub_versions": {
111-
"content": [
112-
"\"LTRFINDER\":\n LTR_FINDER_parallel: v1.1\n ltr_finder: v1.07\n"
113-
],
114-
"meta": {
115-
"nf-test": "0.8.4",
116-
"nextflow": "23.10.1"
117-
},
118-
"timestamp": "2024-02-16T09:16:59.800724"
119148
}
120149
}

modules/nf-core/ltrfinder/tests/tags.yml

-2
This file was deleted.

0 commit comments

Comments
 (0)