-
Notifications
You must be signed in to change notification settings - Fork 58
/
gatk_haplotypecaller_iterator.cwl
86 lines (84 loc) · 2.47 KB
/
gatk_haplotypecaller_iterator.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
#!/usr/bin/env cwl-runner
cwlVersion: v1.0
class: Workflow
label: "scatter GATK HaplotypeCaller over intervals"
requirements:
- class: InlineJavascriptRequirement
- class: ScatterFeatureRequirement
- class: StepInputExpressionRequirement
inputs:
reference:
type:
- string
- File
secondaryFiles: [.fai, ^.dict]
bam:
type: File
secondaryFiles: [^.bai]
emit_reference_confidence:
type:
type: enum
symbols: ['NONE', 'BP_RESOLUTION', 'GVCF']
gvcf_gq_bands:
type: string[]
intervals:
type:
type: array
items:
type: array
items: string
dbsnp_vcf:
type: File?
secondaryFiles: [.tbi]
contamination_fraction:
type: string?
max_alternate_alleles:
type: int?
ploidy:
type: int?
variant_index_type:
type:
- 'null'
- type: enum
symbols: ['DYNAMIC_SEEK', 'DYNAMIC_SIZE', 'LINEAR', 'INTERVAL']
variant_index_parameter:
type: string?
read_filter:
type: string?
output_prefix:
type: string?
doc: 'an optional string to prepend to the output filename'
outputs:
gvcf:
type: File[]
outputSource: haplotype_caller/gvcf
secondaryFiles: [.tbi]
steps:
haplotype_caller:
scatter: [intervals]
run: ../tools/gatk_haplotype_caller.cwl
in:
reference: reference
bam: bam
emit_reference_confidence: emit_reference_confidence
gvcf_gq_bands: gvcf_gq_bands
intervals: intervals
dbsnp_vcf: dbsnp_vcf
contamination_fraction: contamination_fraction
max_alternate_alleles: max_alternate_alleles
ploidy: ploidy
variant_index_type: variant_index_type
variant_index_parameter: variant_index_parameter
read_filter: read_filter
output_file_name:
source: output_prefix
valueFrom: '${
var prefix = self !== null ? self : "";
if (inputs.intervals.length == 1 && inputs.intervals[0].match(/^[0-9A-Za-z]+$/)) {
return prefix + inputs.intervals[0] + ".g.vcf.gz";
} else {
return prefix + "output.g.vcf.gz";
}
}'
out:
[gvcf]