/
bqsr-flow.cwl
141 lines (130 loc) · 2.89 KB
/
bqsr-flow.cwl
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
136
137
138
139
cwlVersion: v1.0
class: Workflow
doc: "Run BQSR pre+post+plot flow"
requirements:
- class: MultipleInputFeatureRequirement
- class: StepInputExpressionRequirement
- class: InlineJavascriptRequirement
- class: ResourceRequirement
coresMin: $(inputs.threads)
inputs:
reference:
type: ["null", string, File]
secondaryFiles:
- .fai
input_bam:
type:
- type: array
items: [string, File]
secondaryFiles:
- .bai
known_sites:
type:
- "null"
- type: array
items: [string, File]
secondaryFiles:
- .tbi
output_file:
type: string
plot_output_file:
type: ["null", string]
plot_output_csv_file:
type: ["null", string]
threads:
type: ["null", int]
interval:
type: ["null", string, File]
advanced_options:
type:
- "null"
- type: record
fields:
- name: bqsr
type:
- "null"
- type: array
items: string
- name: bqsr_post
type:
- "null"
- type: array
items: string
outputs:
qcal_output:
type: File
outputSource: bqsr/output
plot_output:
type: ["null", File]
outputSource: plot/output
plot_csv_output:
type: ["null", File]
outputSource: bqsr_plot/output
steps:
bqsr:
in:
input_bam: input_bam
reference: reference
threads: threads
known_sites: known_sites
interval: interval
output_file:
source: output_file
advanced_options:
source: advanced_options
valueFrom: |
${ return self ? self.bqsr : []; }
out: [output]
run: ../algo/bqsr.cwl
bqsr_post:
in:
input_bam: input_bam
reference: reference
threads: threads
interval: interval
qcal:
source: bqsr/output
valueFrom: ${ return [ self ]; }
output_file:
source: output_file
valueFrom: $(self).post
advanced_options:
source: advanced_options
valueFrom: |
${ return self ? self.bqsr_post : []; }
out: [output]
run: ../algo/bqsr.cwl
bqsr_plot:
in:
threads: threads
before: bqsr/output
after: bqsr_post/output
plot:
valueFrom: ${ return true; }
output_file:
source: [output_file, plot_output_csv_file]
valueFrom: |
${
if(self[1] != null)
return self[1];
else
return self[0] + ".csv";
}
out: [output]
run: ../algo/bqsr.cwl
plot:
in:
input: bqsr_plot/output
output_file:
source: [output_file, plot_output_file]
valueFrom: |
${
if(self[1] != null)
return self[1];
else
return self[0] + ".pdf";
}
fun:
valueFrom: ${ return "bqsr"; }
out: [output]
run: ../algo/plot.cwl