/
super-enhancer.cwl
239 lines (205 loc) · 6.75 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
cwlVersion: v1.0
class: Workflow
requirements:
- class: SubworkflowFeatureRequirement
- 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"
inputs:
islands_file:
type: File
label: "XLS called peaks file"
'sd:upstreamSource': "chipseq_sample/macs2_called_peaks"
'sd:localLabel': true
format: "http://edamontology.org/format_3468"
doc: "XLS file to include information about peaks returned by iaintersect.cwl or macs2-callpeak-biowardrobe-only.cwl"
islands_control_file:
type: File?
'sd:upstreamSource': "chipseq_control/macs2_called_peaks"
'sd:localLabel': true
label: "XLS called peaks file (control)"
format: "http://edamontology.org/format_3468"
doc: "XLS file to include information about peaks returned by iaintersect.cwl or macs2-callpeak-biowardrobe-only.cwl for control"
bambai_pair:
type: File
'sd:upstreamSource': "chipseq_sample/bambai_pair"
secondaryFiles:
- .bai
label: "Coordinate sorted BAM alignment file (+index BAI)"
format: "http://edamontology.org/format_2572"
doc: "Coordinate sorted BAM file and BAI index file"
annotation_file:
type: File
label: "Annotation file"
format: "http://edamontology.org/format_3475"
doc: "Tab-separated input annotation file"
chrom_length_file:
type: File
label: "Chromosome length file"
format: "http://edamontology.org/format_2330"
doc: "Chromosome length file"
stitch_distance:
type: int?
default: 20000
label: "Stitching distance"
doc: "Linking distance for stitching"
'sd:layout':
advanced: true
tss_distance:
type: int?
default: 2500
label: "TSS distance"
doc: "Distance from TSS to exclude, 0 = no TSS exclusion"
'sd:layout':
advanced: true
promoter_bp:
type: int?
default: 1000
label: "Promoter distance"
doc: "Promoter distance for gene names assignment"
'sd:layout':
advanced: true
outputs:
png_file:
type: File
label: "ROSE visualization plot"
format: "http://edamontology.org/format_3603"
doc: "Generated by ROSE visualization plot"
outputSource: rename_png/target_file
gene_names_file:
type: File
label: "Gateway Super Enhancer results from ROSE with gene names"
format: "http://edamontology.org/format_3475"
doc: "Gateway Super Enhancer results from ROSE with assigned gene names"
outputSource: add_island_names/output_file
bigbed_file:
type: File
label: "Gateway Super Enhancer bigBed file"
format: "http://edamontology.org/format_3475"
doc: "Gateway Super Enhancer bigBed file"
outputSource: bed_to_bigbed/bigbed_file
steps:
make_gff:
run: ../tools/makegff.cwl
in:
islands_file: islands_file
islands_control_file: islands_control_file
out: [gff_file]
run_rose:
run: ../tools/rose.cwl
in:
binding_sites_file: make_gff/gff_file
bam_file: bambai_pair
annotation_file: annotation_file
stitch_distance: stitch_distance
tss_distance: tss_distance
out:
- plot_points_pic
- gateway_super_enhancers_bed
rename_png:
run: ../tools/rename.cwl
in:
source_file: run_rose/plot_points_pic
target_filename:
source: bambai_pair
valueFrom: $(self.location.split('/').slice(-1)[0].split('.').slice(0,-1).join('.')+"_super_enhancer.png")
out: [target_file]
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]
bed_to_bigbed:
run: ../tools/ucsc-bedtobigbed.cwl
in:
input_bed: sort_bed/sorted_file
chrom_length_file: chrom_length_file
bed_type:
default: "bed6"
output_filename:
source: bambai_pair
valueFrom: $(self.location.split('/').slice(-1)[0].split('.').slice(0,-1).join('.')+"_super_enhancer.bb")
out: [bigbed_file]
bed_to_macs:
run: ../tools/custom-bash.cwl
in:
input_file: sort_bed/sorted_file
script:
default: >
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`
out: [output_file]
assign_genes:
run: ../tools/iaintersect.cwl
in:
input_filename: bed_to_macs/output_file
annotation_filename: annotation_file
promoter_bp: promoter_bp
out: [result_file]
add_island_names:
run: ../tools/custom-bash.cwl
in:
input_file: [assign_genes/result_file, sort_bed/sorted_file]
script:
default: |
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`
param:
source: bambai_pair
valueFrom: $(self.location.split('/').slice(-1)[0].split('.').slice(0,-1).join('.')+"_super_enhancer.tsv")
out: [output_file]
$namespaces:
s: http://schema.org/
$schemas:
- http://schema.org/docs/schema_org_rdfa.html
s:name: "super-enhancer"
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: |
Both `islands_file` and `islands_control_file` should be produced by the same cwl tool (iaintersect.cwl or
macs2-callpeak-biowardrobe-only.cwl)
s:about: |
Workflow to run Super Enhancer Analysis