Skip to content

Commit

Permalink
test updio and merge_beds
Browse files Browse the repository at this point in the history
  • Loading branch information
nvnieuwk committed Nov 14, 2024
1 parent b896143 commit 4f200f1
Show file tree
Hide file tree
Showing 6 changed files with 301 additions and 0 deletions.
68 changes: 68 additions & 0 deletions modules/local/merge_beds/tests/main.nf.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
nextflow_process {

name "Test Process MERGE_BEDS"
script "../main.nf"
process "MERGE_BEDS"

tag "modules"
tag "modules_local"
tag "merge_beds"

test("homo_sapiens - bed") {

config "./nextflow.config"

when {
process {
"""
input[0] = [
[ id:'test', single_end:false ], // meta map
file(params.bed, checkIfExists:true)
]
input[1] = [
[ id:'fai' ],
file(params.fai, checkIfExists:true)
]
"""
}
}

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

}

test("homo_sapiens - bed - stub") {

options "-stub"
config "./nextflow.config"

when {
process {
"""
input[0] = [
[ id:'test', single_end:false ], // meta map
file(params.bed, checkIfExists:true)
]
input[1] = [
[ id:'fai' ],
file(params.fai, checkIfExists:true)
]
"""
}
}

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

}

}
72 changes: 72 additions & 0 deletions modules/local/merge_beds/tests/main.nf.test.snap
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
{
"homo_sapiens - bed": {
"content": [
{
"0": [
[
{
"id": "test",
"single_end": false
},
"test.bed:md5,fa245abf8add7a80650566a1de67ec04"
]
],
"1": [
"versions.yml:md5,273f887b675fb5feb6073a5313a191a9"
],
"bed": [
[
{
"id": "test",
"single_end": false
},
"test.bed:md5,fa245abf8add7a80650566a1de67ec04"
]
],
"versions": [
"versions.yml:md5,273f887b675fb5feb6073a5313a191a9"
]
}
],
"meta": {
"nf-test": "0.9.1",
"nextflow": "24.10.0"
},
"timestamp": "2024-11-14T09:49:08.980488978"
},
"homo_sapiens - bed - stub": {
"content": [
{
"0": [
[
{
"id": "test",
"single_end": false
},
"test.bed:md5,d41d8cd98f00b204e9800998ecf8427e"
]
],
"1": [
"versions.yml:md5,273f887b675fb5feb6073a5313a191a9"
],
"bed": [
[
{
"id": "test",
"single_end": false
},
"test.bed:md5,d41d8cd98f00b204e9800998ecf8427e"
]
],
"versions": [
"versions.yml:md5,273f887b675fb5feb6073a5313a191a9"
]
}
],
"meta": {
"nf-test": "0.9.1",
"nextflow": "24.10.0"
},
"timestamp": "2024-11-14T09:49:17.089675797"
}
}
3 changes: 3 additions & 0 deletions modules/local/merge_beds/tests/nextflow.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
process {
ext.args = "-d 150"
}
63 changes: 63 additions & 0 deletions modules/local/updio/tests/main.nf.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
nextflow_process {

name "Test Process UPDIO"
script "../main.nf"
process "UPDIO"

tag "modules"
tag "modules_local"
tag "updio"

test("homo_sapiens - vcf, tbi, []") {

config "./nextflow.config"

when {
process {
"""
input[0] = [
[ id:'test', child:'NA24385' ], // meta map
file(params.famvcf, checkIfExists:true),
file(params.famtbi, checkIfExists:true)
]
input[1] = [[],[]]
"""
}
}

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

}

test("homo_sapiens - vcf, tbi, [] - stub") {

options "-stub"
config "./nextflow.config"

when {
process {
"""
input[0] = [
[ id:'test', child:'NA24385' ], // meta map
file(params.famvcf, checkIfExists:true),
file(params.famtbi, checkIfExists:true)
]
input[1] = [[],[]]
"""
}
}

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

}
}
92 changes: 92 additions & 0 deletions modules/local/updio/tests/main.nf.test.snap
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
{
"homo_sapiens - vcf, tbi, [] - stub": {
"content": [
{
"0": [
[
{
"id": "test",
"child": "NA24385"
},
[
"NA24385.events_list:md5,d41d8cd98f00b204e9800998ecf8427e",
"NA24385.log:md5,d41d8cd98f00b204e9800998ecf8427e",
"NA24385.table:md5,d41d8cd98f00b204e9800998ecf8427e",
"NA24385.upd:md5,d41d8cd98f00b204e9800998ecf8427e"
]
]
],
"1": [
"versions.yml:md5,8a807f51c31f64de1c707210fabe7029"
],
"updio": [
[
{
"id": "test",
"child": "NA24385"
},
[
"NA24385.events_list:md5,d41d8cd98f00b204e9800998ecf8427e",
"NA24385.log:md5,d41d8cd98f00b204e9800998ecf8427e",
"NA24385.table:md5,d41d8cd98f00b204e9800998ecf8427e",
"NA24385.upd:md5,d41d8cd98f00b204e9800998ecf8427e"
]
]
],
"versions": [
"versions.yml:md5,8a807f51c31f64de1c707210fabe7029"
]
}
],
"meta": {
"nf-test": "0.9.1",
"nextflow": "24.10.0"
},
"timestamp": "2024-11-14T09:57:26.032830013"
},
"homo_sapiens - vcf, tbi, []": {
"content": [
{
"0": [
[
{
"id": "test",
"child": "NA24385"
},
[
"NA24385.events_list:md5,4a26c133ef193d31eddfd18dae94f0a0",
"NA24385.log:md5,a40a24f379127a9cde7e40a1ce1032ec",
"NA24385.table:md5,ca8165fc7869a113ca034396de7cf579",
"NA24385.upd:md5,d41d8cd98f00b204e9800998ecf8427e"
]
]
],
"1": [
"versions.yml:md5,8a807f51c31f64de1c707210fabe7029"
],
"updio": [
[
{
"id": "test",
"child": "NA24385"
},
[
"NA24385.events_list:md5,4a26c133ef193d31eddfd18dae94f0a0",
"NA24385.log:md5,a40a24f379127a9cde7e40a1ce1032ec",
"NA24385.table:md5,ca8165fc7869a113ca034396de7cf579",
"NA24385.upd:md5,d41d8cd98f00b204e9800998ecf8427e"
]
]
],
"versions": [
"versions.yml:md5,8a807f51c31f64de1c707210fabe7029"
]
}
],
"meta": {
"nf-test": "0.9.1",
"nextflow": "24.10.0"
},
"timestamp": "2024-11-14T09:57:17.522197249"
}
}
3 changes: 3 additions & 0 deletions modules/local/updio/tests/nextflow.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
process {
ext.args = "--childID NA24385 --momID NA24149 --dadID NA24143"
}

0 comments on commit 4f200f1

Please sign in to comment.