diff options
author | gebele <gebele@in-silico.ch> | 2013-03-14 17:58:24 +0100 |
---|---|---|
committer | gebele <gebele@in-silico.ch> | 2013-03-14 17:58:24 +0100 |
commit | d5649c3bb4eb992c722c24c7fa96a912df2cbf8f (patch) | |
tree | 0567fed6a6567364c37c9766e562ea2cfb500607 /application.rb | |
parent | c609abf8157210a75790b54ef53569c07bf851d4 (diff) |
working with iframes
Diffstat (limited to 'application.rb')
-rw-r--r-- | application.rb | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/application.rb b/application.rb index 76e7f60..658366d 100644 --- a/application.rb +++ b/application.rb @@ -28,8 +28,8 @@ post '/predict/?' do # get compound from SMILES @compound = OpenTox::Compound.from_smiles $compound[:uri], @identifier.to_s # init - @prediction_models = [] - @predictions = [] + @@prediction_models = [] + @@predictions = [] # init lazar algorithm lazar = OpenTox::Algorithm.new File.join($algorithm[:uri],"lazar") # gather models from service and compare if selected @@ -38,27 +38,35 @@ post '/predict/?' do @mall = OpenTox::Model.all $model[:uri] @mall.each do |m| m.get - @prediction_models << m if m.title =~ /#{@mselected}/ + @@prediction_models << m if m.title =~ /#{@mselected}/ end - $logger.debug "@prediction_models: #{@prediction_models.inspect}" + $logger.debug "@prediction_models: #{@@prediction_models.inspect}" end # predict with selected models # results in prediction variable # store prediction in array for better handling $logger.debug "@models: #{@models.inspect}" - @prediction_models.each do |m| + @@prediction_models.each do |m| @prediction_uri = m.run :compound_uri => "#{@compound.uri}" prediction = OpenTox::Dataset.new @prediction_uri pa = [] pa << prediction - @predictions << pa + @@predictions << pa $logger.debug "prediction class: #{prediction.class}" end haml :prediction end +get '/prediction/neighbours/?' do + haml :neighbours, :layout => false +end + +get '/prediction/neighbours/details/?' do + haml :details, :layout => false +end + get '/stylesheets/:name.css' do content_type 'text/css', :charset => 'utf-8' sass(:"stylesheets/#{params[:name]}", Compass.sass_engine_options ) |