2021-07-06 12:11:11 +00:00
|
|
|
process ENSEMBLVEP {
|
2021-12-07 09:30:35 +00:00
|
|
|
tag "$meta.id"
|
2021-07-06 12:11:11 +00:00
|
|
|
label 'process_medium'
|
|
|
|
|
|
|
|
conda (params.enable_conda ? "bioconda::ensembl-vep=104.3" : null)
|
2021-12-07 10:18:12 +00:00
|
|
|
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
|
|
|
|
'https://depot.galaxyproject.org/singularity/ensembl-vep:104.3--pl5262h4a94de4_0' :
|
|
|
|
'quay.io/biocontainers/ensembl-vep:104.3--pl5262h4a94de4_0' }"
|
2021-07-06 12:11:11 +00:00
|
|
|
|
|
|
|
input:
|
|
|
|
tuple val(meta), path(vcf)
|
|
|
|
val genome
|
|
|
|
val species
|
|
|
|
val cache_version
|
|
|
|
path cache
|
2022-05-05 10:57:14 +00:00
|
|
|
path extra_files
|
2021-07-06 12:11:11 +00:00
|
|
|
|
|
|
|
output:
|
|
|
|
tuple val(meta), path("*.ann.vcf"), emit: vcf
|
|
|
|
path "*.summary.html" , emit: report
|
2021-10-01 13:04:56 +00:00
|
|
|
path "versions.yml" , emit: versions
|
2021-07-06 12:11:11 +00:00
|
|
|
|
2022-02-04 08:53:32 +00:00
|
|
|
when:
|
|
|
|
task.ext.when == null || task.ext.when
|
|
|
|
|
2021-07-06 12:11:11 +00:00
|
|
|
script:
|
2021-11-26 07:58:40 +00:00
|
|
|
def args = task.ext.args ?: ''
|
2021-12-02 12:39:55 +00:00
|
|
|
def prefix = task.ext.prefix ?: "${meta.id}"
|
2021-12-06 11:59:49 +00:00
|
|
|
def dir_cache = cache ? "\${PWD}/${cache}" : "/.vep"
|
2021-07-06 12:11:11 +00:00
|
|
|
"""
|
|
|
|
mkdir $prefix
|
|
|
|
|
|
|
|
vep \\
|
|
|
|
-i $vcf \\
|
|
|
|
-o ${prefix}.ann.vcf \\
|
2021-11-26 07:58:40 +00:00
|
|
|
$args \\
|
2021-07-06 12:11:11 +00:00
|
|
|
--assembly $genome \\
|
|
|
|
--species $species \\
|
|
|
|
--cache \\
|
|
|
|
--cache_version $cache_version \\
|
|
|
|
--dir_cache $dir_cache \\
|
|
|
|
--fork $task.cpus \\
|
2021-12-06 11:59:49 +00:00
|
|
|
--vcf \\
|
2021-07-06 12:11:11 +00:00
|
|
|
--stats_file ${prefix}.summary.html
|
|
|
|
|
|
|
|
rm -rf $prefix
|
|
|
|
|
2021-09-27 08:41:24 +00:00
|
|
|
cat <<-END_VERSIONS > versions.yml
|
2021-11-26 07:58:40 +00:00
|
|
|
"${task.process}":
|
|
|
|
ensemblvep: \$( echo \$(vep --help 2>&1) | sed 's/^.*Versions:.*ensembl-vep : //;s/ .*\$//')
|
2021-09-27 08:41:24 +00:00
|
|
|
END_VERSIONS
|
2021-07-06 12:11:11 +00:00
|
|
|
"""
|
|
|
|
}
|