forked from biowdl/tasks
-
Notifications
You must be signed in to change notification settings - Fork 0
/
vardict.wdl
73 lines (64 loc) · 2 KB
/
vardict.wdl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
version 1.0
import "common.wdl"
task VarDict {
input {
String tumorSampleName
File tumorBam
File tumorBamIndex
String? normalSampleName
File? normalBam
File? normalBamIndex
File referenceFasta
File referenceFastaFai
File bedFile
String outputVcf
Int chromosomeColumn = 1
Int startColumn = 2
Int endColumn = 3
Int geneColumn = 4
Boolean outputCandidateSomaticOnly = true
Boolean outputAllVariantsAtSamePosition = true
Float mappingQuality = 20
Int minimumTotalDepth = 8
Int minimumVariantDepth = 4
Float minimumAlleleFrequency = 0.02
Int threads = 1
Int memory = 16
Float memoryMultiplier = 2.5
String dockerImage = "quay.io/biocontainers/vardict-java:1.5.8--1"
}
command {
set -e -o pipefail
export JAVA_OPTS="-Xmx~{memory}G"
vardict-java \
~{"-th " + threads} \
-G ~{referenceFasta} \
-N ~{tumorSampleName} \
-b "~{tumorBam}~{"|" + normalBam}" \
~{true="" false="-z" defined(normalBam)} \
-c ~{chromosomeColumn} \
-S ~{startColumn} \
-E ~{endColumn} \
-g ~{geneColumn} \
~{bedFile} | \
~{true="testsomatic.R" false="teststrandbias.R" defined(normalBam)} | \
~{true="var2vcf_paired.pl" false="var2vcf_valid.pl" defined(normalBam)} \
-N "~{tumorSampleName}~{"|" + normalSampleName}" \
~{true="" false="-E" defined(normalBam)} \
~{true="-M" false="" outputCandidateSomaticOnly} \
~{true="-A" false="" outputAllVariantsAtSamePosition} \
-Q ~{mappingQuality} \
-d ~{minimumTotalDepth} \
-v ~{minimumVariantDepth} \
-f ~{minimumAlleleFrequency} \
> ~{outputVcf}
}
output {
File vcfFile = outputVcf
}
runtime {
cpu: threads + 2
memory: ceil(memory * memoryMultiplier)
docker: dockerImage
}
}