2022-04-27 09:12:58 +00:00
|
|
|
process VARDICTJAVA {
|
|
|
|
tag "$meta.id"
|
|
|
|
label 'process_medium'
|
|
|
|
|
|
|
|
conda (params.enable_conda ? "bioconda::vardict-java=1.8.3" : null)
|
|
|
|
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
|
|
|
|
'https://depot.galaxyproject.org/singularity/vardict-java:1.8.3--hdfd78af_0':
|
|
|
|
'quay.io/biocontainers/vardict-java:1.8.3--hdfd78af_0' }"
|
|
|
|
|
|
|
|
input:
|
2022-05-03 13:31:05 +00:00
|
|
|
tuple val(meta), path(bam), path(bai), path(bed)
|
2022-08-10 12:13:03 +00:00
|
|
|
path(fasta)
|
|
|
|
path(fasta_fai)
|
2022-04-27 09:12:58 +00:00
|
|
|
|
|
|
|
output:
|
2022-04-28 08:23:07 +00:00
|
|
|
tuple val(meta), path("*.vcf.gz"), emit: vcf
|
2022-04-28 12:29:37 +00:00
|
|
|
path "versions.yml" , emit: versions
|
2022-04-27 09:12:58 +00:00
|
|
|
|
|
|
|
when:
|
|
|
|
task.ext.when == null || task.ext.when
|
|
|
|
|
|
|
|
script:
|
|
|
|
def args = task.ext.args ?: ''
|
2022-04-28 14:38:49 +00:00
|
|
|
def args2 = task.ext.args2 ?: ''
|
2022-04-27 09:12:58 +00:00
|
|
|
def prefix = task.ext.prefix ?: "${meta.id}"
|
|
|
|
"""
|
2022-08-10 12:13:03 +00:00
|
|
|
export JAVA_OPTS='"-Xms${task.memory.toMega()/4}m" "-Xmx${task.memory.toGiga()}g" "-Dsamjdk.reference_fasta=$fasta"'
|
2022-04-27 09:12:58 +00:00
|
|
|
vardict-java \\
|
|
|
|
$args \\
|
2022-04-28 13:33:27 +00:00
|
|
|
-c 1 -S 2 -E 3 \\
|
2022-04-27 09:12:58 +00:00
|
|
|
-b $bam \\
|
|
|
|
-th $task.cpus \\
|
2022-04-28 07:18:15 +00:00
|
|
|
-N $prefix \\
|
2022-05-03 06:29:46 +00:00
|
|
|
-G $fasta \\
|
|
|
|
$bed \\
|
2022-04-28 13:33:27 +00:00
|
|
|
| teststrandbias.R \\
|
|
|
|
| var2vcf_valid.pl \\
|
2022-04-28 14:38:49 +00:00
|
|
|
$args2 \\
|
2022-04-28 13:33:27 +00:00
|
|
|
-N $prefix \\
|
2022-04-28 07:28:57 +00:00
|
|
|
| gzip -c > ${prefix}.vcf.gz
|
2022-04-27 09:12:58 +00:00
|
|
|
|
|
|
|
cat <<-END_VERSIONS > versions.yml
|
|
|
|
"${task.process}":
|
2022-08-10 12:13:03 +00:00
|
|
|
vardict-java: \$( realpath \$( command -v vardict-java ) | sed 's/.*java-//;s/-.*//' )
|
|
|
|
var2vcf_valid.pl: \$( var2vcf_valid.pl -h | sed '2!d;s/.* //' )
|
2022-04-27 09:12:58 +00:00
|
|
|
END_VERSIONS
|
|
|
|
"""
|
|
|
|
}
|