common-workflow-lab/wdl-cwl-translator

WDL's `size()` function

mr-c opened this issue · 0 comments

mr-c commented

https://github.com/openwdl/wdl/blob/main/versions/1.1/SPEC.md#float-sizefilearrayfile-string

https://www.commonwl.org/v1.2/CommandLineTool.html#File look for the size field which is measured in bytes.

example:

Int disk_size = ceil(size(input_bam, "GiB")) + 20

size(input_bam, "GiB")

equivalent to the CWL expression snippet inputs.input_bam.size / 1024^3