I have a table containing different metadata information about a set of samples as an Array[Object] and I need to extract a couple of columns from this table and output those two columns into a file that will be read and used by the task. I wanted to know whether I can do this within a task rather than within a workflow, that is, without using the scatter construct which is not allowed inside a task.
If I zip two arrays I obtain an Array[Pair[String,String]] variable.
Now if I want to output to file an Array[Array[String]] I can use write_tsv(), if I want to output to file a Map[String,String] I can use write_map().
But WDL does not let me coerce Array[Pair[String,String]] to either Array[Array[String]] nor Map[String,String] (though I can coerce Map[String,String] to Array[Pair[String,String]]), so neither option is available.
Is there a solution to this that does not involve the scatter construct?