Skip to content

Commit

Permalink
Added nf-test stub for gatk4/variantfiltration (#5676)
Browse files Browse the repository at this point in the history
* Added nf-test stub for gatk4/variantfiltration

* Update for lint

* Update for lint
  • Loading branch information
KamilMaliszArdigen committed May 22, 2024
1 parent 63d6994 commit 0040936
Show file tree
Hide file tree
Showing 7 changed files with 119 additions and 111 deletions.
87 changes: 87 additions & 0 deletions modules/nf-core/gatk4/variantfiltration/tests/main.nf.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
nextflow_process {

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

tag "modules"
tag "modules_nfcore"
tag "gatk4"
tag "gatk4/variantfiltration"

test("test_gatk4_variantfiltration_vcf_input") {

when {
process {
"""
input[0] = [
[ id:'test' ], // meta map
file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/gvcf/test.genome.vcf', checkIfExists: true),
file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/gvcf/test.genome.vcf.idx', checkIfExists: true)
]
input[1] = [
[ id:'genome' ], // meta map
file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta', checkIfExists: true)
]
input[2] = [
[ id:'genome' ], // meta map
file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta.fai', checkIfExists: true)
]
input[3] = [
[ id:'genome' ], // meta map
file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.dict', checkIfExists: true)
]
"""
}
}

then {
assertAll(
{ assert process.success },
{ assert snapshot(process.out.versions,
file(process.out.vcf.get(0).get(1)).name,
file(process.out.tbi.get(0).get(1)).name).match() },
)
}

}

test("test_gatk4_variantfiltration_gz_input") {

when {
process {
"""
input[0] = [
[ id:'test' ], // meta map
file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/gvcf/test.genome.vcf.gz', checkIfExists: true),
file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/gvcf/test.genome.vcf.gz.tbi', checkIfExists: true)
]
input[1] = [
[ id:'genome' ], // meta map
file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta', checkIfExists: true)
]
input[2] = [
[ id:'genome' ], // meta map
file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta.fai', checkIfExists: true)
]
input[3] = [
[ id:'genome' ], // meta map
file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.dict', checkIfExists: true)
]
"""
}
}

then {
assertAll(
{ assert process.success },
{ assert snapshot(process.out.versions,
file(process.out.vcf.get(0).get(1)).name,
file(process.out.tbi.get(0).get(1)).name).match() },
)
}

}

}

30 changes: 30 additions & 0 deletions modules/nf-core/gatk4/variantfiltration/tests/main.nf.test.snap
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"test_gatk4_variantfiltration_gz_input": {
"content": [
[
"versions.yml:md5,96943659275ba62de1f0d283a2f6e97b"
],
"test.vcf.gz",
"test.vcf.gz.tbi"
],
"meta": {
"nf-test": "0.8.4",
"nextflow": "23.04.2"
},
"timestamp": "2024-05-22T22:43:27.609784"
},
"test_gatk4_variantfiltration_vcf_input": {
"content": [
[
"versions.yml:md5,96943659275ba62de1f0d283a2f6e97b"
],
"test.vcf.gz",
"test.vcf.gz.tbi"
],
"meta": {
"nf-test": "0.8.4",
"nextflow": "23.04.2"
},
"timestamp": "2024-05-22T22:42:55.316294"
}
}
2 changes: 2 additions & 0 deletions modules/nf-core/gatk4/variantfiltration/tests/tags.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
gatk4/variantfiltration:
- "modules/nf-core/gatk4/variantfiltration/**"
3 changes: 0 additions & 3 deletions tests/config/pytest_modules.yml
Original file line number Diff line number Diff line change
Expand Up @@ -653,9 +653,6 @@ gatk4/splitcram:
gatk4/splitintervals:
- modules/nf-core/gatk4/splitintervals/**
- tests/modules/nf-core/gatk4/splitintervals/**
gatk4/variantfiltration:
- modules/nf-core/gatk4/variantfiltration/**
- tests/modules/nf-core/gatk4/variantfiltration/**
gatk4/variantrecalibrator:
- modules/nf-core/gatk4/variantrecalibrator/**
- tests/modules/nf-core/gatk4/variantrecalibrator/**
Expand Down
51 changes: 0 additions & 51 deletions tests/modules/nf-core/gatk4/variantfiltration/main.nf

This file was deleted.

10 changes: 0 additions & 10 deletions tests/modules/nf-core/gatk4/variantfiltration/nextflow.config

This file was deleted.

47 changes: 0 additions & 47 deletions tests/modules/nf-core/gatk4/variantfiltration/test.yml

This file was deleted.

0 comments on commit 0040936

Please sign in to comment.