-
Notifications
You must be signed in to change notification settings - Fork 0
/
defined_outputs.wdl
66 lines (56 loc) · 1.37 KB
/
defined_outputs.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
version 1.0
workflow defined_or_not {
String pass = "PASS"
Boolean do_not_run_qc = true
Boolean always_true = true
if(!do_not_run_qc) {
call qc
if(always_true) {
if(!(qc.pass_or_fail == pass)) {
String qc_error_code = qc.pass_or_fail
}
}
}
if (defined(qc_error_code)) {
String error_code_coerced_to_not_optional = select_first([qc.pass_or_fail, "WORKFLOW_ERROR_8_REPORT_TO_DEV"])
call print { input: echo_this = error_code_coerced_to_not_optional }
}
}
task qc {
input {
String? unused_string # sometimes tasks without an input get buggy
}
command <<<
if (( $RANDOM > 25000 ))
then
echo "FAILED_QC" >> ERROR
exit 0
else
echo "PASS" >> ERROR
exit 0
fi
>>>
output { String pass_or_fail = read_string("ERROR") }
runtime {
cpu: 2
docker: "ashedpotatoes/clockwork-plus:v0.11.3.2-full"
disks: "local-disk 10 HDD"
memory: "2 GB"
preemptible: "1"
}
}
task print {
input {
String echo_this
}
command <<<
echo "~{echo_this}"
>>>
runtime {
cpu: 2
docker: "ashedpotatoes/clockwork-plus:v0.11.3.2-full"
disks: "local-disk 10 HDD"
memory: "2 GB"
preemptible: "1"
}
}