/
varscan_pre_and_post_processing.cwl
198 lines (197 loc) · 6.1 KB
/
varscan_pre_and_post_processing.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
#!/usr/bin/env cwl-runner
cwlVersion: v1.0
class: Workflow
label: "Varscan Workflow"
requirements:
- class: ScatterFeatureRequirement
- class: SubworkflowFeatureRequirement
- class: MultipleInputFeatureRequirement
- class: StepInputExpressionRequirement
- class: InlineJavascriptRequirement
inputs:
reference:
type:
- string
- File
secondaryFiles: [.fai, ^.dict]
tumor_bam:
type: File
secondaryFiles: [^.bai, .bai]
normal_bam:
type: File
secondaryFiles: [^.bai]
interval_list:
type: File
strand_filter:
type: int?
default: 0
min_coverage:
type: int?
default: 8
min_var_freq:
type: float?
default: 0.1
p_value:
type: float?
default: 0.99
max_normal_freq:
type: float?
normal_sample_name:
type: string
tumor_sample_name:
type: string
scatter_count:
type: int
default: 50
outputs:
unfiltered_vcf:
type: File
outputSource: filter/unfiltered_vcf
secondaryFiles: [.tbi]
filtered_vcf:
type: File
outputSource: filter/filtered_vcf
secondaryFiles: [.tbi]
steps:
split_interval_list:
run: ../tools/split_interval_list.cwl
in:
interval_list: interval_list
scatter_count: scatter_count
out: [split_interval_lists]
intervals_to_bed:
scatter: interval_list
run: ../tools/intervals_to_bed.cwl
in:
interval_list: split_interval_list/split_interval_lists
out:
[interval_bed]
varscan:
scatter: roi_bed
run: varscan.cwl
in:
reference: reference
tumor_bam: tumor_bam
normal_bam: normal_bam
roi_bed: intervals_to_bed/interval_bed
strand_filter: strand_filter
min_coverage: min_coverage
min_var_freq: min_var_freq
p_value: p_value
max_normal_freq: max_normal_freq
out:
[somatic_snvs, somatic_indels, somatic_hc_snvs, somatic_hc_indels]
merge_scattered_somatic_snvs:
run: ../tools/picard_merge_vcfs.cwl
in:
vcfs: varscan/somatic_snvs
sequence_dictionary:
source: reference
valueFrom: '$( (self.secondaryFiles !== undefined) ? self.secondaryFiles.find(function(x) { return x.nameext === ".dict" }) : self.replace(/.fa$/,".dict") )'
merged_vcf_basename:
valueFrom: 'somatic_snvs'
out:
[merged_vcf]
merge_scattered_somatic_indels:
run: ../tools/picard_merge_vcfs.cwl
in:
vcfs: varscan/somatic_indels
sequence_dictionary:
source: reference
valueFrom: '$((self.secondaryFiles !== undefined) ? self.secondaryFiles.find(function(x) { return x.nameext === ".dict" }) : self.replace(/.fa$/,".dict") )'
merged_vcf_basename:
valueFrom: 'somatic_indels'
out:
[merged_vcf]
merge_scattered_somatic_hc_snvs:
run: ../tools/picard_merge_vcfs.cwl
in:
vcfs: varscan/somatic_hc_snvs
sequence_dictionary:
source: reference
valueFrom: '$((self.secondaryFiles !== undefined) ? self.secondaryFiles.find(function(x) { return x.nameext === ".dict" }) : self.replace(/.fa$/,".dict") )'
merged_vcf_basename:
valueFrom: 'somatic_hc_snvs'
out:
[merged_vcf]
merge_scattered_somatic_hc_indels:
run: ../tools/picard_merge_vcfs.cwl
in:
vcfs: varscan/somatic_hc_indels
sequence_dictionary:
source: reference
valueFrom: '$((self.secondaryFiles !== undefined) ? self.secondaryFiles.find(function(x) { return x.nameext === ".dict" }) : self.replace(/.fa$/,".dict") )'
merged_vcf_basename:
valueFrom: 'somatic_hc_indels'
out:
[merged_vcf]
merge_snvs:
run: ../tools/set_filter_status.cwl
in:
vcf: merge_scattered_somatic_snvs/merged_vcf
filtered_vcf: merge_scattered_somatic_hc_snvs/merged_vcf
reference: reference
out:
[merged_vcf]
index_merged_snvs:
run: ../tools/index_vcf.cwl
in:
vcf: merge_snvs/merged_vcf
out:
[indexed_vcf]
merge_indels:
run: ../tools/set_filter_status.cwl
in:
vcf: merge_scattered_somatic_indels/merged_vcf
filtered_vcf: merge_scattered_somatic_hc_indels/merged_vcf
reference: reference
out:
[merged_vcf]
index_merged_indels:
run: ../tools/index_vcf.cwl
in:
vcf: merge_indels/merged_vcf
out:
[indexed_vcf]
merge:
run: ../tools/merge_vcf.cwl
in:
vcfs: [index_merged_snvs/indexed_vcf, index_merged_indels/indexed_vcf]
out:
[merged_vcf]
rename_tumor_sample:
run: ../tools/replace_vcf_sample_name.cwl
in:
input_vcf: merge/merged_vcf
sample_to_replace:
default: 'TUMOR'
new_sample_name: tumor_sample_name
out:
[renamed_vcf]
rename_normal_sample:
run: ../tools/replace_vcf_sample_name.cwl
in:
input_vcf: rename_tumor_sample/renamed_vcf
sample_to_replace:
default: 'NORMAL'
new_sample_name: normal_sample_name
out:
[renamed_vcf]
index:
run: ../tools/index_vcf.cwl
in:
vcf: rename_normal_sample/renamed_vcf
out:
[indexed_vcf]
filter:
run: fp_filter.cwl
in:
reference: reference
bam: tumor_bam
vcf: index/indexed_vcf
min_var_freq: min_var_freq
variant_caller:
valueFrom: "varscan"
sample_name: tumor_sample_name
out:
[unfiltered_vcf, filtered_vcf]