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
(from https://github.com/ProteinsWebTeam/ebi-metagenomics-cwl/blob/f8bb388/workflows/emg-pipeline-v3.cwl#L9)
As needed reference it -- for example in the workflow level inputs:
inputs:
[…]
fraggenescan_model: ../tools/FragGeneScan-model.yaml#model
(From https://github.com/ProteinsWebTeam/ebi-metagenomics-cwl/blob/f8bb388/workflows/emg-pipeline-v3.cwl#L18)
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
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.