-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathAnnotateQC.wdl
68 lines (58 loc) · 1.61 KB
/
AnnotateQC.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
version 1.0
struct RuntimeAttr {
Float? mem_gb
Int? cpu_cores
Int? disk_gb
Int? boot_disk_gb
Int? preemptible_tries
Int? max_retries
}
workflow AnnotateQC {
input {
File cnv_annotations
String docker
RuntimeAttr? runtime_attr
}
call qc {
input:
# https://github.com/talkowski-lab/gCNV-QC-Update.git
docker = docker,
cnv_annotations = cnv_annotations,
runtime_attr_override = runtime_attr
}
output {
File annotations_with_qc = qc.annotations_with_qc
}
}
task qc {
input {
File cnv_annotations
String docker
RuntimeAttr? runtime_attr_override
}
String annotation_name = basename(cnv_annotations, ".bed")
RuntimeAttr default_attr = object {
mem_gb: 16,
cpu_cores: 1,
disk_gb: 32,
boot_disk_gb: 10,
preemptible_tries: 1,
max_retries: 1
}
RuntimeAttr runtime_attr = select_first([runtime_attr_override, default_attr])
command <<<
gcnv_qc.R ~{cnv_annotations} ~{annotation_name}_with_qc.bed
>>>
output {
File annotations_with_qc = "~{annotation_name}_with_qc.bed"
}
runtime {
docker: docker
cpu: select_first([runtime_attr.cpu_cores, default_attr.cpu_cores])
memory: select_first([runtime_attr.mem_gb, default_attr.mem_gb]) + " GiB"
disks: "local-disk " + select_first([runtime_attr.disk_gb, default_attr.disk_gb]) + " HDD"
bootDiskSizeGb: select_first([runtime_attr.boot_disk_gb, default_attr.disk_gb])
preemptible: select_first([runtime_attr.preemptible_tries, default_attr.preemptible_tries])
maxRetries: select_first([runtime_attr.max_retries, default_attr.max_retries])
}
}