Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added nf-test for verifybamid/verifybamid #6242

Merged
merged 2 commits into from
Aug 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion modules/nf-core/verifybamid/verifybamid/environment.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: VERIFYBAMID_VERIFYBAMID
name: verifybamid_verifybamid
channels:
- conda-forge
- bioconda
Expand Down
4 changes: 2 additions & 2 deletions modules/nf-core/verifybamid/verifybamid/meta.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: "VERIFYBAMID_VERIFYBAMID"
name: "verifybamid_verifybamid"
description: Detecting and estimating inter-sample DNA contamination became a crucial quality assessment step to ensure high quality sequence reads and reliable downstream analysis.
keywords:
- qc
Expand All @@ -11,7 +11,7 @@ tools:
documentation: "http://genome.sph.umich.edu/wiki/VerifyBamID"
tool_dev_url: "https://github.com/statgen/verifyBamID"
doi: "10.1016/j.ajhg.2012.09.004"
licence: "['GPL v3']"
licence: ["GPL v3"]
input:
- meta:
type: map
Expand Down
44 changes: 44 additions & 0 deletions modules/nf-core/verifybamid/verifybamid/tests/main.nf.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@

nextflow_process {

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

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

test("test-verifybamid-verifybamid") {

when {
process {
"""
input[0] = [ [ id:'test', single_end:false ], // meta map
file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/bam/test.paired_end.sorted.bam', checkIfExists: true),
file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/bam/test.paired_end.sorted.bam.bai', checkIfExists: true)
]
input[1] = file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/vcf/genmod.vcf.gz', checkIfExists: true)

"""
}
}

then {
assertAll(
{ assert process.success },
{ assert snapshot(
file(process.out.log[0][1]).name,
process.out.depthrg,
process.out.depthsm,
process.out.selfrg,
process.out.selfsm,
process.out.versions,
).match() }
)
}
}

}
51 changes: 51 additions & 0 deletions modules/nf-core/verifybamid/verifybamid/tests/main.nf.test.snap
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
{
"test-verifybamid-verifybamid": {
"content": [
"test.log",
[
[
{
"id": "test",
"single_end": false
},
"test.depthRG:md5,2374504c4138c04f3b29210dcb3da96f"
]
],
[
[
{
"id": "test",
"single_end": false
},
"test.depthSM:md5,4f5367f2be8567b95b57278b2e7372c3"
]
],
[
[
{
"id": "test",
"single_end": false
},
"test.selfRG:md5,3772283d3eaa88683f562a2157b92d55"
]
],
[
[
{
"id": "test",
"single_end": false
},
"test.selfSM:md5,5d2808d70f76e2f753b670fc9b2a6d55"
]
],
[
"versions.yml:md5,36b44d66ecfdbef7191f47a33f688b7f"
]
],
"meta": {
"nf-test": "0.8.4",
"nextflow": "24.04.4"
},
"timestamp": "2024-08-22T17:54:07.273193"
}
}
3 changes: 3 additions & 0 deletions modules/nf-core/verifybamid/verifybamid/tests/nextflow.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
process {
ext.args = '--ignoreRG'
}
3 changes: 0 additions & 3 deletions tests/config/pytest_modules.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1641,9 +1641,6 @@ vcflib/vcffilter:
vcflib/vcfuniq:
- modules/nf-core/vcflib/vcfuniq/**
- tests/modules/nf-core/vcflib/vcfuniq/**
verifybamid/verifybamid:
- modules/nf-core/verifybamid/verifybamid/**
- tests/modules/nf-core/verifybamid/verifybamid/**
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/verifybamid/verifybamid/main.nf

This file was deleted.

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

This file was deleted.

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

This file was deleted.

Loading