To celebrate the release of GATK 4.0, we are giving away free credits for running the GATK4 Best Practices pipelines in FireCloud, our secure online analysis portal. It’s first come first serve, so sign up now to claim your free credits worth $250. Sponsored by Google Cloud. Learn more at

using .bam and .bai files with WDL

Hi all,

I'm trying to re-implement our existing bash pipeline in wdl, but I keep running into the same problem. For example, most gatk tools want an indexed bam file to run. However, they seem to assume that the index file will be in the same folder as the bam file itself. This is not the case when using wdl/cromwell, since indexing the bam file will be a separate task, so the index will be put in its own separate directory.

I also looked at the 'real workflows' (, but the example also only shows the inputBAM being passed to the haplotypecaller, and not how passing the index is achieved.

In general, it is a lot of trouble to use wdl/cromwell with tools that either put their output in a file based on the input filename (in which case it is hard to write the output{} part of a task), or expect certain secondary input files to be present (eg ref.fasta, ref.dict etc) that cannot be passed explicitly. I would love to hear from other people how they deal with these problems in their scripts.


Best Answer


Sign In or Register to comment.