/
super-enhancer.cwl
424 lines (381 loc) · 12 KB
/
super-enhancer.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
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
cwlVersion: v1.0
class: Workflow
requirements:
- class: StepInputExpressionRequirement
- class: InlineJavascriptRequirement
- class: MultipleInputFeatureRequirement
'sd:upstream':
chipseq_sample:
- "chipseq-se.cwl"
- "chipseq-pe.cwl"
- "trim-chipseq-pe.cwl"
- "trim-chipseq-se.cwl"
chipseq_control:
- "chipseq-se.cwl"
- "chipseq-pe.cwl"
- "trim-chipseq-pe.cwl"
- "trim-chipseq-se.cwl"
genome_indices:
- "genome-indices.cwl"
inputs:
alias:
type: string
label: "Experiment short name/Alias"
sd:preview:
position: 1
peak_file:
type: File
format: "http://edamontology.org/format_3468"
label: "ChIP-Seq experiment"
doc: "XLS file generated by MACS2"
'sd:upstreamSource': "chipseq_sample/macs2_called_peaks"
'sd:localLabel': true
alignment_file:
type: File
secondaryFiles:
- .bai
format: "http://edamontology.org/format_2572"
label: "ChIP-Seq experiment"
doc: "Coordinate sorted BAM file and BAI index file"
'sd:upstreamSource': "chipseq_sample/bambai_pair"
'sd:localLabel': true
peak_control_file:
type: File?
format: "http://edamontology.org/format_3468"
label: "Control ChIP-Seq experiment"
doc: "XLS file generated by MACS2 used as control"
'sd:upstreamSource': "chipseq_control/macs2_called_peaks"
'sd:localLabel': true
annotation_file:
type: File
label: "Genome annotation"
format: "http://edamontology.org/format_3475"
doc: "TSV genome annotation file"
'sd:upstreamSource': "genome_indices/annotation"
chrom_length_file:
type: File
format: "http://edamontology.org/format_2330"
label: "Chromosome length file"
doc: "Chromosome length file"
'sd:upstreamSource': "genome_indices/chrom_length"
stitching_distance:
type: int?
default: 20000
label: "Maximum distance between two regions that will be stitched together"
doc: |
Maximum distance between two regions that will be stitched together.
For ROSE default is 12.5kb, in workflow default is 20000
'sd:layout':
advanced: true
tss_exclusion_zone_size:
type: int?
default: 2500
label: "Exclude regions contained within +/- this distance from TSS (skip TSS exclusion if 0)"
doc: |
Exclude regions contained within +/- this distance from TSS in order to account
for promoter biases (Default: 0; recommended if used: 2500). If this value is 0,
will not look for a gene file
'sd:layout':
advanced: true
promoter_distance:
type: int?
default: 1000
label: "Promoter distance, bp"
doc: |
Max distance from gene TSS (in both direction) overlapping which the peak will
be assigned to the promoter region. Default: 1000 bp
'sd:layout':
advanced: true
upstream_distance:
type: int?
default: 20000
label: "Upstream distance, bp"
doc: |
Max distance from the promoter (only in upstream direction) overlapping which the
peak will be assigned to the upstream region. Default: 20,000 bp
'sd:layout':
advanced: true
outputs:
ranked_super_enhancers_plot_png:
type: File
format: "http://edamontology.org/format_3603"
label: "Ranked super-enhancers plot"
doc: "Ranked super-enhancers plot"
outputSource: rename_png/target_file
'sd:visualPlugins':
- image:
tab: 'Plots'
Caption: 'Ranked super-enhancers plot'
super_enhancers_report_file:
type: File
format: "http://edamontology.org/format_3475"
label: "Super-enhancers report file with assigned genes"
doc: "Super-enhancers report file with assigned genes"
outputSource: add_island_names/output_file
'sd:visualPlugins':
- syncfusiongrid:
tab: 'Super-enhancers'
Title: 'Super-enhancers Analysis Results'
super_enhancers_bigbed_file:
type: File
format: "http://edamontology.org/format_3004"
label: "Super-enhancers"
doc: "Super-enhancers bigBed file"
outputSource: bed_to_bigbed/bigbed_file
'sd:visualPlugins':
- igvbrowser:
tab: 'IGV Genome Browser'
id: 'igvbrowser'
type: 'annotation'
name: "Super-enchancers"
displayMode: "COLLAPSE"
height: 40
super_enhancers_raw_txt:
type: File
format: "http://edamontology.org/format_2330"
label: "Super-enhancers report file (raw, from ROSE)"
doc: "Super-enhancers report file (raw, from ROSE)"
outputSource: run_rose/super_enhancers_table
steps:
make_gff:
run: ../tools/makegff.cwl
in:
islands_file: peak_file
islands_control_file: peak_control_file
out: [gff_file]
run_rose:
run: ../tools/rose.cwl
in:
binding_sites_file: make_gff/gff_file
bam_file: alignment_file
annotation_file: annotation_file
stitch_distance: stitching_distance
tss_distance: tss_exclusion_zone_size
out:
- plot_points_pic
- gateway_super_enhancers_bed
- super_enhancers_table
rename_png:
in:
source_file: run_rose/plot_points_pic
target_filename:
source: alignment_file
valueFrom: $(self.location.split('/').slice(-1)[0].split('.').slice(0,-1).join('.')+"_default_s_enhcr.png")
out: [target_file]
run:
cwlVersion: v1.0
class: CommandLineTool
requirements:
- class: DockerRequirement
dockerPull: biowardrobe2/scidap:v0.0.3
inputs:
source_file:
type: File
inputBinding:
position: 5
doc: source file to rename
target_filename:
type: string
inputBinding:
position: 6
doc: filename to rename to
outputs:
target_file:
type: File
outputBinding:
glob: "*"
baseCommand: ["cp"]
doc: Tool renames (copy) `source_file` to `target_filename`
sort_bed:
run: ../tools/linux-sort.cwl
in:
unsorted_file: run_rose/gateway_super_enhancers_bed
key:
default: ["1,1","2,2n","3,3n"]
out: [sorted_file]
reduce_bed:
in:
input_file: sort_bed/sorted_file
out: [output_file]
run:
cwlVersion: v1.0
class: CommandLineTool
requirements:
- class: DockerRequirement
dockerPull: biowardrobe2/scidap:v0.0.3
inputs:
input_file:
type: File
inputBinding:
position: 5
doc: Input BED6 file to be reduced to BED4
outputs:
output_file:
type: File
outputBinding:
glob: "*"
baseCommand: [bash, '-c']
arguments:
- cat $0 | cut -f 1-4 > `basename $0`
doc: Tool converts BED6 to BED4 by reducing column numbers
bed_to_bigbed:
in:
input_bed: reduce_bed/output_file
chrom_length_file: chrom_length_file
bed_type:
default: "bed4"
output_filename:
source: alignment_file
valueFrom: $(self.location.split('/').slice(-1)[0].split('.').slice(0,-1).join('.')+"_default_s_enhcr.bb")
out: [bigbed_file]
run:
cwlVersion: v1.0
class: CommandLineTool
requirements:
- class: DockerRequirement
dockerPull: biowardrobe2/ucscuserapps:v358
inputs:
bed_type:
type: string
inputBinding:
position: 5
prefix: -type=
separate: false
doc: Type of BED file in a form of bedN[+[P]]. By default bed3 to three required BED fields
input_bed:
type: File
inputBinding:
position: 6
doc: Input BED file
chrom_length_file:
type: File
inputBinding:
position: 7
doc: Chromosome length files
output_filename:
type: string
inputBinding:
position: 8
doc: Output filename
outputs:
bigbed_file:
type: File
outputBinding:
glob: "*"
baseCommand: ["bedToBigBed"]
doc: Tool converts bed to bigBed
bed_to_macs:
in:
input_file: sort_bed/sorted_file
out: [output_file]
run:
cwlVersion: v1.0
class: CommandLineTool
requirements:
- class: DockerRequirement
dockerPull: biowardrobe2/scidap:v0.0.3
inputs:
input_file:
type: File
inputBinding:
position: 5
doc: Input file to be converted to MACS2 output format
outputs:
output_file:
type: File
outputBinding:
glob: "*"
baseCommand: [bash, '-c']
arguments:
- cat $0 | grep -v "#" | awk
'BEGIN {print "chr\tstart\tend\tlength\tabs_summit\tpileup\t-log10(pvalue)\tfold_enrichment\t-log10(qvalue)\tname"}
{print $1"\t"$2"\t"$3"\t"$3-$2+1"\t0\t0\t0\t0\t0\t"$4}' > `basename $0`
doc: Tool converts `input_file` to the format compatible with the input of iaintersect from `assign_genes` step
assign_genes:
run: ../tools/iaintersect.cwl
in:
input_filename: bed_to_macs/output_file
annotation_filename: annotation_file
promoter_bp: promoter_distance
upstream_bp: upstream_distance
out: [result_file]
add_island_names:
in:
input_file: [assign_genes/result_file, sort_bed/sorted_file]
param:
source: alignment_file
valueFrom: $(self.location.split('/').slice(-1)[0].split('.').slice(0,-1).join('.')+"_default_s_enhcr.tsv")
out: [output_file]
run:
cwlVersion: v1.0
class: CommandLineTool
requirements:
- class: DockerRequirement
dockerPull: biowardrobe2/scidap:v0.0.3
inputs:
input_file:
type: File[]
inputBinding:
position: 5
doc: TSV file to add extra columns too
param:
type: string
inputBinding:
position: 6
doc: Param to set output filename
outputs:
output_file:
type: File
outputBinding:
glob: "*"
baseCommand: [bash, '-c']
arguments:
- echo -e "refseq_id\tgene_id\ttxStart\ttxEnd\tstrand\tchrom\tstart\tend\tlength\tregion\tname\tscore" > `basename $2`;
cat $0 | grep -v refseq_id | paste - $1 | cut -f 1-9,15,19,20 >> `basename $2`
$namespaces:
s: http://schema.org/
$schemas:
- https://github.com/schemaorg/schemaorg/raw/main/data/releases/11.01/schemaorg-current-http.rdf
s:name: "ROSE: rank ordering of super-enhancers"
label: "ROSE: rank ordering of super-enhancers"
s:alternateName: "ROSE: rank ordering of super-enhancers"
s:downloadUrl: https://raw.githubusercontent.com/datirium/workflows/master/workflows/super-enhancer.cwl
s:codeRepository: https://github.com/datirium/workflows
s:license: http://www.apache.org/licenses/LICENSE-2.0
s:isPartOf:
class: s:CreativeWork
s:name: Common Workflow Language
s:url: http://commonwl.org/
s:creator:
- class: s:Organization
s:legalName: "Cincinnati Children's Hospital Medical Center"
s:location:
- class: s:PostalAddress
s:addressCountry: "USA"
s:addressLocality: "Cincinnati"
s:addressRegion: "OH"
s:postalCode: "45229"
s:streetAddress: "3333 Burnet Ave"
s:telephone: "+1(513)636-4200"
s:logo: "https://www.cincinnatichildrens.org/-/media/cincinnati%20childrens/global%20shared/childrens-logo-new.png"
s:department:
- class: s:Organization
s:legalName: "Allergy and Immunology"
s:department:
- class: s:Organization
s:legalName: "Barski Research Lab"
s:member:
- class: s:Person
s:name: Michael Kotliar
s:email: mailto:misha.kotliar@gmail.com
s:sameAs:
- id: http://orcid.org/0000-0002-6486-3898
# doc:
# $include: ../descriptions/super-enhancer.md
doc: |
Super-enhancers, consist of clusters of enhancers that are densely occupied by
the master regulators and Mediator. Super-enhancers differ from typical enhancers
in size, transcription factor density and content, ability to activate transcription,
and sensitivity to perturbation. Use to create stitched enhancers, and to separate
super-enhancers from typical enhancers using sequencing data (.bam) given a file of
previously identified constituent enhancers (.gff)