I have a task in a WDL with a variable "diskGB" that is defined as Int and is used in the local-disk runtime setting like so :
task token_make
{
File refTar
File bam
File bamIdx
Int diskGB
...
...#(diskGB not used in command or in output block!)
...
runtime {
disks: "local-disk ${diskGB} HDD"
....
To set the diskGB setting the call I wrote in the WDL as :
call token_make
{
input:
bam=bams[index],
bamIdx=bamIndices[index],
refTar=refTar,
diskGB=size(refTar,"G")*3+size(bamIndices[index],"G")+size(bams[index],"G")+5
}
In the setting here I do some small calculation to set the size of the disk. The size for BAMs, for the refTar (and its untarring) and 5GB for output space. But when I tried this in FC, it did not run at all! I tried changing "Int diskGB" in the task variable definition to "Float diskGB" and it did not work either.
Is what I am trying to do possible? I thought it was possible. But since it is not running it is seeming impossible.
Should I have written "diskGB=size(refTar,"G")*3+size(bam,"G")+size(bamIdx,"G")+5 to instead refer to task-variables (on the left-hand side of the = )? I have not tried that.
I did this in FC sometime on Jan 31, 2017