From 7f721eab0bb39599fabf7d742cc5311b254b8943 Mon Sep 17 00:00:00 2001 From: epiercehoffman Date: Mon, 17 May 2021 22:28:45 -0400 Subject: [PATCH] add -w flag to grep for varID searches in 04b (#139) --- wdl/CombineReassess.wdl | 2 +- wdl/Module04b.wdl | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/wdl/CombineReassess.wdl b/wdl/CombineReassess.wdl index 1f9a9408a..3409ce776 100644 --- a/wdl/CombineReassess.wdl +++ b/wdl/CombineReassess.wdl @@ -64,7 +64,7 @@ task Vcf2Bed { svtk vcf2bed ~{vcf} ~{vcf}.bed awk '{if($6!="")print $0}' ~{vcf}.bed >~{vcf}.nonempty.bed cut -f 4 ~{regeno_file} >regeno_variants.txt - fgrep -f regeno_variants.txt ~{vcf}.nonempty.bed> nonempty.txt + fgrep -wf regeno_variants.txt ~{vcf}.nonempty.bed> nonempty.txt >>> output { File nonempty="nonempty.txt" diff --git a/wdl/Module04b.wdl b/wdl/Module04b.wdl index c633e3986..0733cc3d9 100644 --- a/wdl/Module04b.wdl +++ b/wdl/Module04b.wdl @@ -741,9 +741,9 @@ task ConcatRegenotypedVcfs { command <<< set -euo pipefail zcat ~{regeno_vcf} |fgrep "#" > head.txt - zcat ~{regeno_vcf} |fgrep -f ~{regeno_variants} >body.txt + zcat ~{regeno_vcf} |fgrep -wf ~{regeno_variants} >body.txt cat head.txt body.txt|bgzip -c > regeno.vcf.gz - zcat ~{depth_vcf} |fgrep -f ~{regeno_variants} -v |bgzip -c > no_variant.vcf.gz + zcat ~{depth_vcf} |fgrep -wf ~{regeno_variants} -v |bgzip -c > no_variant.vcf.gz vcf-concat regeno.vcf.gz no_variant.vcf.gz \ | vcf-sort -c \ | bgzip -c > ~{batch}.depth.regeno_final.vcf.gz