generated from Sage-Bionetworks-Challenges/model-to-data-challenge-workflow
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathworkflow.cwl
204 lines (188 loc) · 5.85 KB
/
workflow.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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
#!/usr/bin/env cwl-runner
cwlVersion: v1.0
class: Workflow
label: Olfactory mixtures prediction workflow - Leaderboard round
requirements:
- class: StepInputExpressionRequirement
inputs:
adminUploadSynId:
label: Synapse Folder ID accessible by an admin
type: string
submissionId:
label: Submission ID
type: int
submitterUploadSynId:
label: Synapse Folder ID accessible by the submitter
type: string
synapseConfig:
label: filepath to .synapseConfig file
type: File
workflowSynapseId:
label: Synapse File ID that links to the workflow
type: string
organizers:
label: User or team ID for challenge organizers
type: string
default: "3501930"
outputs: []
steps:
organizers_log_access:
doc: >
Give challenge organizers `download` permissions to the submission logs folder
run: |-
https://raw.githubusercontent.com/Sage-Bionetworks/ChallengeWorkflowTemplates/v4.1/cwl/set_permissions.cwl
in:
- id: entityid
source: "#submitterUploadSynId"
- id: principalid
source: "#organizers"
- id: permissions
valueFrom: "download"
- id: synapse_config
source: "#synapseConfig"
out: []
download_submission:
doc: Download submission
run: |-
https://raw.githubusercontent.com/Sage-Bionetworks/ChallengeWorkflowTemplates/v4.1/cwl/get_submission.cwl
in:
- id: submissionid
source: "#submissionId"
- id: synapse_config
source: "#synapseConfig"
out:
- id: filepath
- id: entity_id
- id: entity_type
- id: evaluation_id
- id: results
download_goldstandard:
doc: Download goldstandard file(s)
run: |-
https://raw.githubusercontent.com/Sage-Bionetworks-Workflows/cwl-tool-synapseclient/v1.4/cwl/synapse-get-tool.cwl
in:
- id: synapseid
valueFrom: "syn58613337"
- id: synapse_config
source: "#synapseConfig"
out:
- id: filepath
validate:
doc: Validate predictions file
run: steps/validate.cwl
in:
- id: input_file
source: "#download_submission/filepath"
- id: goldstandard
source: "#download_goldstandard/filepath"
- id: entity_type
source: "#download_submission/entity_type"
out:
- id: results
- id: status
- id: invalid_reasons
send_validation_results:
doc: Send email of the validation results to the submitter
run: |-
https://raw.githubusercontent.com/Sage-Bionetworks/ChallengeWorkflowTemplates/v4.1/cwl/validate_email.cwl
in:
- id: submissionid
source: "#submissionId"
- id: synapse_config
source: "#synapseConfig"
- id: status
source: "#validate/status"
- id: invalid_reasons
source: "#validate/invalid_reasons"
# OPTIONAL: set `default` to `false` if email notification about valid submission is needed
- id: errors_only
default: true
out: [finished]
add_status_annots:
doc: >
Add `submission_status` and `submission_errors` annotations to the
submission
run: |-
https://raw.githubusercontent.com/Sage-Bionetworks/ChallengeWorkflowTemplates/v4.1/cwl/annotate_submission.cwl
in:
- id: submissionid
source: "#submissionId"
- id: annotation_values
source: "#validate/results"
- id: to_public
default: true
- id: force
default: true
- id: synapse_config
source: "#synapseConfig"
out: [finished]
check_status:
doc: >
Check the validation status of the submission; if 'INVALID', throw an
exception to stop the workflow - this will prevent the attempt of
scoring invalid predictions file (which will then result in errors)
run: |-
https://raw.githubusercontent.com/Sage-Bionetworks/ChallengeWorkflowTemplates/v4.1/cwl/check_status.cwl
in:
- id: status
source: "#validate/status"
- id: previous_annotation_finished
source: "#add_status_annots/finished"
- id: previous_email_finished
source: "#send_validation_results/finished"
out: [finished]
score:
doc: Score generated predictions file
run: steps/score.cwl
in:
- id: input_file
source: "#download_submission/filepath"
- id: goldstandard
source: "#download_goldstandard/filepath"
- id: check_validation_finished
source: "#check_status/finished"
out:
- id: results
send_score_results:
doc: Send email of the scores to the submitter
run: |-
https://raw.githubusercontent.com/Sage-Bionetworks/ChallengeWorkflowTemplates/v4.1/cwl/score_email.cwl
in:
- id: submissionid
source: "#submissionId"
- id: synapse_config
source: "#synapseConfig"
- id: results
source: "#score/results"
# OPTIONAL: add annotations to be withheld from participants to `[]`
# - id: private_annotations
# default: []
out: []
add_score_annots:
doc: >
Update `submission_status` and add the scoring metric annotations
run: |-
https://raw.githubusercontent.com/Sage-Bionetworks/ChallengeWorkflowTemplates/v4.1/cwl/annotate_submission.cwl
in:
- id: submissionid
source: "#submissionId"
- id: annotation_values
source: "#score/results"
- id: to_public
default: true
- id: force
default: true
- id: synapse_config
source: "#synapseConfig"
- id: previous_annotation_finished
source: "#add_status_annots/finished"
out: [finished]
s:author:
- class: s:Person
s:identifier: https://orcid.org/0000-0002-5622-7998
s:email: [email protected]
s:name: Verena Chung
s:codeRepository: https://github.com/Sage-Bionetworks-Challenges/olfactory-mixtures-prediction
s:license: https://spdx.org/licenses/Apache-2.0
$namespaces:
s: https://schema.org/