Git Product home page Git Product logo

bioportal's Introduction

Bioportal Gem

This is the Gem version of Bioportal Plugin

(More information please read Bioportal Plugin Documentation below)

Install the gem

Please add the following line into Gemfile:

gem 'bioportal', :git => 'git://github.com/quyen/bioportal.git'

Bioportal Plugin Documentation

A plugin that supports linking of Models within a RoR application to a Concept and Ontology within the BioPortal

Also includes a Mixin and a Helper to facilitate making use of the Rest API without linking to a Model.

More information about BioPortal, and its Rest API, may be found at:

bioportal.bioontology.org/ (main Portal)

www.bioontology.org/wiki/index.php/BioPortal_REST_services (Rest services).

Installing the plugin

Install the plugin from sysmo-db.googlecode.com/hg/vendor/plugins/bioportal

Since the rails plugin scripts don’t work happily with Mercurial, until we extract this plugin the simplest way of adding the plugin is as follows:

cd vendor/plugins
hg clone https://sysmo-db.googlecode.com/hg/vendor/plugins/bioportal bioportal
rm -rf bioportal/.hg/
cd -

Generate the database migration by running

./script/generate bioportal_migration

This generates a table that maps to the BioportalConcept entity, though you don’t need to know about this in your application.

Usage

Linking to a Model

To link to a model in your RoR application, add the following line to your Model class

class MyThing < ActiveRecord::Base
  linked_to_bioportal :email=>"[email protected]"
  ...
end

adding :email is optional, but recommended as you will be notified of changes to the REST API.

You can also use :base_url to indicate a different deployment of BioPortal than the default, which is rest.bioontology.org/bioportal/

This then provides your model with the attributes:

ontology_id ontology_version_id concept_uri

which once set allows you to call the method concept to retreive information about that concept, such as its synonyms, parents and children.

and you can also call the method ‘ontology’ to reteive information about the ontology.

More information about this can be found in the API documentation.

Using the REST API stand-alone

by adding the include

include BioPortal::RestAPI

you can find out more by reading BioPortal::RestAPI

View Helpers

Some view helpers are automatically injected into your application and you don’t need to do anything to use them.

You can find out more about these by reading about BioPortalHelper

bioportal's People

Watchers

 avatar  avatar

Forkers

sysmo-db

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.