forked from aehrc/terraform-aws-serverless-beacon
-
Notifications
You must be signed in to change notification settings - Fork 0
/
openapi.yaml
716 lines (699 loc) · 22.3 KB
/
openapi.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
openapi: 3.0.0
servers: []
info:
title: Serverless Beacon API
version: 0.3.0
description:
Provides an API for contributing to and querying a serverless ga4gh beacon
instance.
contact:
email: brendan.hosking@csiro.au
externalDocs:
description: Beacon Project
url: 'http://beacon-project.io/'
paths:
/:
summary: Get information about the beacon
get:
responses:
200:
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/Beacon'
options:
responses:
200:
description: OK
/query:
get:
description: Get response to a beacon query for allele information.
operationId: getBeaconAlleleResponse
parameters:
- name: referenceName
description: 'Reference name (chromosome). Accepting values 1-22, X, Y, M.'
in: query
required: true
schema:
$ref: '#/components/schemas/Chromosome'
- name: start
description: |
Precise start coordinate position, allele locus (0-based).
* start only:
- for single positions, e.g. the start of a specified sequence alteration where the size is given through the specified alternateBases
- typical use are queries for SNV and small InDels
- the use of "start" without an "end" parameter requires the use of "referenceBases"
* start and end:
- special use case for exactly determined structural changes
in: query
required: false
schema:
type: integer
format: int64
minimum: 0
- name: startMin
description: |
Minimum start coordinate
* startMin + startMax + endMin + endMax
- for querying imprecise positions (e.g. identifying all structural variants starting anywhere between startMin <-> startMax, and ending anywhere between endMin <-> endMax
- single or douple sided precise matches can be achieved by setting startMin = startMax XOR endMin = endMax
in: query
schema:
type: integer
format: int64
minimum: 0
- name: startMax
description: |
Maximum start coordinate. See startMin.
in: query
schema:
type: integer
format: int64
minimum: 0
- name: end
description: |
Precise end coordinate. See start.
in: query
schema:
type: integer
format: int64
minimum: 0
- name: endMin
description: |
Minimum end coordinate. See startMin.
in: query
schema:
type: integer
format: int64
minimum: 0
- name: endMax
description: |
Maximum end coordinate. See startMin.
in: query
schema:
type: integer
format: int64
minimum: 0
- name: referenceBases
description: >
Reference bases for this variant (starting from `start`). Accepted
values: [ACGT]*
When querying for variants without specific base alterations (e.g.
imprecise structural variants with separate variant_type as well as
start_min & end_min ... parameters), the use of a single "N" value
is required.
in: query
required: true
schema:
type: string
pattern: '^([ACGT]+|N)$'
- name: alternateBases
description: >
The bases that appear instead of the reference bases. Accepted
values: [ACGT]* or N.
Symbolic ALT alleles (DEL, INS, DUP, INV, CNV, DUP:TANDEM, DEL:ME,
INS:ME) will be represented in `variantType`.
Optional: either `alternateBases` or `variantType` is required.
in: query
required: false
schema:
type: string
pattern: '^([ACGT]+|N)$'
- name: variantType
description: >
The `variantType` is used to denote e.g. structural variants.
Examples:
* DUP: duplication of sequence following `start`; not necessarily in
situ
* DEL: deletion of sequence following `start`
Optional: either `alternateBases` or `variantType` is required.
in: query
required: false
schema:
type: string
- name: assemblyId
description: 'Assembly identifier (GRC notation, e.g. GRCh37).'
in: query
required: true
schema:
type: string
- name: datasetIds
description: >-
Identifiers of datasets, as defined in "BeaconDataset". If this
field is null/not specified, all datasets should be queried.
in: query
required: false
explode: true
schema:
type: array
items:
type: string
- name: includeDatasetResponses
description: >
Indicator of whether responses for individual datasets
(datasetAlleleResponses) should be included in the response
(BeaconAlleleResponse) to this request or not.
If null (not specified), the default value of NONE is assumed.
in: query
required: false
schema:
type: string
enum:
- ALL
- HIT
- MISS
- NONE
responses:
'200':
description: OK
content:
application/json:
schema:
items:
$ref: '#/components/schemas/BeaconAlleleResponse'
'400':
description: Bad request (e.g. missing mandatory parameter)
content:
application/json:
schema:
$ref: '#/components/schemas/BeaconAlleleResponse'
post:
description: Gets response to a beacon query for allele information.
operationId: postBeaconAlleleResponse
responses:
'200':
description: OK
content:
application/json:
schema:
items:
$ref: '#/components/schemas/BeaconAlleleResponse'
'400':
description: Bad request (e.g. missing mandatory parameter)
content:
application/json:
schema:
$ref: '#/components/schemas/BeaconAlleleResponse'
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/BeaconAlleleRequest'
required: true
options:
responses:
200:
description: OK
/submit:
options:
responses:
200:
description: OK
patch:
summary: Update a dataset
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/DatasetUpdate'
responses:
200:
description: OK
400:
description: Bad Request (e.g. missing mandatory parameter)
content:
application/json:
schema:
$ref: '#/components/schemas/BeaconError'
security:
- sigv4: []
post:
summary: Create a dataset
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/DatasetSubmit'
responses:
200:
description: OK
400:
description: Bad Request (e.g. missing mandatory parameter)
content:
application/json:
schema:
$ref: '#/components/schemas/BeaconError'
security:
- sigv4: []
components:
schemas:
Beacon:
type: object
required:
- id
- name
- apiVersion
- organization
- datasets
properties:
id:
type: string
description: Unique identifier of the beacon. Use reverse domain name
notation.
example: org.ga4gh.beacon
apiVersion:
type: string
description: Version of the API provided by the beacon.
example: v1.0.0
organization:
$ref: '#/components/schemas/BeaconOrganization'
datasets:
description: Dataset(s) served by the beacon.
type: array
items:
$ref: '#/components/schemas/BeaconDataset'
BeaconAlleleRequest:
description: Allele request as interpreted by the beacon.
type: object
required:
- referenceName
- referenceBases
- assemblyId
properties:
referenceName:
$ref: '#/components/schemas/Chromosome'
start:
description: |
Precise start coordinate position, allele locus (0-based).
* start only:
- for single positions, e.g. the start of a specified sequence alteration where the size is given through the specified alternateBases
- typical use are queries for SNV and small InDels
- the use of "start" without an "end" parameter requires the use of "referenceBases"
* start and end:
- special use case for exactly determined structural changes
type: integer
format: int64
minimum: 0
end:
description: Precise end coordinate. See start.
type: integer
startMin:
description: |
Minimum start coordinate
* startMin + startMax + endMin + endMax
- for querying imprecise positions (e.g. identifying all structural variants starting anywhere between startMin <-> startMax, and ending anywhere between endMin <-> endMax
- single or douple sided precise matches can be achieved by setting startMin = startMax XOR endMin = endMax
type: integer
startMax:
description: Maximum start coordinate. See startMin.
type: integer
endMin:
description: Minimum end coordinate. See startMin.
type: integer
endMax:
description: Maximum end coordinate. See startMin.
type: integer
referenceBases:
description: >
Reference bases for this variant (starting from `start`). Accepted
values: [ACGT]*
When querying for variants without specific base alterations (e.g. imprecise structural variants with separate variant_type as well as start_min & end_min ... parameters), the use of a single "N" value is required.
type: string
pattern: '^([ACGT]+|N)$'
alternateBases:
description: >
The bases that appear instead of the reference bases. Accepted
values: [ACGT]* or N.
Symbolic ALT alleles (DEL, INS, DUP, INV, CNV, DUP:TANDEM, DEL:ME,
INS:ME) will be represented in `variantType`.
Optional: either `alternateBases` or `variantType` is required.
type: string
pattern: '^([ACGT]+|N)$'
variantType:
description: >
The `variantType` is used to denote e.g. structural variants.
Examples:
* DUP: duplication of sequence following `start`; not necessarily in
situ
* DEL: deletion of sequence following `start`
Optional: either `alternateBases` or `variantType` is required.
type: string
assemblyId:
description: 'Assembly identifier (GRC notation, e.g. `GRCh37`).'
type: string
example: GRCh38
datasetIds:
description: >-
Identifiers of datasets, as defined in `BeaconDataset`. If this
field is null/not specified, all datasets should be queried.
type: array
nullable: true
items:
type: string
includeDatasetResponses:
description: >-
Indicator of whether responses for individual datasets
(datasetAlleleResponses) should be included in the response
(BeaconAlleleResponse) to this request or not. If null (not
specified), the default value of NONE is assumed.
type: string
enum:
- ALL
- HIT
- MISS
- NONE
BeaconAlleleResponse:
type: object
required:
- beaconId
properties:
beaconId:
description: 'Identifier of the beacon, as defined in `Beacon`.'
type: string
apiVersion:
description: >-
Version of the API. If specified, the value must match `apiVersion`
in Beacon
type: string
exists:
nullable: true
description: >-
Indicator of whether the given allele was observed in any of the
datasets queried. This should be non-null, unless there was an
error, in which case `error` has to be non-null.
type: boolean
alleleRequest:
$ref: '#/components/schemas/BeaconAlleleRequest'
datasetAlleleResponses:
description: >-
Indicator of whether the given allele was observed in individual
datasets. This should be non-null if `includeDatasetResponses` in
the corresponding `BeaconAlleleRequest` is true, and null otherwise.
type: array
items:
$ref: '#/components/schemas/BeaconDatasetAlleleResponse'
error:
$ref: '#/components/schemas/BeaconError'
BeaconDataset:
type: object
required:
- id
- name
- assemblyId
- createDateTime
- updateDateTime
properties:
id:
type: string
description: Unique identifier of the dataset.
name:
type: string
description: Name of the dataset.
description:
type: string
nullable: true
description: Description of the dataset.
assemblyId:
description: 'Assembly identifier (GRC notation, e.g. `GRCh37`).'
type: string
example: GRCh38
createDateTime:
type: string
description: The time the dataset was created (ISO 8601 format).
example: '2012-07-29 or 2017-01-17T20:33:40'
updateDateTime:
type: string
description: The time the dataset was updated in (ISO 8601 format).
example: '2012-07-19 or 2017-01-17T20:33:40'
version:
type: string
nullable: true
description: Version of the dataset.
variantCount:
type: integer
nullable: true
format: int64
description: Total number of variants in the dataset.
minimum: 0
callCount:
type: integer
nullable: true
format: int64
description: Total number of calls in the dataset.
minimum: 0
sampleCount:
type: integer
nullable: true
format: int64
description: Total number of samples in the dataset.
minimum: 0
externalUrl:
type: string
nullable: true
description:
URL to an external system providing more dataset information (RFC
3986 format).
example: 'http://example.org/wiki/Main_Page'
info:
$ref: '#/components/schemas/Info'
dataUseConditions:
$ref: '#/components/schemas/DataUseConditions'
BeaconDatasetAlleleResponse:
type: object
required:
- datasetId
properties:
datasetId:
type: string
description: not provided
exists:
description: >-
Indicator of whether the given allele was observed in the dataset.
This should be non-null, unless there was an error, in which case
`error` has to be non-null.
type: boolean
nullable: true
error:
$ref: '#/components/schemas/BeaconError'
frequency:
type: number
nullable: true
description: Frequency of this allele in the dataset. Between 0 and 1,
inclusive.
minimum: 0
maximum: 1
variantCount:
type: integer
nullable: true
description: Number of variants matching the allele request in the dataset.
minimum: 0
callCount:
type: integer
nullable: true
description: Number of calls matching the allele request in the dataset.
minimum: 0
sampleCount:
type: integer
nullable: true
description: Number of samples matching the allele request in the dataset
minimum: 0
note:
type: string
nullable: true
description: Additional note or description of the response.
externalUrl:
type: string
nullable: true
description: >-
URL to an external system, such as a secured beacon or a system
providing more information about a given allele (RFC 3986 format).
info:
$ref: '#/components/schemas/Info'
BeaconError:
description: >-
Beacon-specific error. This should be non-null in exceptional situations
only, in which case `exists` has to be null.
type: object
nullable: true
required:
- errorCode
properties:
errorCode:
type: integer
format: int32
errorMessage:
type: string
BeaconOrganization:
description: Organization owning the beacon.
type: object
required:
- id
- name
properties:
id:
type: string
description: Unique identifier of the organization.
name:
type: string
description: Name of the organization.
Chromosome:
description: 'Reference name (chromosome). Accepting values 1-22, X, Y, M.'
type: string
enum:
- '1'
- '2'
- '3'
- '4'
- '5'
- '6'
- '7'
- '8'
- '9'
- '10'
- '11'
- '12'
- '13'
- '14'
- '15'
- '16'
- '17'
- '18'
- '19'
- '20'
- '21'
- '22'
- 'X'
- 'Y'
- 'M'
DatasetSubmit:
description: fields to create a new dataset.
type: object
required:
- id
- name
- assemblyId
- vcfLocations
properties:
id:
type: string
description: Unique identifier of the dataset.
name:
type: string
description: Name of the dataset.
assemblyId:
description: 'Assembly identifier (GRC notation, e.g. `GRCh37`).'
type: string
example: GRCh38
vcfLocations:
type: array
description: Location of each VCF file.
minItems: 1
items:
type: string
vcfGroups:
type: array
description: Groups of VCF files.
minItems: 1
items:
type: array
items:
type: string
description: VCF files in the group.
description:
type: string
description: Description of the dataset.
nullable: true
version:
type: string
nullable: true
description: Version of the dataset.
externalUrl:
nullable: true
type: string
description:
URL to an external system providing more dataset information (RFC
3986 format).
example: 'http://example.org/wiki/Main_Page'
info:
$ref: '#/components/schemas/Info'
dataUseConditions:
$ref: '#/components/schemas/DataUseConditions'
DatasetUpdate:
description: fields to update in a dataset.
type: object
required:
- id
properties:
id:
type: string
description: Unique identifier of the dataset.
name:
type: string
description: Name of the dataset.
assemblyId:
description: 'Assembly identifier (GRC notation, e.g. `GRCh37`).'
type: string
example: GRCh38
vcfLocations:
type: array
description: Location of each VCF file to add.
minItems: 1
items:
type: string
vcfGroups:
type: array
description: Groups of VCF files.
minItems: 1
items:
type: array
items:
type: string
description: VCF files in the group.
description:
type: string
nullable: true
description: Description of the dataset.
version:
type: string
nullable: true
description: Version of the dataset.
externalUrl:
type: string
nullable: true
description:
URL to an external system providing more dataset information (RFC
3986 format).
example: 'http://example.org/wiki/Main_Page'
info:
$ref: '#/components/schemas/Info'
dataUseConditions:
$ref: '#/components/schemas/DataUseConditions'
DataUseConditions:
type: object
nullable: true
required:
- consentCodeDataUse
- adamDataUse
description: Data use conditions ruling this dataset.
properties:
consentCodeDataUse:
$ref: >-
https://raw.githubusercontent.com/ga4gh/ga4gh-consent-policy/806ea53cffacb2055c3639f0fc9783f0dcd8cb02/consent_code.yaml#/components/schemas/ConsentCodeDataUse
adamDataUse:
$ref: >-
https://raw.githubusercontent.com/ga4gh/ADA-M/b16a72f9987ae20f433e97d6a3247ecddd8dde23/adam.yaml#/components/schemas/Adam
Info:
description: Additional structured metadata, key-value pairs.
nullable: true
type: array
items:
type: object
required:
- key
- value
properties:
key:
type: string
value:
type: string