diff options
Diffstat (limited to 'lib/model.rb')
-rw-r--r-- | lib/model.rb | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/lib/model.rb b/lib/model.rb index 3ecd61c..d0d6703 100644 --- a/lib/model.rb +++ b/lib/model.rb @@ -84,8 +84,8 @@ module OpenTox def initialize @source = "http://github.com/helma/opentox-model" - @algorithm = File.join(@@config[:services]["opentox-algorithm"],"lazar") - #@independent_variables = File.join(@@config[:services]["opentox-algorithm"],"fminer#BBRC_representative") + @algorithm = File.join(CONFIG[:services]["opentox-algorithm"],"lazar") + #@independent_variables = File.join(CONFIG[:services]["opentox-algorithm"],"fminer#BBRC_representative") @features = [] @effects = {} @activities = {} @@ -95,12 +95,12 @@ module OpenTox def save @features.uniq! - resource = RestClient::Resource.new(@@config[:services]["opentox-model"]) + resource = RestClient::Resource.new(CONFIG[:services]["opentox-model"]) resource.post(self.to_yaml, :content_type => "application/x-yaml").chomp.to_s end def self.find_all - RestClientWrapper.get(@@config[:services]["opentox-model"]).chomp.split("\n") + RestClientWrapper.get(CONFIG[:services]["opentox-model"]).chomp.split("\n") end def self.predict(compound_uri,model_uri) @@ -115,8 +115,8 @@ module OpenTox def initialize @source = "http://github.com/helma/opentox-model" - @algorithm = File.join(@@config[:services]["opentox-algorithm"],"property_lazar") - #@independent_variables = File.join(@@config[:services]["opentox-algorithm"],"fminer#BBRC_representative") + @algorithm = File.join(CONFIG[:services]["opentox-algorithm"],"property_lazar") + #@independent_variables = File.join(CONFIG[:services]["opentox-algorithm"],"fminer#BBRC_representative") @features = [] #@effects = {} @activities = {} @@ -126,12 +126,12 @@ module OpenTox def save @features.uniq! - resource = RestClient::Resource.new(@@config[:services]["opentox-model"]) + resource = RestClient::Resource.new(CONFIG[:services]["opentox-model"]) resource.post(self.to_yaml, :content_type => "application/x-yaml").chomp.to_s end def self.find_all - RestClientWrapper.get(@@config[:services]["opentox-model"]).chomp.split("\n") + RestClientWrapper.get(CONFIG[:services]["opentox-model"]).chomp.split("\n") end def self.predict(compound_uri,model_uri) |