diff options
author | Christoph Helma <helma@in-silico.ch> | 2013-03-27 17:11:50 +0100 |
---|---|---|
committer | Christoph Helma <helma@in-silico.ch> | 2013-03-27 17:11:50 +0100 |
commit | 84417ada7c4d0a3b44ed35a8eee60db2e1e751f6 (patch) | |
tree | 66ae142b5b8a74a0459062cbd12f3629448f897f /lib/dataset.rb | |
parent | a54db46684680d98311631804eca367cc949a715 (diff) |
validation tests ok
Diffstat (limited to 'lib/dataset.rb')
-rw-r--r-- | lib/dataset.rb | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/lib/dataset.rb b/lib/dataset.rb index 8d1aed0..402d2a1 100644 --- a/lib/dataset.rb +++ b/lib/dataset.rb @@ -76,14 +76,8 @@ module OpenTox # @param [OpenTox::Feature] Feature # @return [Array] Data entry values def values(compound, feature) - #puts compounds.inspect - #puts "==" - #puts compound.inspect rows = (0 ... compounds.length).select { |r| compounds[r].uri == compound.uri } - #puts rows.inspect col = features.collect{|f| f.uri}.index feature.uri - #puts col - #puts data_entries(true).inspect rows.collect{|row| data_entries[row][col]} end @@ -340,8 +334,9 @@ module OpenTox end def data_entry_value(compound_index, feature_uri) + data_entries(true) if @data_entries.empty? col = @features.collect{|f| f.uri}.index feature_uri - @data_entries[compound_index][col] + @data_entries[compound_index] ? @data_entries[compound_index][col] : nil end end |