From 76d196bbda378c29ff9c35c96d85b47dc8dfa3cc Mon Sep 17 00:00:00 2001 From: gebele Date: Mon, 24 Jun 2013 14:24:40 +0200 Subject: several minor changes: result,names --- application.rb | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'application.rb') 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 = [] -- cgit v1.2.3