summaryrefslogtreecommitdiff
path: root/application.rb
diff options
context:
space:
mode:
authormr <mr@mrautenberg.de>2011-10-10 12:47:52 +0200
committermr <mr@mrautenberg.de>2011-10-10 12:47:52 +0200
commit99a50ecb6c6cbff678048c2f60eafcfe476c1b64 (patch)
tree5549e6261484382f50ea6a73661d290a15e97a28 /application.rb
parentfad3229cca5d31670f1c1d99542f3d563e226d99 (diff)
add endpoint to features
Diffstat (limited to 'application.rb')
-rw-r--r--application.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/application.rb b/application.rb
index 3ed2af6..a75c6c0 100644
--- a/application.rb
+++ b/application.rb
@@ -1,7 +1,7 @@
['rubygems', "haml", "sass", "rack-flash"].each do |lib|
require lib
end
-gem "opentox-ruby", "~> 2"
+gem "opentox-ruby", "~> 3"
require 'opentox-ruby'
gem 'sinatra-static-assets'
require 'sinatra/static_assets'
@@ -280,6 +280,7 @@ post '/models' do # create a new model
else
raise "#{params[:file][:filename]} has an unsupported file type."
end
+ @dataset.features[@dataset.features.keys.first][OWL.sameAs] = params[:endpoint].split(',').first if params[:endpoint]
@dataset.save(@subjectid)
rescue => e
error "Dataset creation failed '#{e.message}'",e
@@ -290,7 +291,6 @@ post '/models' do # create a new model
@prediction_feature = OpenTox::Feature.find(@dataset.features.keys.first,@subjectid)
end
end
-
task.progress(10)
if @dataset.compounds.size < 10
error "Too few compounds to create a prediction model. Did you provide compounds in SMILES format and classification activities as described in the #{link_to "instructions", "/help"}? As a rule of thumb you will need at least 100 training compounds for nongeneric datasets. A lower number could be sufficient for congeneric datasets."