diff --git a/docs/architecture/kp/rtx-kg2.md b/docs/architecture/kp/rtx-kg2.md index 056c8c2..fbab69e 100644 --- a/docs/architecture/kp/rtx-kg2.md +++ b/docs/architecture/kp/rtx-kg2.md @@ -7,20 +7,22 @@ by can answer Translator queries that are expressed in [TRAPI](https://github.com/NCATSTranslator/ReasonerAPI) format, with query graphs that contain one node or two nodes connected by an edge (i.e., a -"one-hop" query). RTX-KG2 is backed by the RTX-KG2 knowledge graph, which -integrates dozens of upstream knowledge sources into a Biolink-compliant system -hosted in a custom in-memory database (PloverDB). For more information about the -RTX-KG2 knowledge graph and how we built it, see the -[RTX-KG2 build system GitHub project area](https://github.com/RTXteam/RTX-KG2). For -more information about the PloverDB database, see the -[PloverDB GitHub project area](https://github.com/RTXteam/PloverDB). RTX-KG2 is -one of the KPs that is used by the Translator reasoning agent, **ARAX**. For +"one-hop" query). RTX-KG2 is backed by the [RTX-KG2 knowledge graph](https://doi.org/10.1186/s12859-022-04932-3), which +integrates dozens of upstream knowledge sources into a Biolink-compliant system, and is +hosted/served as a TRAPI API using [Plover2.0](https://github.com/RTXteam/PloverDB). For more information about the +RTX-KG2 knowledge graph and how we build it, see the +[RTX-KG2pre build system GitHub project area](https://github.com/RTXteam/RTX-KG2). +For more information about the +canonicalized version of RTX-KG2 (RTX-KG2c, which underlies the RTX-KG2 API), see [the RTX-KG2c build system project area](https://github.com/RTXteam/RTX/tree/master/code/kg2c). +For more information about the Plover2.0 platform, see the +[PloverDB GitHub project area](https://github.com/RTXteam/PloverDB). +RTX-KG2 is one of the KPs that is used by the Translator reasoning agent, **ARAX**. For more information about ARAX, see the [Expander Agent Page](../../teams/expander-agent.md). * _Modes of Access_ - * Via the Translator API (TRAPI) interface; see [the SmartAPI registry](https://smart-api.info/ui/00bab7d59abe031098d5cb1597f7f1c4) + * Via the Translator API (TRAPI) interface; see [the SmartAPI registry](https://smart-api.info/ui/a6b575139cfd429b0a87f825a625d036) * Download RTX-KG2 knowledge graph in [KGX TSV](https://github.com/biolink/kgx/blob/master/specification/kgx-format.md) format from the [NCATS GitHub git-lfs repository](https://github.com/ncats/translator-lfs-artifacts/tree/main/files). * Build your own RTX-KG2: [instructions here](https://github.com/RTXteam/RTX-KG2#how-to-build-rtx-kg2-from-its-upstream-sources) @@ -70,7 +72,7 @@ cat <onehop.json EOF curl -X POST \ - "https://kg2.transltr.io/api/rtxkg2/v1.4/query?bypass_cache=false" \ + "https://kg2cploverdb.transltr.io/query" \ -H "accept: application/json" \ -H "Content-Type: application/json" \ -d @onehop.json @@ -78,120 +80,56 @@ curl -X POST \ should result in this response: ``` { - "context": "https://raw.githubusercontent.com/biolink/biolink-model/master/context.jsonld", - "datetime": "2021-04-28 04:54:14", - "description": "Normal completion", - "logs": [ + "logs":[ { - "code": "", - "level": "INFO", - "message": "RTXKG2 Query launching on incoming Query", - "timestamp": "2021-04-28T04:54:14.856515" + "level":"INFO", + "message":"kg2c: Converting qnode n00's 'ids' to equivalent ids we recognize", + "timestamp":"Fri, 15 Nov 2024 21:11:02 GMT" }, ... - ], "message": { "knowledge_graph": { "edges": { - "1447028": { - "attributes": [ + "30759528": { + "attributes":[ { - "name": "provided_by", - "type": "biolink:provided_by", - "value": [ - "identifiers_org_registry:chembl.compound" - ] - } - ], - "object": "UniProtKB:O00519", - "predicate": "biolink:molecularly_interacts_with", - "subject": "CHEMBL.COMPOUND:CHEMBL112" - }, - "1447029": { - "attributes": [ - { - "name": "provided_by", - "type": "biolink:provided_by", - "value": [ - "identifiers_org_registry:chembl.compound" - ] - } - ], - "object": "UniProtKB:O14965", - "predicate": "biolink:molecularly_interacts_with", - "subject": "CHEMBL.COMPOUND:CHEMBL112" - }, - "1447030": { - "attributes": [ - { - "name": "provided_by", - "type": "biolink:provided_by", - "value": [ - "identifiers_org_registry:chembl.compound" - ] - } - ], - "object": "UniProtKB:O43570", - "predicate": "biolink:molecularly_interacts_with", - "subject": "CHEMBL.COMPOUND:CHEMBL112" - }, - "1447031": { - "attributes": [ + "attribute_source":"infores:rtx-kg2", + "attribute_type_id":"biolink:knowledge_level", + "value":"knowledge_assertion" + }, { - "name": "provided_by", - "type": "biolink:provided_by", - "value": [ - "pharos:" - ] - } - ], - "object": "UniProtKB:P00797", - "predicate": "biolink:molecularly_interacts_with", - "subject": "CHEMBL.COMPOUND:CHEMBL112" - }, - "1447032": { - "attributes": [ + "attribute_source":"infores:rtx-kg2", + "attribute_type_id":"biolink:original_predicate", + "description":"The IDs of the original RTX-KG2pre edge(s) corresponding to this edge prior to any synonymization or remapping.", + "value":[ + "CHEMBL.COMPOUND:CHEMBL112---biolink:physically_interacts_with---None---None---None---CHEMBL.TARGET:CHEMBL2094253---identifiers_org_registry:chembl.compound" + ], + "value_type_id":"metatype:String" + }, { - "name": "provided_by", - "type": "biolink:provided_by", - "value": [ - "identifiers_org_registry:chembl.compound" - ] + "attribute_source":"infores:rtx-kg2", + "attribute_type_id":"biolink:agent_type", + "value":"manual_agent" } ], - "object": "UniProtKB:P00915", - "predicate": "biolink:molecularly_interacts_with", - "subject": "CHEMBL.COMPOUND:CHEMBL112" - }, - "1447033": { - "attributes": [ + "object":"CHEMBL.TARGET:CHEMBL4523964", + "predicate":"biolink:physically_interacts_with", + "sources":[ { - "name": "provided_by", - "type": "biolink:provided_by", - "value": [ - "identifiers_org_registry:chembl.compound" - ] - } - ], - "object": "UniProtKB:P06746", - "predicate": "biolink:molecularly_interacts_with", - "subject": "CHEMBL.COMPOUND:CHEMBL112" - }, - "1447034": { - "attributes": [ + "resource_id":"infores:chembl", + "resource_role":"primary_knowledge_source" + }, { - "name": "provided_by", - "type": "biolink:provided_by", - "value": [ - "identifiers_org_registry:chembl.compound" + "resource_id":"infores:rtx-kg2", + "resource_role":"aggregator_knowledge_source", + "upstream_resource_ids":[ + "infores:chembl" ] } ], - "object": "UniProtKB:P07550", - "predicate": "biolink:molecularly_interacts_with", - "subject": "CHEMBL.COMPOUND:CHEMBL112" + "subject":"CHEBI:46195" }, - ... + ... ``` **Knowledge Sources Accessed** - See the [FAQ entry "What data sources are used in KG2?"](https://github.com/RTXteam/RTX/tree/master/code/kg2#what-data-sources-are-used-in-kg2) for details. @@ -277,6 +215,7 @@ should result in this response: * Example [python module](https://github.com/RTXteam/RTX/blob/master/code/ARAX/Examples/kg2_api_example.py) that queries the KG2 KP API **External Documentation** (List of urls for documentation sites). See example below. -* SmartAPI registry page for RTX-KG2: https://smart-api.info/ui/00bab7d59abe031098d5cb1597f7f1c4 -* Code for the build system for RTX-KG2: https://github.com/RTXteam/RTX/tree/master/code/kg2 -* Code for PloverDB database used by RTX-KG2 service: https://github.com/RTXteam/PloverDB +* SmartAPI registry page for RTX-KG2: https://smart-api.info/ui/a6b575139cfd429b0a87f825a625d036 +* Code for the build system for RTX-KG2pre: https://github.com/RTXteam/RTX-KG2 +* Code for the build system for RTX-KG2c (canonicalized): https://github.com/RTXteam/RTX/tree/master/code/kg2c +* Code for the Plover2.0 platform used to serve RTX-KG2: https://github.com/RTXteam/PloverDB