Heads up:
We’re moving the GATK website, docs and forum to a new platform. Read the full story and breakdown of key changes on this blog.
Update: July 26, 2019
This section of the forum is now closed; we are working on a new support model for WDL that we will share here shortly. For Cromwell-specific issues, see the Cromwell docs and post questions on Github.

Type Coercion

Geraldine_VdAuweraGeraldine_VdAuwera Cambridge, MAMember, Administrator, Broadie admin

WDL values can be created from either JSON values or from native language values. The below table references String-like, Integer-like, etc to refer to values in a particular programming language. For example, "String-like" could mean a java.io.String in the Java context or a str in Python. An "Array-like" could refer to a Seq in Scala or a list in Python.

WDL Type Can Accept Notes / Constraints
String JSON String
String Identity coercion
File JSON String Interpreted as a file path
String-like Interpreted as file path
String Interpreted as file path
File Identity Coercion
Int JSON Number Use floor of the value for non-integers
Int Identity coercion
Float JSON Number
Float Identity coercion
Boolean JSON Boolean
Boolean Identity coercion
Array[T] JSON Array Elements must be coercable to T
Array-like Elements must be coercable to T
Map[K, V] JSON Object keys and values must be coercable to K and V, respectively
Map-like keys and values must be coercable to K and V, respectively
Sign In or Register to comment.