forked from nmdp-bioinformatics/phycus
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcuration-swagger-spec.yaml
655 lines (622 loc) · 15.8 KB
/
curation-swagger-spec.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
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
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
---
swagger: '2.0'
# Document metadata
info:
version: "1.0.0"
title: Haplotype Frequency Curation Service
description: Allows to store and return haplotype frequency data
# Describe paths here
paths:
/hfc/{submissionId}:
get:
description: Returns a submission of haplotypes
parameters:
- name: submissionId
in: path
type: integer
format: int64
required: true
description: The submission id that the haplotype frequencies were submitted under
responses:
200:
description: Returns the data set containing all references
schema:
$ref: '#/definitions/HFCurationResponse'
500:
$ref: '#/responses/Standard500ErrorResponse'
/hfc/{submissionId}/haplotypes:
get:
description: Returns the list of haplotypes attached to the given submission
parameters:
- name: submissionId
in: path
type: integer
format: int64
required: true
description: The submission id
responses:
200:
description: Returns the haplotype frequency data
schema:
$ref: '#/definitions/HaplotypeFrequencyData'
500:
$ref: '#/responses/Standard500ErrorResponse'
/hfc/{submissionId}/cohort:
get:
description: Returns the list of haplotypes attached to the given submission
parameters:
- name: submissionId
in: path
type: integer
format: int64
required: true
description: The submission id
responses:
200:
description: Returns the cohort data and genotypes if available
schema:
$ref: '#/definitions/CohortData'
500:
$ref: '#/responses/Standard500ErrorResponse'
/hfc/{submissionId}/population:
get:
description: Returns the population of the given submission
parameters:
- name: submissionId
in: path
type: integer
format: int64
required: true
description: The submission id
responses:
200:
description: Returns the population
schema:
$ref: '#/definitions/PopulationData'
500:
$ref: '#/responses/Standard500ErrorResponse'
/hfc/{submissionId}/labels:
get:
description: Returns the labels associated to the submission
parameters:
- name: submissionId
in: path
type: integer
format: int64
required: true
description: The submission id
responses:
200:
description: Returns label set
schema:
$ref: '#/definitions/LabelData'
500:
$ref: '#/responses/Standard500ErrorResponse'
/hfc/{submissionId}/scope:
get:
description: Returns the scope of the genotypes used for creating the submitted haplotypes
parameters:
- name: submissionId
in: path
type: integer
format: int64
required: true
description: The submission id
responses:
200:
description: Returns scope set
schema:
$ref: '#/definitions/ScopeData'
500:
$ref: '#/responses/Standard500ErrorResponse'
/hfc:
post:
description: |
Storing of a new Haplotype Frequency set.
parameters:
- name: HFCurationRequest
in: body
description: Haplotype Frequency Curation Data
required: true
schema:
$ref: '#/definitions/HFCurationRequest'
responses:
# Response code
200:
description: Successful response
schema:
$ref: '#/definitions/HFCurationResponse'
500:
$ref: '#/responses/Standard500ErrorResponse'
get:
description: |
Gets a list of all submission data sets
responses:
200:
description: Successful response
schema:
$ref: '#/definitions/HFCurationListResponse'
500:
$ref: '#/responses/Standard500ErrorResponse'
/hfc/population:
get:
description: |
Get a list of all populations
responses:
200:
description: Successful response
schema:
$ref: '#/definitions/PopulationResponse'
500:
$ref: '#/responses/Standard500ErrorResponse'
/hfc/population/{populationId}:
get:
description: Returns a population with its attached submissions
parameters:
- name: populationId
in: path
type: integer
format: int64
required: true
description: The population id
responses:
200:
description: Returns the population including all attached submissions
schema:
$ref: '#/definitions/PopulationSubmissionResponse'
500:
$ref: '#/responses/Standard500ErrorResponse'
definitions:
HFCurationListResponse:
title: HFCurationListResponse
type: object
properties:
HFCurationResponses:
type: array
items:
$ref: '#/definitions/HFCurationResponse'
HFCurationResponse:
title: HFCurationResponse
type: object
required:
- SubmissionID
properties:
SubmissionID:
type: integer
format: int64
description: Reference to a submission
PopulationID:
type: integer
format: int64
description: Reference to a population
CohortID:
type: integer
format: "int64"
description: References a cohort
MethodSetID:
type: integer
format: int64
description: References a method set
LabelID:
type: integer
format: int64
description: References a label
HaplotypeListID:
type: integer
format: int64
description: References a haplotype list
ScopeID:
type: integer
format: int64
description: References a scope
AccessID:
type: integer
format: "int64"
description: References a access controls
PopulationSubmissionResponse:
title: PopulationSubmissionResponse
type: object
properties:
PopulationSubmissionList:
type: array
description: List of populations together with all attached submissions
items:
$ref: '#/definitions/PopulationSubmissionData'
PopulationResponse:
title: PopulationResponse
type: object
properties:
PopulationList:
type: array
description: List of populations
items:
$ref: '#/definitions/PopulationData'
HFCurationRequest:
title: HFCurationRequest
type: object
required:
- PopulationID
properties:
PopulationID:
type: integer
format: int64
description: Reference to a population
PopulationData:
$ref: '#/definitions/PopulationData'
CohortID:
type: integer
format: int64
description: Cohort ID or genotype list
CohortData:
$ref: '#/definitions/CohortData'
MethodSetID:
type: integer
format: int64
description: References a method set
MethodData:
$ref: '#/definitions/MethodData'
LabelID:
type: integer
format: int64
description: References a label
LabelData:
$ref: '#/definitions/LabelData'
HaplotypeFrequencyDataID:
type: string
description: References a haplotype list
HaplotypeFrequencyData:
$ref: '#/definitions/HaplotypeFrequencyData'
ScopeID:
type: integer
format: int64
description: References a scope
ScopeData:
$ref: '#/definitions/ScopeData'
AccessID:
type: integer
format: "int64"
description: References a access controls
AccessData:
$ref: '#/definitions/AccessData'
AccessData:
title: AccessData
type: object
required:
- typeOfAccess
properties:
typeOfAccess:
type: string
description: There will be a default license if one is not provided
HaplotypeFrequencyData:
title: HaplotypeFrequencyData
type: object
required:
- HaplotypeFrequencyList
- License
properties:
License:
$ref: '#/definitions/License'
ResolutionData:
$ref: '#/definitions/ResolutionData'
HaplotypeFrequencyList:
title: HaplotypeFrequencyList
type: array
description: List of HaplotypeFrequencys
items:
$ref: '#/definitions/HaplotypeFrequency'
QualityList:
type: array
description: List of Quality
items:
$ref: '#/definitions/Quality'
HaplotypeFrequency:
title: HaplotypeFrequency
type: object
required:
- haplotypeString
- frequency
properties:
haplotypeString:
type: string #glstring
description: GL string describing the haplotype
frequency:
type: number
format: double
description: value of frequency
FrequencyErrorList:
type: array
description: List of frequency errors
items:
$ref: '#/definitions/FrequencyError'
Quality:
title: Quality
type: object
required:
- value
- typeOfQuality
properties:
value:
type: number
format: double
description: value of quality
typeOfQuality:
type: string
description: type of quality
enum:
- DIV_LAMBDA
- DIV_50
- DIV_50_REL
- SAM_SIZE
- SAM_POP
- DIV_PGD
- DIV_HEAVY_TAIL
- RES_TRS_COUNT
- RES_TRS
- RES_SHARE_AMBIG
- RES_MISS_LOCI
- DEV_HWE
- ERR_STD
- ERR_SAMP_80_100
- SUM_FREQ_GAP
- ERR_OFFSET
- LD_MEASURE
- KFOLD_IMPUTE
- KFOLD_PRED_ACTUAL
- KFOLD_N
ScopeData:
title: ScopeData
type: object
required:
- ScopeElement
properties:
ScopeElement:
title: ScopeElement
type: array
description: Additional Information on genotype
items:
$ref: '#/definitions/ScopeElement'
PopulationSubmissionData:
title: PopulationSubmissionData
description: Contains all submissions for a population
type: object
required:
- population
properties: #this is just a placeholder for now
population:
$ref: '#/definitions/PopulationData'
submissions:
title: attached submissions
type: array
description: submissions that describe the population
items:
type: integer
format: int64
PopulationData:
title: PopulationData
type: object
required:
- name
properties: #this is just a placeholder for now
id:
title: id
type: integer
format: int64
description: id of the population
name:
title: Name
type: string
description: Name of the population
ScopeElement:
title: ScopeElement
type: object
properties:
name:
type: string
description: label name
freeName:
type: string
description: label name
typeOfScope:
type: string
description: type of label
enum:
- gene
- feature
MethodData:
title: MethodData
type: object
required:
- MethodList
properties:
MethodList:
$ref: '#/definitions/MethodList'
MethodList:
type: object
title: MethodList
properties:
Method:
title: Method
type: array
description: list of methods
items:
$ref: '#/definitions/Method'
LabelData:
title: LabelData
type: object
required:
- LabelList
properties:
LabelList:
$ref: '#/definitions/LabelList'
LabelList:
type: object
description: List of labels
properties:
Label:
type: array
items:
$ref: '#/definitions/Label'
Label:
title: Label
type: object
description: List of Genotypes
properties:
value:
type: string
description: label name
typeOfLabel:
type: string
description: type of label
CohortData:
title: CohortData #this will also contain meta information about the sample of the population
type: object
required:
- GenotypeList
properties:
GenotypeList:
$ref: '#/definitions/GenotypeList'
GenotypeList:
title: GenotypeList
type: object
description: List of Genotypes
properties:
License:
$ref: '#/definitions/License'
Genotype:
title: Genotype
type: array
description: Additional Information on genotype
items:
$ref: '#/definitions/Genotype'
Genotype:
title: Genotype
type: object
required:
- genotypeString
properties:
genotypeString:
type: string
description: GL string of the genotype
genotypingMethods:
title: GenotypingMethods
type: array
description: Additional Information on genotype
items:
$ref: '#/definitions/GenotypeMethod'
GenotypeMethod:
title: GenotypeMethod
type: object
description: GenotypeMethod Record
properties:
methodLabel:
type: string
description: Type of method label
enum:
- TYPING_METHOD
- TYPING_REF
- TYPING_DATE
- TYPING_IMGT_VER
- MIRING_REF
methodValue:
type: string
description: Value of method
methodComment:
type: string
description: Comment on method
methodReference:
type: string
description: To be used to refer to an external source
License:
title: License
type: object
description: License models, there will be a default license if one is not provided
required:
- typeOfLicense
properties:
typeOfLicense:
type: string
description: Type of creative commons license
enum:
- CC0
- by
- by-sa
- by-nd
- by-nc
- by-nc-sa
- by-nc-nd
Method:
title: Method
type: object
description: Method Record
properties:
typeOfMethod:
type: string
description: Type of method label
enum:
- EM_ALGORITHM
- EM_VERSION
- EM_ALG_REF
- MAC_SERVICE
- MAC_SER_REF
- MAC_VERSION
- ARS_SERVICE
- ARS_SERV_REF
- ARS_VERSION
- HWE_METHOD
- HWE_REF
- LD_METHOD
- LD_METHOD_REF
methodValue:
type: string
description: Value of method
methodComment:
type: string
description: Comment on method
methodReference:
type: string
description: To be used to refer to an external source
ResolutionData:
title: ResolutionData
type: array
description: List of Method
items:
$ref: '#/definitions/ResolutionInfo'
ResolutionInfo:
title: ResolutionInfo
properties:
scopeElement:
type: string
resolution:
type: string
description: resolution of the data
enum:
- G
- P
- gNMDP
- gDKMS
- 2-Field
- 4-Field
- 6-Field
- 8-Field
- Serology
FrequencyError:
title: FrequencyError
properties:
value:
type: number
format: double
description: value of error
typeOfError:
type: string
description: type of error
Error:
properties:
code:
type: string
message:
type: string
responses:
Standard500ErrorResponse:
description: An unexpected error ocurred
schema:
$ref: '#/definitions/Error'