Skip to content

Commit

Permalink
Swap verifybamid2 to nf-test (#6824)
Browse files Browse the repository at this point in the history
* Swap verifybamid2 to nf-test

* Update snapshots

* Remove empty md5sum

---------

Co-authored-by: Adam Talbot <[email protected]>
  • Loading branch information
SPPearce and adamrtalbot authored Nov 20, 2024
1 parent 64eef62 commit af27a50
Show file tree
Hide file tree
Showing 7 changed files with 245 additions and 127 deletions.
98 changes: 98 additions & 0 deletions modules/nf-core/verifybamid/verifybamid2/tests/main.nf.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
nextflow_process {

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

tag "modules"
tag "modules_nfcore"
tag "verifybamid"
tag "verifybamid/verifybamid2"

test("Should run with SVD input") {
config "./nextflow.config"

when {
process {
"""
input[0] = [ [ id:'test', single_end:false ],
file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/bam/test.paired_end.sorted.bam'),
file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/bam/test.paired_end.sorted.bam.bai') ]
input[1] = [ file(params.modules_testdata_base_path + 'delete_me/verifybamid/test.genome.vcf.UD'),
file(params.modules_testdata_base_path + 'delete_me/verifybamid/test.genome.vcf.mu'),
file(params.modules_testdata_base_path + 'delete_me/verifybamid/test.genome.vcf.bed') ]
input[2] = []
input[3] = file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta')
"""
}
}

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

test("Should run with RefVCF input") {
config "./nextflow.config"

when {
process {
"""
input[0] = [ [ id:'test', single_end:false ],
file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/bam/test.paired_end.sorted.bam'),
file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/bam/test.paired_end.sorted.bam.bai') ]
input[1] = [ [], [], [] ]
input[2] = file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/gvcf/test.genome.vcf')
input[3] = file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta')
"""
}
}

then {
assertAll(
{ assert process.success },
{ assert snapshot(
file(process.out.log[0][1]).name,
process.out.bed,
process.out.mu,
process.out.self_sm,
process.out.ancestry,
process.out.versions,
file(process.out.ud[0][1]).name
).match() }
)
}
}

test("Should run with panel input") {
config "./nextflow.config"

when {
process {
"""
input[0] = [ [ id:'test', single_end:false ],
file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/bam/test.paired_end.sorted.bam'),
file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/bam/test.paired_end.sorted.bam.bai') ]
input[1] = [ file(params.modules_testdata_base_path + 'delete_me/verifybamid/test.genome.vcf.UD'),
file(params.modules_testdata_base_path + 'delete_me/verifybamid/test.genome.vcf.mu'),
file(params.modules_testdata_base_path + 'delete_me/verifybamid/test.genome.vcf.bed') ]
input[2] = []
input[3] = file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta')
"""
}
}

then {
assertAll(
{ assert process.success },
{ assert snapshot(
file(process.out.log[0][1]).name,
process.out.versions
).match() }
)
}
}
}
142 changes: 142 additions & 0 deletions modules/nf-core/verifybamid/verifybamid2/tests/main.nf.test.snap
Original file line number Diff line number Diff line change
@@ -0,0 +1,142 @@
{
"Should run with panel input": {
"content": [
"test.log",
[
"versions.yml:md5,199f2e02b570926d6a249055c917c6b1"
]
],
"meta": {
"nf-test": "0.9.0",
"nextflow": "24.04.4"
},
"timestamp": "2024-10-22T13:02:25.962766167"
},
"Should run with SVD input": {
"content": [
{
"0": [
[
{
"id": "test",
"single_end": false
},
"test.log:md5,32a9811d143450f9f5b99c21b6ecff61"
]
],
"1": [

],
"2": [

],
"3": [

],
"4": [
[
{
"id": "test",
"single_end": false
},
"result.selfSM:md5,9a10860a7e79e393c773aa801ec9f84a"
]
],
"5": [
[
{
"id": "test",
"single_end": false
},
"result.Ancestry:md5,fe39ad1aced7cbb1eb21a74332389ad2"
]
],
"6": [
"versions.yml:md5,199f2e02b570926d6a249055c917c6b1"
],
"ancestry": [
[
{
"id": "test",
"single_end": false
},
"result.Ancestry:md5,fe39ad1aced7cbb1eb21a74332389ad2"
]
],
"bed": [

],
"log": [
[
{
"id": "test",
"single_end": false
},
"test.log:md5,32a9811d143450f9f5b99c21b6ecff61"
]
],
"mu": [

],
"self_sm": [
[
{
"id": "test",
"single_end": false
},
"result.selfSM:md5,9a10860a7e79e393c773aa801ec9f84a"
]
],
"ud": [

],
"versions": [
"versions.yml:md5,199f2e02b570926d6a249055c917c6b1"
]
}
],
"meta": {
"nf-test": "0.9.1",
"nextflow": "24.10.0"
},
"timestamp": "2024-11-05T20:51:39.853534509"
},
"Should run with RefVCF input": {
"content": [
"test.log",
[
[
{
"id": "test",
"single_end": false
},
"test.genome.vcf.bed:md5,47106c764019ee359b1936410e2efa1e"
]
],
[
[
{
"id": "test",
"single_end": false
},
"test.genome.vcf.mu:md5,0810db02af2a176fa5ddc0f404911b66"
]
],
[

],
[

],
[
"versions.yml:md5,199f2e02b570926d6a249055c917c6b1"
],
"test.genome.vcf.UD"
],
"meta": {
"nf-test": "0.9.2",
"nextflow": "24.10.1"
},
"timestamp": "2024-11-20T13:43:20.984216864"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
process {
withName: 'VERIFYBAMID_VERIFYBAMID2' {
ext.args = '--DisableSanityCheck'
}
}
3 changes: 0 additions & 3 deletions tests/config/pytest_modules.yml
Original file line number Diff line number Diff line change
Expand Up @@ -711,9 +711,6 @@ varlociraptor/preprocess:
vcflib/vcfbreakmulti:
- modules/nf-core/vcflib/vcfbreakmulti/**
- tests/modules/nf-core/vcflib/vcfbreakmulti/**
verifybamid/verifybamid2:
- modules/nf-core/verifybamid/verifybamid2/**
- tests/modules/nf-core/verifybamid/verifybamid2/**
vrhyme/extractunbinned:
- modules/nf-core/vrhyme/extractunbinned/**
- tests/modules/nf-core/vrhyme/extractunbinned/**
Expand Down
59 changes: 0 additions & 59 deletions tests/modules/nf-core/verifybamid/verifybamid2/main.nf

This file was deleted.

34 changes: 0 additions & 34 deletions tests/modules/nf-core/verifybamid/verifybamid2/nextflow.config

This file was deleted.

31 changes: 0 additions & 31 deletions tests/modules/nf-core/verifybamid/verifybamid2/test.yml

This file was deleted.

0 comments on commit af27a50

Please sign in to comment.