diff --git a/samtools.wdl b/samtools.wdl index c4c81267309bb578b2f79ca8d97ca82cb92ab880..befa3352d151671c1b0f6c884ada01774a291b92 100644 --- a/samtools.wdl +++ b/samtools.wdl @@ -182,17 +182,24 @@ task Fastq { task Tabix { input { - String inputFile + File inputFile + String outputFilePath = "indexed.vcf.gz" String type = "vcf" String dockerTag = "0.2.6--ha92aebf_0" } command { - tabix ~{inputFile} -p ~{type} + set -e + if [ ! -f ~{outputFilePath} ] + then + ln ~{inputFile} ~{outputFilePath} + fi + tabix ~{outputFilePath} -p ~{type} } output { - File index = inputFile + ".tbi" + File indexedFile = outputFilePath + File index = outputFilePath + ".tbi" } runtime {