Skip to content

Commit 6da1417

Browse files
committed
Pulled changes in other brand for ss filtering
1 parent d8ae8a4 commit 6da1417

1 file changed

Lines changed: 13 additions & 1 deletion

File tree

wdl/SingleSampleFiltering.wdl

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,19 @@ task FilterLargePESRCallsWithoutRawDepthSupport {
275275
cat large_dels_without_raw_depth_support.list large_dups_without_raw_depth_support.list > large_pesr_without_raw_depth_support.list
276276
277277
cat \
278-
<(gzip -cd ~{pesr_vcf} | grep -v '^#' | grep -w -f large_pesr_without_raw_depth_support.list | sed -e 's/SVTYPE=DEL/SVTYPE=BND/' -e 's/SVTYPE=DUP/SVTYPE=BND/' -e 's/<DEL>/<BND>/' -e 's/<DUP>/<BND>/') \
278+
<(gzip -cd ~{pesr_vcf} | grep -v '^#' | grep -w -f large_pesr_without_raw_depth_support.list | sed -e 's/SVTYPE=DEL/SVTYPE=BND/' -e 's/SVTYPE=DUP/SVTYPE=BND/' -e 's/<DEL>/<BND>/' -e 's/<DUP>/<BND>/' \
279+
| awk -F'\t' '
280+
BEGIN { OFS="\t" }
281+
{
282+
end="";
283+
if (match($8, /(^|;)END=([0-9]+)/, m)) { end=m[2]; }
284+
if ($8 !~ /(^|;)CHR2=/) { $8 = $8 ";CHR2=" $1; }
285+
if (end != "" && $8 !~ /(^|;)END2=/) { $8 = $8 ";END2=" end; }
286+
if ($8 ~ /(^|;)END=[0-9]+/) { gsub(/END=[0-9]+/, "END=" $2, $8); }
287+
else { $8 = $8 ";END=" $2; }
288+
print $0;
289+
}'
290+
) \
279291
<(gzip -cd ~{pesr_vcf} | grep -v '^#' | grep -v -w -f large_pesr_without_raw_depth_support.list) \
280292
| cat <(sed -n -e '/^#/p' <(zcat ~{pesr_vcf})) - \
281293
| vcf-sort -c \

0 commit comments

Comments
 (0)