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.
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.
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.
scatter across Array[Pair[]]
Hi,
I've three String arrays that I put in a Array[Pair[]]. I would like to call a task on each of the elements of the new Array[Pair[]] as :
workflow test{ Array[String] a Array[String] b Array[String] c Array[Pair[String,String,String]] x = zip(a,b,c) scatter (y in x ) { call stuff{ input : a=lane.a b=lane.b c=lane.c } } } task stuff{ String a String b String c command { echo ${a}" "${b}" "${c} } }
In this example the lines in the call stuff{} will not work (e.g. a=lane.a)
Is there a way to do that ? Or maybe an other design than using Array[Pair[]] to group three arrays ?
Thank you
Tagged:
Answers
A
Pair
only contains two membersleft
andright
. One can zip-a-zip though to create a structure with three elements.For example: