RNA-KG tutorials

Extract a subgraph of interest using RNA-KG SPARQL endpoint

Supplementary Listings S1, S2, and S3 in the Supplementary material section of RNA-KG pre-print show three examples of queries on RNA-KG that can be executed through the SPARQL endpoint’s query tab. Node types with correspondent URIs are reported in the same section.

How to create a new view using PheKnowLator

  1. Download the PheKnowLator library from https://github.com/callahantiff/PheKnowLator.
  2. Customize PheKnowLator’s input for your specific view. Specifically, from this link https://zenodo.org/doi/10.5281/zenodo.10078876 select a subset of edges that you want to include in your metagraph from edge_source_list.txt and resource_info.txt. Then, select a subset of ontologies that best describes your metagraph from ontology_list.txt.
  3. Be sure to have downloaded selected edges from resources.zip and placed them in the resources/edge_data PheKnowLator's directory.
  4. Be sure to have downloaded the resources/construction_approach/subclass_construction_map.pkl and placed it in the resources/construction_approach PheKnowLator's directory.
  5. Run the Ontology_Cleaning.ipynb notebook to clean and merge the selected ontologies.
  6. Run main.py to generate your customized RNA-KG view.
The figure below illustrates the steps you have to follow for generating the View2 of RNA-KG. RNA-KG's View2

How to import an RNA-KG view in GRAPE and conduct KG analysis

Follow steps described in this notebook: GRAPE_import.ipynb (the mapping of nodes and edges' types and associated identifiers is the one reported in the Supplementary material section of RNA-KG pre-print). This notebook generates two files (nodes.pkl and edges.pkl) that can be then imported into the GRAPE environment to conduct KG analysis and apply ML graph-oriented methods for node classification and link prediction tasks. More details at: https://github.com/AnacletoLAB/grape/tree/main/tutorials.