/
fp_filter.cwl
98 lines (96 loc) · 2.34 KB
/
fp_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
#!/usr/bin/env cwl-runner
cwlVersion: v1.0
class: Workflow
label: "fp_filter workflow"
requirements:
- class: SubworkflowFeatureRequirement
inputs:
bam:
type: File
secondaryFiles: [.bai,^.bai]
reference:
type:
- string
- File
secondaryFiles: [.fai, ^.dict]
vcf:
type: File
secondaryFiles: [.tbi]
variant_caller:
string
sample_name:
string?
min_var_freq:
float?
outputs:
unfiltered_vcf:
type: File
outputSource: fp_index/indexed_vcf
secondaryFiles: [.tbi]
filtered_vcf:
type: File
outputSource: hard_filter/filtered_vcf
secondaryFiles: [.tbi]
steps:
sanitize_vcf:
run: ../tools/vcf_sanitize.cwl
in:
vcf: vcf
out:
[sanitized_vcf]
normalize_variants:
run: ../tools/normalize_variants.cwl
in:
reference: reference
vcf: sanitize_vcf/sanitized_vcf
out:
[normalized_vcf]
decompose_variants:
run: ../tools/vt_decompose.cwl
in:
vcf: normalize_variants/normalized_vcf
out:
[decomposed_vcf]
index:
run: ../tools/index_vcf.cwl
in:
vcf: decompose_variants/decomposed_vcf
out:
[indexed_vcf]
fp_filter:
run: ../tools/fp_filter.cwl
in:
reference: reference
bam: bam
vcf: index/indexed_vcf
sample_name: sample_name
min_var_freq: min_var_freq
output_vcf_basename:
source: variant_caller
valueFrom: $(self)_full
out:
[filtered_vcf]
fp_bgzip:
run: ../tools/bgzip.cwl
in:
file: fp_filter/filtered_vcf
out:
[bgzipped_file]
fp_index:
run: ../tools/index_vcf.cwl
in:
vcf: fp_bgzip/bgzipped_file
out:
[indexed_vcf]
hard_filter:
run: ../tools/select_variants.cwl
in:
reference: reference
vcf: fp_index/indexed_vcf
exclude_filtered:
default: true
output_vcf_basename:
source: variant_caller
valueFrom: $(self)_filtered
out:
[filtered_vcf]