Skip to content
gem file to communicate with the biomodels WSDL in order to run search queries (found here http://www.ebi.ac.uk/biomodels-main/services/BioModelsWebServices?wsdl )
Ruby
Find file
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
.idea
lib
test
.document
.gitignore
Gemfile
Gemfile.lock
LICENSE.txt
README.rdoc
Rakefile
VERSION
search_biomodel-1.1.1.gem
search_biomodel-1.1.2.gem
search_biomodel.gemspec

README.rdoc

search_biomodel

search biomodel is a small ruby gem ready to be used for running queries through the biomodel web service API.

There are (currently) 5 methods implemented here to communicate with the biomodels website (found at www.ebi.ac.uk/biomodels-main/).

These methods are “search_by_chebiid”, “search_by_name”, “get_all_models”, “search_by_person” and “get_model_name_by_id”.

Installation

gem install seach_biomodel

Usage

The first four methods return an array of model IDs (or an empty array if nothing is found) and the 5th returns the name of the model of an ID you search for. The ChEBIID can take quite some time to run on the biomodel servers side.

The “get_all_models” method returns a hash map of :key's and :value's which can be retrieved as such:

require 'rubygems'
require 'search_biomodel'

@connection = SysMODB::SearchBiomodel.instance

puts "\n\n ------------------ List All -----------------------------\n"
all_models = @connection.get_all_models
all_models.each { |item| puts "ID = #{item[:key]}    |    NAME = #{item[:value]}\n" }
puts " ----------------------------------------------------------\n\n\n"

puts "\n\n ------------------ By Chebiid --------------------------\n" 
i=0
models_by_chebiid = @connection.search_by_ChEBIID("CHEBI:15422")
models_by_chebiid.each { |item| puts "#{i+=1} #{item.to_s}\n"}
puts " ----------------------------------------------------------\n\n\n"

puts "\n\n ------------------ By Name -----------------------------\n"  
i=0
models_by_name = @connection.search_by_name("Kolomeisky2003")
models_by_name.each { |item| puts "#{i+=1} #{item.to_s}\n"}
puts " ----------------------------------------------------------\n\n\n"

puts "\n\n ------------------ By Person----------------------------\n"  
i=0
models_by_person = @connection.search_by_person("Jim")
models_by_person.each { |item| puts "#{i+=1} #{item.to_s}\n"}
puts " ----------------------------------------------------------\n\n\n"

puts "\n\n ------------------ Model ID by Name---------------------------\n"   
i=0
models_by_person = @connection.get_model_name_by_id("BIOMD0000000190")
models_by_person.each { |item| puts "#{i+=1} #{item.to_s}\n"}
puts " ----------------------------------------------------------\n\n\n"

Fun Fact

You can append the Model ID to the URL www.ebi.ac.uk/biomodels-main/ to load the link eg (continuing from above).

models_by_person.each { |item| puts "http://www.ebi.ac.uk/biomodels-main/#{item.to_s}\n" } 

#=> http://www.ebi.ac.uk/biomodels-main/BIOMD0000000190
#=> http://www.ebi.ac.uk/biomodels-main/BIOMD0000000191

Contributing to search_biomodel

  • Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet

  • Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it

  • Fork the project

  • Start a feature/bugfix branch

  • Commit and push until you are happy with your contribution

  • Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.

  • Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.

Copyright

Copyright © 2011 Niall Beard. See LICENSE.txt for further details.

Something went wrong with that request. Please try again.