diff options
author | gebele <gebele@in-silico.ch> | 2013-06-24 14:24:40 +0200 |
---|---|---|
committer | gebele <gebele@in-silico.ch> | 2013-06-24 14:24:40 +0200 |
commit | 76d196bbda378c29ff9c35c96d85b47dc8dfa3cc (patch) | |
tree | fe7d1897c2ec44f822f9c70b317eb016e0adc9c5 /application.rb | |
parent | 6f58b77765518f31219e59fca01df5b8ee80701e (diff) |
several minor changes: result,names
Diffstat (limited to 'application.rb')
-rw-r--r-- | application.rb | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/application.rb b/application.rb index 5cc6763..ece622c 100644 --- a/application.rb +++ b/application.rb @@ -33,7 +33,7 @@ get '/prediction/:neighbor/details/?' do task.wait case task[RDF::OT.hasStatus] when "Error" - @names = "There are no names for this compound available." + @names = "No names for this compound available." when "Completed" @names = @compound_uri.names.join(",") end @@ -69,10 +69,12 @@ post '/predict/?' do lazar = OpenTox::Algorithm.new File.join($algorithm[:uri],"lazar") # gather models from service and compare if selected #TODO compare selected by uri + $logger.debug params[:selection] params[:selection].each do |model| @mselected = model[0] @mall = OpenTox::Model.all $model[:uri] @mall.each do |m| + $logger.debug m.inspect @@prediction_models << m if m.title =~ /#{@mselected}/ end end @@ -80,7 +82,8 @@ post '/predict/?' do # predict with selected models # results in prediction variable # store prediction in array for better handling - @@prediction_models.each do |m| + @@prediction_models.each do |m| + $logger.debug m.inspect @prediction_uri = m.run :compound_uri => "#{@compound.uri}" prediction = OpenTox::Dataset.new @prediction_uri pa = [] |