Skip to content

Commit

Permalink
Added nf-test for rtgtools/pedfilter (#6278)
Browse files Browse the repository at this point in the history
* Added nf-test for rtgtools/pedfilter

* Updated power assertions
  • Loading branch information
GallVp authored Aug 23, 2024
1 parent 20c03ae commit c1c2a77
Show file tree
Hide file tree
Showing 8 changed files with 182 additions and 76 deletions.
2 changes: 1 addition & 1 deletion modules/nf-core/rtgtools/pedfilter/meta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ tools:
homepage: "https://www.realtimegenomics.com/products/rtg-tools"
documentation: "https://github.com/RealTimeGenomics/rtg-tools"
tool_dev_url: "https://github.com/RealTimeGenomics/rtg-tools"
licence: "['BSD']"
licence: ["BSD"]
input:
- meta:
type: map
Expand Down
85 changes: 85 additions & 0 deletions modules/nf-core/rtgtools/pedfilter/tests/main.nf.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@

nextflow_process {

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

tag "modules"
tag "modules_nfcore"
tag "rtgtools"
tag "rtgtools/pedfilter"

test("test-rtgtools-pedfilter-ped") {

when {
process {
"""
input[0] = [
[ id:'test', single_end:false ], // meta map
file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/vcf/ped/justhusky.ped', checkIfExists: true)
]
"""
}
}

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

test("test-rtgtools-pedfilter-vcf") {

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

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

test("test-rtgtools-pedfilter-vcf-output") {

config "./nextflow.config"

when {
process {
"""
input[0] = [
[ id:'test', single_end:false ], // meta map
file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/vcf/ped/justhusky.ped', checkIfExists: true)
]
"""
}
}

then {
assertAll(
{ assert process.success },
{ assert snapshot(
path(process.out.output[0][1]).linesGzip[3..7],
process.out.versions
).match()
}
)
}
}

}
91 changes: 91 additions & 0 deletions modules/nf-core/rtgtools/pedfilter/tests/main.nf.test.snap
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
{
"test-rtgtools-pedfilter-vcf": {
"content": [
{
"0": [
[
{
"id": "test",
"single_end": false
},
"test.ped:md5,342135c8bf22e573367b75ef5e1c5e6b"
]
],
"1": [
"versions.yml:md5,036d97d5be26fce2e7d956034b9dc86d"
],
"output": [
[
{
"id": "test",
"single_end": false
},
"test.ped:md5,342135c8bf22e573367b75ef5e1c5e6b"
]
],
"versions": [
"versions.yml:md5,036d97d5be26fce2e7d956034b9dc86d"
]
}
],
"meta": {
"nf-test": "0.8.4",
"nextflow": "24.04.4"
},
"timestamp": "2024-08-23T16:11:01.797205"
},
"test-rtgtools-pedfilter-vcf-output": {
"content": [
[
"##CL=pedfilter --vcf justhusky.ped",
"##diseased=hugelymodelbat",
"##SAMPLE=<ID=earlycasualcaiman,Sex=MALE>",
"##SAMPLE=<ID=hugelymodelbat,Sex=MALE>",
"##SAMPLE=<ID=slowlycivilbuck,Sex=FEMALE>"
],
[
"versions.yml:md5,036d97d5be26fce2e7d956034b9dc86d"
]
],
"meta": {
"nf-test": "0.8.4",
"nextflow": "24.04.4"
},
"timestamp": "2024-08-23T20:46:00.069224"
},
"test-rtgtools-pedfilter-ped": {
"content": [
{
"0": [
[
{
"id": "test",
"single_end": false
},
"test.ped:md5,a8b8f6538e1738d6e06fddfe15d36f09"
]
],
"1": [
"versions.yml:md5,036d97d5be26fce2e7d956034b9dc86d"
],
"output": [
[
{
"id": "test",
"single_end": false
},
"test.ped:md5,a8b8f6538e1738d6e06fddfe15d36f09"
]
],
"versions": [
"versions.yml:md5,036d97d5be26fce2e7d956034b9dc86d"
]
}
],
"meta": {
"nf-test": "0.8.4",
"nextflow": "24.04.4"
},
"timestamp": "2024-08-23T16:10:53.473351"
}
}
5 changes: 5 additions & 0 deletions modules/nf-core/rtgtools/pedfilter/tests/nextflow.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
process {
withName: 'RTGTOOLS_PEDFILTER' {
ext.args = "--vcf"
}
}
3 changes: 0 additions & 3 deletions tests/config/pytest_modules.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1241,9 +1241,6 @@ roary:
rtgtools/format:
- modules/nf-core/rtgtools/format/**
- tests/modules/nf-core/rtgtools/format/**
rtgtools/pedfilter:
- modules/nf-core/rtgtools/pedfilter/**
- tests/modules/nf-core/rtgtools/pedfilter/**
rtgtools/vcfeval:
- modules/nf-core/rtgtools/vcfeval/**
- tests/modules/nf-core/rtgtools/vcfeval/**
Expand Down
35 changes: 0 additions & 35 deletions tests/modules/nf-core/rtgtools/pedfilter/main.nf

This file was deleted.

8 changes: 0 additions & 8 deletions tests/modules/nf-core/rtgtools/pedfilter/nextflow.config

This file was deleted.

29 changes: 0 additions & 29 deletions tests/modules/nf-core/rtgtools/pedfilter/test.yml

This file was deleted.

0 comments on commit c1c2a77

Please sign in to comment.