From 84417ada7c4d0a3b44ed35a8eee60db2e1e751f6 Mon Sep 17 00:00:00 2001 From: Christoph Helma Date: Wed, 27 Mar 2013 17:11:50 +0100 Subject: validation tests ok --- lib/dataset.rb | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'lib/dataset.rb') 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 -- cgit v1.2.3