comparison env/lib/python3.9/site-packages/cwltool/schemas/v1.2.0-dev3/Process.yml @ 0:4f3585e2f14b draft default tip

"planemo upload commit 60cee0fc7c0cda8592644e1aad72851dec82c959"
author shellac
date Mon, 22 Mar 2021 18:12:50 +0000
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:4f3585e2f14b
1 saladVersion: v1.1
2 $base: "https://w3id.org/cwl/cwl#"
3
4 $namespaces:
5 cwl: "https://w3id.org/cwl/cwl#"
6 sld: "https://w3id.org/cwl/salad#"
7 rdfs: "http://www.w3.org/2000/01/rdf-schema#"
8
9 $graph:
10
11 - name: "Common Workflow Language, v1.2.0-dev3"
12 type: documentation
13 doc: {$include: concepts.md}
14
15 - $import: "salad/schema_salad/metaschema/metaschema_base.yml"
16
17 - name: BaseTypesDoc
18 type: documentation
19 doc: |
20 ## Base types
21 docChild:
22 - "#CWLType"
23 - "#Process"
24
25 - type: enum
26 name: CWLVersion
27 doc: "Version symbols for published CWL document versions."
28 symbols:
29 - cwl:draft-2
30 - cwl:draft-3.dev1
31 - cwl:draft-3.dev2
32 - cwl:draft-3.dev3
33 - cwl:draft-3.dev4
34 - cwl:draft-3.dev5
35 - cwl:draft-3
36 - cwl:draft-4.dev1
37 - cwl:draft-4.dev2
38 - cwl:draft-4.dev3
39 - cwl:v1.0.dev4
40 - cwl:v1.0
41 - cwl:v1.1.0-dev1 # a dash is required by the semver 2.0 rules
42 - cwl:v1.1
43 - cwl:v1.2.0-dev1
44 - cwl:v1.2.0-dev2
45 - cwl:v1.2.0-dev3
46
47 - name: CWLType
48 type: enum
49 extends: "sld:PrimitiveType"
50 symbols:
51 - cwl:File
52 - cwl:Directory
53 doc:
54 - "Extends primitive types with the concept of a file and directory as a builtin type."
55 - "File: A File object"
56 - "Directory: A Directory object"
57
58 - name: File
59 type: record
60 docParent: "#CWLType"
61 doc: |
62 Represents a file (or group of files when `secondaryFiles` is provided) that
63 will be accessible by tools using standard POSIX file system call API such as
64 open(2) and read(2).
65
66 Files are represented as objects with `class` of `File`. File objects have
67 a number of properties that provide metadata about the file.
68
69 The `location` property of a File is a URI that uniquely identifies the
70 file. Implementations must support the file:// URI scheme and may support
71 other schemes such as http://. The value of `location` may also be a
72 relative reference, in which case it must be resolved relative to the URI
73 of the document it appears in. Alternately to `location`, implementations
74 must also accept the `path` property on File, which must be a filesystem
75 path available on the same host as the CWL runner (for inputs) or the
76 runtime environment of a command line tool execution (for command line tool
77 outputs).
78
79 If no `location` or `path` is specified, a file object must specify
80 `contents` with the UTF-8 text content of the file. This is a "file
81 literal". File literals do not correspond to external resources, but are
82 created on disk with `contents` with when needed for a executing a tool.
83 Where appropriate, expressions can return file literals to define new files
84 on a runtime. The maximum size of `contents` is 64 kilobytes.
85
86 The `basename` property defines the filename on disk where the file is
87 staged. This may differ from the resource name. If not provided,
88 `basename` must be computed from the last path part of `location` and made
89 available to expressions.
90
91 The `secondaryFiles` property is a list of File or Directory objects that
92 must be staged in the same directory as the primary file. It is an error
93 for file names to be duplicated in `secondaryFiles`.
94
95 The `size` property is the size in bytes of the File. It must be computed
96 from the resource and made available to expressions. The `checksum` field
97 contains a cryptographic hash of the file content for use it verifying file
98 contents. Implementations may, at user option, enable or disable
99 computation of the `checksum` field for performance or other reasons.
100 However, the ability to compute output checksums is required to pass the
101 CWL conformance test suite.
102
103 When executing a CommandLineTool, the files and secondary files may be
104 staged to an arbitrary directory, but must use the value of `basename` for
105 the filename. The `path` property must be file path in the context of the
106 tool execution runtime (local to the compute node, or within the executing
107 container). All computed properties should be available to expressions.
108 File literals also must be staged and `path` must be set.
109
110 When collecting CommandLineTool outputs, `glob` matching returns file paths
111 (with the `path` property) and the derived properties. This can all be
112 modified by `outputEval`. Alternately, if the file `cwl.output.json` is
113 present in the output, `outputBinding` is ignored.
114
115 File objects in the output must provide either a `location` URI or a `path`
116 property in the context of the tool execution runtime (local to the compute
117 node, or within the executing container).
118
119 When evaluating an ExpressionTool, file objects must be referenced via
120 `location` (the expression tool does not have access to files on disk so
121 `path` is meaningless) or as file literals. It is legal to return a file
122 object with an existing `location` but a different `basename`. The
123 `loadContents` field of ExpressionTool inputs behaves the same as on
124 CommandLineTool inputs, however it is not meaningful on the outputs.
125
126 An ExpressionTool may forward file references from input to output by using
127 the same value for `location`.
128
129 fields:
130 - name: class
131 type:
132 type: enum
133 name: File_class
134 symbols:
135 - cwl:File
136 jsonldPredicate:
137 _id: "@type"
138 _type: "@vocab"
139 doc: Must be `File` to indicate this object describes a file.
140 - name: location
141 type: string?
142 doc: |
143 An IRI that identifies the file resource. This may be a relative
144 reference, in which case it must be resolved using the base IRI of the
145 document. The location may refer to a local or remote resource; the
146 implementation must use the IRI to retrieve file content. If an
147 implementation is unable to retrieve the file content stored at a
148 remote resource (due to unsupported protocol, access denied, or other
149 issue) it must signal an error.
150
151 If the `location` field is not provided, the `contents` field must be
152 provided. The implementation must assign a unique identifier for
153 the `location` field.
154
155 If the `path` field is provided but the `location` field is not, an
156 implementation may assign the value of the `path` field to `location`,
157 then follow the rules above.
158 jsonldPredicate:
159 _id: "@id"
160 _type: "@id"
161 - name: path
162 type: string?
163 doc: |
164 The local host path where the File is available when a CommandLineTool is
165 executed. This field must be set by the implementation. The final
166 path component must match the value of `basename`. This field
167 must not be used in any other context. The command line tool being
168 executed must be able to to access the file at `path` using the POSIX
169 `open(2)` syscall.
170
171 As a special case, if the `path` field is provided but the `location`
172 field is not, an implementation may assign the value of the `path`
173 field to `location`, and remove the `path` field.
174
175 If the `path` contains [POSIX shell metacharacters](http://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_02)
176 (`|`,`&`, `;`, `<`, `>`, `(`,`)`, `$`,`` ` ``, `\`, `"`, `'`,
177 `<space>`, `<tab>`, and `<newline>`) or characters
178 [not allowed](http://www.iana.org/assignments/idna-tables-6.3.0/idna-tables-6.3.0.xhtml)
179 for [Internationalized Domain Names for Applications](https://tools.ietf.org/html/rfc6452)
180 then implementations may terminate the process with a
181 `permanentFailure`.
182 jsonldPredicate:
183 "_id": "cwl:path"
184 "_type": "@id"
185 - name: basename
186 type: string?
187 doc: |
188 The base name of the file, that is, the name of the file without any
189 leading directory path. The base name must not contain a slash `/`.
190
191 If not provided, the implementation must set this field based on the
192 `location` field by taking the final path component after parsing
193 `location` as an IRI. If `basename` is provided, it is not required to
194 match the value from `location`.
195
196 When this file is made available to a CommandLineTool, it must be named
197 with `basename`, i.e. the final component of the `path` field must match
198 `basename`.
199 jsonldPredicate: "cwl:basename"
200 - name: dirname
201 type: string?
202 doc: |
203 The name of the directory containing file, that is, the path leading up
204 to the final slash in the path such that `dirname + '/' + basename ==
205 path`.
206
207 The implementation must set this field based on the value of `path`
208 prior to evaluating parameter references or expressions in a
209 CommandLineTool document. This field must not be used in any other
210 context.
211 - name: nameroot
212 type: string?
213 doc: |
214 The basename root such that `nameroot + nameext == basename`, and
215 `nameext` is empty or begins with a period and contains at most one
216 period. For the purposess of path splitting leading periods on the
217 basename are ignored; a basename of `.cshrc` will have a nameroot of
218 `.cshrc`.
219
220 The implementation must set this field automatically based on the value
221 of `basename` prior to evaluating parameter references or expressions.
222 - name: nameext
223 type: string?
224 doc: |
225 The basename extension such that `nameroot + nameext == basename`, and
226 `nameext` is empty or begins with a period and contains at most one
227 period. Leading periods on the basename are ignored; a basename of
228 `.cshrc` will have an empty `nameext`.
229
230 The implementation must set this field automatically based on the value
231 of `basename` prior to evaluating parameter references or expressions.
232 - name: checksum
233 type: string?
234 doc: |
235 Optional hash code for validating file integrity. Currently must be in the form
236 "sha1$ + hexadecimal string" using the SHA-1 algorithm.
237 - name: size
238 type: long?
239 doc: Optional file size
240 - name: "secondaryFiles"
241 type:
242 - "null"
243 - type: array
244 items: [File, Directory]
245 jsonldPredicate:
246 _id: "cwl:secondaryFiles"
247 secondaryFilesDSL: true
248 doc: |
249 A list of additional files or directories that are associated with the
250 primary file and must be transferred alongside the primary file.
251 Examples include indexes of the primary file, or external references
252 which must be included when loading primary document. A file object
253 listed in `secondaryFiles` may itself include `secondaryFiles` for
254 which the same rules apply.
255 - name: format
256 type: string?
257 jsonldPredicate:
258 _id: cwl:format
259 _type: "@id"
260 identity: true
261 doc: |
262 The format of the file: this must be an IRI of a concept node that
263 represents the file format, preferrably defined within an ontology.
264 If no ontology is available, file formats may be tested by exact match.
265
266 Reasoning about format compatability must be done by checking that an
267 input file format is the same, `owl:equivalentClass` or
268 `rdfs:subClassOf` the format required by the input parameter.
269 `owl:equivalentClass` is transitive with `rdfs:subClassOf`, e.g. if
270 `<B> owl:equivalentClass <C>` and `<B> owl:subclassOf <A>` then infer
271 `<C> owl:subclassOf <A>`.
272
273 File format ontologies may be provided in the "$schema" metadata at the
274 root of the document. If no ontologies are specified in `$schema`, the
275 runtime may perform exact file format matches.
276 - name: contents
277 type: string?
278 doc: |
279 File contents literal. Maximum of 64 KiB.
280
281 If neither `location` nor `path` is provided, `contents` must be
282 non-null. The implementation must assign a unique identifier for the
283 `location` field. When the file is staged as input to CommandLineTool,
284 the value of `contents` must be written to a file.
285
286 If `loadContents` of `inputBinding` or `outputBinding` is true and
287 `location` is valid, the implementation must read up to the first 64
288 KiB of text from the file and place it in the "contents" field.
289
290
291 - name: Directory
292 type: record
293 docAfter: "#File"
294 doc: |
295 Represents a directory to present to a command line tool.
296
297 Directories are represented as objects with `class` of `Directory`. Directory objects have
298 a number of properties that provide metadata about the directory.
299
300 The `location` property of a Directory is a URI that uniquely identifies
301 the directory. Implementations must support the file:// URI scheme and may
302 support other schemes such as http://. Alternately to `location`,
303 implementations must also accept the `path` property on Directory, which
304 must be a filesystem path available on the same host as the CWL runner (for
305 inputs) or the runtime environment of a command line tool execution (for
306 command line tool outputs).
307
308 A Directory object may have a `listing` field. This is a list of File and
309 Directory objects that are contained in the Directory. For each entry in
310 `listing`, the `basename` property defines the name of the File or
311 Subdirectory when staged to disk. If `listing` is not provided, the
312 implementation must have some way of fetching the Directory listing at
313 runtime based on the `location` field.
314
315 If a Directory does not have `location`, it is a Directory literal. A
316 Directory literal must provide `listing`. Directory literals must be
317 created on disk at runtime as needed.
318
319 The resources in a Directory literal do not need to have any implied
320 relationship in their `location`. For example, a Directory listing may
321 contain two files located on different hosts. It is the responsibility of
322 the runtime to ensure that those files are staged to disk appropriately.
323 Secondary files associated with files in `listing` must also be staged to
324 the same Directory.
325
326 When executing a CommandLineTool, Directories must be recursively staged
327 first and have local values of `path` assigend.
328
329 Directory objects in CommandLineTool output must provide either a
330 `location` URI or a `path` property in the context of the tool execution
331 runtime (local to the compute node, or within the executing container).
332
333 An ExpressionTool may forward file references from input to output by using
334 the same value for `location`.
335
336 Name conflicts (the same `basename` appearing multiple times in `listing`
337 or in any entry in `secondaryFiles` in the listing) is a fatal error.
338
339 fields:
340 - name: class
341 type:
342 type: enum
343 name: Directory_class
344 symbols:
345 - cwl:Directory
346 jsonldPredicate:
347 _id: "@type"
348 _type: "@vocab"
349 doc: Must be `Directory` to indicate this object describes a Directory.
350 - name: location
351 type: string?
352 doc: |
353 An IRI that identifies the directory resource. This may be a relative
354 reference, in which case it must be resolved using the base IRI of the
355 document. The location may refer to a local or remote resource. If
356 the `listing` field is not set, the implementation must use the
357 location IRI to retrieve directory listing. If an implementation is
358 unable to retrieve the directory listing stored at a remote resource (due to
359 unsupported protocol, access denied, or other issue) it must signal an
360 error.
361
362 If the `location` field is not provided, the `listing` field must be
363 provided. The implementation must assign a unique identifier for
364 the `location` field.
365
366 If the `path` field is provided but the `location` field is not, an
367 implementation may assign the value of the `path` field to `location`,
368 then follow the rules above.
369 jsonldPredicate:
370 _id: "@id"
371 _type: "@id"
372 - name: path
373 type: string?
374 doc: |
375 The local path where the Directory is made available prior to executing a
376 CommandLineTool. This must be set by the implementation. This field
377 must not be used in any other context. The command line tool being
378 executed must be able to to access the directory at `path` using the POSIX
379 `opendir(2)` syscall.
380
381 If the `path` contains [POSIX shell metacharacters](http://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_02)
382 (`|`,`&`, `;`, `<`, `>`, `(`,`)`, `$`,`` ` ``, `\`, `"`, `'`,
383 `<space>`, `<tab>`, and `<newline>`) or characters
384 [not allowed](http://www.iana.org/assignments/idna-tables-6.3.0/idna-tables-6.3.0.xhtml)
385 for [Internationalized Domain Names for Applications](https://tools.ietf.org/html/rfc6452)
386 then implementations may terminate the process with a
387 `permanentFailure`.
388 jsonldPredicate:
389 _id: "cwl:path"
390 _type: "@id"
391 - name: basename
392 type: string?
393 doc: |
394 The base name of the directory, that is, the name of the file without any
395 leading directory path. The base name must not contain a slash `/`.
396
397 If not provided, the implementation must set this field based on the
398 `location` field by taking the final path component after parsing
399 `location` as an IRI. If `basename` is provided, it is not required to
400 match the value from `location`.
401
402 When this file is made available to a CommandLineTool, it must be named
403 with `basename`, i.e. the final component of the `path` field must match
404 `basename`.
405 jsonldPredicate: "cwl:basename"
406 - name: listing
407 type:
408 - "null"
409 - type: array
410 items: [File, Directory]
411 doc: |
412 List of files or subdirectories contained in this directory. The name
413 of each file or subdirectory is determined by the `basename` field of
414 each `File` or `Directory` object. It is an error if a `File` shares a
415 `basename` with any other entry in `listing`. If two or more
416 `Directory` object share the same `basename`, this must be treated as
417 equivalent to a single subdirectory with the listings recursively
418 merged.
419 jsonldPredicate:
420 _id: "cwl:listing"
421
422 - name: Labeled
423 type: record
424 abstract: true
425 fields:
426 - name: label
427 type:
428 - "null"
429 - string
430 jsonldPredicate: "rdfs:label"
431 doc: "A short, human-readable label of this object."
432
433
434 - name: Identified
435 type: record
436 abstract: true
437 fields:
438 - name: id
439 type: string?
440 jsonldPredicate: "@id"
441 doc: "The unique identifier for this object."
442
443
444 - name: LoadListingEnum
445 type: enum
446 symbols: [no_listing, shallow_listing, deep_listing]
447 doc:
448 - |
449 Specify the desired behavior for loading the `listing` field of
450 a Directory object for use by expressions.
451 - "no_listing: Do not load the directory listing."
452 - "shallow_listing: Only load the top level listing, do not recurse into subdirectories."
453 - "deep_listing: Load the directory listing and recursively load all subdirectories as well."
454
455
456 - name: LoadContents
457 type: record
458 abstract: true
459 fields:
460 - name: loadContents
461 type: boolean?
462 jsonldPredicate: "cwl:loadContents"
463 doc: |
464 Only valid when `type: File` or is an array of `items: File`.
465
466 Read up to the first 64 KiB of text from the file and place it in the
467 "contents" field of the file object for use by expressions.
468 - name: loadListing
469 type: LoadListingEnum?
470 jsonldPredicate: "cwl:loadListing"
471 doc: |
472 Only valid when `type: Directory` or is an array of `items: Directory`.
473
474 Specify the desired behavior for loading the `listing` field of
475 a Directory object for use by expressions.
476
477 The order of precedence for loadListing is:
478
479 1. `loadListing` on an individual parameter
480 2. Inherited from `LoadListingRequirement`
481 3. By default: `no_listing`
482
483 - name: FieldBase
484 type: record
485 extends: Labeled
486 abstract: true
487 fields:
488 secondaryFiles:
489 type:
490 - "null"
491 - SecondaryFileSchema
492 - type: array
493 items: SecondaryFileSchema
494 jsonldPredicate:
495 _id: "cwl:secondaryFiles"
496 secondaryFilesDSL: true
497 doc: |
498 Only valid when `type: File` or is an array of `items: File`.
499
500 Provides a pattern or expression specifying files or
501 directories that should be included alongside the primary
502 file. Secondary files may be required or optional. When not
503 explicitly specified, secondary files specified for `inputs`
504 are required and `outputs` are optional. An implementation
505 must include matching Files and Directories in the
506 `secondaryFiles` property of the primary file. These Files
507 and Directories must be transferred and staged alongside the
508 primary file. An implementation may fail workflow execution
509 if a required secondary file does not exist.
510
511 If the value is an expression, the value of `self` in the expression
512 must be the primary input or output File object to which this binding
513 applies. The `basename`, `nameroot` and `nameext` fields must be
514 present in `self`. For `CommandLineTool` outputs the `path` field must
515 also be present. The expression must return a filename string relative
516 to the path to the primary File, a File or Directory object with either
517 `path` or `location` and `basename` fields set, or an array consisting
518 of strings or File or Directory objects. It is legal to reference an
519 unchanged File or Directory object taken from input as a secondaryFile.
520 The expression may return "null" in which case there is no secondaryFile
521 from that expression.
522
523 To work on non-filename-preserving storage systems, portable tool
524 descriptions should avoid constructing new values from `location`, but
525 should construct relative references using `basename` or `nameroot`
526 instead.
527
528 If a value in `secondaryFiles` is a string that is not an expression,
529 it specifies that the following pattern should be applied to the path
530 of the primary file to yield a filename relative to the primary File:
531
532 1. If string ends with `?` character, remove the last `?` and mark
533 the resulting secondary file as optional.
534 2. If string begins with one or more caret `^` characters, for each
535 caret, remove the last file extension from the path (the last
536 period `.` and all following characters). If there are no file
537 extensions, the path is unchanged.
538 3. Append the remainder of the string to the end of the file path.
539
540 streamable:
541 type: boolean?
542 doc: |
543 Only valid when `type: File` or is an array of `items: File`.
544
545 A value of `true` indicates that the file is read or written
546 sequentially without seeking. An implementation may use this flag to
547 indicate whether it is valid to stream file contents using a named
548 pipe. Default: `false`.
549
550
551 - name: InputFormat
552 type: record
553 abstract: true
554 fields:
555 format:
556 type:
557 - "null"
558 - string
559 - type: array
560 items: string
561 - Expression
562 jsonldPredicate:
563 _id: cwl:format
564 _type: "@id"
565 identity: true
566 doc: |
567 Only valid when `type: File` or is an array of `items: File`.
568
569 This must be one or more IRIs of concept nodes
570 that represents file formats which are allowed as input to this
571 parameter, preferrably defined within an ontology. If no ontology is
572 available, file formats may be tested by exact match.
573
574
575 - name: OutputFormat
576 type: record
577 abstract: true
578 fields:
579 format:
580 type:
581 - "null"
582 - string
583 - Expression
584 jsonldPredicate:
585 _id: cwl:format
586 _type: "@id"
587 identity: true
588 doc: |
589 Only valid when `type: File` or is an array of `items: File`.
590
591 This is the file format that will be assigned to the output
592 File object.
593
594
595 - name: Parameter
596 type: record
597 extends: [FieldBase, sld:Documented, Identified]
598 abstract: true
599 doc: |
600 Define an input or output parameter to a process.
601
602
603 - type: enum
604 name: Expression
605 doc: |
606 'Expression' is not a real type. It indicates that a field must allow
607 runtime parameter references. If [InlineJavascriptRequirement](#InlineJavascriptRequirement)
608 is declared and supported by the platform, the field must also allow
609 Javascript expressions.
610 symbols:
611 - cwl:ExpressionPlaceholder
612
613
614 - name: InputBinding
615 type: record
616 fields:
617 - name: loadContents
618 type:
619 - "null"
620 - boolean
621 jsonldPredicate: "cwl:loadContents"
622 doc: |
623 Use of `loadContents` in `InputBinding` is deprecated.
624 Preserved for v1.0 backwards compatability. Will be removed in
625 CWL v2.0. Use `InputParameter.loadContents` instead.
626
627 Only valid when `type: File` or is an array of `items: File`.
628
629 Read up to the first 64 KiB of text from the file and place it in the
630 "contents" field of the file object for use by expressions.
631
632
633 - name: IOSchema
634 extends: [Labeled, sld:Documented]
635 type: record
636 abstract: true
637 fields:
638 - name: name
639 type: string?
640 jsonldPredicate: "@id"
641 doc: "The identifier for this type"
642
643 - name: InputSchema
644 extends: [IOSchema]
645 type: record
646 abstract: true
647
648 - name: OutputSchema
649 extends: [IOSchema]
650 type: record
651 abstract: true
652
653
654 - name: InputRecordField
655 type: record
656 extends: [sld:RecordField, FieldBase, InputFormat, LoadContents]
657 specialize:
658 - specializeFrom: "sld:RecordSchema"
659 specializeTo: InputRecordSchema
660 - specializeFrom: "sld:EnumSchema"
661 specializeTo: InputEnumSchema
662 - specializeFrom: "sld:ArraySchema"
663 specializeTo: InputArraySchema
664 - specializeFrom: "sld:PrimitiveType"
665 specializeTo: CWLType
666
667
668 - name: InputRecordSchema
669 type: record
670 extends: ["sld:RecordSchema", InputSchema]
671 specialize:
672 - specializeFrom: "sld:RecordField"
673 specializeTo: InputRecordField
674
675
676 - name: InputEnumSchema
677 type: record
678 extends: ["sld:EnumSchema", InputSchema]
679
680
681 - name: InputArraySchema
682 type: record
683 extends: ["sld:ArraySchema", InputSchema]
684 specialize:
685 - specializeFrom: "sld:RecordSchema"
686 specializeTo: InputRecordSchema
687 - specializeFrom: "sld:EnumSchema"
688 specializeTo: InputEnumSchema
689 - specializeFrom: "sld:ArraySchema"
690 specializeTo: InputArraySchema
691 - specializeFrom: "sld:PrimitiveType"
692 specializeTo: CWLType
693
694
695 - name: OutputRecordField
696 type: record
697 extends: [sld:RecordField, FieldBase, OutputFormat]
698 specialize:
699 - specializeFrom: "sld:RecordSchema"
700 specializeTo: OutputRecordSchema
701 - specializeFrom: "sld:EnumSchema"
702 specializeTo: OutputEnumSchema
703 - specializeFrom: "sld:ArraySchema"
704 specializeTo: OutputArraySchema
705 - specializeFrom: "sld:PrimitiveType"
706 specializeTo: CWLType
707
708
709 - name: OutputRecordSchema
710 type: record
711 extends: ["sld:RecordSchema", "#OutputSchema"]
712 docParent: "#OutputParameter"
713 specialize:
714 - specializeFrom: "sld:RecordField"
715 specializeTo: OutputRecordField
716
717
718 - name: OutputEnumSchema
719 type: record
720 extends: ["sld:EnumSchema", OutputSchema]
721 docParent: "#OutputParameter"
722
723
724 - name: OutputArraySchema
725 type: record
726 extends: ["sld:ArraySchema", OutputSchema]
727 docParent: "#OutputParameter"
728 specialize:
729 - specializeFrom: "sld:RecordSchema"
730 specializeTo: OutputRecordSchema
731 - specializeFrom: "sld:EnumSchema"
732 specializeTo: OutputEnumSchema
733 - specializeFrom: "sld:ArraySchema"
734 specializeTo: OutputArraySchema
735 - specializeFrom: "sld:PrimitiveType"
736 specializeTo: CWLType
737
738
739 - name: InputParameter
740 type: record
741 abstract: true
742 extends: [Parameter, InputFormat, LoadContents]
743 fields:
744 - name: default
745 type: Any?
746 jsonldPredicate:
747 _id: sld:default
748 noLinkCheck: true
749 doc: |
750 The default value to use for this parameter if the parameter is missing
751 from the input object, or if the value of the parameter in the input
752 object is `null`. Default values are applied before evaluating expressions
753 (e.g. dependent `valueFrom` fields).
754
755
756 - name: OutputParameter
757 type: record
758 extends: [Parameter, OutputFormat]
759 abstract: true
760
761
762 - type: record
763 name: ProcessRequirement
764 abstract: true
765 doc: |
766 A process requirement declares a prerequisite that may or must be fulfilled
767 before executing a process. See [`Process.hints`](#process) and
768 [`Process.requirements`](#process).
769
770 Process requirements are the primary mechanism for specifying extensions to
771 the CWL core specification.
772
773
774 - type: record
775 name: Process
776 extends: [Identified, Labeled, sld:Documented]
777 abstract: true
778 doc: |
779
780 The base executable type in CWL is the `Process` object defined by the
781 document. Note that the `Process` object is abstract and cannot be
782 directly executed.
783
784 fields:
785 - name: inputs
786 type:
787 type: array
788 items: InputParameter
789 jsonldPredicate:
790 _id: "cwl:inputs"
791 mapSubject: id
792 mapPredicate: type
793 doc: |
794 Defines the input parameters of the process. The process is ready to
795 run when all required input parameters are associated with concrete
796 values. Input parameters include a schema for each parameter which is
797 used to validate the input object. It may also be used to build a user
798 interface for constructing the input object.
799
800 When accepting an input object, all input parameters must have a value.
801 If an input parameter is missing from the input object, it must be
802 assigned a value of `null` (or the value of `default` for that
803 parameter, if provided) for the purposes of validation and evaluation
804 of expressions.
805
806 - name: outputs
807 type:
808 type: array
809 items: OutputParameter
810 jsonldPredicate:
811 _id: "cwl:outputs"
812 mapSubject: id
813 mapPredicate: type
814 doc: |
815 Defines the parameters representing the output of the process. May be
816 used to generate and/or validate the output object.
817 - name: requirements
818 type: ProcessRequirement[]?
819 jsonldPredicate:
820 _id: "cwl:requirements"
821 mapSubject: class
822 doc: |
823 Declares requirements that apply to either the runtime environment or the
824 workflow engine that must be met in order to execute this process. If
825 an implementation cannot satisfy all requirements, or a requirement is
826 listed which is not recognized by the implementation, it is a fatal
827 error and the implementation must not attempt to run the process,
828 unless overridden at user option.
829 - name: hints
830 type: Any[]?
831 doc: |
832 Declares hints applying to either the runtime environment or the
833 workflow engine that may be helpful in executing this process. It is
834 not an error if an implementation cannot satisfy all hints, however
835 the implementation may report a warning.
836 jsonldPredicate:
837 _id: cwl:hints
838 noLinkCheck: true
839 mapSubject: class
840 - name: cwlVersion
841 type: CWLVersion?
842 doc: |
843 CWL document version. Always required at the document root. Not
844 required for a Process embedded inside another Process.
845 jsonldPredicate:
846 "_id": "cwl:cwlVersion"
847 "_type": "@vocab"
848 - name: intent
849 type: string[]?
850 jsonldPredicate:
851 _type: "@id"
852 identity: true
853 doc: |
854 An identifier for the type of computational operation, of this Process.
855 Especially useful for "class: Operation", but can also be used for
856 CommandLineTool, Workflow, or ExpressionTool.
857
858 If provided, then this must be an IRI of a concept node that
859 represents the type of operation, preferrably defined within an ontology.
860
861 For example, in the domain of bioinformatics, one can use an IRI from
862 the EDAM Ontology's [Operation concept nodes](http://edamontology.org/operation_0004),
863 like [Alignment](http://edamontology.org/operation_2928),
864 or [Clustering](http://edamontology.org/operation_3432); or a more
865 specific Operation concept like
866 [Split read mapping](http://edamontology.org/operation_3199).
867
868 - name: InlineJavascriptRequirement
869 type: record
870 extends: ProcessRequirement
871 doc: |
872 Indicates that the workflow platform must support inline Javascript expressions.
873 If this requirement is not present, the workflow platform must not perform expression
874 interpolatation.
875 fields:
876 - name: class
877 type: string
878 doc: "Always 'InlineJavascriptRequirement'"
879 jsonldPredicate:
880 "_id": "@type"
881 "_type": "@vocab"
882 - name: expressionLib
883 type: string[]?
884 doc: |
885 Additional code fragments that will also be inserted
886 before executing the expression code. Allows for function definitions that may
887 be called from CWL expressions.
888
889
890 - name: CommandInputSchema
891 type: record
892 abstract: true
893
894 - name: SchemaDefRequirement
895 type: record
896 extends: ProcessRequirement
897 doc: |
898 This field consists of an array of type definitions which must be used when
899 interpreting the `inputs` and `outputs` fields. When a `type` field
900 contain a IRI, the implementation must check if the type is defined in
901 `schemaDefs` and use that definition. If the type is not found in
902 `schemaDefs`, it is an error. The entries in `schemaDefs` must be
903 processed in the order listed such that later schema definitions may refer
904 to earlier schema definitions.
905 fields:
906 - name: class
907 type: string
908 doc: "Always 'SchemaDefRequirement'"
909 jsonldPredicate:
910 "_id": "@type"
911 "_type": "@vocab"
912 - name: types
913 type:
914 type: array
915 items: CommandInputSchema
916 doc: The list of type definitions.
917
918 - name: SecondaryFileSchema
919 type: record
920 fields:
921 - name: pattern
922 type:
923 - string
924 - Expression
925 doc: |
926 Provides a pattern or expression specifying files or directories that
927 should be included alongside the primary file.
928
929 If the value is an expression, the value of `self` in the
930 expression must be the primary input or output File object to
931 which this binding applies. The `basename`, `nameroot` and
932 `nameext` fields must be present in `self`. For
933 `CommandLineTool` inputs the `location` field must also be
934 present. For `CommandLineTool` outputs the `path` field must
935 also be present. If secondary files were included on an input
936 File object as part of the Process invocation, they must also
937 be present in `secondaryFiles` on `self`.
938
939 The expression must return either: a filename string relative
940 to the path to the primary File, a File or Directory object
941 (`class: File` or 'class: Directory`) with either `location`
942 (for inputs) or `path` (for outputs) and `basename` fields
943 set, or an array consisting of strings or File or Directory
944 objects as previously described.
945
946 It is legal to use `location` from a File or Directory object
947 passed in as input, including `location` from secondary files
948 on `self`. If an expression returns a File object with the
949 same `location` but a different `basename` as a secondary file
950 that was passed in, the expression result takes precedence.
951 Setting the basename with an expression this way affects the
952 `path` where the secondary file will be staged to in the
953 CommandLineTool.
954
955 The expression may return "null" in which case there is no
956 secondary file from that expression.
957
958 To work on non-filename-preserving storage systems, portable
959 tool descriptions should treat `location` as an opaque
960 identifier and avoid constructing new values from `location`,
961 but should construct relative references using `basename` or
962 `nameroot` instead, or propagate `location` from defined inputs.
963
964 If a value in `secondaryFiles` is a string that is not an expression,
965 it specifies that the following pattern should be applied to the path
966 of the primary file to yield a filename relative to the primary File:
967
968 1. If string ends with `?` character, remove the last `?` and mark
969 the resulting secondary file as optional.
970 2. If string begins with one or more caret `^` characters, for each
971 caret, remove the last file extension from the path (the last
972 period `.` and all following characters). If there are no file
973 extensions, the path is unchanged.
974 3. Append the remainder of the string to the end of the file path.
975 - name: required
976 type: ["null", boolean, Expression]
977 doc: |
978 An implementation must not fail workflow execution if `required` is
979 set to `false` and the expected secondary file does not exist.
980 Default value for `required` field is `true` for secondary files on
981 input and `false` for secondary files on output.
982 doc: |
983 Secondary files are specified using the following micro-DSL for secondary files:
984
985 * If the value is a string, it is transformed to an object with two fields
986 `pattern` and `required`
987 * By default, the value of `required` is `null`
988 (this indicates default behavior, which may be based on the context)
989 * If the value ends with a question mark `?` the question mark is
990 stripped off and the value of the field `required` is set to `False`
991 * The remaining value is assigned to the field `pattern`
992
993 For implementation details and examples, please see
994 [this section](SchemaSalad.html#Domain_Specific_Language_for_secondary_files)
995 in the Schema Salad specification.
996
997 - name: LoadListingRequirement
998 type: record
999 extends: ProcessRequirement
1000 doc: |
1001 Specify the desired behavior for loading the `listing` field of
1002 a Directory object for use by expressions.
1003 fields:
1004 class:
1005 type: string
1006 doc: "Always 'LoadListingRequirement'"
1007 jsonldPredicate:
1008 "_id": "@type"
1009 "_type": "@vocab"
1010 loadListing:
1011 type: LoadListingEnum?
1012 jsonldPredicate: "cwl:loadListing"