Skip to content

Commit

Permalink
Added nf-test for vcflib/vcffilter
Browse files Browse the repository at this point in the history
  • Loading branch information
GallVp committed Aug 26, 2024
1 parent 3fd7beb commit 5ce8071
Show file tree
Hide file tree
Showing 7 changed files with 57 additions and 34 deletions.
2 changes: 1 addition & 1 deletion modules/nf-core/vcflib/vcffilter/meta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ tools:
documentation: "https://github.com/vcflib/vcflib"
tool_dev_url: "https://github.com/vcflib/vcflib"
doi: "10.1371/journal.pcbi.1009123"
licence: "['MIT']"
licence: ["MIT"]
input:
- meta:
type: map
Expand Down
41 changes: 41 additions & 0 deletions modules/nf-core/vcflib/vcffilter/tests/main.nf.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@

nextflow_process {

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

tag "modules"
tag "modules_nfcore"
tag "vcflib"
tag "vcflib/vcffilter"

test("test-vcflib-vcffilter") {

when {
process {
"""
input[0] = [
[ id:'test', single_end:false ], // meta map
file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test.vcf.gz', checkIfExists: true),
file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test.vcf.gz.tbi', checkIfExists: true)
]
"""
}
}

then {
assertAll(
{ assert process.success },
{ assert snapshot(
path(process.out.vcf[0][1]).vcf.variantsMD5,
process.out.versions
).match()
}
)
}
}

}
15 changes: 15 additions & 0 deletions modules/nf-core/vcflib/vcffilter/tests/main.nf.test.snap
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"test-vcflib-vcffilter": {
"content": [
"9c77022b6e4117314e02ff889f56c292",
[
"versions.yml:md5,1867ed263ff722a16dd0f77cea80ab65"
]
],
"meta": {
"nf-test": "0.8.4",
"nextflow": "24.04.4"
},
"timestamp": "2024-08-27T11:48:33.121349"
}
}
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
process {

publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" }


withName: VCFLIB_VCFFILTER {
ext.args = '-f "DP > 4"'
ext.prefix = 'filtered'
Expand Down
3 changes: 0 additions & 3 deletions tests/config/pytest_modules.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1368,9 +1368,6 @@ vcf2maf:
vcflib/vcfbreakmulti:
- modules/nf-core/vcflib/vcfbreakmulti/**
- tests/modules/nf-core/vcflib/vcfbreakmulti/**
vcflib/vcffilter:
- modules/nf-core/vcflib/vcffilter/**
- tests/modules/nf-core/vcflib/vcffilter/**
verifybamid/verifybamid2:
- modules/nf-core/verifybamid/verifybamid2/**
- tests/modules/nf-core/verifybamid/verifybamid2/**
Expand Down
17 changes: 0 additions & 17 deletions tests/modules/nf-core/vcflib/vcffilter/main.nf

This file was deleted.

9 changes: 0 additions & 9 deletions tests/modules/nf-core/vcflib/vcffilter/test.yml

This file was deleted.

0 comments on commit 5ce8071

Please sign in to comment.