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

ltrfinder: Added test to verify graceful handling of no ltr input #5979

Merged
merged 1 commit into from
Jul 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm still not sold on removing this yet, I think it is better to wait until they are removed from every module at the same time.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! I'll stop remove them from now on. I agree, removing them in one go is safer.

This file was deleted.

Loading