@@ -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 }
0 commit comments