-
-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Some WDL Maps are not handled #77
Comments
I am looking at this, and I am not exactly sure what I should do. Is it just to create a translation from WDL to CWL like here or am I missing something obvious? |
Oh I should create a class for map, is that it? |
@RaOneG Pardon my delay In this instance, Map[String, String] samOutputNames = {"BAM SortedByCoordinate": "sortedByCoord.out.bam"} is not in the WDL So to convert this example we would need to figure out how to represent the only other place File bamFile = outFileNamePrefix + "Aligned." + samOutputNames[outSAMtype] So the strategy for
var samOutputNames = Map([ ["BAM SortedByCoordinate", "sortedByCoord.out.bam"] ];
${
var samOutputNames = new Map([ ["BAM SortedByCoordinate", "sortedByCoord.out.bam"] ]);
return inputs.outFileNamePrefix + "Aligned." + samOutputNames.get(inputs.outSAMtype);
} for the wdl-cwl-translator/wdl2cwl/main.py Line 744 in 3e287fb
However, the Javascript While in this instance we can rely on the So for now we can use a Javascript Object instead: ${
var samOutputNames = {"BAM SortedByCoordinate": "sortedByCoord.out.bam"};`
return inputs.outFileNamePrefix + "Aligned." + samOutputNames[inputs.outSAMtype];
} But eventually we will have to find another solution like adapting this polyfill that brings the ECMAScript 6 |
Hi @mr-c, |
Hello @RaOneG As for my comments on this issue, you can ignore everything I wrote about "polyfill"s and ECMAScript |
I asked in the OpenWDL slack for a real-world example of a |
@dpark01 writes
|
Currently, the WDL input compound type
Map[]
is not handled by the translator. (https://github.com/openwdl/wdl/blob/main/versions/1.1/SPEC.md#mapp-y)A workflow using Maps is given in this workflow (https://github.com/biowdl/tasks/blob/bc1bacf11498d2d30b85591cfccdcf71ef0966a5/star.wdl#L144)edit by @mr-c , we now correctly translate non-input variables of type
Map
as demonstrated by #189 but I can't find any examples of real-world WDL workflows with inputs of typeMap
; currently https://github.com/broadinstitute/warp/blob/b09880a71e3d3e42fa4b544d03aea23c0a246efc/pipelines/broad/dna_seq/germline/joint_genotyping/by_chromosome/JointGenotypingByChromosomePartOne.wdl#L46 does not translate, but that is probably more to due with the use of theSet
typeThe text was updated successfully, but these errors were encountered: