-
Notifications
You must be signed in to change notification settings - Fork 0
/
gene_sharpener_api.yml
450 lines (424 loc) · 12.1 KB
/
gene_sharpener_api.yml
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
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
swagger: '2.0'
info:
title: Sharpener API
version: 1.3.0
host: sharpener.ncats.io
basePath: /api
schemes:
- "https"
paths:
/create_gene_list:
post:
tags:
- sharpener
summary: Create a new gene list
description: Creates a new gene list from a collection of gene symbols.
parameters:
- in: body
name: query
description: a collection of gene symbols
required: true
schema:
type: array
items:
type: string
example: [AURA, TP53]
responses:
200:
description: successful operation
schema:
$ref: '#/definitions/gene_list'
/transformers:
get:
tags:
- sharpener
summary: Retrieve a list of transformers
description: Provides a list of transformers and their descriptions.
responses:
200:
description: successful operation
schema:
type: array
items:
$ref: '#/definitions/transformer_info'
/transform:
post:
tags:
- sharpener
summary: Transform a gene list
description: Depending on the function of a transformer, creates, expands, or filters a gene list.
parameters:
- in: body
name: query
description: transformer query
required: true
schema:
$ref: '#/definitions/transformer_query'
responses:
200:
description: successful operation
schema:
$ref: '#/definitions/gene_list'
400:
description: bad request
schema:
$ref: '#/definitions/error_msg'
404:
description: not found
schema:
$ref: '#/definitions/error_msg'
500:
description: internal server error
schema:
$ref: '#/definitions/error_msg'
/aggregate:
post:
tags:
- sharpener
summary: Aggregate multiple gene lists
description: Aggregates multiple gene lists into one gene list.
parameters:
- in: body
name: query
description: aggregation query
required: true
schema:
$ref: '#/definitions/aggregation_query'
responses:
200:
description: successful operation
schema:
$ref: '#/definitions/gene_list'
/gene_list/{gene_list_id}:
get:
tags:
- sharpener
summary: Retrieve a gene list
description: Retrieves a gene list for a given gene-list id.
parameters:
- in: path
name: gene_list_id
description: gene-list id
required: true
type: string
responses:
200:
description: successful operation
schema:
$ref: '#/definitions/gene_list'
/submit:
post:
tags:
- asynchronous
summary: Asynchronously transform a gene list
description: Depending on the function of a transformer, creates, expands, or filters a gene list.
parameters:
- in: body
name: query
description: transformer query
required: true
schema:
$ref: '#/definitions/transformer_query'
responses:
200:
description: successful operation
schema:
$ref: '#/definitions/request'
/status/{request_id}:
get:
tags:
- asynchronous
summary: Get a status of a request
description: Get a status of an asynchronous transformation request.
parameters:
- in: path
name: request_id
description: Id of an asynchronous transformation request.
required: true
type: string
responses:
200:
description: successful operation
schema:
$ref: '#/definitions/request'
definitions:
transformer_query:
type: object
properties:
name:
type: string
description: Name of the transformer that will be executed.
gene_list_id:
type: string
description: >-
Id of the gene list that will be transformed. Required for expanders and filters;
should be omited for producers.
controls:
type: array
items:
$ref: '#/definitions/property'
description: >-
Values that control the behavior of the transformer. Names of the controls must match the names
specified in the transformer's definition and values must match types (and possibly
allowed_values) specified in the transformer's definition.
required:
- name
- controls
example:
name: MSigDB gene-set producer
controls:
- name: gene_set_name
value: REACTOME_GLUCOSE_TRANSPORT
gene_list:
type: object
properties:
gene_list_id:
type: string
description: Id of the gene list.
source:
type: string
description: Transformer that produced the gene list.
attributes:
type: array
items:
$ref: '#/definitions/attribute'
description: Additional information and provenance about the gene list.
genes:
type: array
items:
$ref: '#/definitions/gene_info'
description: Members of the gene list.
required:
- gene_list_id
- source
- genes
gene_info:
type: object
properties:
gene_id:
type: string
description: >-
Id of the gene. Preferably HGNC id; can be Entrez or ENSEMBL id if HGNC id is not available.
identifiers:
type: object
properties:
entrez:
type: string
description: Entrez gene id (CURIE).
example: 'NCBIGene:100'
hgnc:
type: string
description: HGNC gene id (CURIE).
example: 'HGNC:186'
mim:
type: string
description: OMIM gene id (CURIE).
example: 'MIM:608958'
ensembl:
type: array
items:
type: string
example: 'ENSEMBL:ENSG00000196839'
description: ENSEMBL gene id (CURIE).
mygene_info:
type: string
description: myGene.info primary id.
example: '100'
attributes:
type: array
items:
$ref: '#/definitions/attribute'
description: >-
Additional information about the gene and provenance about gene-list membership. Sharpener
will use myGene.info to add 'gene_symbol', 'synonyms', and 'gene_name' to every gene.
Multiple synonyms are separated by semicolons.
source:
type: string
description: Name of a transformer that added gene to the gene list.
required:
- gene_id
attribute:
type: object
properties:
name:
type: string
description: Name of the attribute.
value:
type: string
description: Value of the attribute.
source:
type: string
description: Transformer that produced the attribute's value.
url:
type: string
description: URL for additional information.
required:
- name
- value
- source
property:
type: object
properties:
name:
type: string
value:
type: string
required:
- name
- value
transformer_info:
type: object
properties:
name:
type: string
description: Name of the transformer.
label:
type: string
description: Short label for GUI display.
url:
type: string
description: Transformer's url.
version:
type: string
description: Transformer's version.
status:
type: string
description: Status of the transformer, one of 'online', 'offline'.
enum: [online,offline]
function:
type: string
description: Function of the transformer, one of 'producer', 'expander', 'filter', or 'aggregator'.
enum: [producer, expander, filter, aggregator]
description:
type: string
description: Description of the transformer.
properties:
type: object
description: Additional metadata for the transformer.
properties:
list_predicate:
type: string
description: Biolink model predicate describing relationship between input and output gene lists.
member_predicate:
type: string
description: Biolink model predicate describing relationship between input and output genes.
source_url:
type: string
description: URL for underlying data or a wrapped service.
method:
type: string
description: A method used to generate output gene lists.
parameters:
type: array
items:
$ref: '#/definitions/parameter'
description: Parameters used to control the transformer.
required_attributes:
type: array
items:
type: string
description: Gene attributes required by the transformer.
description: Definition of the transformer.
required:
- name
- status
- function
parameter:
type: object
properties:
name:
type: string
description: Name of the parameter.
type:
type: string
description: Type of the parameter, one of 'Boolean', 'int', 'double', 'string'.
enum: [Boolean, int, double, string]
default:
type: string
description: Default value of the parameter.
biolink_class:
type: string
description: >-
Biolink class of the parameter. Applicable to producers only and only one parameter
can have a biolink class.
allowed_values:
type: array
items:
type: string
description: Allowed values for the parameter.
allowed_range:
type: array
items:
type: number
description: Allowed range for values of the parameter.
minItems: 2
maxItems: 2
suggested_values:
type: string
description: Suggested value range for the parameter.
lookup_url:
type: string
description: URL to search for suitable parameter values.
required:
- name
- type
- default
aggregation_query:
type: object
properties:
operation:
type: string
description: Gene-list aggregation operation, one of 'union', 'intersection', 'difference','symmetric difference'.
controls:
type: array
items:
$ref: '#/definitions/property'
description: >-
Values that control the behavior of the aggregator. Names of the controls must match the names
specified in the aggregator's definition and values must match types (and possibly
allowed_values) specified in the aggregator's definition.
gene_list_ids:
type: array
items:
type: string
description: Ids of the gene lists to be aggregated.
example: [gene_lis_id_1, gene_list_id_2]
required:
- operation
- gene_list_ids
request:
type: object
properties:
request_id:
type: string
description: Id of the request.
status:
type: string
description: Status of the request.
enum: [success, failed, running]
gene_list_id:
type: string
description: Id of a gene list produced by successful completion this request.
current_step:
type: integer
description: Current step of the transformation (optional).
total_steps:
type: integer
description: Total number of steps in the transformation request (optional).
error_msg:
type: string
description: Error message (for failed requests).
required:
- request_id
- status
error_msg:
type: object
properties:
status:
type: integer
title:
type: string
detail:
type: string
type:
type: string