Skip to content
This repository has been archived by the owner on Sep 24, 2019. It is now read-only.

OpenBEL/bel2rdf

Repository files navigation

bel2rdf

Warning: This repository has been superseded by OpenBEL/bel.rb.

Tool to convert BEL to RDF triples.

requirements

Optional tools:

  • raptop rdf - for converting between RDF formats
  • graphviz - can convert DOT files converted using raptor

setup

  1. Install ruby.
  2. Install bundler with gem install bundler.
  3. Install required gems for bel2rdf with bundle install.

project layout

  • Gemfile
    • Describes gem dependencies for bel2rdf project.
  • vocabulary.rb
    • Captures an RDF schema (RDFS) for the BELV vocabulary.
    • Maps BEL data to its RDF representation in the BELV vocabulary.
    • Provides functions that convert BEL objects to RDF.
  • conversion.rb
    • Provides a writer for RDF-Turtle using the rdf gem.
  • bel2rdf.rb
    • Converts a BEL file (stdin or file path) to an RDF-Turtle file.
  • rdf_annotations.rb
    • Converts the BEL annotation(belanno) files to SKOS RDF.
    • The belanno files to convert must be placed in an annotations directory relative to this file.
  • rdf_namespaces.rb
    • Converts the BEL namespace(belns) files to SKOS RDF.
    • The belns files to convert must be placed in an namespaces directory relative to this file.
  • rdf_orthology.rb
    • Parses the gene orthology BEL file into RDF between namespace SKOS Concepts.

The bel.ttl provides RDF-Turtle for BELV's RDF schema. This is a slice of RDF data that will be included in the conversion.

running

Convert BEL to RDF

./bel2rdf.rb full_abstract1.bel > full_abstract1.ttl

Convert namespaces to SKOS vocabulary

# copy belns files to namespaces/ directory
./rdf_namespaces.rb

Convert annotations to SKOS vocabulary

# copy belanno files to annotations/ directory
./rdf_annotations.rb

Convert gene orthology to properties of the namespace SKOS Concepts

./rdf_orthology.rb gene-orthology.bel

questions?

Post questions to OpenBEL discussion group and get immediate response from the community.

Releases

No releases published

Packages

No packages published

Languages