/
filter_vcf.cwl
110 lines (109 loc) · 3.39 KB
/
filter_vcf.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
#!/usr/bin/env cwl-runner
cwlVersion: v1.0
class: Workflow
label: "Apply filters to VCF file"
requirements:
- class: SubworkflowFeatureRequirement
- class: StepInputExpressionRequirement
- class: MultipleInputFeatureRequirement
inputs:
vcf:
type: File
secondaryFiles: [.tbi]
filter_mapq0_threshold:
type: float
filter_gnomADe_maximum_population_allele_frequency:
type: float
gnomad_field_name:
type: string
tumor_bam:
type: File
secondaryFiles: [.bai]
do_cle_vcf_filter:
type: boolean
filter_somatic_llr_threshold:
type: float
filter_somatic_llr_tumor_purity:
type: float
filter_somatic_llr_normal_contamination_rate:
type: float
reference:
type:
- string
- File
secondaryFiles: [.fai, ^.dict]
filter_minimum_depth:
type: int
tumor_sample_name:
type: string
normal_sample_name:
type: string
validated_variants:
type: File?
secondaryFiles: [.tbi]
doc: "An optional VCF with variants that will be flagged as 'VALIDATED' if found in this pipeline's main output VCF"
outputs:
filtered_vcf:
type: File
outputSource: set_final_vcf_name/replacement
steps:
filter_known_variants:
run: ../tools/filter_known_variants.cwl
in:
vcf: vcf
validated_variants: validated_variants
out:
[validated_annotated_vcf]
filter_vcf_gnomADe_allele_freq:
run: ../tools/filter_vcf_custom_allele_freq.cwl
in:
vcf: filter_known_variants/validated_annotated_vcf
maximum_population_allele_frequency: filter_gnomADe_maximum_population_allele_frequency
field_name: gnomad_field_name
out:
[filtered_vcf]
filter_vcf_mapq0:
run: ../tools/filter_vcf_mapq0.cwl
in:
vcf: filter_vcf_gnomADe_allele_freq/filtered_vcf
tumor_bam: tumor_bam
threshold: filter_mapq0_threshold
reference: reference
out:
[mapq0_filtered_vcf]
filter_vcf_cle:
run: ../tools/filter_vcf_cle.cwl
in:
vcf: filter_vcf_mapq0/mapq0_filtered_vcf
filter: do_cle_vcf_filter
out:
[cle_filtered_vcf]
filter_vcf_depth:
run: ../tools/filter_vcf_depth.cwl
in:
vcf: filter_vcf_cle/cle_filtered_vcf
minimum_depth: filter_minimum_depth
sample_names:
source: [normal_sample_name, tumor_sample_name]
linkMerge: merge_flattened
out:
[depth_filtered_vcf]
filter_vcf_somatic_llr:
run: ../tools/filter_vcf_somatic_llr.cwl
in:
vcf: filter_vcf_depth/depth_filtered_vcf
threshold: filter_somatic_llr_threshold
tumor_purity: filter_somatic_llr_tumor_purity
normal_contamination_rate: filter_somatic_llr_normal_contamination_rate
tumor_sample_name: tumor_sample_name
normal_sample_name: normal_sample_name
out:
[somatic_llr_filtered_vcf]
set_final_vcf_name:
run: ../tools/staged_rename.cwl
in:
original: filter_vcf_somatic_llr/somatic_llr_filtered_vcf
name:
valueFrom: 'annotated_filtered.vcf'
out:
[replacement]