summaryrefslogtreecommitdiff
path: root/lazar.rb
diff options
context:
space:
mode:
authorChristoph Helma <helma@in-silico.de>2010-03-16 19:42:55 +0100
committerChristoph Helma <helma@in-silico.de>2010-03-16 19:42:55 +0100
commit00845f15fa41b921fb7d16100a74553aaf61d62d (patch)
tree85f4018f5a7a6d65df2d5f55424f75bfe598a37d /lazar.rb
parent506952dff164c3535ece28859778260f69d748fa (diff)
initial test for dataset prediction added
Diffstat (limited to 'lazar.rb')
-rw-r--r--lazar.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/lazar.rb b/lazar.rb
index 51a6c20..bef367a 100644
--- a/lazar.rb
+++ b/lazar.rb
@@ -132,20 +132,20 @@ post '/:id/?' do # create prediction
else
halt 404, "Content type #{request.env['HTTP_ACCEPT']} not available."
end
+
elsif dataset_uri
task = OpenTox::Task.create
pid = Spork.spork(:logger => LOGGER) do
task.started
- task = OpenTox::Task.create
input_dataset = OpenTox::Dataset.find(dataset_uri)
input_dataset.compounds.each do |compound_uri|
- lazar.classify(compound_uri) unless lazar.database_activity?(compound_uri)
+ lazar.classify(compound_uri,prediction) unless lazar.database_activity?(compound_uri,prediction)
end
- uri = lazar.prediction_dataset.save
+ uri = prediction.save.chomp
task.completed(uri)
end
task.pid = pid
- LOGGER.debug "Task PID: " + pid.to_s
+ LOGGER.debug "Prediction task PID: " + pid.to_s
#status 303
response['Content-Type'] = 'text/uri-list'
task.uri + "\n"