generated from Sage-Bionetworks-Challenges/data-to-model-challenge-workflow
-
Notifications
You must be signed in to change notification settings - Fork 0
/
workflow.cwl
165 lines (149 loc) · 4.73 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
#!/usr/bin/env cwl-runner
cwlVersion: v1.0
class: Workflow
label: <YOUR CHALLENGE> Evaluation
doc: >
BRIEF DESCRIPTION ABOUT THE CHALLENGE, e.g.
This workflow will run and evaluate Docker submissions to the
Awesome Challenge (syn123). Metrics returned are x, y, z.
requirements:
- class: StepInputExpressionRequirement
inputs:
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
outputs: {}
steps:
set_submitter_folder_permissions:
run: https://raw.githubusercontent.com/Sage-Bionetworks/ChallengeWorkflowTemplates/v3.1/cwl/set_permissions.cwl
in:
- id: entityid
source: "#submitterUploadSynId"
# TODO: replace `valueFrom` with the admin user ID or admin team ID
- id: principalid
valueFrom: "3379097"
- id: permissions
valueFrom: "download"
- id: synapse_config
source: "#synapseConfig"
out: []
download_submission:
run: https://raw.githubusercontent.com/Sage-Bionetworks/ChallengeWorkflowTemplates/v3.1/cwl/get_submission.cwl
in:
- id: submissionid
source: "#submissionId"
- id: synapse_config
source: "#synapseConfig"
out:
- id: filepath
- id: docker_repository
- id: docker_digest
- id: entity_id
- id: entity_type
- id: results
download_goldstandard:
run: https://raw.githubusercontent.com/Sage-Bionetworks-Workflows/cwl-tool-synapseclient/v1.4/cwl/synapse-get-tool.cwl
in:
# TODO: replace `valueFrom` with the Synapse ID to the challenge goldstandard
- id: synapseid
valueFrom: "syn51106053"
- id: synapse_config
source: "#synapseConfig"
out:
- id: filepath
validate:
run: steps/validate.cwl
in:
- id: input_file
source: "#download_submission/filepath"
- id: entity_type
source: "#download_submission/entity_type"
out:
- id: results
- id: status
- id: invalid_reasons
email_validation:
run: https://raw.githubusercontent.com/Sage-Bionetworks/ChallengeWorkflowTemplates/v3.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]
annotate_validation_with_output:
run: https://raw.githubusercontent.com/Sage-Bionetworks/ChallengeWorkflowTemplates/v3.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:
run: https://raw.githubusercontent.com/Sage-Bionetworks/ChallengeWorkflowTemplates/v3.1/cwl/check_status.cwl
in:
- id: status
source: "#validate/status"
- id: previous_annotation_finished
source: "#annotate_validation_with_output/finished"
- id: previous_email_finished
source: "#email_validation/finished"
out: [finished]
score:
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
email_score:
run: https://raw.githubusercontent.com/Sage-Bionetworks/ChallengeWorkflowTemplates/v3.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: []
annotate_submission_with_output:
run: https://raw.githubusercontent.com/Sage-Bionetworks/ChallengeWorkflowTemplates/v3.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: "#annotate_validation_with_output/finished"
out: [finished]