Skip to content
(OBSOLETE; use OpenBEL/bel.rb)
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
Gemfile
Gemfile.lock
LICENSE
README.md
bel.ttl
bel2rdf.rb
conversion.rb
full_abstract1.bel
full_abstract1.png
full_abstract1.ttl
rdf_annotations.rb
rdf_namespaces.rb
rdf_orthology.rb
remap.csv
upgrade-annotations.rb
upgrade-namespaces.rb
vocabulary.rb

README.md

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.

You can’t perform that action at this time.