Skip to content

Commit 7157a5e

Browse files
expose runtime attributes in AnnotateVcf (#255)
1 parent ba508ac commit 7157a5e

File tree

3 files changed

+70
-43
lines changed

3 files changed

+70
-43
lines changed

wdl/AnnotateExternalAF.wdl

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,17 +26,23 @@ workflow AnnotateExternalAF {
2626
RuntimeAttr? runtime_attr_modify_vcf
2727
RuntimeAttr? runtime_override_combine_vcfs
2828
RuntimeAttr? runtime_override_split_vcf
29+
RuntimeAttr? runtime_attr_split_ref_bed
30+
RuntimeAttr? runtime_attr_split_query_vcf
31+
RuntimeAttr? runtime_attr_bedtools_closest
32+
RuntimeAttr? runtime_attr_select_matched_svs
2933

3034
}
3135
call SplitBed as split_ref_bed{
3236
input:
3337
bed = ref_bed,
34-
sv_base_mini_docker = sv_base_mini_docker
38+
sv_base_mini_docker = sv_base_mini_docker,
39+
runtime_attr_override = runtime_attr_split_ref_bed
3540
}
3641
call SplitVcf as split_query_vcf{
3742
input:
3843
vcf = vcf,
39-
sv_pipeline_docker = sv_pipeline_docker
44+
sv_pipeline_docker = sv_pipeline_docker,
45+
runtime_attr_override = runtime_attr_split_query_vcf
4046
}
4147
4248
Array[String] svtype_list = ["DEL","DUP","INS","INV_CPX","BND_CTX"]
@@ -60,13 +66,14 @@ workflow AnnotateExternalAF {
6066
population = population,
6167
contig = contig,
6268
ref_prefix = ref_prefix,
63-
6469
max_shards_per_chrom_step1 = max_shards_per_chrom_step1,
6570
min_records_per_shard_step1 = min_records_per_shard_step1,
6671
sv_base_mini_docker = sv_base_mini_docker,
6772
sv_pipeline_docker = sv_pipeline_docker,
6873
runtime_override_split_vcf = runtime_override_split_vcf,
6974
runtime_attr_modify_vcf = runtime_attr_modify_vcf
75+
runtime_attr_select_matched_svs = runtime_attr_select_matched_svs,
76+
runtime_attr_bedtools_closest = runtime_attr_bedtools_closest
7077
}
7178
}
7279

wdl/AnnotateExternalAFperContig.wdl

Lines changed: 51 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -35,91 +35,103 @@ workflow AnnotateExternalAFperContig {
3535
RuntimeAttr? runtime_attr_modify_vcf
3636
RuntimeAttr? runtime_override_split_vcf
3737
RuntimeAttr? runtime_override_combine_vcfs
38+
RuntimeAttr? runtime_attr_bedtools_closest
39+
RuntimeAttr? runtime_attr_select_matched_svs
3840
}
3941

40-
call BedtoolsClosest as compare_del{
42+
call BedtoolsClosest as compare_del {
4143
input:
4244
bed_a = split_query_vcf_del,
4345
bed_b = split_ref_bed_del,
4446
svtype = "del",
4547
contig = contig,
46-
sv_pipeline_docker = sv_pipeline_docker
48+
sv_pipeline_docker = sv_pipeline_docker,
49+
runtime_attr_override = runtime_attr_bedtools_closest
4750
}
4851
49-
call BedtoolsClosest as compare_dup{
52+
call BedtoolsClosest as compare_dup {
5053
input:
5154
bed_a = split_query_vcf_dup,
5255
bed_b = split_ref_bed_dup,
5356
svtype = "dup",
5457
contig = contig,
55-
sv_pipeline_docker = sv_pipeline_docker
58+
sv_pipeline_docker = sv_pipeline_docker,
59+
runtime_attr_override = runtime_attr_bedtools_closest
5660
}
5761
58-
call BedtoolsClosest as compare_ins{
62+
call BedtoolsClosest as compare_ins {
5963
input:
6064
bed_a = split_query_vcf_ins,
6165
bed_b = split_ref_bed_ins,
6266
svtype = "ins",
6367
contig = contig,
64-
sv_pipeline_docker = sv_pipeline_docker
68+
sv_pipeline_docker = sv_pipeline_docker,
69+
runtime_attr_override = runtime_attr_bedtools_closest
6570
}
6671
67-
call BedtoolsClosest as compare_inv{
72+
call BedtoolsClosest as compare_inv {
6873
input:
6974
bed_a = split_query_vcf_inv,
7075
bed_b = split_ref_bed_inv,
7176
svtype = "inv",
7277
contig = contig,
73-
sv_pipeline_docker = sv_pipeline_docker
78+
sv_pipeline_docker = sv_pipeline_docker,
79+
runtime_attr_override = runtime_attr_bedtools_closest
7480
}
7581
76-
call BedtoolsClosest as compare_bnd{
82+
call BedtoolsClosest as compare_bnd {
7783
input:
7884
bed_a = split_query_vcf_bnd,
7985
bed_b = split_ref_bed_bnd,
8086
svtype = "bnd",
8187
contig = contig,
82-
sv_pipeline_docker = sv_pipeline_docker
88+
sv_pipeline_docker = sv_pipeline_docker,
89+
runtime_attr_override = runtime_attr_bedtools_closest
8390
}
8491
85-
call SelectMatchedSVs as calcu_del{
92+
call SelectMatchedSVs as calcu_del {
8693
input:
8794
svtype = "del",
8895
input_bed = compare_del.output_bed,
8996
population = population,
90-
sv_pipeline_docker = sv_pipeline_docker
97+
sv_pipeline_docker = sv_pipeline_docker,
98+
runtime_attr_override = runtime_attr_select_matched_svs
9199
}
92100
93-
call SelectMatchedSVs as calcu_dup{
101+
call SelectMatchedSVs as calcu_dup {
94102
input:
95103
input_bed=compare_dup.output_bed,
96104
svtype="dup",
97105
population = population,
98-
sv_pipeline_docker = sv_pipeline_docker
106+
sv_pipeline_docker = sv_pipeline_docker,
107+
runtime_attr_override = runtime_attr_select_matched_svs
99108
}
100109
101-
call SelectMatchedINSs as calcu_ins{
110+
call SelectMatchedINSs as calcu_ins {
102111
input:
103112
input_bed = compare_ins.output_bed,
104113
svtype = "ins",
105114
population = population,
106-
sv_pipeline_docker = sv_pipeline_docker
115+
sv_pipeline_docker = sv_pipeline_docker,
116+
runtime_attr_override = runtime_attr_select_matched_svs
107117
}
108118
109-
call SelectMatchedSVs as calcu_inv{
119+
call SelectMatchedSVs as calcu_inv {
110120
input:
111121
input_bed = compare_inv.output_bed,
112122
svtype = "inv",
113123
population = population,
114-
sv_pipeline_docker = sv_pipeline_docker
124+
sv_pipeline_docker = sv_pipeline_docker,
125+
runtime_attr_override = runtime_attr_select_matched_svs
115126
}
116127
117-
call SelectMatchedINSs as calcu_bnd{
128+
call SelectMatchedINSs as calcu_bnd {
118129
input:
119130
input_bed = compare_bnd.output_bed,
120131
svtype = "bnd",
121132
population = population,
122-
sv_pipeline_docker = sv_pipeline_docker
133+
sv_pipeline_docker = sv_pipeline_docker,
134+
runtime_attr_override = runtime_attr_select_matched_svs
123135
}
124136
125137
call MiniTasks.SplitVcf as SplitVcf {
@@ -160,15 +172,15 @@ workflow AnnotateExternalAFperContig {
160172
runtime_attr_override = runtime_override_combine_vcfs
161173
}
162174
163-
output{
175+
output {
164176
File annotated_vcf = CombineVcfStep1.concat_vcf
165177
File annotated_vcf_tbi = CombineVcfStep1.concat_vcf_idx
166178
}
167179

168180
}
169181

170-
task SplitBed{
171-
input{
182+
task SplitBed {
183+
input {
172184
File bed
173185
String sv_base_mini_docker
174186
RuntimeAttr? runtime_attr_override
@@ -206,7 +218,7 @@ task SplitBed{
206218
cat header <(zcat ~{bed} | awk '{if ($6=="BND" || $6=="CTX") print}' ) > ~{prefix}.BND_CTX.bed
207219
>>>
208220

209-
output{
221+
output {
210222
File del = "~{prefix}.DEL.bed"
211223
File dup = "~{prefix}.DUP.bed"
212224
File ins = "~{prefix}.INS.bed"
@@ -215,8 +227,8 @@ task SplitBed{
215227
}
216228
}
217229

218-
task SplitVcf{
219-
input{
230+
task SplitVcf {
231+
input {
220232
File vcf
221233
String sv_pipeline_docker
222234
RuntimeAttr? runtime_attr_override
@@ -256,7 +268,7 @@ task SplitVcf{
256268
cat header <(awk '{if ($5=="BND" || $5=="CTX") print}' ~{prefix}.bed )> ~{prefix}.BND_CTX.bed
257269
>>>
258270

259-
output{
271+
output {
260272
File bed = "~{prefix}.bed"
261273
File del = "~{prefix}.DEL.bed"
262274
File dup = "~{prefix}.DUP.bed"
@@ -266,8 +278,8 @@ task SplitVcf{
266278
}
267279
}
268280

269-
task BedtoolsClosest{
270-
input{
281+
task BedtoolsClosest {
282+
input {
271283
File bed_a
272284
File bed_b
273285
String svtype
@@ -306,13 +318,13 @@ task BedtoolsClosest{
306318
bedtools closest -wo -a <(sort -k1,1 -k2,2n filea.bed) -b <(sort -k1,1 -k2,2n fileb.bed) >> ~{svtype}.bed
307319
>>>
308320

309-
output{
321+
output {
310322
File output_bed = "~{svtype}.bed"
311323
}
312324
}
313325

314-
task SelectMatchedSVs{
315-
input{
326+
task SelectMatchedSVs {
327+
input {
316328
File input_bed
317329
String svtype
318330
Array[String] population
@@ -351,13 +363,13 @@ task SelectMatchedSVs{
351363
-p ~{pop_list}
352364
>>>
353365

354-
output{
366+
output {
355367
File output_comp = "~{prefix}.comparison"
356368
}
357369
}
358370

359-
task SelectMatchedINSs{
360-
input{
371+
task SelectMatchedINSs {
372+
input {
361373
File input_bed
362374
String svtype
363375
Array[String] population
@@ -396,13 +408,13 @@ task SelectMatchedINSs{
396408
-p ~{pop_list}
397409
>>>
398410

399-
output{
411+
output {
400412
File output_comp = "~{prefix}.comparison"
401413
}
402414
}
403415

404-
task ModifyVcf{
405-
input{
416+
task ModifyVcf {
417+
input {
406418
File labeled_del
407419
File labeled_dup
408420
File labeled_ins
@@ -489,7 +501,7 @@ task ModifyVcf{
489501
tabix ~{prefix}.annotated.vcf.gz
490502
>>>
491503

492-
output{
504+
output {
493505
File annotated_vcf = "~{prefix}.annotated.vcf.gz"
494506
File annotated_vcf_tbi = "~{prefix}.annotated.vcf.gz.tbi"
495507
}

wdl/AnnotateVcf.wdl

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,10 @@ workflow AnnotateVcf {
4343
RuntimeAttr? runtime_attr_modify_vcf
4444
RuntimeAttr? runtime_override_combine_vcfs
4545
RuntimeAttr? runtime_override_split_vcf
46+
RuntimeAttr? runtime_attr_split_ref_bed
47+
RuntimeAttr? runtime_attr_split_query_vcf
48+
RuntimeAttr? runtime_attr_bedtools_closest
49+
RuntimeAttr? runtime_attr_select_matched_svs
4650
}
4751

4852
call ann.ScatterAnnotateVcfByChrom as ScatterAnnotateVcfByChrom {
@@ -98,7 +102,11 @@ workflow AnnotateVcf {
98102
sv_pipeline_docker = sv_pipeline_docker,
99103
runtime_attr_modify_vcf = runtime_attr_modify_vcf,
100104
runtime_override_split_vcf = runtime_override_split_vcf,
101-
runtime_override_combine_vcfs = runtime_override_combine_vcfs
105+
runtime_override_combine_vcfs = runtime_override_combine_vcfs,
106+
runtime_attr_split_ref_bed = runtime_attr_split_ref_bed,
107+
runtime_attr_split_query_vcf = runtime_attr_split_query_vcf,
108+
runtime_attr_bedtools_closest = runtime_attr_bedtools_closest,
109+
runtime_attr_select_matched_svs = runtime_attr_select_matched_svs
102110
}
103111
}
104112

0 commit comments

Comments
 (0)