Skip to content

Commit

Permalink
Added nf-test for bedtools/makewindows
Browse files Browse the repository at this point in the history
  • Loading branch information
GallVp committed Aug 26, 2024
1 parent 13b1571 commit 7d8ec87
Show file tree
Hide file tree
Showing 7 changed files with 131 additions and 56 deletions.
58 changes: 58 additions & 0 deletions modules/nf-core/bedtools/makewindows/tests/main.nf.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@

nextflow_process {

name "Test Process BEDTOOLS_MAKEWINDOWS"
script "../main.nf"
process "BEDTOOLS_MAKEWINDOWS"
config "./nextflow.config"

tag "modules"
tag "modules_nfcore"
tag "bedtools"
tag "bedtools/makewindows"

test("test-bedtools-makewindows-bed") {

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

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

test("test-bedtools-makewindows-fai") {

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

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

}
68 changes: 68 additions & 0 deletions modules/nf-core/bedtools/makewindows/tests/main.nf.test.snap
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
{
"test-bedtools-makewindows-fai": {
"content": [
{
"0": [
[
{
"id": "test2"
},
"test2.bed:md5,622d1f62786fe4239b76c53168f21c54"
]
],
"1": [
"versions.yml:md5,f797078cc8b8bac7e6906685d4867be5"
],
"bed": [
[
{
"id": "test2"
},
"test2.bed:md5,622d1f62786fe4239b76c53168f21c54"
]
],
"versions": [
"versions.yml:md5,f797078cc8b8bac7e6906685d4867be5"
]
}
],
"meta": {
"nf-test": "0.8.4",
"nextflow": "24.04.4"
},
"timestamp": "2024-08-26T14:03:31.430455"
},
"test-bedtools-makewindows-bed": {
"content": [
{
"0": [
[
{
"id": "test2"
},
"test2.bed:md5,0cf6ed2b6f470cd44a247da74ca4fe4e"
]
],
"1": [
"versions.yml:md5,f797078cc8b8bac7e6906685d4867be5"
],
"bed": [
[
{
"id": "test2"
},
"test2.bed:md5,0cf6ed2b6f470cd44a247da74ca4fe4e"
]
],
"versions": [
"versions.yml:md5,f797078cc8b8bac7e6906685d4867be5"
]
}
],
"meta": {
"nf-test": "0.8.4",
"nextflow": "24.04.4"
},
"timestamp": "2024-08-26T14:03:27.118372"
}
}
5 changes: 5 additions & 0 deletions modules/nf-core/bedtools/makewindows/tests/nextflow.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
process {
withName: BEDTOOLS_MAKEWINDOWS {
ext.args = '-w 50 '
}
}
3 changes: 0 additions & 3 deletions tests/config/pytest_modules.yml
Original file line number Diff line number Diff line change
Expand Up @@ -103,9 +103,6 @@ bedtools/intersect:
bedtools/jaccard:
- modules/nf-core/bedtools/jaccard/**
- tests/modules/nf-core/bedtools/jaccard/**
bedtools/makewindows:
- modules/nf-core/bedtools/makewindows/**
- tests/modules/nf-core/bedtools/makewindows/**
bedtools/maskfasta:
- modules/nf-core/bedtools/maskfasta/**
- tests/modules/nf-core/bedtools/maskfasta/**
Expand Down
25 changes: 0 additions & 25 deletions tests/modules/nf-core/bedtools/makewindows/main.nf

This file was deleted.

9 changes: 0 additions & 9 deletions tests/modules/nf-core/bedtools/makewindows/nextflow.config

This file was deleted.

19 changes: 0 additions & 19 deletions tests/modules/nf-core/bedtools/makewindows/test.yml

This file was deleted.

0 comments on commit 7d8ec87

Please sign in to comment.