-
Notifications
You must be signed in to change notification settings - Fork 351
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for cwl.output.json (#3152)
* Add support for cwl.output.json
- Loading branch information
Showing
19 changed files
with
338 additions
and
77 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 34 additions & 0 deletions
34
centaur/src/main/resources/standardTestCases/cwl_output_json/cwl_output_json.cwl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
cwlVersion: v1.0 | ||
$graph: | ||
- id: outputJson | ||
# slightly modified version of conformance test #2 to remove the default File that doesn't work on PAPI | ||
# It is instead being passed as an input through the input json file | ||
class: CommandLineTool | ||
cwlVersion: v1.0 | ||
hints: | ||
- class: DockerRequirement | ||
dockerPull: python:2-slim | ||
inputs: | ||
- id: reference | ||
type: File | ||
inputBinding: { position: 2 } | ||
|
||
- id: reads | ||
type: | ||
type: array | ||
items: File | ||
inputBinding: { prefix: "-YYY" } | ||
inputBinding: { position: 3, prefix: "-XXX" } | ||
|
||
- id: "args.py" | ||
type: File | ||
inputBinding: | ||
position: -1 | ||
|
||
outputs: | ||
# note the absence of any sort of valueFrom. | ||
# The output value is generated from the "cwl.output.json" file created by the python script | ||
args: string[] | ||
|
||
baseCommand: python | ||
arguments: ["bwa", "mem"] |
22 changes: 22 additions & 0 deletions
22
centaur/src/main/resources/standardTestCases/cwl_output_json/cwl_output_json.inputs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
{ | ||
"args.py": { | ||
"class": "File", | ||
"location": "gs://centaur-cwl-conformance/cwl-inputs/args.py" | ||
}, | ||
"reference": { | ||
"class": "File", | ||
"location": "gs://centaur-cwl-conformance/cwl-inputs/chr20.fa", | ||
"size": 123, | ||
"checksum": "sha1$hash" | ||
}, | ||
"reads": [ | ||
{ | ||
"class": "File", | ||
"location": "gs://centaur-cwl-conformance/cwl-inputs/example_human_Illumina.pe_1.fastq" | ||
}, | ||
{ | ||
"class": "File", | ||
"location": "gs://centaur-cwl-conformance/cwl-inputs/example_human_Illumina.pe_2.fastq" | ||
} | ||
] | ||
} |
24 changes: 24 additions & 0 deletions
24
centaur/src/main/resources/standardTestCases/cwl_output_json_jes.test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
name: cwl_output_json_jes | ||
testFormat: workflowsuccess | ||
backends: [Jes] | ||
|
||
files { | ||
wdl: cwl_output_json/cwl_output_json.cwl | ||
inputs: cwl_output_json/cwl_output_json.inputs | ||
} | ||
|
||
metadata { | ||
status: Succeeded | ||
"outputs.outputJson.args.0": "bwa" | ||
"outputs.outputJson.args.1": "mem" | ||
"outputs.outputJson.args.2": "chr20.fa" | ||
"outputs.outputJson.args.3": "-XXX" | ||
"outputs.outputJson.args.4": "-YYY" | ||
"outputs.outputJson.args.5": "example_human_Illumina.pe_1.fastq" | ||
"outputs.outputJson.args.6": "-YYY" | ||
"outputs.outputJson.args.7": "example_human_Illumina.pe_2.fastq" | ||
} | ||
|
||
workflowType: CWL | ||
workflowTypeVersion: v1.0 | ||
workflowRoot: outputJson |
13 changes: 13 additions & 0 deletions
13
centaur/src/main/resources/standardTestCases/wdl_empty_glob.test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
name: wdl_empty_glob | ||
testFormat: workflowsuccess | ||
|
||
files { | ||
wdl: wdl_empty_glob/wdl_empty_glob.wdl | ||
} | ||
|
||
metadata { | ||
workflowName: wdl_empty_glob | ||
status: Succeeded | ||
"calls.wdl_empty_glob.empty_glob.executionStatus": Done | ||
"outputs.wdl_empty_glob.wf_out": 0 | ||
} |
19 changes: 19 additions & 0 deletions
19
centaur/src/main/resources/standardTestCases/wdl_empty_glob/wdl_empty_glob.wdl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
task empty_glob { | ||
command { | ||
echo "hello" | ||
} | ||
runtime { | ||
docker: "ubuntu:latest" | ||
} | ||
output { | ||
Array[File] empty_glob = glob("*.txt") | ||
Int nbGlobbed = length(empty_glob) | ||
} | ||
} | ||
|
||
workflow wdl_empty_glob { | ||
call empty_glob | ||
output { | ||
Int wf_out = empty_glob.nbGlobbed | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.