Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Edit 2021-01-20: I rewrote this description to be clearer, and updated it to reflect latest information.
Sometimes it's difficult to get specific types of params into a code tool, restricted by the CLI interface, both arg-parse and the CWL / WDL command line generators, so writing to a JSON file, then just parsing that in should make it a lot easier. CWL worked pretty much out of the box, but generating the JSON file is a little bit tricker in Cromwell due to some grammar issues.
Minimal example
This gives the following error for Cromwell:
There was talk about cromwell upgrading the grammar which I thought might fix this, but it's been sitting in the backlog for a while: JIRA: CROM-6280, Cromwell Slack.
Next, I tried inserting an input so the write_json wouldn't be inside a string interpoloated block which got me a lot closer.
Error:
No suitable input for 'computed' amongst '{intvalue}'
Jira issue: https://broadworkbench.atlassian.net/browse/BW-392
But interestingly this turns out to work if wrapped in a workflow. So merging this PR actually would work, UNLESS you wanted to directly run a single python tool without wrapping it in a workflow. As of 20th Jan, there was a bit of movement on that Cromwell Jira ticket for the computed values, so if that's resolved, this PR should be good to go!