diff options
author | Christoph Helma <helma@in-silico.de> | 2010-03-16 19:42:55 +0100 |
---|---|---|
committer | Christoph Helma <helma@in-silico.de> | 2010-03-16 19:42:55 +0100 |
commit | 00845f15fa41b921fb7d16100a74553aaf61d62d (patch) | |
tree | 85f4018f5a7a6d65df2d5f55424f75bfe598a37d | |
parent | 506952dff164c3535ece28859778260f69d748fa (diff) |
initial test for dataset prediction added
-rw-r--r-- | lazar.rb | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -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" |