@@ -15,6 +15,7 @@ workflow TinyResolve {
15
15
Int samples_per_shard = 25
16
16
String sv_pipeline_docker
17
17
String linux_docker
18
+ Boolean rm_cpx_type = true
18
19
RuntimeAttr ? runtime_attr_resolve
19
20
RuntimeAttr ? runtime_attr_untar
20
21
RuntimeAttr ? runtime_attr_concattars
@@ -78,6 +79,7 @@ workflow TinyResolve {
78
79
sv_pipeline_docker = sv_pipeline_docker ,
79
80
cytoband =cytoband ,
80
81
cytoband_idx =cytoband_idx ,
82
+ rm_cpx_type = rm_cpx_type ,
81
83
discfile =GetShardDiscfiles .shard_items ,
82
84
discfile_idx =GetShardDiscfileIndexes .shard_items ,
83
85
mei_bed =mei_bed ,
@@ -111,6 +113,7 @@ task ResolveManta {
111
113
File cytoband
112
114
File mei_bed
113
115
String sv_pipeline_docker
116
+ Boolean rm_cpx_type
114
117
RuntimeAttr ? runtime_attr_override
115
118
}
116
119
@@ -139,9 +142,22 @@ task ResolveManta {
139
142
pe=${discfiles[$i]}
140
143
sample_no=` printf %03d $i `
141
144
bash /opt/sv-pipeline/00_preprocessing/scripts/mantatloccheck.sh $vcf $pe ${sample_id} ~ {mei_bed} ~ {cytoband}
142
- mv ${sample_id} .manta.complex.vcf.gz tloc_${sample_no} .${sample_id} .manta.complex.vcf.gz
143
- bgzip manta.unresolved.vcf
144
- mv manta.unresolved.vcf.gz ${sample_no} .${sample_id} .manta.unresolved.vcf.gz
145
+ if [[ ~ {true= ' true' false= ' false' rm_cpx_type} = ' true' ]]; then
146
+ bcftools annotate --include ' INFO/SVTYPE != "CPX"' --keep-sites \
147
+ --remove ' INFO/CPX_TYPE'
148
+ --output " tloc_${sample_no} .${sample_id} .manta.complex.vcf.gz" \
149
+ --output-type z \
150
+ " ${sample_id} .manta.complex.vcf.gz"
151
+ bcftools annotate --include ' INFO/SVTYPE != "CPX"' --keep-sites \
152
+ --remove ' INFO/CPX_TYPE'
153
+ --output " ${sample_no} .${sample_id} .manta.unresolved.vcf.gz" \
154
+ --output-type z \
155
+ manta.unresolved.vcf.gz
156
+ else
157
+ mv ${sample_id} .manta.complex.vcf.gz tloc_${sample_no} .${sample_id} .manta.complex.vcf.gz
158
+ bgzip manta.unresolved.vcf
159
+ mv manta.unresolved.vcf.gz ${sample_no} .${sample_id} .manta.unresolved.vcf.gz
160
+ fi
145
161
done
146
162
find . -type f -name ' *.complex.vcf.gz' \
147
163
| tar --create --file=' manta_tloc_~{shard_number}.tar' --files-from=-
0 commit comments