Workflow input JSON array with length of one is converted to scalar Completed
We are trying to use the ExomeGermlineSingleSample WARP pipeline,which accepts a JSON array of strings for the input field ExomeGermlineSingleSample.sample_and_unmapped_bams.flowcell_unmapped_bams
Usually samples have multiple uBAM files but for some, there is a single uBAM. We specify the input to be this.participant, which should in theory expand to
["gs://something/patient.bam"]
Unfortunately Terra is converting this to a scalar, we get this error
Workflow input processing failed (Caused by [reason 1 of 1]: Failed to evaluate input 'sample_and_unmapped_bams' (reason 1 of 1): Error(s): No coercion defined from '"gs://.../BamToUnmappedBams/.../call-SortSam/shard-0/....bam.unmapped.bam"' of type 'spray.json.JsString' to 'Array[File]'.)
This anti-feature would seem like it's by intentional design. Our other runs in the same job which have multiple uBAMs per sample work as expected, only the run with one uBAM crashes. Is there a clean way to work around this?
Comments
10 comments
Hi Jennings Zhang and Gabriel Goodney,
A fix for this issue went out with yesterday's release. An array with a single value should work when passed in with the normal workflow configuration syntax, without needing to be wrapped in an array.
If you run into any trouble, please let us know.
Kind regards,
Jason
Hi Jennings Zhang,
Thank you for writing in about this issue. Can you share the workspace where you are seeing this issue with GROUP_FireCloud-Support@firecloud.org by clicking the Share button in your workspace? The Share option is in the three-dots menu at the top-right.
Let us know the workspace name, as well as the relevant submission and workflow IDs. We’ll be happy to take a closer look as soon as we can.
Kind regards,
Jason
Thanks for helping out Jason Cerrato! I am not sure I am allowed to share the workspace, and how exactly it'll make it through the hoops of authorized domains. Though I can ask my superiors.
I can, however, do my best to provide steps to reproduce.
Hi Jennings Zhang,
Thank you for those steps. I was able to reproduce the issue and I'll be happy to bring this to the attention of our engineers tomorrow. Can you let us know the urgency with which you need a workaround for this issue? Are you currently blocked by this.
Many thanks,
Jason
Jason Cerrato it is of no urgency.
Come to, we would figure out a temporary client-side workaround.
Hey Jennings Zhang,
If you're interested, you can follow this JIRA ticket created by our engineers to track work toward resolving this bug: https://broadworkbench.atlassian.net/browse/BW-678
I'll also follow up on this thread if I get word that the bug has been resolved!
Kind regards,
Jason
Hey Jason,
Has this been resolved or is there a workaround for this issue? I am having the same exact problem when running the Whole Genome Analysis Pipeline. Any help or information would be appreciated.
Thanks,
Gabe
Hi Gabe,
Thanks for writing in. This has not yet been resolved but I am happy to check with the team to see if there is a known good workaround. I'll get back to you as soon as I can.
Kind regards,
Jason
Hi Gabriel Goodney,
We have a known good workaround for cases where you know the list/array only has one element. The workaround is to surround the reference with square brackets so that Cromwell knows to interpret the single element as an array.
Here is an example of how you define the sample_and_unmapped_bams variable for the WholeGenomeGermlineSingleSample best practices workflow.
{ "sample_name": this.read_group_set_id, "base_file_name": this.read_group_set_id, "flowcell_unmapped_bams": [this.read_groups.flowcell_unmapped_bams_list], "final_gvcf_base_name": this.read_group_set_id, "unmapped_bam_suffix": ".bam" }{ "sample_name": this.read_group_set_id, "base_file_name": this.read_group_set_id, "flowcell_unmapped_bams": this.read_groups.flowcell_unmapped_bams_list, "final_gvcf_base_name": this.read_group_set_id, "unmapped_bam_suffix": ".bam" }The workflows team will be discussing this scalar issue to see if we can identify a good permanent solution for th problem. For now, I hope this workaround helps you move forward with your analysis!
Kind regards,
Jason
Jason Cerrato thank you for letting me know! We will try it out.
Please sign in to leave a comment.