Add a function to get a list of the values from a Map #43
Labels
L-enhancement
(Legacy) An enhancement to the WDL language.
Z-specification-change
(Metadata) An issue or PR related to a specification change.
Milestone
I have a
Map[String,File]
from which I want to extract the values into anArray[File]
, that would be equivalent to eg the Java expressionList list = map.values
.Justification: I need to provide multiple files to a task and I don't want to have to hardcode separate arguments for each. I can't just use an Array at the workflow inputs level because I need to be able to call on one of the files specifically in other tasks.
Worked out use case:
JSON
WDL
The expression
dbSNP_VCF = known_sites_VCFs_map["dbsnp"]
already works perfectly. But there's currently no way to do a straightforwardknown_sites_VCFs = known_sites_VCFs_map.values
. This is the feature request. Actual syntax can be different of course.Bonus points for making the keys available as well, though I don't have an immediate use case in mind.
Draft implementation: https://github.com/openwdl/wdl/tree/43-map-values
The text was updated successfully, but these errors were encountered: