summaryrefslogtreecommitdiff
path: root/application.rb
diff options
context:
space:
mode:
Diffstat (limited to 'application.rb')
-rw-r--r--application.rb7
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 = []