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 https://software.broadinstitute.org/firecloud/documentation/freecredits

Using wdl when output filenames depend on input filenames

Hi all,
I was wondering if there is a way to use wdl with programs that do not allow users to specify an output file.
We use a couple of bash commands to generate all the required index files for our analysis, and right now we have to manually include all index files in the .json file.

$ file=NC_011083.fasta  
$ dict_file=${file%fasta}dict
$ picard-tools CreateSequenceDictionary R=$file O=$dict_file
$ samtools faidx $file
$ bwa index $file

Generated index files:

NC_011083.dict   
NC_011083.fasta.amb  
NC_011083.fasta.bwt  
NC_011083.fasta.pac
NC_011083.fasta  
NC_011083.fasta.ann  
NC_011083.fasta.fai  
NC_011083.fasta.sa

NC_011083.dict gives the problem, since it wants to replace the extension, instead of just adding to it. Replacing the extension is of course the default behavior of many programs, how can we deal with this when using WDL?

Answers

Sign In or Register to comment.