summaryrefslogtreecommitdiff
path: root/lib/validation-statistics.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/validation-statistics.rb')
-rw-r--r--lib/validation-statistics.rb10
1 files changed, 7 insertions, 3 deletions
diff --git a/lib/validation-statistics.rb b/lib/validation-statistics.rb
index 4910573..5fd9985 100644
--- a/lib/validation-statistics.rb
+++ b/lib/validation-statistics.rb
@@ -178,8 +178,12 @@ module OpenTox
# @param [String,nil] format
# @return [Blob]
def correlation_plot format: "png"
- unless correlation_plot_id
- tmpfile = "/tmp/#{id.to_s}_correlation.#{format}"
+ #unless correlation_plot_id
+ #tmpfile = "/tmp/#{id.to_s}_correlation.#{format}"
+ tmpdir = "/tmp"
+ #p tmpdir
+ FileUtils.mkdir_p tmpdir
+ tmpfile = File.join(tmpdir,"#{id.to_s}_correlation.#{format}")
x = []
y = []
feature = Feature.find(predictions.first.last["prediction_feature_id"])
@@ -203,7 +207,7 @@ module OpenTox
file = Mongo::Grid::File.new(File.read(tmpfile), :filename => "#{id.to_s}_correlation_plot.#{format}")
plot_id = $gridfs.insert_one(file)
update(:correlation_plot_id => plot_id)
- end
+ #end
$gridfs.find_one(_id: correlation_plot_id).data
end