/
hisat2_samtools_htseq-dexseq.stringtie-prepDE-DESeq2.cwl
416 lines (383 loc) · 9.64 KB
/
hisat2_samtools_htseq-dexseq.stringtie-prepDE-DESeq2.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
# A collection of RNA-Seq data analysis tools wrapped in CWL scripts
# Copyright (C) 2019 Alessandro Pio Greco, Patrick Hedley-Miller, Filipe Jesus, Zeyu Yang
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
#!/usr/bin/env cwl-runner
cwlVersion: v1.0
class: Workflow
requirements:
ScatterFeatureRequirement: {}
MultipleInputFeatureRequirement: {}
StepInputExpressionRequirement: {}
InlineJavascriptRequirement: {}
inputs:
threads: int
genomeDir: Directory
annotation: File
subject_name1: string
subject_name2: string
subject_name3: string
subject_name4: string
fastq1: File[]
fastq2: File[]
fastq3: File[]
fastq4: File[]
htseq_prepare_script: File
htseq_count_script: File
dexseq_script: File
prepDE_script: File
DESeq2_script: File
metadata: File
outputs:
hisat2_align_out:
type: Directory
outputSource: hisat2_align_folder/out
samtools_out:
type: Directory
outputSource: samtools_folder/out
htseq_prepare_out:
type: Directory
outputSource: htseq_prepare_folder/out
htseq_count_out:
type: Directory
outputSource: htseq_count_folder/out
dexseq_out:
type: Directory
outputSource: dexseq_folder/out
stringtie_out:
type: Directory
outputSource: stringtie_folder/out
prepDE_out:
type: Directory
outputSource: prepDE_folder/out
DESeq2_out:
type: Directory
outputSource: DESeq2_folder/out
steps:
hisat2_align_1:
run: ../tools/hisat2_align.cwl
in:
threads: threads
index_directory: genomeDir
first_pair:
source: fastq1
valueFrom: $(self[0])
second_pair:
source: fastq1
valueFrom: $(self[1])
output:
source: subject_name1
valueFrom: $(self + '.sam')
out: [sam_output, hisat2_align_out]
hisat2_align_2:
run: ../tools/hisat2_align.cwl
in:
threads: threads
index_directory: genomeDir
first_pair:
source: fastq2
valueFrom: $(self[0])
second_pair:
source: fastq2
valueFrom: $(self[1])
output:
source: subject_name2
valueFrom: $(self + '.sam')
out: [sam_output, hisat2_align_out]
hisat2_align_3:
run: ../tools/hisat2_align.cwl
in:
threads: threads
index_directory: genomeDir
# first_pair:
# source: fastq2
# valueFrom: $(self[0])
# second_pair:
# source: fastq2
# valueFrom: $(self[1])
single_file: fastq3
output:
source: subject_name3
valueFrom: $(self + '.sam')
out: [sam_output, hisat2_align_out]
hisat2_align_4:
run: ../tools/hisat2_align.cwl
in:
threads: threads
index_directory: genomeDir
# first_pair:
# source: fastq2
# valueFrom: $(self[0])
# second_pair:
# source: fastq2
# valueFrom: $(self[1])
single_file: fastq4
output:
source: subject_name4
valueFrom: $(self + '.sam')
out: [sam_output, hisat2_align_out]
hisat2_align_folder:
run: ../tools/folder.cwl
in:
item:
- hisat2_align_1/hisat2_align_out
- hisat2_align_2/hisat2_align_out
- hisat2_align_3/hisat2_align_out
- hisat2_align_4/hisat2_align_out
name:
valueFrom: "hisat2"
out: [out]
# Samtools
samtools_1:
run: ../tools/samtools.cwl
in:
samfile: hisat2_align_1/sam_output
threads: threads
outfilename:
source: [subject_name1]
valueFrom: $(self + '.bam')
out: [samtools_out]
samtools_2:
run: ../tools/samtools.cwl
in:
samfile: hisat2_align_2/sam_output
threads: threads
outfilename:
source: [subject_name2]
valueFrom: $(self + '.bam')
out: [samtools_out]
samtools_3:
run: ../tools/samtools.cwl
in:
samfile: hisat2_align_3/sam_output
threads: threads
outfilename:
source: [subject_name3]
valueFrom: $(self + '.bam')
out: [samtools_out]
samtools_4:
run: ../tools/samtools.cwl
in:
samfile: hisat2_align_4/sam_output
threads: threads
outfilename:
source: [subject_name4]
valueFrom: $(self + '.bam')
out: [samtools_out]
samtools_folder:
run: ../tools/folder.cwl
in:
item:
- samtools_1/samtools_out
- samtools_2/samtools_out
- samtools_3/samtools_out
- samtools_4/samtools_out
name:
valueFrom: "samtools"
out: [out]
htseq_prepare:
run: ../tools/htseq_prepare.cwl
in:
input_script: htseq_prepare_script
gtf: annotation
gff_name:
source: [annotation]
valueFrom: $(self.nameroot + '.gff')
out: [ht_prep_out]
htseq_prepare_folder:
run: ../tools/folder.cwl
in:
item: htseq_prepare/ht_prep_out
name:
valueFrom: "htseq_prepare"
out: [out]
htseq_count_1:
run: ../tools/htseq_count.cwl
in:
input_script: htseq_count_script
pairedend:
valueFrom: "yes"
stranded:
valueFrom: "no"
input_format:
valueFrom: "bam"
sorted_by:
valueFrom: "pos"
gff: htseq_prepare/ht_prep_out
bam: samtools_1/samtools_out
outname:
source: [subject_name1]
valueFrom: $(self + '_htseq_count.csv')
out: [exon_count_output]
htseq_count_2:
run: ../tools/htseq_count.cwl
in:
input_script: htseq_count_script
pairedend:
valueFrom: "yes"
stranded:
valueFrom: "no"
input_format:
valueFrom: "bam"
sorted_by:
valueFrom: "pos"
gff: htseq_prepare/ht_prep_out
bam: samtools_2/samtools_out
outname:
source: [subject_name2]
valueFrom: $(self + '_htseq_count.csv')
out: [exon_count_output]
htseq_count_3:
run: ../tools/htseq_count.cwl
in:
input_script: htseq_count_script
pairedend:
valueFrom: "no"
stranded:
valueFrom: "no"
input_format:
valueFrom: "bam"
sorted_by:
valueFrom: "pos"
gff: htseq_prepare/ht_prep_out
bam: samtools_3/samtools_out
outname:
source: [subject_name3]
valueFrom: $(self + '_htseq_count.csv')
out: [exon_count_output]
htseq_count_4:
run: ../tools/htseq_count.cwl
in:
input_script: htseq_count_script
pairedend:
valueFrom: "no"
stranded:
valueFrom: "no"
input_format:
valueFrom: "bam"
sorted_by:
valueFrom: "pos"
gff: htseq_prepare/ht_prep_out
bam: samtools_4/samtools_out
outname:
source: [subject_name4]
valueFrom: $(self + '_htseq_count.csv')
out: [exon_count_output]
htseq_count_folder:
run: ../tools/folder.cwl
in:
item:
- htseq_count_1/exon_count_output
- htseq_count_2/exon_count_output
- htseq_count_3/exon_count_output
- htseq_count_4/exon_count_output
name:
valueFrom: "htseq_count"
out: [out]
dexseq:
run: ../tools/dexseq.cwl
in:
input_script: dexseq_script
counts_matrix: htseq_count_folder/out
gff: htseq_prepare_folder/out
metadata: metadata
out: [dexseq_out]
dexseq_folder:
run: ../tools/folder.cwl
in:
item: dexseq/dexseq_out
name:
valueFrom: "DEXSeq"
out: [out]
#Stringtie
stringtie_1:
run: ../tools/stringtie.cwl
in:
bam: samtools_1/samtools_out
threads: threads
gtf: annotation
output:
source: [subject_name1]
valueFrom: $(self)
out: [stringtie_out]
stringtie_2:
run: ../tools/stringtie.cwl
in:
bam: samtools_2/samtools_out
threads: threads
gtf: annotation
output:
source: [subject_name2]
valueFrom: $(self)
out: [stringtie_out]
stringtie_3:
run: ../tools/stringtie.cwl
in:
bam: samtools_3/samtools_out
threads: threads
gtf: annotation
output:
source: [subject_name3]
valueFrom: $(self)
out: [stringtie_out]
stringtie_4:
run: ../tools/stringtie.cwl
in:
bam: samtools_4/samtools_out
threads: threads
gtf: annotation
output:
source: [subject_name4]
valueFrom: $(self)
out: [stringtie_out]
stringtie_folder:
run: ../tools/folder.cwl
in:
item:
- stringtie_1/stringtie_out
- stringtie_2/stringtie_out
- stringtie_3/stringtie_out
- stringtie_4/stringtie_out
name:
valueFrom: "stringtie"
out: [out]
prepDE:
run: ../tools/prepDE.cwl
in:
input_script: prepDE_script
stringtie_out: stringtie_folder/out
out: [gene_count_output, transcript_count_output]
prepDE_folder:
run: ../tools/folder.cwl
in:
item:
- prepDE/gene_count_output
- prepDE/transcript_count_output
name:
valueFrom: "prepDE"
out: [out]
DESeq2:
run: ../tools/DESeq2.cwl
in:
input_script: DESeq2_script
count_matrix: prepDE/gene_count_output
metadata: metadata
out: [DESeq2_out]
DESeq2_folder:
run: ../tools/folder.cwl
in:
item: DESeq2/DESeq2_out
name:
valueFrom: "DESeq2"
out: [out]