bel2rdf
Warning: This repository has been superseded by OpenBEL/bel.rb.
Tool to convert BEL to RDF triples.
requirements
- ruby
- gems
- bel.rb for parsing BEL.
- ruby-rdf/rdf for writing RDF.
Optional tools:
- raptop rdf - for converting between RDF formats
- graphviz - can convert DOT files converted using raptor
setup
- Install ruby.
- Install bundler with
gem install bundler
. - 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.
- Captures an RDF schema (RDFS) for the
- conversion.rb
- Provides a writer for RDF-Turtle using the
rdf
gem.
- Provides a writer for RDF-Turtle using the
- 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 anannotations
directory relative to this file.
- Converts the BEL annotation(
- rdf_namespaces.rb
- Converts the BEL namespace(
belns
) files to SKOS RDF. - The
belns
files to convert must be placed in annamespaces
directory relative to this file.
- Converts the BEL namespace(
- rdf_orthology.rb
- Parses the gene orthology BEL file into RDF between namespace SKOS
Concepts
.
- Parses the gene orthology BEL file into RDF between namespace SKOS
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.