Coder Social home page Coder Social logo

sbl-sdsc / kg-onto Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 1.0 42 KB

Create Node and Relationship files from BioPortal ontologies for import into Property Graphs

License: BSD 3-Clause "New" or "Revised" License

Jupyter Notebook 80.12% Python 19.88%
ontology property-graph neo4j knowledge-graph data-integration data-ingestion

kg-onto's Introduction

kg-onto

kg-onto converts Ontologies into Node, Relationship, and Metadata files for import into Property Graph database systems.

The current version converts biomedical ontologies from BioPortal.

BioPortal hosts more than 900 ontologies from the biomedical domain. Note, while the majority of ontologies in BioPortal are freely available, some ontologies have access restrictions or data use agreements and are not directly available from BioPortal, e.g., SNOWMED CT.

Features

  • Automated conversion process - no programming required
  • A mapping file is used to specify the ontology and properties to be exported
  • Both ontology classes and their properties are exported into data files
  • Data types of properties are inferred
  • The data files are property graph database system agnostic

Overview

The conversion of an ontology requires the following steps:

  1. Identify an ontology of interest from BioPortal
  2. Create a mapping file for the ontology
  3. Run kg-onto to convert the ontology into data and metadata files
  4. Run kg-import to import the ontologies into a Property Graph Database

Mapping file

A mapping file includes the name of the ontology, the BioPortal download link, and an optional selection of properties to be included in the output file. The mapping file is a csv file with the following key-value pairs:

key,value
name,<name of ontology>
downloadUrl,<download link from BioPortal in csv format>
curie,<compact URI for ontology from Identifiers.org>
nodeFilename,<name of the node property file>
relationshipFilename,<name of the relationship property file>
originalPropertyName-1,<new name for property>
...
originalPropertyName-n,<new name for property>

Below is an example of a mapping file for the Chemical Entities of Biological Interest (ChEBI) Ontology:

key,value
name,Chemical Entities of Biological Interest Ontology
downloadUrl,https://data.bioontology.org/ontologies/CHEBI/download?apikey=8b5b7825-538d-40e0-9e9e-5ab9274a9aeb&download_format=csv
curie,chebi
nodeFilename,Compound_chebi-v207.csv
relationshipFilename,Compound-IS_A-Compound_chebi-v207.csv
http://purl.obolibrary.org/obo/chebi/formula,formula
http://purl.obolibrary.org/obo/chebi/inchikey,inchiKey
http://purl.obolibrary.org/obo/chebi/inchi,inchi
http://purl.obolibrary.org/obo/chebi/mass,mass

The node filename specifies the Node label, e.g., Compound, and the relationship filename specifies the Relationship type, e.g. Compound-IS_A-Compound. A postfix, e.g., chebi-v207, can be added to distinguish different sources, versions, or download dates. The kg-import project describes the file naming conventions used for Node Labels, Relationship Types, and Properties. By following these conventions, the data files can be directly imported into Property Graphs with the kg-import tool.

By default, kg-onto includes the node properties: id, name, synonymes, definition, and url for each class in the ontology. Additional properties can be added by specifying additional key-value pairs of originalPropertyName,newPropertyName. For the ChEBI ontology, four properties (formula, inchiKey, inchi, and mass) have been added.

More examples of mapping files are available in the mappings directory.

kg-onto's People

Contributors

pwrose avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Forkers

pj0616

kg-onto's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.