-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathSvABA.wdl
135 lines (111 loc) · 3.59 KB
/
SvABA.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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
version 1.0
task svabaCall{
input {
File queryBAM
File queryIndex
File? normalBAM
File? normalIndex
File reference
File refFAIndex
File refBWTIndex
File refSAIndex
File refANNIndex
File refAMBIndex
File refPACIndex
String id
Int threads = 2
File? regions
File? dbSNPVCF
Int sizeAll
Int memoryin = 32
String runMode
Boolean SaveAlignments = false # do we want to save the outputs to file or not "0" off "1" on
}
String Germline = if (runMode=="Germline") then "1" else "0"
runtime {
docker : "quay.io/biocontainers/svaba:1.1.0--h7d7f7ad_2"
memory : memoryin + " GB"
cpu : "${threads}"
disks : "local-disk " + sizeAll + " HDD"
}
command {
set -e
if [ ${Germline} -eq "1" ];
then
germline_mode=" -L 6 -I"
else
germline_mode=""
fi
svaba run -p ${threads} \
-G ${reference} -a ${id} ~{"-n " + normalBAM} ~{"-t " + queryBAM} ~{"-k " + regions} ~{"-D " + dbSNPVCF} --hp $germline_mode
gzip ~{id}.svaba.indel.vcf
gzip ~{id}.svaba.sv.vcf
gzip ~{id}.svaba.unfiltered.indel.vcf
gzip ~{id}.svaba.unfiltered.sv.vcf
ls *.txt.gz
if [ ~{SaveAlignments} == true ]; then
mv ~{id}.alignments.txt.gz ~{id}.evidence.alignments.txt.gz
fi
}
output {
File? SvABA_Indel_VCF = "~{id}.svaba.indel.vcf.gz"
File? SvABA_SV_VCF = "~{id}.svaba.sv.vcf.gz"
File? SvABA_Unfiltered_indel_VCF = "~{id}.svaba.unfiltered.indel.vcf.gz"
File? SvABA_Unfiltered_SV_VCF = "~{id}.svaba.unfiltered.sv.vcf.gz"
File? Svaba_evidence = "~{id}.evidence.alignments.txt.gz"
}
}
workflow svabaSomatic {
input {
File queryBAM
File queryIndex
File? normalBAM
File? normalIndex
File reference
File refFAIndex
File refBWTIndex
File refSAIndex
File refANNIndex
File refAMBIndex
File refPACIndex
Boolean SaveAlignments = false
String id
Int threads
File? regions
File? dbSNPVCF
String runMode = "Germline" ## options: TumOnly, Paired, Germline
}
Int ref_size = ceil(size(reference, "GB") + size(refPACIndex, "GB") + size(refBWTIndex, "GB") + size(refSAIndex, "GB"))
Int tumor_reads_size = ceil(size(queryBAM, "GB") + size(queryIndex, "GB"))
Int vcf_size = if defined(dbSNPVCF) then ceil(size(dbSNPVCF, "GB")) else 0
Int normal_reads_size = if defined(normalBAM) then ceil(size(normalBAM, "GB") + size(normalIndex, "GB")) else 0
Int sizeAll=8*(ref_size+tumor_reads_size+vcf_size+normal_reads_size)
call svabaCall {
input:
queryBAM=queryBAM,
queryIndex=queryIndex,
normalBAM=normalBAM,
normalIndex=normalIndex,
reference=reference,
refFAIndex=refFAIndex,
refBWTIndex=refBWTIndex,
refSAIndex=refSAIndex,
refANNIndex=refANNIndex,
refAMBIndex=refAMBIndex,
refPACIndex=refPACIndex,
id=id,
threads=threads,
regions=regions,
dbSNPVCF=dbSNPVCF,
sizeAll=sizeAll,
runMode=runMode,
SaveAlignments=SaveAlignments
}
output {
File? SvABA_Indel_VCF = svabaCall.SvABA_Indel_VCF
File? SvABA_SV_VCF = svabaCall.SvABA_SV_VCF
File? SvABA_Unfiltered_indel_VCF = svabaCall.SvABA_Unfiltered_indel_VCF
File? SvABA_Unfiltered_SV_VCF = svabaCall.SvABA_Unfiltered_SV_VCF
File? Svaba_evidence =svabaCall.Svaba_evidence
}
}