Skip to content

Commit

Permalink
ltrfinder: Added test to verify graceful handling of no ltr input (#5979
Browse files Browse the repository at this point in the history
)
  • Loading branch information
GallVp authored Jul 20, 2024
1 parent 78575b0 commit be4f907
Show file tree
Hide file tree
Showing 3 changed files with 69 additions and 22 deletions.
32 changes: 26 additions & 6 deletions modules/nf-core/ltrfinder/tests/main.nf.test
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ nextflow_process {
"""
input[0] = [
[ id:'test' ], // meta map
file(params.test_data['actinidia_chinensis']['genome']['genome_21_fasta_gz'], checkIfExists: true)
file(params.modules_testdata_base_path + 'genomics/eukaryotes/actinidia_chinensis/genome/chr1/genome.fasta.gz', checkIfExists: true)
]
"""
}
Expand All @@ -37,8 +37,29 @@ nextflow_process {
then {
assertAll(
{ assert process.success },
{ assert snapshot(process.out).match() },
{ assert snapshot(path(process.out.versions[0]).text).match("versions") }
{ assert snapshot(process.out).match() }
)
}

}

test("sarscov2-genome_fasta-no_ltr") {

when {
process {
"""
input[0] = [
[ id:'test' ],
file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true)
]
"""
}
}

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

Expand All @@ -53,7 +74,7 @@ nextflow_process {
"""
input[0] = [
[ id:'test' ], // meta map
file(params.test_data['actinidia_chinensis']['genome']['genome_21_fasta_gz'], checkIfExists: true)
file(params.modules_testdata_base_path + 'genomics/eukaryotes/actinidia_chinensis/genome/chr1/genome.fasta.gz', checkIfExists: true)
]
"""
}
Expand All @@ -62,8 +83,7 @@ nextflow_process {
then {
assertAll(
{ assert process.success },
{ assert snapshot(process.out).match() },
{ assert snapshot(path(process.out.versions[0]).text).match("stub_versions") }
{ assert snapshot(process.out).match() }
)
}

Expand Down
57 changes: 43 additions & 14 deletions modules/nf-core/ltrfinder/tests/main.nf.test.snap
Original file line number Diff line number Diff line change
Expand Up @@ -48,15 +48,54 @@
},
"timestamp": "2024-02-16T09:14:38.509965"
},
"versions": {
"sarscov2-genome_fasta-no_ltr": {
"content": [
"\"LTRFINDER\":\n LTR_FINDER_parallel: v1.1\n ltr_finder: v1.07\n"
{
"0": [
[
{
"id": "test"
},
"test.scn:md5,2ce449dff751e59dbc292b6888491954"
]
],
"1": [
[
{
"id": "test"
},
"test.gff3:md5,bddeb04277af08b5850e64708e8af02a"
]
],
"2": [
"versions.yml:md5,7b24225b810fa88cfb2a887de11be333"
],
"gff": [
[
{
"id": "test"
},
"test.gff3:md5,bddeb04277af08b5850e64708e8af02a"
]
],
"scn": [
[
{
"id": "test"
},
"test.scn:md5,2ce449dff751e59dbc292b6888491954"
]
],
"versions": [
"versions.yml:md5,7b24225b810fa88cfb2a887de11be333"
]
}
],
"meta": {
"nf-test": "0.8.4",
"nextflow": "23.10.1"
"nextflow": "24.04.2"
},
"timestamp": "2024-02-16T09:16:55.301422"
"timestamp": "2024-07-16T13:03:03.505263"
},
"stub": {
"content": [
Expand Down Expand Up @@ -106,15 +145,5 @@
"nextflow": "23.10.1"
},
"timestamp": "2024-02-16T09:14:43.054758"
},
"stub_versions": {
"content": [
"\"LTRFINDER\":\n LTR_FINDER_parallel: v1.1\n ltr_finder: v1.07\n"
],
"meta": {
"nf-test": "0.8.4",
"nextflow": "23.10.1"
},
"timestamp": "2024-02-16T09:16:59.800724"
}
}
2 changes: 0 additions & 2 deletions modules/nf-core/ltrfinder/tests/tags.yml

This file was deleted.

0 comments on commit be4f907

Please sign in to comment.