Code Monkey home page Code Monkey logo

bioportal-to-kgx's Introduction

BioPortal-to-KGX

Assemble a BioPortal Knowledge Graph through the following steps:

  • Transform the BioPortal 4store data dump to KGX graphs, with ROBOT preprocessing
  • Validate the output graphs with KGX to determine alignment to the Biolink Model
  • Obtain additional ontology metadata through the Bioportal API
  • Retrieve mappings for nodes without clear Bioportal analogues through Bioportal

Usage

Prepare a dump of the Bioportal 4store data with the 4s-dump script.

The dump will be in the form of n-triples, with individual sets of records in nested directories and one line of metadata at the top of each file.

Run BioPortal-to-KGX with all validation and metadata retrieval options as:

python run.py --input ../path/to/your/data/ --kgx_validate --robot_validate --pandas_validate --write_curies --get_bioportal_metadata --ncbo_key YOUR_NCBO_API_KEY_HERE 

Specify individual ontologies to include or exclude with the --include_only and --exclude options, respectively, each followed by a comma-delimited list of the original hashed file ID from the 4store dump.

For example:

python run.py --input ../path/to/your/data/ --include_only dabd4d902360003975fb25ae56f8,7b95f2cc27c8fb0d5df11fbdb078

Output will be written to the /bioportal_to_kgx directory within /transformed, with subdirectories named for the 4store graph and each subgraph.

Each subgraph will contain:

  • node and edge files ({subgraph_name}_nodes.tsv and {subgraph_name}_edges.tsv, respectively)
  • A JSON version of the ontology ({subgraph_name}_relaxed.json)
  • logs containing any validation messages about the transforms

Troubleshooting

  • The --robot_validate option may fail on larger ontologies like NCBITAXON with java.lang.OutOfMemoryError. Consider omitting this option or running ROBOT on files directly, as needed.

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.