fixed, probability plot format was not taken from params for filename
authorgebele <gebele@in-silico.ch>
Fri, 12 Jul 2019 12:20:20 +0000 (12:20 +0000)
committergebele <gebele@in-silico.ch>
Fri, 12 Jul 2019 12:20:20 +0000 (12:20 +0000)
lib/validation-statistics.rb

index 2dd9c7a..4910573 100644 (file)
@@ -101,7 +101,7 @@ module OpenTox
           R.assign "probability", probabilities
           R.eval "image = qplot(probability,accuracy)+ylab('Accumulated accuracy')+xlab('Prediction probability')+ylim(c(0,1))+scale_x_reverse()+geom_line()"
           R.eval "ggsave(file='#{tmpfile}', plot=image)"
-          file = Mongo::Grid::File.new(File.read(tmpfile), :filename => "#{self.id.to_s}_probability_plot.svg")
+          file = Mongo::Grid::File.new(File.read(tmpfile), :filename => "#{self.id.to_s}_probability_plot.#{format}")
           plot_id = $gridfs.insert_one(file)
           update(:probability_plot_id => plot_id)
         #end