0.0
No commit activity in last 3 years
No release in over 3 years
There's a lot of open issues
Ruby wrapper for the OpenTox REST API (http://www.opentox.org)
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

Runtime

= 0.2.5
= 1.1.0
= 1.1.0
= 1.14.7
= 3.1.1
= 1.4.4
= 0.1.3
= 1.3.5
= 0.1.1
= 2.2.2
= 2.0.2
= 1.3.4
= 1.9.3
= 0.6.1
= 0.9.4
= 1.2.6
= 0.6.5.4
= 1.1.0
= 0.8.2
 Project Readme

opentox-ruby

Ruby wrapper for the OpenTox REST API

Installation

opentox-ruby depends on many third party programs and libraries, which makes the setup complicated and error prone. For this reason we recommend to use the installer from opentox-install. If you want to install manually you can find the necessary steps in the installation scripts.

Quickstart

This example shows how to create a lazar model and predict a compound, it assumes that you have access to a working installation of OpenTox services with corresponding settings in $HOME/.opentox/config. Run the following code in irb or from a ruby script:

require 'rubygems'
require 'opentox-ruby'

# Authenticate
subjectid = OpenTox::Authorization.authenticate(USER,PASSWORD) 

# Upload a dataset
training_dataset = OpenTox::Dataset.create_from_csv_file(TRAINING_DATASET, subjectid)

# Create a prediction model
model_uri = OpenTox::Algorithm::Lazar.new.run({:dataset_uri => training_dataset.uri, :subjectid => subjectid}).to_s
lazar = OpenTox::Model::Lazar.find model_uri, subjectid

# Predict a compound
compound = OpenTox::Compound.from_smiles("c1ccccc1NN")
prediction_uri = lazar.run(:compound_uri => compound.uri, :subjectid => subjectid)
prediction = OpenTox::LazarPrediction.find(prediction_uri, subjectid)
puts prediction.to_yaml

Copyright

Copyright (c) 2009-2012 Christoph Helma, Martin Guetlein, Micha Rautenberg, Andreas Maunz, David Vorgrimmler, Denis Gebele. See LICENSE for details.