From 2ccb9b0ffdbe9885bc129eeba3cac39e1080d945 Mon Sep 17 00:00:00 2001 From: anand-imcm Date: Fri, 26 Jul 2024 16:42:49 +0100 Subject: [PATCH] generate index if not provided --- workflows/tasks/extract_info.wdl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/workflows/tasks/extract_info.wdl b/workflows/tasks/extract_info.wdl index 461cc3c..4af3989 100644 --- a/workflows/tasks/extract_info.wdl +++ b/workflows/tasks/extract_info.wdl @@ -19,8 +19,8 @@ task extract { for vcf in ~{sep=' ' imputed_vcf}; do ln -s $vcf $(basename $vcf) if [[ $vcf == *.vcf.gz ]]; then - if [ ! -f $vcf.csi ]; then - bcftools index -c $vcf + if [ ! -f $vcf.csi ] && [ ! -f $vcf.tbi ]; then + bcftools index -c $(basename $vcf) fi fi done