/
trick_revsort.cwl
executable file
·79 lines (71 loc) · 2.32 KB
/
trick_revsort.cwl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
#!/usr/bin/env cwl-runner
#
# This is a two-step workflow which uses "revtool" and "sorttool" defined above.
#
class: Workflow
doc: "Reverse the lines in a document, then sort those lines."
cwlVersion: v1.0
# Requirements & hints specify prerequisites and extensions to the workflow.
# In this example, DockerRequirement specifies a default Docker container
# in which the command line tools will execute.
hints:
- class: DockerRequirement
dockerPull: debian:8
# The inputs array defines the structure of the input object that describes
# the inputs to the workflow.
#
# The "reverse_sort" input parameter demonstrates the "default" field. If the
# field "reverse_sort" is not provided in the input object, the default value will
# be used.
inputs:
workflow_input:
type: File
doc: "The input file to be processed."
format: iana:text/plain
default:
class: File
location: hello.txt
reverse_sort:
type: boolean
default: true
doc: "If true, reverse (decending) sort"
name:
type: string
doc: "Here to test for a bug in --pack"
# The "outputs" array defines the structure of the output object that describes
# the outputs of the workflow.
#
# Each output field must be connected to the output of one of the workflow
# steps using the "outputSource" field. Here, the parameter "sorted_output" of the
# workflow comes from the "sorted_output" output of the "sorted" step.
outputs:
sorted_output:
type: File
outputSource: sorted/sorted_output
doc: "The output with the lines reversed and sorted."
# The "steps" array lists the executable steps that make up the workflow.
# The tool to execute each step is listed in the "run" field.
#
# In the first step, the "in" field of the step connects the upstream
# parameter "workflow_input" of the workflow to the input parameter of the tool
# "revtool_input"
#
# In the second step, the "in" field of the step connects the output
# parameter "revtool_output" from the first step to the input parameter of the
# tool "sorted_input".
steps:
rev:
in:
revtool_input: workflow_input
out: [revtool_output]
run: revtool.cwl
sorted:
in:
sorted_input: rev/revtool_output
reverse: reverse_sort
out: [sorted_output]
run: sorttool.cwl
$namespaces:
iana: https://www.iana.org/assignments/media-types/
$schemas:
- empty2.ttl