summaryrefslogtreecommitdiff
path: root/lib/model.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/model.rb')
-rw-r--r--lib/model.rb8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/model.rb b/lib/model.rb
index 24f6e52..c4041f2 100644
--- a/lib/model.rb
+++ b/lib/model.rb
@@ -31,6 +31,12 @@ module OpenTox
def self.find_all
RestClient.get(@@config[:services]["opentox-model"]).split("\n")
end
+
+ def self.find(uri)
+ puts uri
+ yaml = RestClient.get(uri, :accept => "application/x-yaml")
+ OpenTox::Model::Lazar.from_yaml(yaml)
+ end
# Predict a compound
def predict(compound)
@@ -46,7 +52,7 @@ module OpenTox
end
def endpoint
- YAML.load(RestClient.get uri)[:endpoint]
+ YAML.load(RestClient.get(uri))[:endpoint]
end
def algorithm=(algorithm)