/
merge_duprem_filter.cwl
134 lines (117 loc) · 2.98 KB
/
merge_duprem_filter.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
cwlVersion: v1.0
class: Workflow
requirements:
SubworkflowFeatureRequirement: {}
ScatterFeatureRequirement: {}
StepInputExpressionRequirement: {}
InlineJavascriptRequirement: {}
### INPUT PART:
##################################################
inputs:
sample_id:
type: string
bams:
type:
type: array
items: File
is_paired_end:
type: boolean
### WORKFLOW STEPS:
##################################################
steps:
lane_replicate_merging:
doc: samtools merge - merging bam files of lane replicates
run: "../tools/samtools_merge.cwl"
in:
bams:
source: bams
output_name:
source: sample_id
valueFrom: $(self + ".bam")
out:
- bam_merged
sorting_merged_bam:
doc: samtools sort - sorting of merged bam
run: "../tools/samtools_sort.cwl"
in:
bam_unsorted:
source: lane_replicate_merging/bam_merged
out:
- bam_sorted
remove_duplicates:
doc: picard markdup - emoves duplicates from a single sorted bam file.
run: "../tools/picard_markdup.cwl"
in:
bam_sorted:
source: sorting_merged_bam/bam_sorted
out:
- bam_duprem
- picard_markdup_stdout
filter_by_mapq:
doc: samtools view
run: "../tools/samtools_view_filter.cwl"
in:
bam:
source: remove_duplicates/bam_duprem
is_paired_end:
source: is_paired_end
out:
- bam_filtered
sorting_filtered_bam:
doc: samtools sort - sorting of filtered bam
run: "../tools/samtools_sort.cwl"
in:
bam_unsorted:
source: filter_by_mapq/bam_filtered
out:
- bam_sorted
indexing_filtered_bam:
doc: |
samtools index - indexes sorted bam
run: "../tools/samtools_index_hack.cwl"
in:
bam_sorted:
source: sorting_filtered_bam/bam_sorted
out:
- bam_sorted_indexed
qc_post_filtering:
doc: fastqc - quality control for reads directly after mapping
run: "../tools/fastqc.cwl"
in:
bam:
source: indexing_filtered_bam/bam_sorted_indexed
out:
- fastqc_zip
- fastqc_html
### OUTPUTS:
##################################################
outputs:
#bam_merged:
# type: File
# outputSource: lane_replicate_merging/bam_merged
#bam_merged_sorted:
# type: File
# outputSource: sorting_merged_bam/bam_sorted
#bam_merged_duprem:
# type: File
# outputSource: remove_duplicates/bam_duprem
#bam_merged_duprem_filtered:
# type: File
# outputSource: filter_by_mapq/bam_filtered
post_filter_fastqc_zip:
type:
type: array
items: File
outputSource: qc_post_filtering/fastqc_zip
post_filter_fastqc_html:
type:
type: array
items: File
outputSource: qc_post_filtering/fastqc_html
bam:
type: File
secondaryFiles: .bai
outputSource: indexing_filtered_bam/bam_sorted_indexed
picard_markdup_stdout:
type: File
outputSource: remove_duplicates/picard_markdup_stdout