Skip to content

Commit

Permalink
Update rtx-kg2.md in light of Plover2.0
Browse files Browse the repository at this point in the history
Updated SmartAPI registration URL and KG2 API URLs to current versions; other very minor documentation additions.
  • Loading branch information
amykglen authored Dec 4, 2024
1 parent b33577d commit 4cc25ac
Showing 1 changed file with 49 additions and 110 deletions.
159 changes: 49 additions & 110 deletions docs/architecture/kp/rtx-kg2.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down Expand Up @@ -70,128 +72,64 @@ cat <<EOF >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
```
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.
Expand Down Expand Up @@ -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

0 comments on commit 4cc25ac

Please sign in to comment.