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

port parabricks/genotypegvcf to nf-test #6980

Merged
merged 14 commits into from
Dec 10, 2024
2 changes: 2 additions & 0 deletions .github/conda_skip.yml
Original file line number Diff line number Diff line change
Expand Up @@ -182,3 +182,5 @@ exclude:
path: modules/nf-core/xeniumranger/resegment
- profile: conda
path: modules/nf-core/xeniumranger/import-segmentation
- profile: conda
path: modules/nf-core/parabricks/genotypegvcf
4 changes: 1 addition & 3 deletions modules/nf-core/parabricks/genotypegvcf/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ process PARABRICKS_GENOTYPEGVCF {
tag "$meta.id"
label 'process_high'

container "nvcr.io/nvidia/clara/clara-parabricks:4.3.0-1"
container "nvcr.io/nvidia/clara/clara-parabricks:4.4.0-1"

input:
tuple val(meta), path(input)
Expand All @@ -16,7 +16,6 @@ process PARABRICKS_GENOTYPEGVCF {
task.ext.when == null || task.ext.when

script:

// Exit if running this module with -profile conda / -profile mamba
if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) {
exit 1, "Parabricks module does not support Conda. Please use Docker / Singularity / Podman instead."
Expand All @@ -26,7 +25,6 @@ process PARABRICKS_GENOTYPEGVCF {
def prefix = task.ext.prefix ?: "${meta.id}"
def output_file = "${prefix}.vcf"
"""

pbrun \\
genotypegvcf \\
--ref $fasta \\
Expand Down
70 changes: 70 additions & 0 deletions modules/nf-core/parabricks/genotypegvcf/tests/main.nf.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
nextflow_process {

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

tag "modules"
tag "modules_nfcore"
tag "parabricks"
tag "parabricks/genotypegvcf"
tag "gpu"

test("human - gvcf") {

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

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

}

test("human - gvf - stub") {

options "-stub"

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

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

}

}
50 changes: 50 additions & 0 deletions modules/nf-core/parabricks/genotypegvcf/tests/main.nf.test.snap
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
{
"human - gvcf": {
"content": [
"da770258f27bf3837c38769e9dfb1df3",
[
"versions.yml:md5,34667e15df7f35f16f97eaea3d257e7c"
]
],
"meta": {
"nf-test": "0.9.2",
"nextflow": "24.10.0"
},
"timestamp": "2024-11-13T12:09:42.000067144"
},
"human - gvf - stub": {
"content": [
{
"0": [
[
{
"id": "test",
"single_end": false
},
"test.vcf:md5,d41d8cd98f00b204e9800998ecf8427e"
]
],
"1": [
"versions.yml:md5,34667e15df7f35f16f97eaea3d257e7c"
],
"vcf": [
[
{
"id": "test",
"single_end": false
},
"test.vcf:md5,d41d8cd98f00b204e9800998ecf8427e"
]
],
"versions": [
"versions.yml:md5,34667e15df7f35f16f97eaea3d257e7c"
]
}
],
"meta": {
"nf-test": "0.9.2",
"nextflow": "24.10.0"
},
"timestamp": "2024-11-13T11:09:01.981995733"
}
}
3 changes: 0 additions & 3 deletions tests/config/pytest_modules.yml
Original file line number Diff line number Diff line change
Expand Up @@ -401,9 +401,6 @@ parabricks/dbsnp:
parabricks/deepvariant:
- modules/nf-core/parabricks/deepvariant/**
- tests/modules/nf-core/parabricks/deepvariant/**
parabricks/genotypegvcf:
- modules/nf-core/parabricks/genotypegvcf/**
- tests/modules/nf-core/parabricks/genotypegvcf/**
parabricks/haplotypecaller:
- modules/nf-core/parabricks/haplotypecaller/**
- tests/modules/nf-core/parabricks/haplotypecaller/**
Expand Down
32 changes: 0 additions & 32 deletions tests/modules/nf-core/parabricks/genotypegvcf/main.nf

This file was deleted.

5 changes: 0 additions & 5 deletions tests/modules/nf-core/parabricks/genotypegvcf/nextflow.config

This file was deleted.

10 changes: 0 additions & 10 deletions tests/modules/nf-core/parabricks/genotypegvcf/test.yml

This file was deleted.

This file was deleted.

10 changes: 0 additions & 10 deletions tests/modules/nf-core/parabricks/genotypegvcf/test_GPU_yml.txt

This file was deleted.

Loading