Skip to content

Instantly share code, notes, and snippets.

@dleehr
Created December 8, 2016 20:47
Show Gist options
  • Save dleehr/4c72a5a70e4a59f80f453c0379f52aab to your computer and use it in GitHub Desktop.
Save dleehr/4c72a5a70e4a59f80f453c0379f52aab to your computer and use it in GitHub Desktop.
#!/usr/bin/env cwl-runner
cwlVersion: v1.0
class: ExpressionTool
requirements:
- class: InlineJavascriptRequirement
inputs:
primary:
type: File
secondary:
type:
type: array
items: File
outputs:
merged:
type: File
expression: >
${
var ret = inputs.primary;
ret["secondaryFiles"] = inputs.secondary;
return {"merged": ret };
}
{"primary":{"class":"File","path":"primary"},"secondary":[{"class":"File","path":"secondary"}]}
Primary File
Secondary File
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment