/
peak-calling-MACS2.cwl
175 lines (167 loc) · 4.74 KB
/
peak-calling-MACS2.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
#!/usr/bin/env cwl-runner
cwlVersion: v1.0
class: Workflow
label: "ChIP-seq peak caller workflow MACS2 based"
doc: "This workflow execute peak caller and QC for ChIP-seq using MACS2"
requirements:
InlineJavascriptRequirement: {}
StepInputExpressionRequirement: {}
SubworkflowFeatureRequirement: {}
ScatterFeatureRequirement: {}
inputs:
genome_name: string
genome_fasta: File
genome_gtf: File
tagAlign_gz: File[]
macs_callpeaks_g: string
macs_callpeaks_q: float
nomodel: boolean?
extsize: int?
outputs:
readQC_plots:
outputSource: readQC/plots
type: {"type": "array", "items": {"type": "array", "items": "File"}}
macs_cutoff_pdf:
outputSource: macs_cutoff/out_pdf
type: File[]
macs_cutoff_inflection:
outputSource: macs_cutoff/out_inflection
type: File[]
macs_callpeak_q_value_narrowPeak:
outputSource: macs_callpeak_q_value/narrowPeak
type: File[]
macs_callpeak_q_value_xls:
outputSource: macs_callpeak_q_value/xls
type: File[]
macs_callpeak_q_value_bed:
outputSource: macs_callpeak_q_value/bed
type: File[]
homer_annotate_peaks_output:
outputSource: homer_annotate_peaks/output
type: File[]
homer_annotate_peaks_annStats:
outputSource: homer_annotate_peaks/annStats_out
type: File[]?
lambda_tdf_out:
outputSource: lambda_bdg_to_tdf/out_tdf
type: File[]
pileup_tdf_out:
outputSource: pileup_bdg_to_tdf/out_tdf
type: File[]
steps:
gzip_cat:
run: ../../tools/basic/gzip.cwl
scatter: file
in:
d: { default: True}
file: tagAlign_gz
out: [output]
homer_tags:
run: ../../tools/homer/homer-makeTagDirectory.cwl
scatter: input
in:
tags_directory_name:
valueFrom: ${ return inputs.input.nameroot + "_tags";}
checkGC: { default: True}
genome: genome_fasta
input: gzip_cat/output
format: { default: "bed"}
out: [tags_directory]
readQC:
run: ../../tools/R/readQC.cwl
scatter: tags_directory
in:
tags_directory: homer_tags/tags_directory
out: [plots]
macs_callpeak:
run: ../../tools/macs/macs2-callpeak.cwl
scatter: t
in:
n:
valueFrom: ${ return inputs.t.nameroot;}
f: { default: "BED"}
g: macs_callpeaks_g
cutoff-analysis: { default: True}
nomodel: nomodel
B: { default: True}
shift: { default: 0}
extsize: extsize
q: macs_callpeaks_q
outdir_name:
valueFrom: ${ return inputs.t.nameroot + "_peaks";}
t: gzip_cat/output
out: [cutoff_analysis]
macs_cutoff:
run: ../../tools/R/macs-cutoff.cwl
scatter: peak_cutoff_file
in:
peak_cutoff_file: macs_callpeak/cutoff_analysis
out_pdf_name:
valueFrom: ${ return inputs.peak_cutoff_file.nameroot + ".pdf";}
out_inflection_name:
valueFrom: ${ return inputs.peak_cutoff_file.nameroot + "_inflection.txt";}
out: [out_pdf,out_inflection]
macs_callpeak_q_value:
run: ../../tools/macs/macs2-callpeak.cwl
scatter: [t, q_file]
scatterMethod: dotproduct
in:
n:
valueFrom: ${ return inputs.t.nameroot;}
f: { default: "BED"}
g: macs_callpeaks_g
cutoff-analysis: { default: True}
call-summits: { default: True}
nomodel: nomodel
B: { default: True}
shift: { default: 0}
extsize: extsize
q_file: macs_cutoff/out_inflection
outdir_name:
valueFrom: ${ return inputs.t.nameroot + "_peaks";}
t: gzip_cat/output
out: [lambda, pileup, narrowPeak, xls, bed]
homer_annotate_peaks:
run: ../../tools/homer/homer-annotatePeaks.cwl
scatter: [input, d]
scatterMethod: dotproduct
in:
genome: genome_fasta
gtf: genome_gtf
input: macs_callpeak_q_value/narrowPeak
o:
valueFrom: ${ return inputs.input.nameroot + "_annotation.txt";}
annStats:
valueFrom: ${ return inputs.input.nameroot + "_annStats.txt";}
d: homer_tags/tags_directory
fpkm: {default: True}
out: [output,annStats_out]
lambda_bdg_to_tdf:
run: ../../tools/igvtools/igvtools-totdf.cwl
scatter: i
in:
i: macs_callpeak_q_value/lambda
g: genome_name
o:
valueFrom: ${ return inputs.i.nameroot + ".tdf";}
z: {default: 5}
out: [out_tdf]
pileup_bdg_to_tdf:
run: ../../tools/igvtools/igvtools-totdf.cwl
scatter: i
in:
i: macs_callpeak_q_value/pileup
g: genome_name
o:
valueFrom: ${ return inputs.i.nameroot + ".tdf";}
z: {default: 5}
out: [out_tdf]
$namespaces:
s: http://schema.org/
s:author:
- class: s:Person
s:identifier: https://orcid.org/0000-0002-4108-5982
s:email: mailto:r78v10a07@gmail.com
s:name: Roberto Vera Alvarez
$schemas:
- https://schema.org/version/latest/schemaorg-current-http.rdf