-
Notifications
You must be signed in to change notification settings - Fork 13
/
heatmap.cwl
182 lines (152 loc) · 4.99 KB
/
heatmap.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
cwlVersion: v1.0
class: Workflow
requirements:
- class: InlineJavascriptRequirement
- class: SubworkflowFeatureRequirement
inputs:
bam_file:
type: File[]
label: "BAM files"
format: "http://edamontology.org/format_2572"
doc: "Array of input BAM files"
genelist_file:
type: File
label: "Genelist file"
format: "http://edamontology.org/format_3475"
doc: "Genelist file"
fragment_size:
type: int[]
label: "Fragment sizes"
doc: "Array of fragment sizes"
total_reads:
type: int[]
label: "Total reads numbers"
doc: "Array of total reads number for downstream normalization"
# genebody_hist_filename:
# type: string
# label: "Genebody histogram file name"
# doc: "Genebody histogram file name"
threads:
type: int?
default: 1
label: "Number of threads"
doc: "Number of threads for those steps that support multithreading"
outputs:
heatmap_file:
type: File[]
label: "TSS centered refactored homer generated heatmap JSON files"
format: "http://edamontology.org/format_3464"
doc: "Heatmap JSON files generated by Homer annotatePeaks.pl with TSS centered peak file"
outputSource: split_heatmap/refactored_heatmap_file
# genebody_hist_file:
# type: File
# label: "Homer gene body histogram file"
# format: "http://edamontology.org/format_3475"
# doc: "Genebody histogram file generated by Homer makeMetaGeneProfile.pl"
# outputSource: make_genebody_hist/histogram_file
steps:
make_tag_folders:
run: ../subworkflows/heatmap-prepare.cwl
in:
bam_file: bam_file
fragment_size: fragment_size
total_reads: total_reads
out: [tag_folder]
center_genelist_on_tss:
run: ../tools/custom-bash.cwl
in:
input_file: genelist_file
script:
default: cat "$0" | grep -v "refseq_id" | awk '{tss=$4; if ($6 == "-") tss=$5; print NR"\t"$3"\t"tss"\t"tss"\t"$6}' > `basename $0`
out: [output_file]
# make_peak_file:
# run: ../tools/custom-bash.cwl
# in:
# input_file: genelist_file
# script:
# default: cat "$0" | grep -v "refseq_id" | awk '{print NR"\t"$3"\t"$4"\t"$5"\t"$6}' > `basename $0`
# out: [output_file]
make_tss_heatmap:
run: ../tools/homer-annotate-peaks-hist.cwl
in:
peak_file: center_genelist_on_tss/output_file
tag_folders: make_tag_folders/tag_folder
hist_width:
default: 10000
hist_bin_size:
default: 50
export_heatmap:
default: True
threads: threads
histogram_filename:
default: "default.tsv"
out: [histogram_file]
split_heatmap:
run: ../tools/split-heatmap.cwl
in:
heatmap_file: make_tss_heatmap/histogram_file
output_filename: bam_file
out: [refactored_heatmap_file]
# make_genebody_hist:
# run: ../tools/homer-make-metagene-profile.cwl
# in:
# peak_file: make_peak_file/output_file
# tag_folders: make_tag_folders/tag_folder
# flank_width:
# default: 5000
# flank_bin_size:
# default: 50
# genebody_bin_count:
# default: 1000
# threads: threads
# histogram_filename: genebody_hist_filename
# out: [histogram_file]
$namespaces:
s: http://schema.org/
$schemas:
- http://schema.org/docs/schema_org_rdfa.html
s:name: "heatmap"
s:downloadUrl: https://raw.githubusercontent.com/Barski-lab/workflows/master/workflows/heatmap.cwl
s:codeRepository: https://github.com/Barski-lab/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
- class: s:Person
s:name: Andrey Kartashov
s:email: mailto:Andrey.Kartashov@cchmc.org
s:sameAs:
- id: http://orcid.org/0000-0001-9102-5681
doc: |
Generates ATDP heatmap centered on TSS from an array of input BAM files and genelist TSV file.
Returns array of heatmap JSON files with the names that have the same basenames as input BAM files,
but with .json extension
s:about: |
Generates ATDP heatmap centered on TSS from an array of input BAM files and genelist TSV file.
Returns array of heatmap JSON files with the names that have the same basenames as input BAM files,
but with .json extension