mirror of
https://github.com/MillironX/nf-core_modules.git
synced 2024-12-22 11:08:17 +00:00
update svdb to version 2.5.2 (#1390)
* update svdb version and tests * update link
This commit is contained in:
parent
e69a4ce4ed
commit
5297d27fbf
7 changed files with 97 additions and 19 deletions
|
@ -2,10 +2,10 @@ process SVDB_MERGE {
|
|||
tag "$meta.id"
|
||||
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 ?
|
||||
'https://depot.galaxyproject.org/singularity/svdb:2.5.0--py39hcbe4a3b_0':
|
||||
'quay.io/biocontainers/svdb:2.5.0--py39hcbe4a3b_0' }"
|
||||
'https://depot.galaxyproject.org/singularity/svdb:2.5.2--py39h5371cbf_0':
|
||||
'quay.io/biocontainers/svdb:2.5.2--py39h5371cbf_0' }"
|
||||
|
||||
input:
|
||||
tuple val(meta), path(vcfs)
|
||||
|
|
|
@ -2,36 +2,73 @@ process SVDB_QUERY {
|
|||
tag "$meta.id"
|
||||
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 ?
|
||||
'https://depot.galaxyproject.org/singularity/svdb:2.5.0--py39hcbe4a3b_0':
|
||||
'quay.io/biocontainers/svdb:2.5.0--py39hcbe4a3b_0' }"
|
||||
'https://depot.galaxyproject.org/singularity/svdb:2.5.2--py39h5371cbf_0':
|
||||
'quay.io/biocontainers/svdb:2.5.2--py39h5371cbf_0' }"
|
||||
|
||||
input:
|
||||
tuple val(meta), path(vcf)
|
||||
path (vcf_db)
|
||||
val(in_occs)
|
||||
val(in_frqs)
|
||||
val(out_occs)
|
||||
val(out_frqs)
|
||||
path (vcf_dbs)
|
||||
|
||||
output:
|
||||
tuple val(meta), path("*_ann_svdbq.vcf"), emit: vcf
|
||||
tuple val(meta), path("*_query.vcf"), emit: vcf
|
||||
path "versions.yml" , emit: versions
|
||||
|
||||
when:
|
||||
task.ext.when == null || task.ext.when
|
||||
|
||||
script:
|
||||
def args = task.ext.args ?: ''
|
||||
def prefix = task.ext.prefix ?: "${meta.id}"
|
||||
def args = task.ext.args ?: ''
|
||||
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 \\
|
||||
--query \\
|
||||
$in_occ \\
|
||||
$in_frq \\
|
||||
$out_occ \\
|
||||
$out_frq \\
|
||||
$args \\
|
||||
--db $vcf_db \\
|
||||
--db ${vcf_dbs.join(',')} \\
|
||||
--query_vcf $vcf \\
|
||||
>${prefix}_ann_svdbq.vcf
|
||||
--prefix ${prefix}
|
||||
|
||||
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
|
||||
"""
|
||||
|
||||
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
|
||||
"""
|
||||
|
||||
}
|
||||
|
|
|
@ -15,6 +15,12 @@ input:
|
|||
description: |
|
||||
Groovy Map containing sample information
|
||||
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:
|
||||
type: file
|
||||
description: query vcf file
|
||||
|
@ -34,10 +40,16 @@ output:
|
|||
type: file
|
||||
description: File containing software versions
|
||||
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:
|
||||
type: file
|
||||
description: Annotated output VCF file
|
||||
pattern: "*_ann_svdbq.vcf"
|
||||
pattern: "*_query.vcf"
|
||||
|
||||
authors:
|
||||
- "@ramprasadn"
|
||||
|
|
|
@ -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_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"
|
||||
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_tbi = "${test_data_dir}/genomics/homo_sapiens/genome/chr21/germlineresources/hapmap_3.3.hg38.vcf.gz.tbi"
|
||||
|
|
|
@ -14,5 +14,29 @@ workflow test_svdb_query {
|
|||
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 )
|
||||
}
|
||||
|
|
|
@ -2,8 +2,4 @@ process {
|
|||
|
||||
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'
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -4,4 +4,12 @@
|
|||
- svdb
|
||||
- svdb/query
|
||||
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
|
||||
|
|
Loading…
Reference in a new issue