forked from mobidic/MobiDL
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathHC.wdl
111 lines (109 loc) · 2.52 KB
/
HC.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
import "modules/preparePanelCaptureTmpDirs.wdl" as runPreparePanelCaptureTmpDirs
import "modules/bedToGatkIntervalList.wdl" as runBedToGatkIntervalList
import "modules/gatkSplitIntervals.wdl" as runGatkSplitIntervals
import "modules/gatkHaplotypeCaller.wdl" as runGatkHaplotypeCaller
import "modules/gatkGatherVcfs.wdl" as runGatkGatherVcfs
#WDL to run HC alone on a given BAM
workflow HC {
meta {
author: "David Baux"
email: "david.baux(at)inserm.fr"
}
#variables declarations
##Resources
Int cpuHigh
Int cpuLow
Int memoryLow
Int memoryHigh
##Global
String sampleID
String workflowType
String outDir
File refFasta
File refFai
File intervalBedFile
##Standard execs
String awkExe
String gatkExe
##gatk-picard
File refDict
File knownSites3
File knownSites3Index
##gatk splitintervals
String subdivisionMode
##haplotypeCaller
String swMode
File bam
File bamIndex
#Tasks calls
call runPreparePanelCaptureTmpDirs.preparePanelCaptureTmpDirs {
input:
Cpu = cpuLow,
Memory = memoryHigh,
SampleID = sampleID,
OutDir = outDir,
WorkflowType = workflowType
}
call runBedToGatkIntervalList.bedToGatkIntervalList {
input:
Cpu = cpuLow,
Memory = memoryHigh,
SampleID = sampleID,
OutDir = outDir,
WorkflowType = workflowType,
IntervalBedFile = intervalBedFile,
AwkExe = awkExe,
DirsPrepared = preparePanelCaptureTmpDirs.dirsPrepared
}
call runGatkSplitIntervals.gatkSplitIntervals {
input:
Cpu = cpuLow,
Memory = memoryHigh,
SampleID = sampleID,
OutDir = outDir,
WorkflowType = workflowType,
GatkExe = gatkExe,
RefFasta = refFasta,
RefFai = refFai,
RefDict = refDict,
GatkInterval = bedToGatkIntervalList.gatkIntervals,
SubdivisionMode = subdivisionMode,
ScatterCount = cpuHigh
}
scatter (interval in gatkSplitIntervals.splittedIntervals) {
call runGatkHaplotypeCaller.gatkHaplotypeCaller {
input:
Cpu = cpuLow,
Memory = memoryLow,
SampleID = sampleID,
OutDir = outDir,
WorkflowType = workflowType,
GatkExe = gatkExe,
RefFasta = refFasta,
RefFai = refFai,
RefDict = refDict,
DbSNP = knownSites3,
DbSNPIndex = knownSites3Index,
GatkInterval = interval,
BamFile = bam,
BamIndex = bamIndex,
SwMode = swMode
}
}
output {
Array[File] hcVcfs = gatkHaplotypeCaller.hcVcf
}
call runGatkGatherVcfs.gatkGatherVcfs {
input:
Cpu = cpuLow,
Memory = memoryHigh,
SampleID = sampleID,
OutDir = outDir,
WorkflowType = workflowType,
GatkExe = gatkExe,
HcVcfs = hcVcfs
}
output {
File Vcf = gatkGatherVcfs.gatheredHcVcf
}
}