-
Notifications
You must be signed in to change notification settings - Fork 17
/
04-peakcall-with-control.cwl
270 lines (270 loc) · 8.23 KB
/
04-peakcall-with-control.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
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
#!/usr/bin/env cwl-runner
class: Workflow
cwlVersion: v1.0
doc: 'ChIP-seq 04 quantification - samples: treatment and control.'
requirements:
- class: ScatterFeatureRequirement
- class: StepInputExpressionRequirement
- class: InlineJavascriptRequirement
inputs:
input_bam_files:
type: File[]
input_control_bam_files:
type: File[]
genome_effective_size:
default: hs
doc: Effective genome size used by MACS2. It can be numeric or a shortcuts:'hs' for human (2.7e9), 'mm' for mouse (1.87e9), 'ce' for C. elegans (9e7) and 'dm' for fruitfly (1.2e8), Default:hs
type: string
input_genome_sizes:
doc: Two column tab-delimited file with chromosome size information
type: File
as_narrowPeak_file:
doc: Definition narrowPeak file in AutoSql format (used in bedToBigBed)
type: File
as_broadPeak_file:
doc: Definition broadPeak file in AutoSql format (used in bedToBigBed)
type: File
nthreads:
default: 1
type: int
outputs:
output_filtered_read_count_file:
doc: Filtered read count reported by MACS2
type: File[]
outputSource: count-reads-filtered/read_count_file
output_spp_cross_corr_plot:
doc: peakshift/phantomPeak results file
type: File[]
outputSource: spp/output_spp_cross_corr_plot
output_spp_x_cross_corr:
doc: peakshift/phantomPeak results file
type: File[]
outputSource: spp/output_spp_cross_corr
output_narrowpeak_count:
doc: Peak counts within replicate
type: File[]
outputSource: count-narrowpeaks/output_counts
output_read_in_narrowpeak_count_within_replicate:
doc: narrowPeak counts within replicate
type: File[]
outputSource: extract-count-reads-in-narrowpeaks/output_read_count
output_narrowpeak_file:
doc: peakshift/phantomPeak results file
type: File[]
outputSource: narrowPeak-calling/output_peak_file
output_narrowpeak_bigbed_file:
doc: Peaks in bigBed format
type: File[]
outputSource: narrowpeaks-bed-to-bigbed/bigbed
output_narrowpeak_xls_file:
doc: Peak calling report file (*_peaks.xls file produced by MACS2)
type: File[]
outputSource: narrowPeak-calling/output_peak_xls_file
output_narrowpeak_summits_file:
doc: File containing peak summits
type:
type: array
items:
- 'null'
- items: File
type: array
outputSource: narrowPeak-calling/output_peak_summits_file
output_broadpeak_count:
doc: Peak counts within replicate
type: File[]
outputSource: count-broadpeaks/output_counts
output_read_in_broadpeak_count_within_replicate:
doc: broadPeak counts within replicate
type: File[]
outputSource: extract-count-reads-in-broadpeaks/output_read_count
output_broadpeak_file:
doc: peakshift/phantomPeak results file
type: File[]
outputSource: broadPeak-calling/output_peak_file
output_broadpeak_bigbed_file:
doc: Peaks in bigBed format
type: File[]
outputSource: broadpeaks-bed-to-bigbed/bigbed
output_broadpeak_xls_file:
doc: Peak calling report file (*_peaks.xls file produced by MACS2)
type: File[]
outputSource: broadPeak-calling/output_peak_xls_file
output_broadpeak_summits_file:
doc: File containing peak summits
type:
type: array
items:
- 'null'
- items: File
type: array
outputSource: broadPeak-calling/output_peak_summits_file
steps:
spp:
run: ../spp/spp.cwl
scatterMethod: dotproduct
scatter:
- input_bam
- control_bam
in:
control_bam: input_control_bam_files
input_bam: input_bam_files
nthreads: nthreads
savp:
valueFrom: ${return true}
out:
- output_spp_cross_corr
- output_spp_cross_corr_plot
extract-peak-frag-length:
scatter: input_spp_txt_file
run: ../spp/extract-best-frag-length.cwl
in:
input_spp_txt_file: spp/output_spp_cross_corr
out:
- output_best_frag_length
narrowPeak-calling:
run: ../peak_calling/macs2-callpeak.cwl
scatterMethod: dotproduct
scatter:
- extsize
- treatment
- control
in:
control: input_control_bam_files
treatment:
source: input_bam_files
valueFrom: $([self])
extsize: extract-peak-frag-length/output_best_frag_length
nomodel:
valueFrom: ${return true}
g: genome_effective_size
format:
valueFrom: BAM
out:
- output_peak_file
- output_peak_summits_file
- output_peak_xls_file
trunk-narrowpeak-score:
scatter: peaks
run: ../utils/trunk-peak-score.cwl
in:
peaks: narrowPeak-calling/output_peak_file
out:
- trunked_scores_peaks
narrowpeaks-bed-to-bigbed:
run: ../quant/bedToBigBed.cwl
scatter: bed
in:
type:
valueFrom: bed6+4
as: as_narrowPeak_file
genome_sizes: input_genome_sizes
bed: trunk-narrowpeak-score/trunked_scores_peaks
out:
- bigbed
filter-reads-in-narrowpeaks:
scatterMethod: dotproduct
scatter:
- input_bam_file
- input_bedfile
run: ../peak_calling/samtools-filter-in-bedfile.cwl
in:
input_bam_file: input_bam_files
input_bedfile: narrowPeak-calling/output_peak_file
out:
- filtered_file
extract-count-reads-in-narrowpeaks:
run: ../peak_calling/samtools-extract-number-mapped-reads.cwl
scatter: input_bam_file
in:
output_suffix:
valueFrom: .read_count.in_narrowpeaks.txt
input_bam_file: filter-reads-in-narrowpeaks/filtered_file
out:
- output_read_count
count-narrowpeaks:
run: ../utils/count-with-output-suffix.cwl
scatter: input_file
in:
output_suffix:
valueFrom: .peak_count.within_replicate.txt
input_file: narrowPeak-calling/output_peak_file
out:
- output_counts
broadPeak-calling:
run: ../peak_calling/macs2-callpeak.cwl
scatterMethod: dotproduct
scatter:
- extsize
- treatment
- control
in:
control: input_control_bam_files
treatment:
source: input_bam_files
valueFrom: $([self])
extsize: extract-peak-frag-length/output_best_frag_length
nomodel:
valueFrom: ${return true}
g: genome_effective_size
format:
valueFrom: BAM
broad:
valueFrom: ${return true}
out:
- output_peak_file
- output_peak_summits_file
- output_peak_xls_file
trunk-broadpeak-score:
scatter: peaks
run: ../utils/trunk-peak-score.cwl
in:
peaks: broadPeak-calling/output_peak_file
out:
- trunked_scores_peaks
broadpeaks-bed-to-bigbed:
run: ../quant/bedToBigBed.cwl
scatter: bed
in:
type:
valueFrom: bed6+4
as: as_broadPeak_file
genome_sizes: input_genome_sizes
bed: trunk-broadpeak-score/trunked_scores_peaks
out:
- bigbed
filter-reads-in-broadpeaks:
scatterMethod: dotproduct
scatter:
- input_bam_file
- input_bedfile
run: ../peak_calling/samtools-filter-in-bedfile.cwl
in:
input_bam_file: input_bam_files
input_bedfile: broadPeak-calling/output_peak_file
out:
- filtered_file
extract-count-reads-in-broadpeaks:
run: ../peak_calling/samtools-extract-number-mapped-reads.cwl
scatter: input_bam_file
in:
output_suffix:
valueFrom: .read_count.in_broadpeaks.txt
input_bam_file: filter-reads-in-broadpeaks/filtered_file
out:
- output_read_count
count-broadpeaks:
run: ../utils/count-with-output-suffix.cwl
scatter: input_file
in:
output_suffix:
valueFrom: .peak_count.within_replicate.txt
input_file: broadPeak-calling/output_peak_file
out:
- output_counts
count-reads-filtered:
run: ../peak_calling/count-reads-after-filtering.cwl
scatter: peak_xls_file
in:
peak_xls_file: narrowPeak-calling/output_peak_xls_file
out:
- read_count_file