0.0
No commit activity in last 3 years
No release in over 3 years
Client package for creating, sending, recieving and consuming SOAP messages from BioModels search engine
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.6.2
>= 0
~> 0.9.2
 Project Readme

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 © 2011 Niall Beard. See LICENSE.txt for further details.