Ok thanks, I think I understand it now. Dependent parameters are all defined by putting them in one record (embedded or using a pointer to a file). Exclusive parameters are separated by using an array of records. The example in the user guide shows that, but I did not immediately notice the array notation. It might be helpful to point this out in the documentation with one sentence.
Hi,
Section "2.10 Record inputs" in the UserGuide is a bit unclear to me. "dependent_parameters" is used as an id and as a name. Which is the actual keyword and which is an arbitrary name that I can change ?
The example shows how to make one set of dependent parameters. How can I make more than one set ? E.g.: itemA pairs with itemB and itemD pairs with itemE.
thanks Wolfgang
1 answer
Hello Wolfgang,
Neither usage of dependent_parameters is a keyword, in fact there is an error in the v1.0 spec related to custom records and the name field: https://github.com/common-workflow-language/common-workflow-language/issues/394
You can have as many dependent parameters as you want, just follow the pattern: custom record type with two or more fields.
Here's a real example that may help:
External definition of custom record type for re-use:
type: record
name: model
fields:
- name: main
type: File
- name: prob_forward
type: File
label: Forward probability model
[…]
(From https://github.com/ProteinsWebTeam/ebi-metagenomics-cwl/blob/f8bb388/tools/FragGeneScan-model.yaml)
Import of the custom record type in the tool definition
requirements:
SchemaDefRequirement:
types:
- $import: FragGeneScan-model.yaml
[…]
(From https://github.com/ProteinsWebTeam/ebi-metagenomics-cwl/blob/f8bb388/tools/FragGeneScan1_20.cwl#L21)
Use of the custom record type in that tool's inputs:
inputs:
[…]
model: FragGeneScan-model.yaml#model
(From https://github.com/ProteinsWebTeam/ebi-metagenomics-cwl/blob/f8bb388/tools/FragGeneScan1_20.cwl#L51)
And likewise, using that tool in a workflow. First import the same custom type:
requirements:
[…]
- class: SchemaDefRequirement
types:
- $import: ../tools/FragGeneScan-model.yaml
# other imports for other tool's custom types go here
As needed reference it -- for example in the workflow level inputs:
inputs:
[…]
fraggenescan_model: ../tools/FragGeneScan-model.yaml#model
Thank you for your question, this part of the user guide is confusing and needs rewording. There is an open issue to remind the team to clarify and demonstrate this better: https://github.com/common-workflow-language/common-workflow-language/issues/438
Log in to answer this question.