-
Notifications
You must be signed in to change notification settings - Fork 14
/
etl.cwl
469 lines (438 loc) · 12.5 KB
/
etl.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
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
#!/usr/bin/env cwl-runner
cwlVersion: v1.0
class: Workflow
requirements:
- class: MultipleInputFeatureRequirement
- class: InlineJavascriptRequirement
- class: StepInputExpressionRequirement
- class: SubworkflowFeatureRequirement
inputs:
- id: bioclient_config
type: File
- id: bioclient_load_bucket
type: string
- id: input_bam_gdc_id
type: string
- id: input_bam_file_size
type: long
- id: known_snp_gdc_id
type: string
- id: known_snp_file_size
type: long
- id: known_snp_index_gdc_id
type: string
- id: known_snp_index_file_size
type: long
- id: reference_amb_gdc_id
type: string
- id: reference_amb_file_size
type: long
- id: reference_ann_gdc_id
type: string
- id: reference_ann_file_size
type: long
- id: reference_bwt_gdc_id
type: string
- id: reference_bwt_file_size
type: long
- id: reference_dict_gdc_id
type: string
- id: reference_dict_file_size
type: long
- id: reference_fa_gdc_id
type: string
- id: reference_fa_file_size
type: long
- id: reference_fai_gdc_id
type: string
- id: reference_fai_file_size
type: long
- id: reference_pac_gdc_id
type: string
- id: reference_pac_file_size
type: long
- id: reference_sa_gdc_id
type: string
- id: reference_sa_file_size
type: long
- id: start_token
type: File
- id: thread_count
type: long
- id: job_uuid
type: string
outputs:
- id: indexd_bam_json
type: File
outputSource: load_bam/output
- id: indexd_bai_json
type: File
outputSource: load_bai/output
- id: indexd_mirna_profiling_tar_json
type: File
outputSource: load_tar_mirna_profiling/output
- id: indexd_mirna_profiling_isoforms_quant_json
type: File
outputSource: load_mirna_profiling_isoforms_quant/output
- id: indexd_mirna_profiling_mirnas_quant_json
type: File
outputSource: load_mirna_profiling_mirnas_quant/output
- id: indexd_sqlite_json
type: File
outputSource: load_sqlite/output
- id: token
type: File
outputSource: generate_token/token
steps:
- id: extract_bam
run: ../../tools/bio_client_download.cwl
in:
- id: config-file
source: bioclient_config
- id: download_handle
source: input_bam_gdc_id
- id: file_size
source: input_bam_file_size
out:
- id: output
- id: extract_known_snp
run: ../../tools/bio_client_download.cwl
in:
- id: config-file
source: bioclient_config
- id: download_handle
source: known_snp_gdc_id
- id: file_size
source: known_snp_file_size
out:
- id: output
- id: extract_known_snp_index
run: ../../tools/bio_client_download.cwl
in:
- id: config-file
source: bioclient_config
- id: download_handle
source: known_snp_index_gdc_id
- id: file_size
source: known_snp_index_file_size
out:
- id: output
- id: extract_ref_fa
run: ../../tools/bio_client_download.cwl
in:
- id: config-file
source: bioclient_config
- id: download_handle
source: reference_fa_gdc_id
- id: file_size
source: reference_fa_file_size
out:
- id: output
- id: extract_ref_fai
run: ../../tools/bio_client_download.cwl
in:
- id: config-file
source: bioclient_config
- id: download_handle
source: reference_fai_gdc_id
- id: file_size
source: reference_fai_file_size
out:
- id: output
- id: extract_ref_dict
run: ../../tools/bio_client_download.cwl
in:
- id: config-file
source: bioclient_config
- id: download_handle
source: reference_dict_gdc_id
- id: file_size
source: reference_dict_file_size
out:
- id: output
- id: extract_ref_amb
run: ../../tools/bio_client_download.cwl
in:
- id: config-file
source: bioclient_config
- id: download_handle
source: reference_amb_gdc_id
- id: file_size
source: reference_amb_file_size
out:
- id: output
- id: extract_ref_ann
run: ../../tools/bio_client_download.cwl
in:
- id: config-file
source: bioclient_config
- id: download_handle
source: reference_ann_gdc_id
- id: file_size
source: reference_ann_file_size
out:
- id: output
- id: extract_ref_bwt
run: ../../tools/bio_client_download.cwl
in:
- id: config-file
source: bioclient_config
- id: download_handle
source: reference_bwt_gdc_id
- id: file_size
source: reference_bwt_file_size
out:
- id: output
- id: extract_ref_pac
run: ../../tools/bio_client_download.cwl
in:
- id: config-file
source: bioclient_config
- id: download_handle
source: reference_pac_gdc_id
- id: file_size
source: reference_pac_file_size
out:
- id: output
- id: extract_ref_sa
run: ../../tools/bio_client_download.cwl
in:
- id: config-file
source: bioclient_config
- id: download_handle
source: reference_sa_gdc_id
- id: file_size
source: reference_sa_file_size
out:
- id: output
- id: root_fasta_files
run: ../../tools/root_fasta_dnaseq.cwl
in:
- id: fasta
source: extract_ref_fa/output
- id: fasta_amb
source: extract_ref_amb/output
- id: fasta_ann
source: extract_ref_ann/output
- id: fasta_bwt
source: extract_ref_bwt/output
- id: fasta_dict
source: extract_ref_dict/output
- id: fasta_fai
source: extract_ref_fai/output
- id: fasta_pac
source: extract_ref_pac/output
- id: fasta_sa
source: extract_ref_sa/output
out:
- id: output
- id: root_known_snp_files
run: ../../tools/root_vcf.cwl
in:
- id: vcf
source: extract_known_snp/output
- id: vcf_index
source: extract_known_snp_index/output
out:
- id: output
- id: transform
run: transform_mirna.cwl
in:
- id: input_bam
source: extract_bam/output
- id: known_snp
source: root_known_snp_files/output
- id: reference_sequence
source: root_fasta_files/output
- id: thread_count
source: thread_count
- id: job_uuid
source: job_uuid
out:
- id: merge_all_sqlite_destination_sqlite
- id: mirna_profiling_mirna_adapter_report_sorted_output
- id: mirna_profiling_mirna_alignment_stats_features
- id: mirna_profiling_mirna_expression_matrix_expn_matrix_txt
- id: mirna_profiling_mirna_expression_matrix_expn_matrix_norm_txt
- id: mirna_profiling_mirna_expression_matrix_expn_matrix_norm_log_txt
- id: mirna_profiling_mirna_expression_matrix_mimat_expn_matrix_mimat_txt
- id: mirna_profiling_mirna_expression_matrix_mimat_expn_matrix_mimat_norm_txt
- id: mirna_profiling_mirna_expression_matrix_mimat_expn_matrix_mimat_norm_log_txt
- id: mirna_profiling_mirna_graph_libs_jpgs
- id: mirna_profiling_mirna_tcga_isoforms_quant
- id: mirna_profiling_mirna_tcga_mirnas_quant
- id: picard_markduplicates_output
- id: tar_mirna_profiling_alignment_stats
run: ../../tools/tar_dir.cwl
in:
- id: INPUT
source: transform/mirna_profiling_mirna_alignment_stats_features
- id: file
valueFrom: features.tar
out:
- id: OUTPUT
- id: tar_mirna_profiling_graph_libs
run: ../../tools/tar_dir.cwl
in:
- id: INPUT
source: transform/mirna_profiling_mirna_graph_libs_jpgs
- id: file
valueFrom: graph_libs_jpgs.tar
out:
- id: OUTPUT
- id: tar_mirna_profiling
run: ../../tools/tar.cwl
in:
- id: INPUT
source: [
transform/mirna_profiling_mirna_adapter_report_sorted_output,
tar_mirna_profiling_alignment_stats/OUTPUT,
tar_mirna_profiling_graph_libs/OUTPUT,
transform/mirna_profiling_mirna_expression_matrix_expn_matrix_txt,
transform/mirna_profiling_mirna_expression_matrix_expn_matrix_norm_txt,
transform/mirna_profiling_mirna_expression_matrix_expn_matrix_norm_log_txt,
transform/mirna_profiling_mirna_expression_matrix_mimat_expn_matrix_mimat_txt,
transform/mirna_profiling_mirna_expression_matrix_mimat_expn_matrix_mimat_norm_txt,
transform/mirna_profiling_mirna_expression_matrix_mimat_expn_matrix_mimat_norm_log_txt,
transform/mirna_profiling_mirna_tcga_isoforms_quant,
transform/mirna_profiling_mirna_tcga_mirnas_quant
]
- id: file
source: job_uuid
valueFrom: $(self)_mirna_profiling.tar.xz
out:
- id: OUTPUT
- id: rename_isoforms_quant
run: ../../tools/rename.cwl
in:
- id: INPUT
source: transform/mirna_profiling_mirna_tcga_isoforms_quant
- id: OUTNAME
source: input_bam_gdc_id
valueFrom: $(self).mirbase21.isoforms.quantification.txt
out:
- id: OUTPUT
- id: rename_mirnas_quant
run: ../../tools/rename.cwl
in:
- id: INPUT
source: transform/mirna_profiling_mirna_tcga_mirnas_quant
- id: OUTNAME
source: input_bam_gdc_id
valueFrom: $(self).mirbase21.mirnas.quantification.txt
out:
- id: OUTPUT
- id: load_bam
run: ../../tools/bio_client_upload_pull_uuid.cwl
in:
- id: config-file
source: bioclient_config
- id: input
source: transform/picard_markduplicates_output
- id: upload-bucket
source: bioclient_load_bucket
- id: upload-key
valueFrom: $(inputs.job_uuid)/$(inputs.input.basename)
- id: job_uuid
source: job_uuid
valueFrom: $(null)
out:
- id: output
- id: load_bai
run: ../../tools/bio_client_upload_pull_uuid.cwl
in:
- id: config-file
source: bioclient_config
- id: input
source: transform/picard_markduplicates_output
valueFrom: $(self.secondaryFiles[0])
- id: upload-bucket
source: bioclient_load_bucket
- id: upload-key
valueFrom: $(inputs.job_uuid)/$(inputs.input.basename)
- id: job_uuid
source: job_uuid
valueFrom: $(null)
out:
- id: output
- id: load_sqlite
run: ../../tools/bio_client_upload_pull_uuid.cwl
in:
- id: config-file
source: bioclient_config
- id: input
source: transform/merge_all_sqlite_destination_sqlite
- id: upload-bucket
source: bioclient_load_bucket
- id: upload-key
valueFrom: $(inputs.job_uuid)/$(inputs.input.basename)
- id: job_uuid
source: job_uuid
valueFrom: $(null)
out:
- id: output
- id: load_tar_mirna_profiling
run: ../../tools/bio_client_upload_pull_uuid.cwl
in:
- id: config-file
source: bioclient_config
- id: input
source: tar_mirna_profiling/OUTPUT
- id: upload-bucket
source: bioclient_load_bucket
- id: upload-key
valueFrom: $(inputs.job_uuid)/$(inputs.input.basename)
- id: job_uuid
source: job_uuid
valueFrom: $(null)
out:
- id: output
- id: load_mirna_profiling_isoforms_quant
run: ../../tools/bio_client_upload_pull_uuid.cwl
in:
- id: config-file
source: bioclient_config
- id: input
source: rename_isoforms_quant/OUTPUT
- id: upload-bucket
source: bioclient_load_bucket
- id: upload-key
valueFrom: $(inputs.job_uuid)/$(inputs.input.basename)
- id: job_uuid
source: job_uuid
valueFrom: $(null)
out:
- id: output
- id: load_mirna_profiling_mirnas_quant
run: ../../tools/bio_client_upload_pull_uuid.cwl
in:
- id: config-file
source: bioclient_config
- id: input
source: rename_mirnas_quant/OUTPUT
- id: upload-bucket
source: bioclient_load_bucket
- id: upload-key
valueFrom: $(inputs.job_uuid)/$(inputs.input.basename)
- id: job_uuid
source: job_uuid
valueFrom: $(null)
out:
- id: output
- id: generate_token
run: ../../tools/generate_load_token.cwl
in:
- id: load1
source: load_bam/output
- id: load2
source: load_bai/output
- id: load3
source: load_mirna_profiling_isoforms_quant/output
- id: load4
source: load_mirna_profiling_mirnas_quant/output
- id: load5
source: load_tar_mirna_profiling/output
- id: load6
source: load_sqlite/output
out:
- id: token