-
Notifications
You must be signed in to change notification settings - Fork 0
/
openapi.yaml
832 lines (814 loc) · 22.2 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
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
openapi: 3.1.0
info:
title: viguno
description: Phenotype/disease for VarFish
contact:
name: Manuel Holtgrewe
email: [email protected]
license:
name: Apache-2.0
version: 0.3.2
paths:
/api/v1/hpo/genes:
get:
tags:
- hpo_genes
summary: Query for genes in the HPO database.
description: |-
# Errors
In the case that there is an error running the server.
operationId: hpoGenes
parameters:
- name: gene_id
in: query
description: The gene ID to search for.
required: false
schema:
type:
- string
- 'null'
- name: gene_symbol
in: query
description: The gene symbol to search for.
required: false
schema:
type:
- string
- 'null'
- name: match_
in: query
description: The match mode.
required: false
schema:
oneOf:
- type: 'null'
- $ref: '#/components/schemas/Match'
- name: max_results
in: query
description: Maximal number of results to return.
required: false
schema:
type: integer
minimum: 0
- name: hpo_terms
in: query
description: Whether to include HPO terms.
required: false
schema:
type: boolean
responses:
'200':
description: The query was successful.
content:
application/json:
schema:
$ref: '#/components/schemas/HpoGenesResult'
'500':
description: The server encountered an error.
content:
application/json:
schema:
$ref: '#/components/schemas/CustomError'
/api/v1/hpo/omims:
get:
tags:
- hpo_omims
summary: Query for OMIM diseases in the HPO database.
operationId: hpoOmims
parameters:
- name: omim_id
in: query
description: The OMIM ID to search for.
required: false
schema:
type:
- string
- 'null'
- name: name
in: query
description: The disease name to search for.
required: false
schema:
type:
- string
- 'null'
- name: match
in: query
description: The match mode, default is `Match::Exact`.
required: false
schema:
oneOf:
- type: 'null'
- $ref: '#/components/schemas/Match'
- name: ignore_case
in: query
description: Whether case is insentivie, default is `false`.
required: false
schema:
type:
- boolean
- 'null'
- name: max_results
in: query
description: Maximal number of results to return.
required: false
schema:
type: integer
minimum: 0
- name: hpo_terms
in: query
description: Whether to include HPO terms.
required: false
schema:
type: boolean
responses:
'200':
description: The query was successful.
content:
application/json:
schema:
$ref: '#/components/schemas/HpoOmimsResult'
'500':
description: The server encountered an error.
content:
application/json:
schema:
$ref: '#/components/schemas/CustomError'
/api/v1/hpo/sim/term-gene:
get:
tags:
- hpo_sim::term_gene
summary: |-
Query for similarity between a set of terms to each entry in a
list of genes.
operationId: hpoSimTermGene
parameters:
- name: terms
in: query
description: Set of terms to use as query.
required: true
schema:
type: array
items:
type: string
- name: gene_ids
in: query
description: The set of ids for genes to use as "database".
required: false
schema:
type:
- array
- 'null'
items:
type: string
- name: gene_symbols
in: query
description: The set of symbols for genes to use as "database".
required: false
schema:
type:
- array
- 'null'
items:
type: string
responses:
'200':
description: The query was successful.
content:
application/json:
schema:
$ref: '#/components/schemas/HpoSimTermGeneResult'
'500':
description: The server encountered an error.
content:
application/json:
schema:
$ref: '#/components/schemas/CustomError'
/api/v1/hpo/sim/term-term:
get:
tags:
- hpo_sim::term_term
summary: Query for pairwise term similarity.
description: |-
In the case of Resnik, this corresponds to `IC(MICA(t_1, t_2))`.
# Errors
In the case that there is an error running the server.
operationId: hpoSimTermTerm
parameters:
- name: lhs
in: query
description: The one set of HPO terms to compute similarity for.
required: true
schema:
type: array
items:
type: string
- name: rhs
in: query
description: The second set of HPO terms to compute similarity for.
required: true
schema:
type: array
items:
type: string
- name: ic_base
in: query
description: What should information content be based on.
required: false
schema:
$ref: '#/components/schemas/IcBasedOn'
- name: similarity
in: query
description: The similarity method to use.
required: false
schema:
$ref: '#/components/schemas/SimilarityMethod'
- name: combiner
in: query
description: The score combiner.
required: false
schema:
$ref: '#/components/schemas/ScoreCombiner'
responses:
'200':
description: The query was successful.
content:
application/json:
schema:
$ref: '#/components/schemas/HpoSimTermTermResult'
'500':
description: The server encountered an error.
content:
application/json:
schema:
$ref: '#/components/schemas/CustomError'
/api/v1/hpo/terms:
get:
tags:
- hpo_terms
summary: Query for terms in the HPO database.
description: |-
# Errors
In the case that there is an error running the server.
operationId: hpoTerms
parameters:
- name: term_id
in: query
description: The term ID to search for.
required: false
schema:
type:
- string
- 'null'
- name: name
in: query
description: The term name to search for.
required: false
schema:
type:
- string
- 'null'
- name: max_results
in: query
description: Maximal number of results to return.
required: false
schema:
type: integer
minimum: 0
- name: genes
in: query
description: Whether to include genes.
required: false
schema:
type: boolean
responses:
'200':
description: The query was successful.
content:
application/json:
schema:
$ref: '#/components/schemas/HpoTermsResult'
'500':
description: The server encountered an error.
content:
application/json:
schema:
$ref: '#/components/schemas/CustomError'
components:
schemas:
CustomError:
type: object
required:
- err
properties:
err:
type: string
Gene:
type: object
description: Struct for storing gene information in the result.
required:
- entrez_id
- gene_symbol
properties:
entrez_id:
type: integer
format: int32
description: The NCBI gene ID.
minimum: 0
gene_symbol:
type: string
description: The gene symbol.
hgnc_id:
type:
- string
- 'null'
description: The HGNC ID.
HpoGenesQuery:
type: object
description: |-
Parameters for `fetch_hpo_genes`.
This allows to query for genes. The first given of the following is
interpreted.
- `gene_id` -- specify gene ID (either NCBI or HGNC gene ID)
- `gene_symbol` -- specify the gene symbol
- `max_results` -- the maximnum number of records to return
- `hpo_terms` -- whether to include `"hpo_terms"` in result
The following propery defines how matches are performed:
- `match` -- how to match
properties:
gene_id:
type:
- string
- 'null'
description: The gene ID to search for.
gene_symbol:
type:
- string
- 'null'
description: The gene symbol to search for.
match_:
oneOf:
- type: 'null'
- $ref: '#/components/schemas/Match'
description: The match mode.
max_results:
type: integer
description: Maximal number of results to return.
minimum: 0
hpo_terms:
type: boolean
description: Whether to include HPO terms.
HpoGenesResult:
type: object
description: Container for the result.
required:
- version
- query
- result
properties:
version:
$ref: '#/components/schemas/Version'
description: Version information.
query:
$ref: '#/components/schemas/HpoGenesQuery'
description: The original query records.
result:
type: array
items:
$ref: '#/components/schemas/HpoGenesResultEntry'
description: The resulting records for the scored genes.
HpoGenesResultEntry:
type: object
description: Result entry for `handle`.
required:
- gene_ncbi_id
- gene_symbol
properties:
gene_ncbi_id:
type: integer
format: int32
description: The gene's NCBI ID.
minimum: 0
gene_symbol:
type: string
description: The gene's HGNC symbol.
hgnc_id:
type:
- string
- 'null'
description: The gene's HGNC ID.
hpo_terms:
type:
- array
- 'null'
items:
$ref: '#/components/schemas/ResultHpoTerm'
description: The gene's associated HPO terms.
HpoOmimsQuery:
type: object
description: |-
Parameters for `handle`.
This allows to query for diseases. The first given of the following
is interpreted.
- `omim_id` -- specify disease ID
- `name` -- specify the name to query for
- `max_results` -- the maximum number of records to return
- `hpo_terms` -- whether to include `"hpo_terms"` in result
The following propery defines how matches are performed:
- `match` -- how to match
properties:
omim_id:
type:
- string
- 'null'
description: The OMIM ID to search for.
name:
type:
- string
- 'null'
description: The disease name to search for.
match:
oneOf:
- type: 'null'
- $ref: '#/components/schemas/Match'
description: The match mode, default is `Match::Exact`.
ignore_case:
type:
- boolean
- 'null'
description: Whether case is insentivie, default is `false`.
max_results:
type: integer
description: Maximal number of results to return.
minimum: 0
hpo_terms:
type: boolean
description: Whether to include HPO terms.
HpoOmimsResult:
type: object
description: Container for the result.
required:
- version
- query
- result
properties:
version:
$ref: '#/components/schemas/Version'
description: Version information.
query:
$ref: '#/components/schemas/HpoOmimsQuery'
description: The original query records.
result:
type: array
items:
$ref: '#/components/schemas/HpoOmimsResultEntry'
description: The resulting records for the scored genes.
HpoOmimsResultEntry:
type: object
description: Result entry for `handle`.
required:
- omim_id
- name
properties:
omim_id:
type: string
description: The OMIM ID.
name:
type: string
description: The OMIM disease name.
hpo_terms:
type:
- array
- 'null'
items:
$ref: '#/components/schemas/ResultHpoTerm'
description: The gene's associated HPO terms.
HpoSimTermGeneQuery:
type: object
description: The performed query.
required:
- terms
- genes
properties:
terms:
type: array
items:
$ref: '#/components/schemas/HpoTerm'
description: The query HPO terms.
genes:
type: array
items:
$ref: '#/components/schemas/Gene'
description: The gene list to score.
HpoSimTermGeneResult:
type: object
description: Result container data structure.
required:
- version
- query
- result
properties:
version:
$ref: '#/components/schemas/Version'
description: Version information.
query:
$ref: '#/components/schemas/HpoSimTermGeneQuery'
description: The original query records.
result:
type: array
items:
$ref: '#/components/schemas/HpoSimTermGeneResultEntry'
description: The resulting records for the scored genes.
HpoSimTermGeneResultEntry:
type: object
description: Store score for a record with information on individual terms.
required:
- gene_symbol
- raw_score
properties:
gene_symbol:
type: string
description: The gene symbol.
raw_score:
type: number
format: float
description: The raw Phenomizer score.
terms:
type:
- array
- 'null'
items:
$ref: '#/components/schemas/HpoSimTermGeneTermDetails'
description: Details on individual terms.
HpoSimTermGeneTermDetails:
type: object
description: Detailed term scores.
required:
- term_gene
- score
properties:
term_query:
oneOf:
- type: 'null'
- $ref: '#/components/schemas/HpoTerm'
description: The query HPO term.
term_gene:
$ref: '#/components/schemas/HpoTerm'
description: The gene's HPO term.
score:
type: number
format: float
description: The similarity score.
HpoSimTermTermQuery:
type: object
description: |-
Request as sent together with the response.
The difference is that the `lhs` and `rhs` fields are replaced by vecs.
required:
- lhs
- rhs
properties:
lhs:
type: array
items:
type: string
description: The one set of HPO terms to compute similarity for.
rhs:
type: array
items:
type: string
description: The second set of HPO terms to compute similarity for.
ic_base:
$ref: '#/components/schemas/IcBasedOn'
description: What should information content be based on.
similarity:
$ref: '#/components/schemas/SimilarityMethod'
description: The similarity method to use.
combiner:
$ref: '#/components/schemas/ScoreCombiner'
description: The score combiner.
HpoSimTermTermResult:
type: object
description: Result container.
required:
- version
- query
- result
properties:
version:
$ref: '#/components/schemas/Version'
description: Version information.
query:
$ref: '#/components/schemas/HpoSimTermTermQuery'
description: The original query records.
result:
type: array
items:
$ref: '#/components/schemas/HpoSimTermTermResultEntry'
description: The resulting records for the scored genes.
HpoSimTermTermResultEntry:
type: object
description: Result entry for `handle`.
required:
- lhs
- rhs
- score
properties:
lhs:
type: string
description: The lhs entry.
rhs:
type: string
description: The rhs entry.
score:
type: number
format: float
description: The similarity score.
HpoTerm:
type: object
description: Struct for loading an HPO term from JSON.
required:
- term_id
properties:
term_id:
type: string
description: The term ID.
term_name:
type:
- string
- 'null'
description: The term name (optional).
HpoTermsQuery:
type: object
description: |-
Parameters for `handle`.
This allows to query for terms. The first given of the following is
interpreted.
- `term_id` -- specify term ID
- `gene_symbol` -- specify the gene symbol
- `max_results` -- the maximum number of records to return
- `genes` -- whether to include `"genes"` in result
properties:
term_id:
type:
- string
- 'null'
description: The term ID to search for.
name:
type:
- string
- 'null'
description: The term name to search for.
max_results:
type: integer
description: Maximal number of results to return.
minimum: 0
genes:
type: boolean
description: Whether to include genes.
HpoTermsResult:
type: object
description: Container for the result.
required:
- version
- query
- result
properties:
version:
$ref: '#/components/schemas/Version'
description: Version information.
query:
$ref: '#/components/schemas/HpoTermsQuery'
description: The original query records.
result:
type: array
items:
$ref: '#/components/schemas/HpoTermsResultEntry'
description: The resulting records for the scored genes.
HpoTermsResultEntry:
type: object
description: Result entry for `fetch_hpo_genes`.
required:
- term_id
- name
properties:
term_id:
type: string
description: The HPO term's ID.
name:
type: string
description: The HPO term's name.
definition:
type:
- string
- 'null'
description: Any matching description.
synonyms:
type:
- array
- 'null'
items:
type: string
description: Any matching synonyms.
xrefs:
type:
- array
- 'null'
items:
type: string
description: Any matching xref.
genes:
type:
- array
- 'null'
items:
$ref: '#/components/schemas/ResultGene'
description: The gene's associated HPO terms.
IcBasedOn:
type: string
description: |-
Enum for representing the information content kind.
We replicate what is in the `hpo` create so we can put them on the command line and use
them in HTTP queries more easily.
enum:
- gene
- omim
Match:
type: string
description: Specify how to perform query matches in the API calls.
enum:
- exact
- prefix
- suffix
- contains
ResultGene:
type: object
description: Representation of a gene.
required:
- ncbi_gene_id
- gene_symbol
properties:
ncbi_gene_id:
type: integer
format: int32
description: The HPO ID.
minimum: 0
gene_symbol:
type: string
description: The description.
hgnc_id:
type:
- string
- 'null'
description: The HGNC ID.
ResultHpoTerm:
type: object
description: Representation of an HPO term.
required:
- term_id
- name
properties:
term_id:
type: string
description: The HPO ID.
name:
type: string
description: The term name.
ScoreCombiner:
type: string
description: |-
Representation of the standard combiners from HPO.
We replicate what is in the `hpo` create so we can put them on the command line and use
them in HTTP queries more easily.
enum:
- fun-sim-avg
- fun-sim-max
- bma
SimilarityMethod:
type: string
description: |-
Enum for representing similarity method to use.
We replicate what is in the `hpo` create so we can put them on the command line and use
them in HTTP queries more easily.
enum:
- distance-gene
- graph-ic
- information-coefficient
- jc
- lin
- mutation
- relevance
- resnik
Version:
type: object
description: Version information that is returned by the HTTP server.
required:
- hpo
- viguno
properties:
hpo:
type: string
description: Version of the HPO.
viguno:
type: string
description: Version of the `viguno` package.