-
Notifications
You must be signed in to change notification settings - Fork 13
/
manorm.cwl
329 lines (292 loc) · 9.55 KB
/
manorm.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
cwlVersion: v1.0
class: Workflow
requirements:
- class: StepInputExpressionRequirement
- class: InlineJavascriptRequirement
- class: MultipleInputFeatureRequirement
'sd:upstream':
first_chipseq_sample:
- "chipseq-se.cwl"
- "chipseq-pe.cwl"
- "trim-chipseq-pe.cwl"
- "trim-chipseq-se.cwl"
second_chipseq_sample:
- "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_first:
type: File
format: "http://edamontology.org/format_3475"
label: "ChIP-Seq sample one"
doc: "TSV peak file, formatted as iaintersect output"
'sd:upstreamSource': "first_chipseq_sample/iaintersect_result"
'sd:localLabel': true
peak_file_second:
type: File
format: "http://edamontology.org/format_3475"
label: "ChIP-Seq sample two"
doc: "TSV peak file, formatted as iaintersect output"
'sd:upstreamSource': "second_chipseq_sample/iaintersect_result"
'sd:localLabel': true
bam_file_first:
type: File
format: "http://edamontology.org/format_2572"
label: "First BAM file"
doc: "BAM alignment file"
'sd:upstreamSource': "first_chipseq_sample/bambai_pair"
bam_file_second:
type: File
format: "http://edamontology.org/format_2572"
label: "Second BAM file"
doc: "BAM alignment file"
'sd:upstreamSource': "second_chipseq_sample/bambai_pair"
annotation_file:
type: File
label: "Annotation file"
format: "http://edamontology.org/format_3475"
doc: "Tab-separated annotation file"
'sd:upstreamSource': "genome_indices/annotation"
fragment_size_first:
type: int?
label: "First fragment size"
doc: "Fragment size, int"
default: 150
'sd:layout':
advanced: true
fragment_size_second:
type: int?
label: "Second fragment size"
doc: "Fragment size, int"
default: 150
'sd:layout':
advanced: true
output_filename:
type: string?
label: "MAnorm output TSV filename"
doc: "MAnorm output TSV filename"
default: "manorm_common_peak.tsv"
'sd:layout':
advanced: true
outputs:
common_peak_file:
type: File
format: "http://edamontology.org/format_3475"
label: "MAnorm common peak resutls, TSV"
doc: "MAnorm generated list of common peaks with assigned genes"
outputSource: restore_columns/restored_peak_file
'sd:visualPlugins':
- syncfusiongrid:
Title: 'MAnorm Common Peak Results'
steps:
manorm:
in:
peak_file_first: peak_file_first
peak_file_second: peak_file_second
bam_file_first: bam_file_first
bam_file_second: bam_file_second
fragment_size_first: fragment_size_first
fragment_size_second: fragment_size_second
out: [common_peak_file]
run:
cwlVersion: v1.0
class: CommandLineTool
requirements:
- class: DockerRequirement
dockerPull: biowardrobe2/manorm:v0.0.1
inputs:
peak_file_first:
type: File
inputBinding:
position: 5
peak_file_second:
type: File
inputBinding:
position: 6
bam_file_first:
type: File
inputBinding:
position: 7
bam_file_second:
type: File
inputBinding:
position: 9
fragment_size_first:
type: int
inputBinding:
position: 10
fragment_size_second:
type: int
inputBinding:
position: 11
outputs:
common_peak_file:
type: File
outputBinding:
glob: "MAnorm_result_commonPeak_merged.xls"
baseCommand: ["run_manorm.sh"]
filter_columns:
in:
peak_file: manorm/common_peak_file
script:
default: >
cat $0 | grep -v "start" | 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\t"NR"\t0\t0\t0\t0"}' > `basename $0`
out: [filtered_peak_file]
run:
cwlVersion: v1.0
class: CommandLineTool
requirements:
- class: DockerRequirement
dockerPull: biowardrobe2/scidap:v0.0.3
inputs:
script:
type: string
inputBinding:
position: 1
peak_file:
type: File
inputBinding:
position: 2
outputs:
filtered_peak_file:
type: File
outputBinding:
glob: "*"
baseCommand: [bash, '-c']
assign_genes:
in:
peak_file: filter_columns/filtered_peak_file
annotation_file: annotation_file
output_filename: output_filename
promoter_bp:
default: 1000
out: [peaks_and_genes_file]
run:
cwlVersion: v1.0
class: CommandLineTool
requirements:
- class: DockerRequirement
dockerPull: biowardrobe2/iaintersect:v0.0.2
inputs:
peak_file:
type: File
inputBinding:
position: 1
prefix: --in=
separate: false
annotation_file:
type: File
inputBinding:
position: 2
prefix: --a=
separate: false
output_filename:
type: string
inputBinding:
position: 3
prefix: --out=
separate: false
promoter_bp:
type: int
inputBinding:
position: 4
prefix: --promoter=
separate: false
outputs:
peaks_and_genes_file:
type: File
outputBinding:
glob: $(inputs.output_filename)
baseCommand: [iaintersect]
restore_columns:
in:
peak_files: [assign_genes/peaks_and_genes_file, manorm/common_peak_file]
script:
default: |
cat $0 | grep -v "start" | sort -k 11n > sorted_iaintersect_result.tsv
cat $1 | grep -v "start" > manorm_result.tsv
echo -e "refseq_id\tgene_id\ttxStart\ttxEnd\tstrand\tchrom\tstart\tend\tlength\tregion\tdescription\t#raw_read_1\t#raw_read_2\tM_value_rescaled\tA_value_rescaled\t-log10(p-value)" > `basename $0`;
cat sorted_iaintersect_result.tsv | paste - manorm_result.tsv | cut -f 1-9,15,19-24 >> `basename $0`
rm sorted_iaintersect_result.tsv manorm_result.tsv
out: [restored_peak_file]
run:
cwlVersion: v1.0
class: CommandLineTool
requirements:
- class: DockerRequirement
dockerPull: biowardrobe2/scidap:v0.0.3
inputs:
script:
type: string
inputBinding:
position: 1
peak_files:
type: File[]
inputBinding:
position: 2
outputs:
restored_peak_file:
type: File
outputBinding:
glob: "*"
baseCommand: [bash, '-c']
$namespaces:
s: http://schema.org/
$schemas:
- http://schema.org/docs/schema_org_rdfa.html
s:name: "MAnorm - quantitative comparison of ChIP-Seq data"
label: "MAnorm - quantitative comparison of ChIP-Seq data"
s:downloadUrl: https://raw.githubusercontent.com/datirium/workflows/master/workflows/manorm.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:michael.kotliar@cchmc.org
s:sameAs:
- id: http://orcid.org/0000-0002-6486-3898
doc: |
MAnorm is a robust model for quantitative comparison of ChIP-Seq data sets of TFs (transcription factors) or epigenetic modifications.
s:about: |
What is MAnorm?
--------------
MAnorm is a robust model for quantitative comparison of ChIP-Seq data sets of TFs (transcription factors) or epigenetic modifications and you can use it for:
* Normalization of two ChIP-seq samples
* Quantitative comparison (differential analysis) of two ChIP-seq samples
* Evaluating the overlap enrichment of the protein binding sites(peaks)
* Elucidating underlying mechanisms of cell-type specific gene regulation
How MAnorm works?
----------------
MAnorm uses common peaks of two samples as a reference to build the rescaling model for normalization, which is based on the empirical assumption that if a chromatin-associated protein has a substantial number of peaks shared in two conditions, the binding at these common regions will tend to be determined by similar mechanisms, and thus should exhibit similar global binding intensities across samples. The observed differences on common peaks are presumed to reflect the scaling relationship of ChIP-Seq signals between two samples, which can be applied to all peaks.