summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristoph Helma <helma@in-silico.ch>2011-03-09 11:37:57 +0100
committerChristoph Helma <helma@in-silico.ch>2011-03-09 11:37:57 +0100
commitd1f555bdb0368fc82a2bb379ab7857bae727072a (patch)
tree8419d2658e55a031b6434dcb06a99afdd3bb4c2d
parent521c615c5aae4b2aaf28cdbcf5d6d37e85362f14 (diff)
README updated and converted to markdown
-rw-r--r--README.markdown43
-rw-r--r--README.rdoc23
2 files changed, 43 insertions, 23 deletions
diff --git a/README.markdown b/README.markdown
new file mode 100644
index 0000000..8f18598
--- /dev/null
+++ b/README.markdown
@@ -0,0 +1,43 @@
+opentox-ruby
+============
+
+Ruby wrapper for the OpenTox REST API (http://www.opentox.org)
+
+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)[http://github.com/opentox/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
+
+API documentation
+-----------------
+
+http://rdoc.info/gems/opentox-ruby/0.0.2/frames
+
+Copyright
+--------
+
+Copyright (c) 2009-2011 Christoph Helma. See LICENSE for details.
diff --git a/README.rdoc b/README.rdoc
deleted file mode 100644
index 45cc5f6..0000000
--- a/README.rdoc
+++ /dev/null
@@ -1,23 +0,0 @@
-= opentox-ruby
-
-Ruby wrapper for the OpenTox REST API (http://www.opentox.org)
-
-== Installation
-
-Run the following if you haven't already:
-
- gem sources -a http://gems.github.com
-
-Install the gem:
-
- sudo gem install helma-opentox-ruby
-
-== Usage
-
-- adjust the settings in $HOME/.opentox/config
-- require 'opentox-ruby' in your ruby application
-- consult the rdoc API documentation for details
-
-== Copyright
-
-Copyright (c) 2009-2010 Christoph Helma. See LICENSE for details.