-
Notifications
You must be signed in to change notification settings - Fork 23
/
curation-swagger-spec.yaml
856 lines (856 loc) · 21.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
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
swagger: '2.0'
info:
version: 1.0.0
title: Haplotype Frequency Curation Service
description: Allows to store and return haplotype frequency data
paths:
'/hfc/{submissionId}':
delete:
description: Delete based on submissionId
parameters:
- name: submissionId
in: path
type: integer
format: int64
required: true
responses:
'204':
description: Delete Success = OK
'404':
description: Not Found
'500':
$ref: '#/responses/Standard500ErrorResponse'
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'
'404':
description: Submission not found.
'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'
'404':
description: Submission not found.
'500':
$ref: '#/responses/Standard500ErrorResponse'
'/hfc/{submissionId}/quality':
get:
description: Returns the list of quality measures for the given submission
parameters:
- name: submissionId
in: path
type: integer
format: int64
required: true
description: The submission id
responses:
'200':
description: Returns the list of quality measures for the given submission. The response body may be empty if there are no quality measures for the submission.
schema:
type: array
description: List of quality measures
items:
$ref: '#/definitions/Quality'
'404':
description: Submission not found.
'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'
'404':
description: Submission not found.
'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'
'404':
description: Submission not found.
'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. The response body may be empty if there are no quality measures for the submission.
schema:
$ref: '#/definitions/LabelData'
'404':
description: Submission not found.
'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'
'404':
description: Submission not found.
'500':
$ref: '#/responses/Standard500ErrorResponse'
/hfc:
post:
description: |
Storing of a new Haplotype Frequency set.
The service will silently ignore any quality metrics sent for submission and calculate the supported
ones itself.
parameters:
- name: HFCurationRequest
in: body
description: Haplotype Frequency Curation Data
required: true
schema:
$ref: '#/definitions/HFCurationRequest'
responses:
'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/label:
get:
description: Get a list of all labels
responses:
'200':
description: Successful response
schema:
$ref: '#/definitions/LabelResponse'
'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'
/population:
post:
tags:
- Population
summary: Create Population
operationId: createPopulation
consumes:
- application/json
produces:
- application/json
parameters:
- in: body
name: populationRequest
description: Population Request
required: true
schema:
$ref: '#/definitions/PopulationRequest'
responses:
'200':
description: OK
schema:
$ref: '#/definitions/PopulationData'
'201':
description: Created
'401':
description: Unauthorized
'403':
description: Forbidden
'404':
description: Not Found
get:
tags:
- Population
summary: Get a list of all populations
operationId: getAllPopulations
produces:
- application/json
responses:
'200':
description: Successful response
schema:
$ref: '#/definitions/PopulationResponse'
'500':
$ref: '#/responses/Standard500ErrorResponse'
'/population/{populationId}':
get:
tags:
- Population
summary: Get Population Given an Id
operationId: getPopulationForId
produces:
- application/json
parameters:
- name: populationId
description: Population ID
in: path
type: integer
format: int64
required: true
responses:
'200':
description: OK
schema:
$ref: '#/definitions/PopulationData'
'401':
description: Unauthorized
'403':
description: Forbidden
'404':
description: Not Found
/cohort:
post:
tags:
- Cohort
summary: Create Cohort
operationId: createCohort
consumes:
- application/json
produces:
- application/json
parameters:
- in: body
name: cohortRequest
description: Cohort Request
required: true
schema:
$ref: '#/definitions/CohortRequest'
responses:
'200':
description: OK
schema:
$ref: '#/definitions/CohortData'
'201':
description: Created
'401':
description: Unauthorized
'403':
description: Forbidden
'404':
description: Not Found
get:
tags:
- Cohort
summary: Get a list of all cohorts
operationId: getAllCohorts
produces:
- application/json
responses:
'200':
description: Successful response
schema:
$ref: '#/definitions/CohortResponse'
'500':
$ref: '#/responses/Standard500ErrorResponse'
'/cohort/{cohortId}':
get:
tags:
- Cohort
summary: Get Cohort Given an Id
operationId: getCohortForId
produces:
- application/json
parameters:
- name: cohortId
description: Cohort ID
in: path
type: integer
format: int64
required: true
responses:
'200':
description: OK
schema:
$ref: '#/definitions/CohortData'
'401':
description: Unauthorized
'403':
description: Forbidden
'404':
description: Not Found
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'
LabelResponse:
title: LabelResponse
type: object
properties:
LabelsList:
type: array
description: List of labels
items:
$ref: '#/definitions/LabelData'
CohortResponse:
title: CohortResponse
type: object
properties:
CohortsList:
type: array
description: List of cohorts
items:
$ref: '#/definitions/CohortData'
HFCurationRequest:
title: HFCurationRequest
type: object
required:
- PopulationID
- CohortID
properties:
PopulationID:
type: integer
format: int64
description: Reference to a population
CohortID:
type: integer
format: int64
description: Cohort ID or genotype list
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
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:
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:
id:
title: id
type: integer
format: int64
description: id of the population
name:
title: Name
type: string
description: Name of the population
description:
title: description
type: string
description: Description 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:
title: Method
type: array
description: list of methods
items:
$ref: '#/definitions/Method'
LabelData:
title: LabelData
type: object
required:
- LabelList
properties:
LabelList:
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
type: object
required:
- name
- GenotypeList
properties:
GenotypeList:
$ref: '#/definitions/GenotypeList'
name:
title: Name
type: string
description: Name of the cohort
id:
title: id
type: integer
format: int64
description: id of the cohort
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
- 1-Field
- 2-Field
- 3-Field
- 4-Field
- Serology
FrequencyError:
title: FrequencyError
properties:
value:
type: number
format: double
description: value of error
typeOfError:
type: string
description: type of error
CohortRequest:
title: CohortRequest
type: object
properties:
CohortData:
$ref: '#/definitions/CohortData'
PopulationRequest:
title: PopulationRequest
type: object
required:
- name
properties:
name:
type: string
description:
type: string
Error:
properties:
code:
type: string
message:
type: string
responses:
Standard500ErrorResponse:
description: An unexpected error ocurred
schema:
$ref: '#/definitions/Error'