summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristoph Helma <ch@in-silico.ch>2009-08-14 17:14:35 +0200
committerChristoph Helma <ch@in-silico.ch>2009-08-14 17:14:35 +0200
commit84ca9f7d79e9a74070527b9ee43d85190169d0f2 (patch)
tree853fc95506aaae1bcff206e0c103eca6c1f807da
parentcdebc21341f892b5dd379efe0469fc18c45073c0 (diff)
README URIs fixed, update task addded
-rw-r--r--README16
-rw-r--r--Rakefile11
-rw-r--r--application.rb2
-rw-r--r--environment.rb2
4 files changed, 18 insertions, 13 deletions
diff --git a/README b/README
index 51dab9d..8902783 100644
--- a/README
+++ b/README
@@ -4,7 +4,7 @@ OpenTox lazar
* An OpenTox REST Webservice (http://www.opentox.org)
* Ruby implementation of the lazar algorithm
* Implements a subset of the OpenTox algorithm/model API (http://opentox.org/wiki/opentox/Structure).
-* Runs at http://webservices.in-silico.ch/lazar
+* Current version runs at http://webservices.in-silico.ch/lazar/v0
REST API
@@ -41,31 +41,31 @@ EXAMPLES
Create a prediction model from a tab/whitespace delimited file (smiles activity):
- curl -X POST -d name="Hamster carcinogenicity" -d file=@hamster_carcinogenicity http://webservices.in-silico.ch/lazar/models
+ curl -X POST -d name="Hamster carcinogenicity" -d file=@hamster_carcinogenicity http://webservices.in-silico.ch/lazar/v0/models
Create a prediction model from an existing dataset:
- curl -X POST -d dataset_uri=http://webservices.in-silico.ch/datasets/1 http://webservices.in-silico.ch/lazar/models
+ curl -X POST -d dataset_uri=http://webservices.in-silico.ch/datasets/1 http://webservices.in-silico.ch/lazar/v0/models
Get model information:
- curl http://webservices.in-silico.ch/lazar/model/1 (returns status code 202, if model is still under construction)
+ curl http://webservices.in-silico.ch/lazar/v0/model/1 (returns status code 202, if model is still under construction)
Predict a compound:
- curl -X POST -d compound_uri=http://webservices.in-silico.ch/compound/N%23%5BN%2B%5Dc1ccccc1%2EF%5BB%2D%5D%28F%29%28F%29F http://webservices.in-silico.ch/lazar/model/1
+ curl -X POST -d compound_uri=http://webservices.in-silico.ch/compound/v0/N%23%5BN%2B%5Dc1ccccc1%2EF%5BB%2D%5D%28F%29%28F%29F http://webservices.in-silico.ch/lazar/v0/model/1
Show a prediction:
- curl http://webservices.in-silico.ch/lazar/prediction/1 (returns status code 202, if prediction is still running)
+ curl http://webservices.in-silico.ch/lazar/v0/prediction/1 (returns status code 202, if prediction is still running)
Show prediction neighbors:
- curl http://webservices.in-silico.ch/lazar/prediction/neighbors
+ curl http://webservices.in-silico.ch/lazar/v0/prediction/neighbors
Show relevant features for a prediction:
- curl http://webservices.in-silico.ch/lazar/prediction/features
+ curl http://webservices.in-silico.ch/lazar/v0/prediction/features
INSTALLATION
diff --git a/Rakefile b/Rakefile
index 931410f..bd2f675 100644
--- a/Rakefile
+++ b/Rakefile
@@ -1,10 +1,15 @@
require 'rubygems'
require 'rake'
-desc "Install required gems and openbabel"
+desc "Install required gems"
task :install do
- `sudo gem sources -a http://gems.github.com`
- `sudo gem install sinatra dm-core dm-more builder helma-opentox-ruby-api`
+ puts `sudo gem sources -a http://gems.github.com`
+ puts `sudo gem install sinatra datamapper dm-more builder helma-opentox-ruby-api-wrapper`
+end
+
+desc "Update gems"
+task :update do
+ puts `sudo gem update sinatra datamapper dm-more builder helma-opentox-ruby-api-wrapper`
end
desc "Run tests"
diff --git a/application.rb b/application.rb
index 172db06..fc261e7 100644
--- a/application.rb
+++ b/application.rb
@@ -1,7 +1,7 @@
load 'environment.rb'
# MODELS
-get '/models?' do # get index of models
+get '/models/?' do # get index of models
Model.all.collect{ |m| m.uri }.join("\n")
end
diff --git a/environment.rb b/environment.rb
index b525c45..aea0710 100644
--- a/environment.rb
+++ b/environment.rb
@@ -1,6 +1,6 @@
require 'rubygems'
-['sinatra', 'sinatra/url_for', 'dm-core', 'dm-more', 'builder', 'opentox-ruby-api'].each do |lib|
+['sinatra', 'sinatra/url_for', 'dm-core', 'dm-more', 'builder', 'opentox-ruby-api-wrapper'].each do |lib|
require lib
end