-
Notifications
You must be signed in to change notification settings - Fork 21
/
Copy pathRTX_OA3_TRAPI1.2_ARAX.yaml
2306 lines (2306 loc) · 82.2 KB
/
RTX_OA3_TRAPI1.2_ARAX.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
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
openapi: 3.0.1
info:
description: TRAPI 1.2 endpoint for the NCATS Biomedical Translator Reasoner called ARAX
version: 1.1.1
title: ARAX Translator Reasoner
contact:
email: [email protected]
license:
name: Apache 2.0
url: http://www.apache.org/licenses/LICENSE-2.0.html
termsOfService: https://github.com/RTXteam/RTX/blob/master/LICENSE
x-translator:
component: ARA
team:
- Expander Agent
biolink-version: 2.1.0
externalDocs:
description: >-
The values for component and team are restricted according to this
external JSON schema. See schema and examples at url
url: https://github.com/NCATSTranslator/translator_extensions/blob/production/x-translator/
x-trapi:
version: 1.2.0
asyncquery: true
operations:
- filter_results_top_n
- overlay_compute_ngd
- overlay_compute_jaccard
- overlay_fisher_exact_test
- bind
- fill
- filter_kgraph_orphans
- score
- complete_results
- filter_kgraph_top_n
- filter_kgraph_std_dev
- filter_kgraph_percentile
- filter_kgraph_discrete_kedge_attribute
- filter_kgraph_continuous_attribute
externalDocs:
description: >-
The values for version are restricted according to the regex in
this external JSON schema. See schema and examples at url
url: https://github.com/NCATSTranslator/translator_extensions/blob/production/x-trapi/
externalDocs:
description: >-
Documentation for the NCATS Biomedical Translator Reasoners web services
url: https://github.com/NCATSTranslator/ReasonerAPI
servers:
- url: https://arax.ncats.io/api/arax/v1.2
description: ARAX Translator Reasoner API
tags:
- name: meta_knowledge_graph
description: Get supported relationships
externalDocs:
description: Documentation for the reasoner predicates function
url: http://arax.ncats.io/overview.html#predicates
- name: query
description: Initiate a query and wait to receive the response
externalDocs:
description: Documentation for the reasoner query function
url: http://arax.ncats.io/overview.html#query
- name: asyncquery
description: Initiate a query with a callback to receive the response
externalDocs:
description: Documentation for the reasoner asynchquery function
url: http://arax.ncats.io/overview.html#asyncquery
- name: translator
description: Required for SmartAPI validation of x-translator
- name: trapi
description: Required for SmartAPI validation of x-trapi
- name: response
description: Request a previously stored response from the server
externalDocs:
description: Documentation for the reasoner response function
url: https://arax.ncats.io/overview.html#response
- name: translate
description: Translate natural language question into a standardized query
externalDocs:
description: Documentation for the reasoner translate function
url: 'https://arax.ncats.io/overview.html#translate'
- name: entity
description: Return identifier and type of some entity in the knowledge graph
externalDocs:
description: Documentation for the reasoner entity function
url: 'https://arax.ncats.io/overview.html#entity'
- name: exampleQuestions
description: Return a list of example questions that the reasoner can answer
externalDocs:
description: Documentation for the reasoner exampleQuestions function
url: 'https://arax.ncats.io/overview.html#exampleQuestions'
- name: PubmedMeshNgd
description: Query to get the Normalized Google Distance between two MeSH terms based on co-occurance in all PubMed article annotations
externalDocs:
description: Documentation for the reasoner PubmedMeshNgd function
url: 'https://arax.ncats.io/overview.html#PubmedMeshNgd'
paths:
/meta_knowledge_graph:
get:
tags:
- meta_knowledge_graph
summary: Meta knowledge graph representation of this TRAPI web service.
operationId: meta_knowledge_graph
responses:
'200':
description: >-
Returns meta knowledge graph representation of this TRAPI web
service.
content:
application/json:
schema:
$ref: '#/components/schemas/MetaKnowledgeGraph'
/query:
post:
tags:
- query
summary: Initiate a query and wait to receive a Response
description: ''
operationId: query
requestBody:
description: Query information to be submitted
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/Query'
responses:
'200':
description: >-
OK. There may or may not be results. Note that some of the provided
identifiers may not have been recognized.
content:
application/json:
schema:
$ref: '#/components/schemas/Response'
'400':
description: >-
Bad request. The request is invalid according to this OpenAPI
schema OR a specific identifier is believed to be invalid somehow
(not just unrecognized).
content:
application/json:
schema:
type: string
'500':
description: >-
Internal server error.
content:
application/json:
schema:
type: string
'501':
description: >-
Not implemented.
content:
application/json:
schema:
type: string
/asyncquery:
post:
tags:
- asyncquery
summary: Initiate a query with a callback to receive the response
description: ''
requestBody:
description: Query information to be submitted
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/AsyncQuery'
responses:
'200':
description: >-
The query is accepted for processing and the Response will be
sent to the callback url when complete.
content:
application/json:
schema:
type: string
'400':
description: >-
Bad request. The request is invalid according to this OpenAPI
schema OR a specific identifier is believed to be invalid somehow
(not just unrecognized).
content:
application/json:
schema:
type: string
'500':
description: >-
Internal server error.
content:
application/json:
schema:
type: string
'501':
description: >-
Not implemented.
content:
application/json:
schema:
type: string
/response/{response_id}:
get:
tags:
- response
summary: Request a previously stored response from the server
description: ''
operationId: get_response
parameters:
- in: path
name: response_id
description: Identifier of the response to return
required: true
schema:
type: string
responses:
'200':
description: successful operation
content:
application/json:
schema:
$ref: '#/components/schemas/Response'
'404':
description: response_id not found
/response:
post:
tags:
- response
summary: Annotate a response
description: ''
operationId: post_response
requestBody:
description: Object that provides annotation information
required: true
content:
application/json:
schema:
type: object
responses:
'200':
description: successful operation
content:
application/json:
schema:
type: object
'400':
description: Invalid request
/translate:
post:
tags:
- translate
summary: Translate natural language question into a standardized query
description: ''
operationId: translate
requestBody:
description: Question information to be translated
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/Question'
responses:
'200':
description: successful operation
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/Query'
'400':
description: Invalid status value
/entity:
get:
tags:
- entity
summary: Obtain CURIE and synonym information about a search term
description: ''
operationId: get_entity
parameters:
- in: query
name: q
description: >-
A string to search by (name, abbreviation, CURIE, etc.).
The parameter may be repeated for multiple search strings.
required: true
schema:
type: array
example:
- MESH:D014867
- NCIT:C34373
items:
type: string
responses:
'200':
description: successful operation
content:
application/json:
schema:
type: object
'404':
description: "Entity not found"
post:
tags:
- entity
summary: Obtain CURIE and synonym information about search terms
description: ''
operationId: post_entity
requestBody:
description: List of terms to get information about
required: true
content:
application/json:
schema:
type: object
responses:
'200':
description: successful operation
content:
application/json:
schema:
$ref: '#/components/schemas/EntityQuery'
'404':
description: "Entity not found"
/exampleQuestions:
get:
tags:
- exampleQuestions
summary: Request a list of example questions that ARAX can answer
description: ''
operationId: example_questions
responses:
'200':
description: successful operation
content:
application/json:
schema:
type: array
items:
type: object
'/PubmedMeshNgd/{term1}/{term2}':
get:
tags:
- PubmedMeshNgd
summary: Query to get the Normalized Google Distance between two MeSH terms based on co-occurrence in all PubMed article annotations
description: ''
operationId: PubmedMeshNgd
parameters:
- in: path
name: term1
description: First of two terms. Order not important.
required: true
schema:
type: string
- in: path
name: term2
description: Second of two terms. Order not important.
required: true
schema:
type: string
responses:
'200':
description: successful operation
content:
application/json:
schema:
$ref: '#/components/schemas/MeshNgdResponse'
'400':
description: "Invalid terms"
components:
schemas:
Query:
description: >-
The Query class is used to package a user request for information. A
Query object consists of a required Message object with optional
additional properties. Additional properties are intended to convey
implementation-specific or query-independent parameters. For example,
an additional property specifying a log level could allow a user to
override the default log level in order to receive more fine-grained
log information when debugging an issue.
x-body-name: request_body
type: object
properties:
message:
$ref: '#/components/schemas/Message'
description: >-
The query Message is a serialization of the user request. Content
of the Message object depends on the intended TRAPI operation. For
example, the fill operation requires a non-empty query_graph field
as part of the Message, whereas other operations, e.g. overlay,
require non-empty results and knowledge_graph fields.
log_level:
description: The least critical level of logs to return
allOf:
- $ref: '#/components/schemas/LogLevel'
nullable: true
workflow:
description: List of workflow steps to be executed.
type: array
example: null
items:
oneOf:
- $ref: '#/components/schemas/OperationAnnotate'
- $ref: '#/components/schemas/OperationAnnotateEdges'
- $ref: '#/components/schemas/OperationBind'
- $ref: '#/components/schemas/OperationCompleteResults'
- $ref: '#/components/schemas/OperationFill'
- $ref: '#/components/schemas/OperationFilterKgraph'
- $ref: '#/components/schemas/OperationFilterKgraphContinuousAttribute'
- $ref: '#/components/schemas/OperationFilterKgraphDiscreteKedgeAttribute'
- $ref: '#/components/schemas/OperationFilterKgraphOrphans'
- $ref: '#/components/schemas/OperationFilterKgraphPercentile'
- $ref: '#/components/schemas/OperationFilterKgraphStdDev'
- $ref: '#/components/schemas/OperationFilterKgraphTopN'
- $ref: '#/components/schemas/OperationFilterResults'
- $ref: '#/components/schemas/OperationFilterResultsTopN'
- $ref: '#/components/schemas/OperationLookup'
- $ref: '#/components/schemas/OperationOverlay'
- $ref: '#/components/schemas/OperationOverlayComputeJaccard'
- $ref: '#/components/schemas/OperationOverlayComputeNgd'
- $ref: '#/components/schemas/OperationOverlayConnectKnodes'
- $ref: '#/components/schemas/OperationOverlayFisherExactTest'
- $ref: '#/components/schemas/OperationRestate'
- $ref: '#/components/schemas/OperationScore'
- $ref: '#/components/schemas/OperationSortResults'
- $ref: '#/components/schemas/OperationSortResultsEdgeAttribute'
- $ref: '#/components/schemas/OperationSortResultsNodeAttribute'
- $ref: '#/components/schemas/OperationSortResultsScore'
nullable: true
bypass_cache:
type: boolean
default: false
description: >-
Set to true in order to bypass any possible cached
response and try to answer the query from scratch
stream_progress:
type: boolean
default: false
description: >-
Set to true in order to receive a stream of LogEntry objects
as the query is progressing
enforce_edge_directionality:
type: boolean
default: false
description: >-
Set to true in order to enforce edge directionality during queries.
By default, edge directionality can be reversed without penalty.
return_minimal_metadata:
type: boolean
default: false
description: >-
Set to true in order to return only the most minimal metadata.
By default, rich metadata for nodes and edges are supplied, which
may cause a very large and slower Response.
max_results:
type: integer
example: 100
default: 100
description: Maximum number of individual results to return
page_size:
type: integer
example: 100
default: 100
description: Split the results into pages with this number of results each
page_number:
type: integer
example: 1
default: 1
description: >-
Page number of results when the number of results exceeds the
page_size, with page 1 as the first page
operations:
description: >-
Container for one or more Message objects or identifiers for one or
more Messages along with a processing plan and options for how those
messages should be processed and returned
example: null
allOf:
- $ref: '#/components/schemas/Operations'
nullable: true
additionalProperties: true
required:
- message
AsyncQuery:
description: >-
The AsyncQuery class is effectively the same as the Query class but
it requires a callback property.
x-body-name: request_body
type: object
properties:
callback:
type: string
format: uri
pattern: ^https?://
description: >-
Upon completion, this server will send a POST request to the
callback URL with `Content-Type: application/json` header and
request body containing a JSON-encoded `Response` object.
The server MAY POST `Response` objects before work is fully
complete to provide interim results with a Response.status
value of 'Running'. If a POST operation to the callback URL
does not succeed, the server SHOULD retry the POST at least
once.
message:
$ref: '#/components/schemas/Message'
description: >-
The query Message is a serialization of the user request. Content
of the Message object depends on the intended TRAPI operation. For
example, the fill operation requires a non-empty query_graph field
as part of the Message, whereas other operations, e.g. overlay,
require non-empty results and knowledge_graph fields.
log_level:
description: The least critical level of logs to return
allOf:
- $ref: '#/components/schemas/LogLevel'
nullable: true
workflow:
description: List of workflow steps to be executed.
type: array
example: null
items:
oneOf:
- $ref: '#/components/schemas/OperationAnnotate'
- $ref: '#/components/schemas/OperationAnnotateEdges'
- $ref: '#/components/schemas/OperationBind'
- $ref: '#/components/schemas/OperationCompleteResults'
- $ref: '#/components/schemas/OperationFill'
- $ref: '#/components/schemas/OperationFilterKgraph'
- $ref: '#/components/schemas/OperationFilterKgraphContinuousAttribute'
- $ref: '#/components/schemas/OperationFilterKgraphDiscreteKedgeAttribute'
- $ref: '#/components/schemas/OperationFilterKgraphOrphans'
- $ref: '#/components/schemas/OperationFilterKgraphPercentile'
- $ref: '#/components/schemas/OperationFilterKgraphStdDev'
- $ref: '#/components/schemas/OperationFilterKgraphTopN'
- $ref: '#/components/schemas/OperationFilterResults'
- $ref: '#/components/schemas/OperationFilterResultsTopN'
- $ref: '#/components/schemas/OperationLookup'
- $ref: '#/components/schemas/OperationOverlay'
- $ref: '#/components/schemas/OperationOverlayComputeJaccard'
- $ref: '#/components/schemas/OperationOverlayComputeNgd'
- $ref: '#/components/schemas/OperationOverlayConnectKnodes'
- $ref: '#/components/schemas/OperationOverlayFisherExactTest'
- $ref: '#/components/schemas/OperationRestate'
- $ref: '#/components/schemas/OperationScore'
- $ref: '#/components/schemas/OperationSortResults'
- $ref: '#/components/schemas/OperationSortResultsEdgeAttribute'
- $ref: '#/components/schemas/OperationSortResultsNodeAttribute'
- $ref: '#/components/schemas/OperationSortResultsScore'
nullable: true
additionalProperties: true
required:
- callback
- message
Response:
type: object
description: >-
The Response object contains the main payload when a TRAPI query
endpoint interprets and responds to the submitted query successfully
(i.e., HTTP Status Code 200). The message property contains the
knowledge of the response (query graph, knowledge graph, and results).
The status, description, and logs properties provide additional details
about the response.
properties:
message:
description: >-
Contains the knowledge of the response (query graph, knowledge
graph, and results).
$ref: '#/components/schemas/Message'
status:
description: >-
One of a standardized set of short codes,
e.g. Success, QueryNotTraversable, KPsNotAvailable
type: string
example: Success
nullable: true
description:
description: A brief human-readable description of the outcome
type: string
example: Success. 42 results found.
nullable: true
logs:
description: >-
Log entries containing errors, warnings, debugging information, etc
type: array
items:
$ref: '#/components/schemas/LogEntry'
nullable: true
workflow:
description: A list of operations that were executed.
type: array
items:
oneOf:
- $ref: '#/components/schemas/OperationAnnotate'
- $ref: '#/components/schemas/OperationAnnotateEdges'
- $ref: '#/components/schemas/OperationBind'
- $ref: '#/components/schemas/OperationCompleteResults'
- $ref: '#/components/schemas/OperationFill'
- $ref: '#/components/schemas/OperationFilterKgraph'
- $ref: '#/components/schemas/OperationFilterKgraphContinuousAttribute'
- $ref: '#/components/schemas/OperationFilterKgraphDiscreteKedgeAttribute'
- $ref: '#/components/schemas/OperationFilterKgraphOrphans'
- $ref: '#/components/schemas/OperationFilterKgraphPercentile'
- $ref: '#/components/schemas/OperationFilterKgraphStdDev'
- $ref: '#/components/schemas/OperationFilterKgraphTopN'
- $ref: '#/components/schemas/OperationFilterResults'
- $ref: '#/components/schemas/OperationFilterResultsTopN'
- $ref: '#/components/schemas/OperationLookup'
- $ref: '#/components/schemas/OperationOverlay'
- $ref: '#/components/schemas/OperationOverlayComputeJaccard'
- $ref: '#/components/schemas/OperationOverlayComputeNgd'
- $ref: '#/components/schemas/OperationOverlayConnectKnodes'
- $ref: '#/components/schemas/OperationOverlayFisherExactTest'
- $ref: '#/components/schemas/OperationRestate'
- $ref: '#/components/schemas/OperationScore'
- $ref: '#/components/schemas/OperationSortResults'
- $ref: '#/components/schemas/OperationSortResultsEdgeAttribute'
- $ref: '#/components/schemas/OperationSortResultsNodeAttribute'
- $ref: '#/components/schemas/OperationSortResultsScore'
operations:
description: >-
Container for one or more Message objects or identifiers for one or
more Messages along with the processing plan and options for how those
messages were processed and returned
allOf:
- $ref: '#/components/schemas/Operations'
reasoner_id:
type: string
example: ARAX
description: >-
Identifier string of the reasoner that provided this response
(one of ARAX, Robokop, etc.)
tool_version:
type: string
example: ARAX 0.8.0
description: Version label of the tool that generated this response
schema_version:
type: string
example: 1.0.0
description: Version label of this TRAPI schema
datetime:
type: string
example: '2021-01-09 12:34:45'
description: >-
Datetime string for the time that this response was generated
table_column_names:
type: array
example:
- chemical_substance.name
- chemical_substance.id
description: >-
List of column names that corresponds to the row_data for
each result
items:
type: string
original_question:
type: string
example: what proteins are affected by sickle cell anemia
description: The original question text typed in by the user
restated_question:
type: string
example: Which proteins are affected by sickle cell anemia?
description: >-
A precise restatement of the question, as understood by the
Translator, for which the answer applies. The user should verify
that the restated question matches the intent of their original
question (it might not).
query_options:
type: object
example:
coalesce: true
threshold: 0.9
description: >-
Dict of options that can be sent with the query. Options are tool
specific and not stipulated here
context:
type: string
example: 'https://rtx.ncats.io/ns/translator.jsonld'
description: JSON-LD context URI
type:
type: string
example: TranslatorAPIResponse
description: Entity type of this response
id:
type: string
example: 'https://arax.ncats.io/api/rtx/v1.0/response/123'
description: URI for this response
validation_result:
type: object
description: >-
Validation results and other summary stats computed
for this Response.
additionalProperties: true
required:
- message
Message:
description: >-
The message object holds the main content of a Query or a Response in
three properties: query_graph, results, and knowledge_graph.
The query_graph property contains the query configuration, the results
property contains any answers that are returned by the service,
and knowledge_graph property contains lists of edges and nodes in the
thought graph corresponding to this message. The content of these
properties is context-dependent to the encompassing object and
the TRAPI operation requested.
type: object
properties:
results:
description: >-
List of all returned Result objects for the query posed
type: array
items:
$ref: '#/components/schemas/Result'
nullable: true
query_graph:
description: >-
QueryGraph object that contains a serialization of a query in the
form of a graph
allOf:
- $ref: '#/components/schemas/QueryGraph'
nullable: true
knowledge_graph:
description: >-
KnowledgeGraph object that contains lists of nodes and edges
in the thought graph corresponding to the message
allOf:
- $ref: '#/components/schemas/KnowledgeGraph'
nullable: true
additionalProperties: false
example:
query_graph:
edges:
e00:
subject: n00
object: n01
predicates: [ biolink:physically_interacts_with ]
nodes:
n00:
ids: [ CHEMBL.COMPOUND:CHEMBL112 ]
categories: [ biolink:ChemicalSubstance ]
n01:
categories: [ biolink:Protein ]
LogEntry:
description: >-
The LogEntry object contains information useful for tracing
and debugging across Translator components. Although an
individual component (for example, an ARA or KP) may have its
own logging and debugging infrastructure, this internal
information is not, in general, available to other components.
In addition to a timestamp and logging level, LogEntry
includes a string intended to be read by a human, along with
one of a standardized set of codes describing the condition of
the component sending the message.
type: object
properties:
timestamp:
type: string
format: date-time
description: Timestamp in ISO 8601 format
example: '2020-09-03T18:13:49+00:00'
nullable: true
level:
allOf:
- $ref: '#/components/schemas/LogLevel'
nullable: true
code:
type: string
description: >-
One of a standardized set of short codes
e.g. QueryNotTraversable, KPNotAvailable, KPResponseMalformed
nullable: true
message:
type: string
description: A human-readable log message
nullable: true
additionalProperties: true
LogLevel:
type: string
description: Logging level
enum:
- ERROR
- WARNING
- INFO
- DEBUG
example: DEBUG
x-nullable: true
Result:
type: object
description: >-
A Result object specifies the nodes and edges in the knowledge graph
that satisfy the structure or conditions of a user-submitted query
graph. It must contain a NodeBindings object (list of query graph node
to knowledge graph node mappings) and an EdgeBindings object (list of
query graph edge to knowledge graph edge mappings).
properties:
node_bindings:
type: object
description: >-
The dictionary of Input Query Graph to Result Knowledge Graph node
bindings where the dictionary keys are the key identifiers of the
Query Graph nodes and the associated values of those keys are
instances of NodeBinding schema type (see below). This value is an
array of NodeBindings since a given query node may have multiple
knowledge graph Node bindings in the result.
additionalProperties:
type: array
items:
$ref: '#/components/schemas/NodeBinding'
edge_bindings:
type: object
description: >-
The dictionary of Input Query Graph to Result Knowledge Graph edge
bindings where the dictionary keys are the key identifiers of the
Query Graph edges and the associated values of those keys are
instances of EdgeBinding schema type (see below). This value is an
array of EdgeBindings since a given query edge may resolve to
multiple knowledge graph edges in the result.
additionalProperties:
type: array
items:
$ref: '#/components/schemas/EdgeBinding'
id:
type: string
example: result:234
description: URI for this result
nullable: true
description:
type: string
example: >-
The genetic condition sickle cell anemia may provide protection
from cerebral malaria via genetic alterations of proteins HBB
(P68871) and HMOX1 (P09601).
description: >-
A free text description of this result answer from the reasoner
nullable: true
essence:
type: string
example: ibuprofen
description: >-
A single string that is the terse essence of the result (useful for
simple answers)
nullable: true
essence_category:
type: string
example: biolink:ChemicalSubstance
description: A Translator BioLink bioentity category of the essence
nullable: true
row_data:
type: array
example:
- ibuprofen
- CHEMBL:CHEMBL521
description: >-
An arbitrary list of values that captures the essence of the result
that can be turned into a tabular result across all answers (each
result is a row) for a user that wants simplified tabular output
items:
oneOf:
- type: string
- type: number
nullable: true
score:
type: number
format: float
example: 163.233
description: Any type of score associated with this result
nullable: true
score_name:
type: string
example: Jaccard distance
description: Name for the score
nullable: true
score_direction:
type: string
example: lower_is_better
description: >-
Sorting indicator for the score: one of higher_is_better or
lower_is_better
nullable: true
confidence:
type: number
format: float
example: 0.9234
description: >-
Confidence metric for this result, a value between (inclusive)
0.0 (no confidence) and 1.0 (highest confidence)
nullable: true
result_group:
type: integer
example: 1
description: >-
An integer group number for results for use in cases where several
results should be grouped together. Also useful to control sorting
ascending.
nullable: true
result_group_similarity_score:
type: number
format: float
example: 0.95
description: >-
A score that denotes the similarity of this result to other members
of the result_group
nullable: true
reasoner_id:
type: string
example: ARAX
description: >-
Identifier string of the reasoner that provided this result (e.g.,
ARAX, Robokop, etc.)
nullable: true
additionalProperties: true
required:
- node_bindings
- edge_bindings
NodeBinding:
type: object
properties:
id:
$ref: '#/components/schemas/CURIE'
description: >-
An instance of NodeBinding is a single KnowledgeGraph Node mapping,
identified by the corresponding 'id' object key identifier of the
Node within the Knowledge Graph. Instances of NodeBinding may
include extra annotation (such annotation is not yet fully
standardized).
additionalProperties: true
required:
- id
EdgeBinding:
type: object
description: >-
A instance of EdgeBinding is a single KnowledgeGraph Edge mapping,
identified by the corresponding 'id' object key identifier of the
Edge within the Knowledge Graph. Instances of EdgeBinding may include
extra annotation (such annotation is not yet fully standardized).
properties:
id:
type: string
description: The key identifier of a specific KnowledgeGraph Edge.
attributes:
type: array
description: >-
A list of attributes providing further information about the
edge binding. This is not intended for capturing edge attributes
and should only be used for properties that vary from result to
result.
items:
$ref: '#/components/schemas/Attribute'
nullable: true
additionalProperties: true
required:
- id
KnowledgeGraph:
type: object
description: >-
The knowledge graph associated with a set of results. The instances
of Node and Edge defining this graph represent instances of
biolink:NamedThing (concept nodes) and biolink:Association
(relationship edges) representing (Attribute) annotated knowledge
returned from the knowledge sources and inference agents wrapped by
the given TRAPI implementation.
properties:
nodes:
type: object
description: >-
Dictionary of Node instances used in the KnowledgeGraph,
referenced elsewhere in the TRAPI output by the dictionary key.
additionalProperties:
$ref: '#/components/schemas/Node'
edges:
type: object
description: >-
Dictionary of Edge instances used in the KnowledgeGraph,
referenced elsewhere in the TRAPI output by the dictionary key.
additionalProperties:
$ref: '#/components/schemas/Edge'
additionalProperties: true
required:
- nodes
- edges
x-nullable: true
QueryGraph:
type: object
description: >-
A graph representing a biomedical question. It serves as a template for
each result (answer), where each bound knowledge graph node/edge is
expected to obey the constraints of the associated query graph element.
properties:
nodes:
type: object
description: >-
The node specifications. The keys of this map are unique node
identifiers and the corresponding values include the constraints
on bound nodes.
additionalProperties:
$ref: '#/components/schemas/QNode'
edges:
type: object
description: >-