-
Notifications
You must be signed in to change notification settings - Fork 1
/
bam_collapsing_marianas.cwl
602 lines (598 loc) · 17.4 KB
/
bam_collapsing_marianas.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
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
class: Workflow
cwlVersion: v1.0
id: bam_collapsing
label: bam_collapsing
$namespaces:
sbg: 'https://www.sevenbridges.com/'
inputs:
- id: reference_fasta
type: File
doc: >-
The reference sequence in a single reference sequence in FASTA format,
with all contigs in the same file, validated according to the FASTA
standard. It has multiple secondary file associated with it ending in
".dict, .fai, .amb, .ann, .bwt, .pac, .index, .rbwt, .rpac, .rsa, .sa"
secondaryFiles:
- .fai
- ^.dict
- .amb
- .ann
- .bwt
- .pac
- .sa
'sbg:x': 0
'sbg:y': 640.21875
- id: bed_file
type: File
doc: >-
Targets in BED file format used by Waltz to generate the PileUp for
collapsing of the BAM file. The genotype from positions in this bed file
will be used as the consensus base if min_consensus_percent threshold is
not reached. Otherwise, the reference base from the supplied
reference_fasta will be used
'sbg:x': 0
'sbg:y': 3094.6875
- id: bam
type: File
secondaryFiles:
- ^.bai
'sbg:x': 0
'sbg:y': 3201.375
- id: min_map_quality
type: int
doc: Make sure to use high quality reads.
'sbg:x': 0
'sbg:y': 2134.2890625
- id: min_base_quality
type: int
doc: Minimum Base Quality score to be used during collapsing.
'sbg:x': 0
'sbg:y': 2347.7109375
- id: mismatches
type: int
doc: Allowable mismatch count in UMI bases for grouping UMI families
'sbg:x': 0
'sbg:y': 2027.578125
- id: min_consensus_percent
type: int
doc: >-
Percentage of bases that must be in agreement at each position in the
consensus read before masking that base as "N
'sbg:x': 0
'sbg:y': 2241
- id: key
type:
type: array
items: string
inputBinding:
prefix: '-k'
'sbg:x': 686.4918212890625
'sbg:y': 1812.375
- id: sort_first_pass_output_file_name
type: string
doc: Output File Name for Marianas First Pass process.
'sbg:x': 0
'sbg:y': 426.796875
- id: output_name_collapsed_gzip_R1
type: string?
doc: Name of the output file for READ1 collapsed FASTQ file
'sbg:x': 0
'sbg:y': 1707.4453125
- id: output_name_collapsed_gzip_R2
type: string?
doc: Name of the output file for READ2 collapsed FASTQ file
'sbg:x': 0
'sbg:y': 1600.7109375
- id: read_group_sequencing_platform
type: string
doc: BAM Tag describing the Platform used to generate the sequencing data.
'sbg:x': 0
'sbg:y': 746.9296875
- id: read_group_sample_name
type: string
doc: >-
SM = Sample
The name of the sample sequenced in this read group. GATK tools treat all
read groups with the same SM value as containing sequencing data for the
same sample, and this is also the name that will be used for the sample
column in the VCF file. Therefore it's critical that the SM field be
specified correctly. When sequencing pools of samples, use a pool name
instead of an individual sample name. Note, when we say pools, we mean
samples that are not individually barcoded. In the case of multiplexing
(often confused with pooling) where you know which reads come from each
sample and you have simply run the samples together in one lane, you can
keep the SM tag as the sample name and not the "pooled name".
'sbg:x': 0
'sbg:y': 960.3984375
- id: read_group_platform_unit
type: string
doc: >-
PU = Platform Unit
The PU holds three types of information, the
{FLOWCELL_BARCODE}.{LANE}.{SAMPLE_BARCODE}. The {FLOWCELL_BARCODE} refers
to the unique identifier for a particular flow cell. The {LANE} indicates
the lane of the flow cell and the {SAMPLE_BARCODE} is a
sample/library-specific identifier. Although the PU is not required by
GATK but takes precedence over ID for base recalibration if it is present.
In the example shown earlier, two read group fields, ID and PU,
appropriately differentiate flow cell lane, marked by .2, a factor that
contributes to batch effects.
'sbg:x': 0
'sbg:y': 1067.1328125
- id: read_group_library
type: string
doc: >-
LB = DNA preparation library identifier
MarkDuplicates uses the LB field to determine which read groups might
contain molecular duplicates, in case the same DNA library was sequenced
on multiple lanes.
'sbg:x': 0
'sbg:y': 1173.8671875
- id: read_group_identifier
type: string
doc: >-
ID = Read group identifier
This tag identifies which read group each read belongs to, so each read
group's ID must be unique. It is referenced both in the read group
definition line in the file header (starting with @RG) and in the RG:Z tag
for each read record.
'sbg:x': 0
'sbg:y': 1280.6015625
- id: picard_output_file_name
type: string?
doc: Output BAM file name for picard AddOrReplaceReadGroups
'sbg:x': 0
'sbg:y': 1387.3125
- id: aln_output_file_name
type: string?
'sbg:x': 0
'sbg:y': 3308.0625
- id: sort_order
type: string?
doc: Picard Sort Order of the Input BAM file
'sbg:x': 0
'sbg:y': 320.109375
- id: create_bam_index
type: boolean?
doc: Make Index (bai) file corresponding to the BAM file.
'sbg:x': 0
'sbg:y': 2774.578125
- id: P
type: boolean?
doc: skip pairing; mate rescue performed unless -S also in use
'sbg:x': 0
'sbg:y': 1494
- id: window_size
type: string?
'sbg:x': 0
'sbg:y': 106.6875
- id: scoring_gap_alignments
type: string?
'sbg:x': 0
'sbg:y': 533.5078125
- id: option_bedgraph
type: boolean?
'sbg:x': 0
'sbg:y': 1814.1796875
- id: no_sort
type: boolean?
'sbg:x': 0
'sbg:y': 1920.890625
- id: maximum_average_depth
type: int?
'sbg:x': 0
'sbg:y': 2561.1328125
- id: maximum_mixmatch_rate
type: float?
'sbg:x': 0
'sbg:y': 2454.421875
- id: ignore_bad_assembly
type: boolean?
'sbg:x': 0
'sbg:y': 2667.8671875
- id: contig_anchor
type: string?
'sbg:x': 0
'sbg:y': 2881.2890625
- id: consensus_sequence
type: boolean?
'sbg:x': 0
'sbg:y': 2988
- id: abra_collapsing_number_of_threads
type: int?
'sbg:x': 1386.576171875
'sbg:y': 1905.109375
- id: wobble
type: int
'sbg:x': 0
'sbg:y': 0
- id: temporary_directory
type: string?
'sbg:x': 0
'sbg:y': 213.3984375
- id: read_group_sequencing_center
type: string
'sbg:x': 0
'sbg:y': 853.6640625
outputs:
- id: second_pass_insertions
outputSource:
- marianas_collapsing_second_pass_cwl/second_pass_insertions
type: File
'sbg:x': 1141.263671875
'sbg:y': 1266.578125
- id: second_pass_alt_alleles
outputSource:
- marianas_collapsing_second_pass_cwl/second_pass_alt_alleles
type: File
'sbg:x': 1141.263671875
'sbg:y': 1373.265625
- id: collapsed_fastq_2
outputSource:
- marianas_collapsing_second_pass_cwl/collapsed_fastq_2
type: File
'sbg:x': 1141.263671875
'sbg:y': 1934.796875
- id: collapsed_fastq_1
outputSource:
- marianas_collapsing_second_pass_cwl/collapsed_fastq_1
type: File
'sbg:x': 1141.263671875
'sbg:y': 2041.484375
- id: pileup_without_duplicates
outputSource:
- waltz_pileupmetrics/pileup_without_duplicates
type: File
'sbg:x': 686.4918212890625
'sbg:y': 1282.2890625
- id: intervals_without_duplicates
outputSource:
- waltz_pileupmetrics/intervals_without_duplicates
type: File
'sbg:x': 686.4918212890625
'sbg:y': 1919.0859375
- id: intervals
outputSource:
- waltz_pileupmetrics/intervals
type: File
'sbg:x': 686.4918212890625
'sbg:y': 2025.7734375
- id: unfiltered-bam
outputSource:
- abra_fx/abra_fx_bam
type: File
secondaryFiles:
- ^.bai
'sbg:x': 2415.73974609375
'sbg:y': 1479.953125
- id: output_file
outputSource:
- abra_fx/output_file
type: File?
label: indel_realign_targets
'sbg:x': 2415.73974609375
'sbg:y': 1707.3984375
- id: first_pass_insertions
outputSource:
- marianas_collapsing_first_pass_cwl/first_pass_insertions
type: File
'sbg:x': 1141.263671875
'sbg:y': 1828.109375
- id: alt_allele_file
outputSource:
- marianas_collapsing_first_pass_cwl/alt_allele_file
type: File
'sbg:x': 1141.263671875
'sbg:y': 2148.171875
- id: first_pass_output_dir
outputSource:
- marianas_collapsing_first_pass_cwl/first_pass_output_dir
type: Directory
'sbg:x': 1141.263671875
'sbg:y': 1721.421875
- id: gzip_read1
outputSource:
- gzip_Read1/output_file
type: File
'sbg:x': 1386.576171875
'sbg:y': 1509.640625
- id: gzip_read2
outputSource:
- gzip_Read2/output_file
type: File
'sbg:x': 1386.576171875
'sbg:y': 1402.90625
- id: simplex-bam
outputSource:
- marianas_separate_bams_1_8_1/simplex-bam
type: File
secondaryFiles:
- ^.bai
'sbg:x': 2721.735107421875
'sbg:y': 1426.5859375
- id: duplex-bam
outputSource:
- marianas_separate_bams_1_8_1/duplex-bam
type: File
secondaryFiles:
- ^.bai
'sbg:x': 2721.735107421875
'sbg:y': 1774.7421875
- id: alignment_metrics_unfiltered
outputSource:
- picard_collect_alignment_summary_metrics_unfiltered/alignment_metrics
type: File
'sbg:x': 2721.735107421875
'sbg:y': 1881.453125
- id: alignment_metrics_simplex
outputSource:
- picard_collect_alignment_summary_metrics_simplex/alignment_metrics
type: File
'sbg:x': 3027.73046875
'sbg:y': 1600.640625
- id: alignment_metrics_duplex
outputSource:
- picard_collect_alignment_summary_metrics_duplex/alignment_metrics
type: File
'sbg:x': 3027.73046875
'sbg:y': 1707.375
steps:
- id: waltz_pileupmetrics
in:
- id: bam
source: bam
- id: referece_fasta
source: reference_fasta
- id: min_map_quality
source: min_map_quality
- id: bed_file
source: bed_file
out:
- id: pileup
- id: pileup_without_duplicates
- id: intervals
- id: intervals_without_duplicates
run: >-
command_line_tools/waltz_pileupmatrices_3.1.1/waltz_pileupmatrices_3.1.1.cwl
label: Generate Pileup
'sbg:x': 319.171875
'sbg:y': 1633.03125
- id: marianas_collapsing_first_pass_cwl
in:
- id: input_bam
source: bam
- id: pileup
source: waltz_pileupmetrics/pileup
- id: min_mapping_quality
source: min_map_quality
- id: min_base_quality
source: min_base_quality
- id: mismatches
source: mismatches
- id: wobble
source: wobble
- id: min_consensus_percent
source: min_consensus_percent
- id: reference_fasta
source: reference_fasta
out:
- id: first_pass_output_file
- id: alt_allele_file
- id: first_pass_insertions
- id: first_pass_output_dir
run: >-
command_line_tools/marianas_collapsing_first_pass_1.8.1/marianas_first_pass.cwl
label: Marianas First Pass
'sbg:x': 686.4918212890625
'sbg:y': 1656.6640625
- id: sort
in:
- id: input
linkMerge: merge_flattened
source:
- marianas_collapsing_first_pass_cwl/first_pass_output_file
- id: key
default:
- '6,6n'
- '8,8n'
source:
- key
- id: output
source: sort_first_pass_output_file_name
out:
- id: sorted
run: command_line_tools/utilities_ubuntu_18.04/sort.cwl
label: Sort First Pass Output
'sbg:x': 1141.263671875
'sbg:y': 1145.890625
- id: marianas_collapsing_second_pass_cwl
in:
- id: input_bam
source: bam
- id: pileup
source: waltz_pileupmetrics/pileup
- id: min_mapping_quality
source: min_map_quality
- id: min_base_quality
source: min_base_quality
- id: mismatches
source: mismatches
- id: wobble
source: wobble
- id: min_consensus_percent
source: min_consensus_percent
- id: reference_fasta
source: reference_fasta
- id: first_pass_file
source: sort/sorted
out:
- id: collapsed_fastq_1
- id: collapsed_fastq_2
- id: second_pass_alt_alleles
- id: second_pass_insertions
run: >-
command_line_tools/marianas_collapsing_second_pass_1.8.1/marianas_second_pass.cwl
label: Marianas Second Pass
'sbg:x': 686.4918212890625
'sbg:y': 1444.9765625
- id: gzip_Read1
in:
- id: input
source: marianas_collapsing_second_pass_cwl/collapsed_fastq_1
- id: output
source: output_name_collapsed_gzip_R1
out:
- id: output_file
run: command_line_tools/utilities_ubuntu_18.04/gzip.cwl
label: gzip_Read1
'sbg:x': 1141.263671875
'sbg:y': 1607.7109375
- id: gzip_Read2
in:
- id: input
source: marianas_collapsing_second_pass_cwl/collapsed_fastq_2
- id: output
source: output_name_collapsed_gzip_R2
out:
- id: output_file
run: command_line_tools/utilities_ubuntu_18.04/gzip.cwl
label: gzip_Read2
'sbg:x': 1141.263671875
'sbg:y': 1486.9765625
- id: alignment
in:
- id: reference
source: reference_fasta
- id: reads
source:
- gzip_Read1/output_file
- gzip_Read2/output_file
- id: P
default: true
source: P
- id: M
default: true
- id: read_group_identifier
source: read_group_identifier
- id: sort_order
default: coordinate
source: sort_order
- id: create_bam_index
default: true
source: create_bam_index
- id: read_group_sequencing_platform
source: read_group_sequencing_platform
- id: read_group_sample_name
source: read_group_sample_name
- id: read_group_platform_unit
source: read_group_platform_unit
- id: read_group_library
source: read_group_library
- id: output_file_name
source: picard_output_file_name
- id: output
source: aln_output_file_name
- id: read_group_sequencing_center
source: read_group_sequencing_center
- id: temporary_directory
source: temporary_directory
out:
- id: bam
run: subworkflows/alignment.cwl
label: Align Collapsed Fastq and Generate BAM file
'sbg:x': 1386.576171875
'sbg:y': 1707.375
- id: abra_fx
in:
- id: input_bam
source:
- alignment/bam
- id: reference_fasta
source: reference_fasta
- id: bam_index
default: true
source: create_bam_index
- id: option_bedgraph
default: true
source: option_bedgraph
- id: window_size
source: window_size
- id: scoring_gap_alignments
source: scoring_gap_alignments
- id: no_sort
source: no_sort
- id: maximum_mixmatch_rate
source: maximum_mixmatch_rate
- id: maximum_average_depth
source: maximum_average_depth
- id: ignore_bad_assembly
source: ignore_bad_assembly
- id: contig_anchor
source: contig_anchor
- id: consensus_sequence
source: consensus_sequence
- id: number_of_threads
source: abra_collapsing_number_of_threads
- id: temporary_directory
source: temporary_directory
out:
- id: abra_fx_bam
- id: output_file
run: subworkflows/abra_fx.cwl
label: abra_fx.cwl
'sbg:x': 1874.360107421875
'sbg:y': 1563.03125
- id: marianas_separate_bams_1_8_1
in:
- id: input_bam
source: abra_fx/abra_fx_bam
out:
- id: duplex-bam
- id: simplex-bam
run: >-
command_line_tools/marianas_separate_bams_1.8.1/marianas_separate_bams_1.8.1.cwl
label: Marianas Seprate BAM into Simplex and Duplex
'sbg:x': 2415.73974609375
'sbg:y': 1821.109375
- id: picard_collect_alignment_summary_metrics_unfiltered
in:
- id: input
source: abra_fx/abra_fx_bam
- id: reference_sequence
source: reference_fasta
out:
- id: alignment_metrics
run: >-
command_line_tools/picard_collect_alignment_summary_metrics_2.8.1/picard_collect_alignment_summary_metrics_2.8.1.cwl
label: alignment_summary_metrics_unflitered
'sbg:x': 2415.73974609375
'sbg:y': 1593.6640625
- id: picard_collect_alignment_summary_metrics_duplex
in:
- id: input
source: marianas_separate_bams_1_8_1/duplex-bam
- id: reference_sequence
source: reference_fasta
out:
- id: alignment_metrics
run: >-
command_line_tools/picard_collect_alignment_summary_metrics_2.8.1/picard_collect_alignment_summary_metrics_2.8.1.cwl
label: alignment_summary_metrics_duplex
'sbg:x': 2721.735107421875
'sbg:y': 1661.03125
- id: picard_collect_alignment_summary_metrics_simplex
in:
- id: input
source: marianas_separate_bams_1_8_1/simplex-bam
- id: reference_sequence
source: reference_fasta
out:
- id: alignment_metrics
run: >-
command_line_tools/picard_collect_alignment_summary_metrics_2.8.1/picard_collect_alignment_summary_metrics_2.8.1.cwl
label: alignment_summary_metrics_simplex
'sbg:x': 2721.735107421875
'sbg:y': 1540.296875
requirements:
- class: SubworkflowFeatureRequirement
- class: MultipleInputFeatureRequirement