update svdb to version 2.5.2 (#1390)

* update svdb version and tests

* update link
This commit is contained in:
Ramprasad Neethiraj 2022-03-21 10:39:34 +01:00 committed by GitHub
parent e69a4ce4ed
commit 5297d27fbf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 97 additions and 19 deletions

View file

@ -2,10 +2,10 @@ process SVDB_MERGE {
tag "$meta.id" tag "$meta.id"
label 'process_medium' label 'process_medium'
conda (params.enable_conda ? "bioconda::svdb=2.5.0" : null) conda (params.enable_conda ? "bioconda::svdb=2.5.2" : null)
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/svdb:2.5.0--py39hcbe4a3b_0': 'https://depot.galaxyproject.org/singularity/svdb:2.5.2--py39h5371cbf_0':
'quay.io/biocontainers/svdb:2.5.0--py39hcbe4a3b_0' }" 'quay.io/biocontainers/svdb:2.5.2--py39h5371cbf_0' }"
input: input:
tuple val(meta), path(vcfs) tuple val(meta), path(vcfs)

View file

@ -2,36 +2,73 @@ process SVDB_QUERY {
tag "$meta.id" tag "$meta.id"
label 'process_medium' label 'process_medium'
conda (params.enable_conda ? "bioconda::svdb=2.5.0" : null) conda (params.enable_conda ? "bioconda::svdb=2.5.2" : null)
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/svdb:2.5.0--py39hcbe4a3b_0': 'https://depot.galaxyproject.org/singularity/svdb:2.5.2--py39h5371cbf_0':
'quay.io/biocontainers/svdb:2.5.0--py39hcbe4a3b_0' }" 'quay.io/biocontainers/svdb:2.5.2--py39h5371cbf_0' }"
input: input:
tuple val(meta), path(vcf) tuple val(meta), path(vcf)
path (vcf_db) val(in_occs)
val(in_frqs)
val(out_occs)
val(out_frqs)
path (vcf_dbs)
output: output:
tuple val(meta), path("*_ann_svdbq.vcf"), emit: vcf tuple val(meta), path("*_query.vcf"), emit: vcf
path "versions.yml" , emit: versions path "versions.yml" , emit: versions
when: when:
task.ext.when == null || task.ext.when task.ext.when == null || task.ext.when
script: script:
def args = task.ext.args ?: '' def args = task.ext.args ?: ''
def prefix = task.ext.prefix ?: "${meta.id}" def prefix = task.ext.prefix ?: "${meta.id}"
def in_occ = ""
def in_frq = ""
def out_occ = ""
def out_frq = ""
if (in_occs) {
in_occ = "--in_occ ${in_occs.join(',')}"
}
if (in_frqs) {
in_frq = "--in_frq ${in_frqs.join(',')}"
}
if (out_occs) {
out_occ = "--out_occ ${out_occs.join(',')}"
}
if (out_frqs) {
out_frq = "--out_frq ${out_frqs.join(',')}"
}
""" """
svdb \\ svdb \\
--query \\ --query \\
$in_occ \\
$in_frq \\
$out_occ \\
$out_frq \\
$args \\ $args \\
--db $vcf_db \\ --db ${vcf_dbs.join(',')} \\
--query_vcf $vcf \\ --query_vcf $vcf \\
>${prefix}_ann_svdbq.vcf --prefix ${prefix}
cat <<-END_VERSIONS > versions.yml cat <<-END_VERSIONS > versions.yml
"${task.process}": "${task.process}":
svdb: \$( echo \$(svdb) | head -1 | sed 's/usage: SVDB-\\([0-9]\\.[0-9]\\.[0-9]\\).*/\\1/' ) svdb: \$( echo \$(svdb) | head -1 | sed 's/usage: SVDB-\\([0-9]\\.[0-9]\\.[0-9]\\).*/\\1/' )
END_VERSIONS END_VERSIONS
""" """
stub:
def prefix = task.ext.prefix ?: "${meta.id}"
"""
touch ${prefix}_query.vcf
cat <<-END_VERSIONS > versions.yml
"${task.process}":
svdb: \$( echo \$(svdb) | head -1 | sed 's/usage: SVDB-\\([0-9]\\.[0-9]\\.[0-9]\\).*/\\1/' )
END_VERSIONS
"""
} }

View file

@ -15,6 +15,12 @@ input:
description: | description: |
Groovy Map containing sample information Groovy Map containing sample information
e.g. [ id:'test', single_end:false ] e.g. [ id:'test', single_end:false ]
- in_occs:
type: list
description: A list of allele count tags
- in_frqs:
type: list
description: A list of allele frequency tags
- vcf: - vcf:
type: file type: file
description: query vcf file description: query vcf file
@ -34,10 +40,16 @@ output:
type: file type: file
description: File containing software versions description: File containing software versions
pattern: "versions.yml" pattern: "versions.yml"
- out_occs:
type: list
description: A list of allele count tags
- out_frqs:
type: list
description: A list of allele frequency tags
- vcf: - vcf:
type: file type: file
description: Annotated output VCF file description: Annotated output VCF file
pattern: "*_ann_svdbq.vcf" pattern: "*_query.vcf"
authors: authors:
- "@ramprasadn" - "@ramprasadn"

View file

@ -140,6 +140,7 @@ params {
syntheticvcf_short_vcf_gz_tbi = "${test_data_dir}/genomics/homo_sapiens/genome/vcf/syntheticvcf_short.vcf.gz.tbi" syntheticvcf_short_vcf_gz_tbi = "${test_data_dir}/genomics/homo_sapiens/genome/vcf/syntheticvcf_short.vcf.gz.tbi"
syntheticvcf_short_score = "${test_data_dir}/genomics/homo_sapiens/genome/vcf/syntheticvcf_short.score" syntheticvcf_short_score = "${test_data_dir}/genomics/homo_sapiens/genome/vcf/syntheticvcf_short.score"
gnomad_r2_1_1_sv_vcf_gz = "${test_data_dir}/genomics/homo_sapiens/genome/vcf/gnomAD.r2.1.1-sv.vcf.gz" gnomad_r2_1_1_sv_vcf_gz = "${test_data_dir}/genomics/homo_sapiens/genome/vcf/gnomAD.r2.1.1-sv.vcf.gz"
gnomad2_r2_1_1_sv_vcf_gz = "${test_data_dir}/genomics/homo_sapiens/genome/vcf/gnomAD2.r2.1.1-sv.vcf.gz"
hapmap_3_3_hg38_21_vcf_gz = "${test_data_dir}/genomics/homo_sapiens/genome/chr21/germlineresources/hapmap_3.3.hg38.vcf.gz" hapmap_3_3_hg38_21_vcf_gz = "${test_data_dir}/genomics/homo_sapiens/genome/chr21/germlineresources/hapmap_3.3.hg38.vcf.gz"
hapmap_3_3_hg38_21_vcf_gz_tbi = "${test_data_dir}/genomics/homo_sapiens/genome/chr21/germlineresources/hapmap_3.3.hg38.vcf.gz.tbi" hapmap_3_3_hg38_21_vcf_gz_tbi = "${test_data_dir}/genomics/homo_sapiens/genome/chr21/germlineresources/hapmap_3.3.hg38.vcf.gz.tbi"

View file

@ -14,5 +14,29 @@ workflow test_svdb_query {
file(params.test_data['homo_sapiens']['genome']['gnomad_r2_1_1_sv_vcf_gz'], checkIfExists: true) file(params.test_data['homo_sapiens']['genome']['gnomad_r2_1_1_sv_vcf_gz'], checkIfExists: true)
] ]
SVDB_QUERY ( input, vcf_db ) in_occs = ['AC']
in_frqs = ['AF']
out_occs = ['gnomad_svAC']
out_frqs = ['gnomad_svAF']
SVDB_QUERY ( input, in_occs, in_frqs, out_occs, out_frqs, vcf_db )
}
workflow test_svdb_query_multiple {
input = [ [ id:'test' ], // meta map
[ file(params.test_data['homo_sapiens']['illumina']['test_sv_vcf'], checkIfExists: true) ]
]
vcf_db = [
file(params.test_data['homo_sapiens']['genome']['gnomad_r2_1_1_sv_vcf_gz'], checkIfExists: true),
file(params.test_data['homo_sapiens']['genome']['gnomad2_r2_1_1_sv_vcf_gz'], checkIfExists: true)
]
in_occs = ['AC','AC']
in_frqs = ['AF','AF']
out_occs = ['gnomad_svAC','gnomad_svAC']
out_frqs = ['gnomad_svAF','gnomad_svAF']
SVDB_QUERY ( input, in_occs, in_frqs, out_occs, out_frqs, vcf_db )
} }

View file

@ -2,8 +2,4 @@ process {
publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" }
withName: SVDB_QUERY {
ext.args = '--in_occ AC --out_occ gnomad_svAC --in_frq AF --out_frq gnomad_svAF'
}
} }

View file

@ -4,4 +4,12 @@
- svdb - svdb
- svdb/query - svdb/query
files: files:
- path: output/svdb/test_ann_svdbq.vcf - path: output/svdb/test_query.vcf
- name: svdb query multiple
command: nextflow run ./tests/modules/svdb/query -entry test_svdb_query_multiple -c ./tests/config/nextflow.config -c ./tests/modules/svdb/query/nextflow.config
tags:
- svdb
- svdb/query
files:
- path: output/svdb/test_query.vcf