diff --git a/.github/conda_skip.yml b/.github/conda_skip.yml index fa3c980098d..839cc138ada 100644 --- a/.github/conda_skip.yml +++ b/.github/conda_skip.yml @@ -184,3 +184,5 @@ exclude: path: modules/nf-core/xeniumranger/import-segmentation - profile: conda path: modules/nf-core/parabricks/dbsnp + - profile: conda + path: modules/nf-core/parabricks/genotypegvcf diff --git a/modules/nf-core/parabricks/genotypegvcf/main.nf b/modules/nf-core/parabricks/genotypegvcf/main.nf index d94926bff8f..4ad7985cd6e 100644 --- a/modules/nf-core/parabricks/genotypegvcf/main.nf +++ b/modules/nf-core/parabricks/genotypegvcf/main.nf @@ -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) @@ -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." @@ -26,7 +25,6 @@ process PARABRICKS_GENOTYPEGVCF { def prefix = task.ext.prefix ?: "${meta.id}" def output_file = "${prefix}.vcf" """ - pbrun \\ genotypegvcf \\ --ref $fasta \\ diff --git a/modules/nf-core/parabricks/genotypegvcf/tests/main.nf.test b/modules/nf-core/parabricks/genotypegvcf/tests/main.nf.test new file mode 100644 index 00000000000..8d12071a215 --- /dev/null +++ b/modules/nf-core/parabricks/genotypegvcf/tests/main.nf.test @@ -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() } + ) + } + + } + +} diff --git a/modules/nf-core/parabricks/genotypegvcf/tests/main.nf.test.snap b/modules/nf-core/parabricks/genotypegvcf/tests/main.nf.test.snap new file mode 100644 index 00000000000..f53d217e3a8 --- /dev/null +++ b/modules/nf-core/parabricks/genotypegvcf/tests/main.nf.test.snap @@ -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" + } +} \ No newline at end of file diff --git a/tests/config/pytest_modules.yml b/tests/config/pytest_modules.yml index c6ce163142f..1fa73fc197c 100644 --- a/tests/config/pytest_modules.yml +++ b/tests/config/pytest_modules.yml @@ -398,9 +398,6 @@ oncocnv: 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/** diff --git a/tests/modules/nf-core/parabricks/genotypegvcf/main.nf b/tests/modules/nf-core/parabricks/genotypegvcf/main.nf deleted file mode 100644 index 05788342dc0..00000000000 --- a/tests/modules/nf-core/parabricks/genotypegvcf/main.nf +++ /dev/null @@ -1,32 +0,0 @@ -#!/usr/bin/env nextflow - -nextflow.enable.dsl = 2 - -include { PARABRICKS_GENOTYPEGVCF } from '../../../../../modules/nf-core/parabricks/genotypegvcf/main.nf' - -workflow test_parabricks_genotypegvcf { - - input = [ - [ id:'test', single_end:false ], // meta map - file(params.test_data['homo_sapiens']['illumina']['test_genome_vcf'], checkIfExists: true) - ] - fasta = [ - [ id:'test'], - file(params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true) - ] - - process stage { - input: - tuple val(meta), path(input) - - output: - tuple val(meta), path("*.g.vcf") - - script: - """ - mv $input test.genome.g.vcf - """ - } - - PARABRICKS_GENOTYPEGVCF ( stage( input ), fasta ) -} diff --git a/tests/modules/nf-core/parabricks/genotypegvcf/nextflow.config b/tests/modules/nf-core/parabricks/genotypegvcf/nextflow.config deleted file mode 100644 index 50f50a7a357..00000000000 --- a/tests/modules/nf-core/parabricks/genotypegvcf/nextflow.config +++ /dev/null @@ -1,5 +0,0 @@ -process { - - publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } - -} \ No newline at end of file diff --git a/tests/modules/nf-core/parabricks/genotypegvcf/test.yml b/tests/modules/nf-core/parabricks/genotypegvcf/test.yml deleted file mode 100644 index 0943312b81c..00000000000 --- a/tests/modules/nf-core/parabricks/genotypegvcf/test.yml +++ /dev/null @@ -1,10 +0,0 @@ -- name: parabricks genotypegvcf test_parabricks_genotypegvcf - command: nextflow run ./tests/modules/nf-core/parabricks/genotypegvcf -entry test_parabricks_genotypegvcf -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/parabricks/genotypegvcf/nextflow.config -stub-run - tags: - - parabricks - - parabricks/genotypegvcf - files: - - path: output/parabricks/test.vcf - should_exist: true - - path: output/parabricks/versions.yml - should_exist: true diff --git a/tests/modules/nf-core/parabricks/genotypegvcf/test_GPU_config.txt b/tests/modules/nf-core/parabricks/genotypegvcf/test_GPU_config.txt deleted file mode 100644 index 2c916c20501..00000000000 --- a/tests/modules/nf-core/parabricks/genotypegvcf/test_GPU_config.txt +++ /dev/null @@ -1,9 +0,0 @@ -process { - - publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } - memory = "15.GB" - cpus = 4 - accelerator = 1 -} -docker.runOptions = "--gpus all" -singularity.runOptions = "--nv" \ No newline at end of file diff --git a/tests/modules/nf-core/parabricks/genotypegvcf/test_GPU_yml.txt b/tests/modules/nf-core/parabricks/genotypegvcf/test_GPU_yml.txt deleted file mode 100644 index 89e890b8136..00000000000 --- a/tests/modules/nf-core/parabricks/genotypegvcf/test_GPU_yml.txt +++ /dev/null @@ -1,10 +0,0 @@ -- name: parabricks genotypegvcf test_parabricks_genotypegvcf - command: nextflow run ./tests/modules/nf-core/parabricks/genotypegvcf -entry test_parabricks_genotypegvcf -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/parabricks/genotypegvcf/nextflow.config - tags: - - parabricks - - parabricks/genotypegvcf - files: - - path: output/parabricks/test.vcf - md5sum: e4ca0133b93c3c8e8469b817dcb34052 - - path: output/parabricks/versions.yml - should_exist: true