From eb0fde7039adde9a2aa8f8ba925a582a1bd386c1 Mon Sep 17 00:00:00 2001 From: ramprasadn <20065894+ramprasadn@users.noreply.github.com> Date: Fri, 13 Sep 2024 14:44:34 +0200 Subject: [PATCH 1/2] vep110-112 --- modules.json | 4 +- .../ensemblvep/filtervep/environment.yml | 4 +- modules/nf-core/ensemblvep/filtervep/main.nf | 5 +- .../ensemblvep/filtervep/tests/main.nf.test | 136 ++++++++++++++++++ .../filtervep/tests/main.nf.test.snap | 26 ++++ .../filtervep/tests/nextflow.config | 10 ++ .../ensemblvep/filtervep/tests/tab.gz.config | 24 ++++ .../ensemblvep/filtervep/tests/tags.yml | 2 + .../ensemblvep/filtervep/tests/vcf.config | 23 +++ .../nf-core/ensemblvep/vep/environment.yml | 4 +- modules/nf-core/ensemblvep/vep/main.nf | 14 +- .../nf-core/ensemblvep/vep/tests/main.nf.test | 40 ++++-- .../ensemblvep/vep/tests/main.nf.test.snap | 26 ++++ .../ensemblvep/vep/tests/nextflow.config | 11 +- 14 files changed, 291 insertions(+), 38 deletions(-) create mode 100644 modules/nf-core/ensemblvep/filtervep/tests/main.nf.test create mode 100644 modules/nf-core/ensemblvep/filtervep/tests/main.nf.test.snap create mode 100644 modules/nf-core/ensemblvep/filtervep/tests/nextflow.config create mode 100644 modules/nf-core/ensemblvep/filtervep/tests/tab.gz.config create mode 100644 modules/nf-core/ensemblvep/filtervep/tests/tags.yml create mode 100644 modules/nf-core/ensemblvep/filtervep/tests/vcf.config create mode 100644 modules/nf-core/ensemblvep/vep/tests/main.nf.test.snap diff --git a/modules.json b/modules.json index 64ceca8d6..cc525b802 100644 --- a/modules.json +++ b/modules.json @@ -123,12 +123,12 @@ }, "ensemblvep/filtervep": { "branch": "master", - "git_sha": "214d575774c172062924ad3564b4f66655600730", + "git_sha": "06c8865e36741e05ad32ef70ab3fac127486af48", "installed_by": ["modules"] }, "ensemblvep/vep": { "branch": "master", - "git_sha": "76a0696a60c41c57fc5f6040ac31b11ce5d4d8dd", + "git_sha": "06c8865e36741e05ad32ef70ab3fac127486af48", "installed_by": ["modules"] }, "expansionhunter": { diff --git a/modules/nf-core/ensemblvep/filtervep/environment.yml b/modules/nf-core/ensemblvep/filtervep/environment.yml index d84dc89ee..283a45bbd 100644 --- a/modules/nf-core/ensemblvep/filtervep/environment.yml +++ b/modules/nf-core/ensemblvep/filtervep/environment.yml @@ -1,7 +1,5 @@ -name: ensemblvep_filtervep channels: - conda-forge - bioconda - - defaults dependencies: - - bioconda::ensembl-vep=110.0 + - bioconda::ensembl-vep=112.0 diff --git a/modules/nf-core/ensemblvep/filtervep/main.nf b/modules/nf-core/ensemblvep/filtervep/main.nf index 53abf7727..a56bdb832 100644 --- a/modules/nf-core/ensemblvep/filtervep/main.nf +++ b/modules/nf-core/ensemblvep/filtervep/main.nf @@ -4,8 +4,8 @@ process ENSEMBLVEP_FILTERVEP { conda "${moduleDir}/environment.yml" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/ensembl-vep:110.0--pl5321h2a3209d_0' : - 'biocontainers/ensembl-vep:110.0--pl5321h2a3209d_0' }" + 'https://depot.galaxyproject.org/singularity/ensembl-vep:112.0--pl5321h2a3209d_0' : + 'biocontainers/ensembl-vep:112.0--pl5321h2a3209d_0' }" input: tuple val(meta), path(input) @@ -47,4 +47,3 @@ process ENSEMBLVEP_FILTERVEP { END_VERSIONS """ } - diff --git a/modules/nf-core/ensemblvep/filtervep/tests/main.nf.test b/modules/nf-core/ensemblvep/filtervep/tests/main.nf.test new file mode 100644 index 000000000..1852e2ab7 --- /dev/null +++ b/modules/nf-core/ensemblvep/filtervep/tests/main.nf.test @@ -0,0 +1,136 @@ +nextflow_process { + + name "Test Process ENSEMBLVEP_FILTERVEP" + script "../main.nf" + process "ENSEMBLVEP_FILTERVEP" + config "./nextflow.config" + + tag "modules" + tag "modules_nfcore" + tag "ensemblvep" + tag "ensemblvep/vep" + tag "ensemblvep/filtervep" + tag "ensemblvep/download" + + // Test for filtering VCF file + test("test_ensemblvep_filtervep_vcf") { + config "./vcf.config" + + setup { + run("ENSEMBLVEP_DOWNLOAD") { + script "../../download/main.nf" + + process { + """ + input[0] = Channel.of([ + [id:"112_WBcel235"], + params.vep_genome, + params.vep_species, + params.vep_cache_version + ]) + """ + } + } + run("ENSEMBLVEP_VEP") { + script "../../vep/main.nf" + + process { + """ + input[0] = Channel.of([ + [ id:'test' ], // meta map + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test.vcf', checkIfExists: true), + [] + ]) + input[1] = params.vep_genome + input[2] = params.vep_species + input[3] = params.vep_cache_version + input[4] = ENSEMBLVEP_DOWNLOAD.out.cache.map{ meta, cache -> [cache] } + input[5] = Channel.value([ + [id:"fasta"], + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true) + ]) + input[6] = [] + """ + } + } + } + + when { + process { + """ + input[0] = ENSEMBLVEP_VEP.out.vcf + input[1] = [] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out.versions).match() }, + { assert path(process.out.output.get(0).get(1)).readLines().first().contains("##fileformat=VCFv4.2") } + ) + } + } + + // Test for filtering TAB file + test("test_ensemblvep_filtervep_tab_gz") { + config "./tab.gz.config" + + setup { + run("ENSEMBLVEP_DOWNLOAD") { + script "../../download/main.nf" + + process { + """ + input[0] = Channel.of([ + [id:"112_WBcel235"], + params.vep_genome, + params.vep_species, + params.vep_cache_version + ]) + """ + } + } + run("ENSEMBLVEP_VEP") { + script "../../vep/main.nf" + + process { + """ + input[0] = Channel.of([ + [ id:'test' ], // meta map + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test.vcf', checkIfExists: true), + [] + ]) + input[1] = params.vep_genome + input[2] = params.vep_species + input[3] = params.vep_cache_version + input[4] = ENSEMBLVEP_DOWNLOAD.out.cache.map{ meta, cache -> [cache] } + input[5] = Channel.value([ + [id:"fasta"], + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true) + ]) + input[6] = [] + """ + } + } + } + + when { + process { + """ + input[0] = ENSEMBLVEP_VEP.out.tab + input[1] = [] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out.versions).match() }, + { assert path(process.out.output.get(0).get(1)).readLines().first().contains("## ENSEMBL VARIANT EFFECT PREDICTOR v112.0") } + ) + } + } +} diff --git a/modules/nf-core/ensemblvep/filtervep/tests/main.nf.test.snap b/modules/nf-core/ensemblvep/filtervep/tests/main.nf.test.snap new file mode 100644 index 000000000..ddaa1dc1f --- /dev/null +++ b/modules/nf-core/ensemblvep/filtervep/tests/main.nf.test.snap @@ -0,0 +1,26 @@ +{ + "test_ensemblvep_filtervep_vcf": { + "content": [ + [ + "versions.yml:md5,4d3217834548bbe6784e102e9348461d" + ] + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.4" + }, + "timestamp": "2024-09-02T13:38:25.18143" + }, + "test_ensemblvep_filtervep_tab_gz": { + "content": [ + [ + "versions.yml:md5,4d3217834548bbe6784e102e9348461d" + ] + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.4" + }, + "timestamp": "2024-09-02T13:57:11.471669" + } +} \ No newline at end of file diff --git a/modules/nf-core/ensemblvep/filtervep/tests/nextflow.config b/modules/nf-core/ensemblvep/filtervep/tests/nextflow.config new file mode 100644 index 000000000..aee2e62b0 --- /dev/null +++ b/modules/nf-core/ensemblvep/filtervep/tests/nextflow.config @@ -0,0 +1,10 @@ +/* +======================================================================================== + Nextflow config file for running tests +======================================================================================== +*/ +params { + vep_cache_version = "112" + vep_genome = "WBcel235" + vep_species = "caenorhabditis_elegans" +} diff --git a/modules/nf-core/ensemblvep/filtervep/tests/tab.gz.config b/modules/nf-core/ensemblvep/filtervep/tests/tab.gz.config new file mode 100644 index 000000000..0aa5ea752 --- /dev/null +++ b/modules/nf-core/ensemblvep/filtervep/tests/tab.gz.config @@ -0,0 +1,24 @@ +/* +======================================================================================== + Nextflow config file for running tests +======================================================================================== +*/ + +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + + withName: ENSEMBLVEP_DOWNLOAD { + ext.args = '--AUTO c --CONVERT --NO_BIOPERL --NO_HTSLIB --NO_TEST --NO_UPDATE' + } + + withName: ENSEMBLVEP_VEP { + ext.args = '--tab' + ext.prefix = { "${meta.id}_vep" } + } + + withName: ENSEMBLVEP_FILTERVEP { + ext.args = '--filter "Feature_type is Transcript"' + ext.suffix = "tab" + } +} diff --git a/modules/nf-core/ensemblvep/filtervep/tests/tags.yml b/modules/nf-core/ensemblvep/filtervep/tests/tags.yml new file mode 100644 index 000000000..b43bf40d6 --- /dev/null +++ b/modules/nf-core/ensemblvep/filtervep/tests/tags.yml @@ -0,0 +1,2 @@ +ensemblvep/filtervep: + - "modules/nf-core/ensemblvep/filtervep/**" diff --git a/modules/nf-core/ensemblvep/filtervep/tests/vcf.config b/modules/nf-core/ensemblvep/filtervep/tests/vcf.config new file mode 100644 index 000000000..0b65fe5c4 --- /dev/null +++ b/modules/nf-core/ensemblvep/filtervep/tests/vcf.config @@ -0,0 +1,23 @@ +/* +======================================================================================== + Nextflow config file for running tests +======================================================================================== +*/ + +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + + withName: ENSEMBLVEP_DOWNLOAD { + ext.args = '--AUTO c --CONVERT --NO_BIOPERL --NO_HTSLIB --NO_TEST --NO_UPDATE' + } + + withName: ENSEMBLVEP_VEP { + ext.args = '--vcf' + ext.prefix = { "${meta.id}_vep" } + } + + withName: ENSEMBLVEP_FILTERVEP { + ext.args = '--filter "Feature_type is Transcript"' + } +} diff --git a/modules/nf-core/ensemblvep/vep/environment.yml b/modules/nf-core/ensemblvep/vep/environment.yml index 7a1277460..283a45bbd 100644 --- a/modules/nf-core/ensemblvep/vep/environment.yml +++ b/modules/nf-core/ensemblvep/vep/environment.yml @@ -1,7 +1,5 @@ -name: ensemblvep_vep channels: - conda-forge - bioconda - - defaults dependencies: - - bioconda::ensembl-vep=110.0 + - bioconda::ensembl-vep=112.0 diff --git a/modules/nf-core/ensemblvep/vep/main.nf b/modules/nf-core/ensemblvep/vep/main.nf index a7fc5ad1f..5f33265b0 100644 --- a/modules/nf-core/ensemblvep/vep/main.nf +++ b/modules/nf-core/ensemblvep/vep/main.nf @@ -4,8 +4,8 @@ process ENSEMBLVEP_VEP { conda "${moduleDir}/environment.yml" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/ensembl-vep:110.0--pl5321h2a3209d_0' : - 'biocontainers/ensembl-vep:110.0--pl5321h2a3209d_0' }" + 'https://depot.galaxyproject.org/singularity/ensembl-vep:112.0--pl5321h2a3209d_0' : + 'biocontainers/ensembl-vep:112.0--pl5321h2a3209d_0' }" input: tuple val(meta), path(vcf), path(custom_extra_files) @@ -20,7 +20,7 @@ process ENSEMBLVEP_VEP { tuple val(meta), path("*.vcf.gz") , optional:true, emit: vcf tuple val(meta), path("*.tab.gz") , optional:true, emit: tab tuple val(meta), path("*.json.gz") , optional:true, emit: json - path "*.summary.html" , optional:true, emit: report + path "*.html" , optional:true, emit: report path "versions.yml" , emit: versions when: @@ -57,10 +57,10 @@ process ENSEMBLVEP_VEP { stub: def prefix = task.ext.prefix ?: "${meta.id}" """ - touch ${prefix}.vcf.gz - touch ${prefix}.tab.gz - touch ${prefix}.json.gz - touch ${prefix}.summary.html + echo "" | gzip > ${prefix}.vcf.gz + echo "" | gzip > ${prefix}.tab.gz + echo "" | gzip > ${prefix}.json.gz + touch ${prefix}_summary.html cat <<-END_VERSIONS > versions.yml "${task.process}": diff --git a/modules/nf-core/ensemblvep/vep/tests/main.nf.test b/modules/nf-core/ensemblvep/vep/tests/main.nf.test index f072dcabd..e68fff3c0 100644 --- a/modules/nf-core/ensemblvep/vep/tests/main.nf.test +++ b/modules/nf-core/ensemblvep/vep/tests/main.nf.test @@ -1,26 +1,31 @@ nextflow_process { name "Test Process ENSEMBLVEP_VEP" - script "modules/nf-core/ensemblvep/vep/main.nf" + script "../main.nf" process "ENSEMBLVEP_VEP" config "./nextflow.config" + tag "modules" tag "modules_nfcore" tag "ensemblvep" tag "ensemblvep/vep" tag "ensemblvep/download" - test("test_ensemblvep_vep_fasta_vcf") { - config "./vcf.config" setup { run("ENSEMBLVEP_DOWNLOAD") { script "../../download/main.nf" + process { """ - input[0] = Channel.of([[id:"${params.vep_cache_version}_${params.vep_genome}"], params.vep_genome, params.vep_species, params.vep_cache_version]) + input[0] = Channel.of([ + [id:"112_WBcel235"], + params.vep_genome, + params.vep_species, + params.vep_cache_version + ]) """ } } @@ -31,7 +36,7 @@ nextflow_process { """ input[0] = Channel.of([ [ id:'test' ], // meta map - file(params.test_data['sarscov2']['illumina']['test_vcf'], checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test.vcf', checkIfExists: true), [] ]) input[1] = params.vep_genome @@ -40,7 +45,7 @@ nextflow_process { input[4] = ENSEMBLVEP_DOWNLOAD.out.cache.map{ meta, cache -> [cache] } input[5] = Channel.value([ [id:"fasta"], - file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true) ]) input[6] = [] """ @@ -49,23 +54,29 @@ nextflow_process { then { assertAll( - {assert process.success}, - {assert path(process.out.vcf.get(0).get(1)).linesGzip.contains("##fileformat=VCFv4.2")} + { assert process.success }, + { assert snapshot(process.out.versions).match() }, + { assert path(process.out.vcf.get(0).get(1)).linesGzip.contains("##fileformat=VCFv4.2") } ) } } test("test_ensemblvep_vep_fasta_tab_gz") { - config "./tab.gz.config" setup { run("ENSEMBLVEP_DOWNLOAD") { script "../../download/main.nf" + process { """ - input[0] = Channel.of([[id:"${params.vep_cache_version}_${params.vep_genome}"], params.vep_genome, params.vep_species, params.vep_cache_version]) + input[0] = Channel.of([ + [id:"112_WBcel235"], + params.vep_genome, + params.vep_species, + params.vep_cache_version + ]) """ } } @@ -76,7 +87,7 @@ nextflow_process { """ input[0] = Channel.of([ [ id:'test' ], // meta map - file(params.test_data['sarscov2']['illumina']['test_vcf'], checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test.vcf', checkIfExists: true), [] ]) input[1] = params.vep_genome @@ -85,7 +96,7 @@ nextflow_process { input[4] = ENSEMBLVEP_DOWNLOAD.out.cache.map{ meta, cache -> [cache] } input[5] = Channel.value([ [id:"fasta"], - file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true) ]) input[6] = [] """ @@ -94,8 +105,9 @@ nextflow_process { then { assertAll( - {assert process.success}, - {assert path(process.out.tab.get(0).get(1)).linesGzip.contains("## ENSEMBL VARIANT EFFECT PREDICTOR v110.0")} + { assert process.success }, + { assert snapshot(process.out.versions).match() }, + { assert path(process.out.tab.get(0).get(1)).linesGzip.contains("## ENSEMBL VARIANT EFFECT PREDICTOR v112.0") } ) } } diff --git a/modules/nf-core/ensemblvep/vep/tests/main.nf.test.snap b/modules/nf-core/ensemblvep/vep/tests/main.nf.test.snap new file mode 100644 index 000000000..1c4c0e4e9 --- /dev/null +++ b/modules/nf-core/ensemblvep/vep/tests/main.nf.test.snap @@ -0,0 +1,26 @@ +{ + "test_ensemblvep_vep_fasta_tab_gz": { + "content": [ + [ + "versions.yml:md5,d06f1eb60f534489026d682eb3aa5559" + ] + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.4" + }, + "timestamp": "2024-09-02T10:15:18.228927" + }, + "test_ensemblvep_vep_fasta_vcf": { + "content": [ + [ + "versions.yml:md5,d06f1eb60f534489026d682eb3aa5559" + ] + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.4" + }, + "timestamp": "2024-09-02T10:14:50.193861" + } +} \ No newline at end of file diff --git a/modules/nf-core/ensemblvep/vep/tests/nextflow.config b/modules/nf-core/ensemblvep/vep/tests/nextflow.config index cfaef7331..9aa481645 100644 --- a/modules/nf-core/ensemblvep/vep/tests/nextflow.config +++ b/modules/nf-core/ensemblvep/vep/tests/nextflow.config @@ -1,13 +1,12 @@ params { - vep_cache_version = "110" - vep_genome = "WBcel235" - vep_species = "caenorhabditis_elegans" + vep_cache_version = "112" + vep_genome = "WBcel235" + vep_species = "caenorhabditis_elegans" } process { - withName: ENSEMBLVEP_DOWNLOAD { - ext.args = '--AUTO c --CONVERT --NO_BIOPERL --NO_HTSLIB --NO_TEST --NO_UPDATE' + ext.args = '--AUTO c --CONVERT --NO_BIOPERL --NO_HTSLIB --NO_TEST --NO_UPDATE' + ext.prefix = { "${params.vep_cache_version}_${params.vep_genome}" } } - } From 0f41135bb9d6df32b46640d92eb27e544c3e0f16 Mon Sep 17 00:00:00 2001 From: ramprasadn <20065894+ramprasadn@users.noreply.github.com> Date: Fri, 13 Sep 2024 14:46:21 +0200 Subject: [PATCH 2/2] update changelog --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 393092326..79c1b7cae 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -21,6 +21,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### `Changed` +- Update default vep container from v110-v112 [#609](https://github.com/nf-core/raredisease/pull/609) - Default index for vcfanno extra annotation files from tbi to csi [#606](https://github.com/nf-core/raredisease/pull/606) - Updated the model for Sentieon DNAScope to v1.1 [#601](https://github.com/nf-core/raredisease/pull/601) - bwameme can no longer be used to align mitochondrial reads [#600](https://github.com/nf-core/raredisease/pull/600) @@ -70,6 +71,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 | Tool | Old version | New version | | ----------- | ----------- | ----------- | | Deepvariant | 1.5.0 | 1.6.1 | +| ensemblvep | 110 | 112 | ## 2.1.0 - Obelix [2024-05-29]