-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathAPISpecification.yaml
340 lines (340 loc) · 8.76 KB
/
APISpecification.yaml
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
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
openapi: 3.0.0
info:
title: Tools api
version: 0.0.1
paths:
/api/tools/vep/config:
get:
parameters:
- name: genome_id
in: query
required: true
schema:
type: string
responses:
'200':
description: The request has succeeded.
content:
application/json:
schema:
$ref: '#/components/schemas/VepConfigResponse'
/api/tools/vep/submissions:
post:
requestBody:
content:
multipart/form-data:
schema:
type: object
properties:
genome_id:
type: string
input_file:
type: string
format: binary
parameters:
type: string
description: |
Stringified JSON of parameters, such as '{"transcript_set":"blah","symbol":true,"biotype":true}'
responses:
'200':
description: Successful operaiton.
content:
application/json:
schema:
$ref: '#/components/schemas/VepFormSubmissionCreatedResponse'
/api/tools/vep/submissions/{id}/status:
get:
parameters:
- name: id
in: path
required: true
schema:
type: string
responses:
'200':
description: The request has succeeded.
content:
application/json:
schema:
$ref: '#/components/schemas/VepSubmissionStatusResponse'
'404':
description: Submission not found.
content:
application/json:
schema:
$ref: '#/components/schemas/VepSubmissionNotFoundResponse'
/api/tools/vep/submissions/{id}/results:
get:
description: Returns results of VEP analysis
parameters:
- name: id
in: path
required: true
schema:
type: string
- name: page
in: query
required: false
schema:
type: integer
default: 1
- name: per_page
in: query
required: false
schema:
type: integer
default: 100
responses:
'200':
description: Successful operaiton.
content:
application/json:
schema:
$ref: '#/components/schemas/VepResultsResponse'
components:
schemas:
AlternativeVariantAllele:
type: object
required:
- allele_sequence
- allele_type
- predicted_molecular_consequences
properties:
allele_sequence:
type: string
allele_type:
type: string
representative_population_allele_frequency:
type: number
nullable: true
predicted_molecular_consequences:
type: array
items:
anyOf:
- $ref: '#/components/schemas/PredictedTranscriptConsequence'
- $ref: '#/components/schemas/PredictedIntergenicConsequence'
BooleanConfigOption:
type: object
required:
- label
- description
- type
- default_value
properties:
label:
type: string
description:
type: string
nullable: true
type:
type: string
enum:
- boolean
default_value:
type: boolean
PaginationMetadata:
type: object
required:
- page
- per_page
- total
properties:
page:
type: integer
per_page:
type: integer
total:
type: integer
PredictedIntergenicConsequence:
type: object
required:
- feature_type
- consequences
properties:
feature_type:
nullable: true
description: The value of this field is always null. The presence of null in this field will serve as a marker that this is a consequence of an intergenic variant.
consequences:
type: array
items:
type: string
description: The only expected member of this array will be the string 'intergenic_variant'
PredictedTranscriptConsequence:
type: object
required:
- feature_type
- stable_id
- gene_stable_id
- gene_symbol
- biotype
- is_canonical
- consequences
- strand
properties:
feature_type:
type: string
enum:
- transcript
stable_id:
type: string
description: transcript stable id, versioned
gene_stable_id:
type: string
description: gene stable id, versioned
gene_symbol:
type: string
nullable: true
biotype:
type: string
is_canonical:
type: boolean
consequences:
type: array
items:
type: string
strand:
type: string
enum:
- forward
- reverse
ReferenceVariantAllele:
type: object
required:
- allele_sequence
properties:
allele_sequence:
type: string
SelectConfigOption:
type: object
required:
- label
- description
- type
- options
- default_value
properties:
label:
type: string
description:
type: string
nullable: true
type:
type: string
enum:
- select
options:
type: array
items:
type: object
properties:
label:
type: string
value:
type: string
required:
- label
- value
default_value:
type: string
Variant:
type: object
required:
- name
- allele_type
- location
- reference_allele
- alternative_alleles
properties:
name:
type: string
nullable: true
description: User's name for the variant; optional
allele_type:
type: string
location:
type: object
properties:
region_name:
type: string
start:
type: integer
end:
type: integer
required:
- region_name
- start
- end
reference_allele:
$ref: '#/components/schemas/ReferenceVariantAllele'
alternative_alleles:
type: array
items:
$ref: '#/components/schemas/AlternativeVariantAllele'
VepConfigResponse:
type: object
required:
- parameters
properties:
parameters:
type: array
items:
anyOf:
- $ref: '#/components/schemas/BooleanConfigOption'
- $ref: '#/components/schemas/SelectConfigOption'
VepResultsResponse:
type: object
required:
- metadata
- variants
properties:
metadata:
type: object
properties:
pagination:
$ref: '#/components/schemas/PaginationMetadata'
required:
- pagination
variants:
type: array
items:
$ref: '#/components/schemas/Variant'
VepSubmissionNotFoundResponse:
type: object
required:
- details
- status_code
properties:
status_code:
type: integer
default: 404
details:
type: string
example: A submission with id 1234567 was not found
VepSubmissionStatusResponse:
type: object
required:
- submission_id
- status
properties:
submission_id:
type: string
status:
type: string
description: >
The possible statuses for a VEP submission are based on the list of documented statuses of Seqera workflows
(see https://github.com/seqeralabs/tower-cli/blob/50dd04dd806acf8461dfc9b286faec7e874aec15/USAGE.md?plain=1#L254-L259),
except for the 'UNKNOWN' status, which is listed in Seqera docs without explanation how a workflow can get into that status.
If the tools api receives the 'UNKNOWN' status from the Seqera platform, the status reported to the client is FAILED.
enum:
- SUBMITTED
- RUNNING
- SUCCEEDED
- FAILED
- CANCELLED
VepFormSubmissionCreatedResponse:
type: object
required:
- submission_id
properties:
submission_id:
type: string