diff options
author | mr <mr@mrautenberg.de> | 2011-01-10 17:47:09 +0100 |
---|---|---|
committer | mr <mr@mrautenberg.de> | 2011-01-10 17:47:09 +0100 |
commit | ecdd0347a347bd2ac5fa9e6a41ec7475b007309d (patch) | |
tree | 72c7f34a8067d4d394760bf01e32e63b49a47284 /lib/model.rb | |
parent | a65f376df49f215dea007f08362c2f15cf559a2c (diff) |
A&A extent
Diffstat (limited to 'lib/model.rb')
-rw-r--r-- | lib/model.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/model.rb b/lib/model.rb index 32f5604..7aa3f5c 100644 --- a/lib/model.rb +++ b/lib/model.rb @@ -60,8 +60,8 @@ module OpenTox # Get URIs of all lazar models # @return [Array] List of lazar model URIs - def self.all - RestClientWrapper.get(CONFIG[:services]["opentox-model"]).to_s.split("\n") + def self.all(subjectid=nil) + RestClientWrapper.get(CONFIG[:services]["opentox-model"], :subjectid => subjectid).to_s.split("\n") end # Find a lazar model @@ -77,7 +77,7 @@ module OpenTox def self.create(params) lazar_algorithm = OpenTox::Algorithm::Generic.new File.join( CONFIG[:services]["opentox-algorithm"],"lazar") model_uri = lazar_algorithm.run(params) - OpenTox::Model::Lazar.find(model_uri) + OpenTox::Model::Lazar.find(model_uri, params[:subjectid]) end # Get a parameter value @@ -98,7 +98,7 @@ module OpenTox DC.title => URI.decode(File.basename( @metadata[OT.dependentVariables] )), OT.parameters => [{DC.title => "dataset_uri", OT.paramValue => dataset_uri}] }) - d = Dataset.new(dataset_uri) + d = Dataset.new(dataset_uri,subjectid) d.load_compounds d.compounds.each do |compound_uri| predict(compound_uri,false,subjectid) |