@@ -31,6 +31,7 @@ rule deepvariant_make_examples:
31
31
input :
32
32
bam = join (workpath , "BAM" , "{name}.sorted.bam" ),
33
33
bai = join (workpath , "BAM" , "{name}.sorted.bam.bai" ),
34
+ bed = provided (join (workpath , "references" , "wes_regions_50bp_padded.bed" ), run_wes ),
34
35
output :
35
36
success = join (workpath , "deepvariant" , "mk_examples" , "{name}.make_examples.success" ),
36
37
params :
@@ -46,7 +47,11 @@ rule deepvariant_make_examples:
46
47
w .name ,
47
48
int (allocated ("threads" , "deepvariant_make_examples" , cluster ))
48
49
)),
49
- message : "Running DeepVariant make_examples on '{input.bam}' input file"
50
+ # Call variants within regions BED
51
+ # file created from WES capture kit
52
+ wes_region_option = lambda _ : "--regions {0}" .format (
53
+ join (workpath , "references" , "wes_regions_50bp_padded.bed" ),
54
+ ) if run_wes else '' ,
50
55
threads : int (allocated ("threads" , "deepvariant_make_examples" , cluster ))
51
56
container : config ['images' ]['deepvariant' ]
52
57
envmodules : config ['tools' ]['deepvariant' ]
@@ -74,7 +79,7 @@ rule deepvariant_make_examples:
74
79
--halt 2 \\
75
80
--line-buffer \\
76
81
make_examples \\
77
- --mode calling \\
82
+ --mode calling {params.wes_region_option} \\
78
83
--ref {params.genome} \\
79
84
--reads {input.bam} \\
80
85
--examples {params.example} \\
@@ -131,7 +136,6 @@ rule deepvariant_call_variants:
131
136
# @WES = "/opt/models/wes/model.ckpt"
132
137
# @WGS = "/opt/models/wgs/model.ckpt"
133
138
ckpt = lambda _ : "/opt/models/wes/model.ckpt" if run_wes else "/opt/models/wgs/model.ckpt" ,
134
- message : "Running DeepVariant call_variants on '{wildcards.name}' sample"
135
139
threads : int (allocated ("threads" , "deepvariant_call_variants" , cluster ))
136
140
container : config ['images' ]['deepvariant' ]
137
141
envmodules : config ['tools' ]['deepvariant' ]
@@ -197,7 +201,6 @@ rule deepvariant_postprocess_variants:
197
201
w .name ,
198
202
int (allocated ("threads" , "deepvariant_make_examples" , cluster ))
199
203
)),
200
- message : "Running DeepVariant postprocess_variants on '{input.callvar}' input file"
201
204
threads : int (allocated ("threads" , "deepvariant_postprocess_variants" , cluster ))
202
205
container : config ['images' ]['deepvariant' ]
203
206
envmodules : config ['tools' ]['deepvariant' ]
0 commit comments