summaryrefslogtreecommitdiff
path: root/lib/dataset.rb
diff options
context:
space:
mode:
authorChristoph Helma <helma@in-silico.ch>2015-08-01 18:03:09 +0200
committerChristoph Helma <helma@in-silico.ch>2015-08-01 18:03:09 +0200
commit2d02fabfafccb164093062a962f392bb7d13647a (patch)
tree08d29519c45652dd1b43e2b0895875abfbc5e8d0 /lib/dataset.rb
parentf93333d7f5df30875eae9135f4b5e65a98d923b6 (diff)
50 times faster bbrc setup by eliminating @fminer.add_fminer_data
Diffstat (limited to 'lib/dataset.rb')
-rw-r--r--lib/dataset.rb13
1 files changed, 4 insertions, 9 deletions
diff --git a/lib/dataset.rb b/lib/dataset.rb
index 38e195b..45f7119 100644
--- a/lib/dataset.rb
+++ b/lib/dataset.rb
@@ -5,6 +5,10 @@ module OpenTox
class LazarPrediction < Dataset
field :creator, type: String
+ def value compound
+ end
+ def confidence compound
+ end
end
class DescriptorDataset < Dataset
@@ -21,7 +25,6 @@ module OpenTox
class Dataset
include Mongoid::Document
- attr_accessor :bulk
attr_writer :data_entries
# associations like has_many, belongs_to deteriorate performance
@@ -31,11 +34,6 @@ module OpenTox
field :source, type: String
field :warnings, type: Array, default: []
- def initialize params=nil
- super params
- @bulk = []
- end
-
def save_all
dump = Marshal.dump(@data_entries)
file = Mongo::Grid::File.new(dump, :filename => "#{self.id.to_s}.data_entries")
@@ -344,10 +342,8 @@ module OpenTox
next
elsif numeric[j]
@data_entries[i][j] = v.to_f
- #dataset.bulk << [cid,feature_ids[j],v.to_f]
else
@data_entries[i][j] = v.strip
- #dataset.bulk << [cid,feature_ids[j],v.strip]
end
end
end
@@ -359,7 +355,6 @@ module OpenTox
$logger.debug "Value parsing: #{Time.now-time} (Compound creation: #{compound_time})"
time = Time.now
- #dataset.bulk_write
save_all
$logger.debug "Saving: #{Time.now-time}"