From 9e8537997d84e78e6545a66a0d09c33e76c8b7cf Mon Sep 17 00:00:00 2001 From: Christoph Helma Date: Fri, 30 Sep 2016 17:11:30 +0200 Subject: npo uri as source, spectral count unit f proteomics features --- lib/nanoparticle.rb | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) (limited to 'lib/nanoparticle.rb') diff --git a/lib/nanoparticle.rb b/lib/nanoparticle.rb index d6261ee..b1a3835 100644 --- a/lib/nanoparticle.rb +++ b/lib/nanoparticle.rb @@ -5,7 +5,7 @@ module OpenTox field :core, type: Hash, default: {} field :coating, type: Array, default: [] - field :proteomics, type: Hash, default: {} + #field :proteomics, type: Hash, default: {} attr_accessor :scaled_values @@ -63,26 +63,16 @@ module OpenTox physchem_descriptors[feature.id.to_s] << value physchem_descriptors[feature.id.to_s].uniq! when "Proteomics" - #proteomics[feature.id.to_s] ||= [] - #proteomics[feature.id.to_s] << value - #proteomics[feature.id.to_s].uniq! physchem_descriptors[feature.id.to_s] ||= [] physchem_descriptors[feature.id.to_s] << value physchem_descriptors[feature.id.to_s].uniq! when "TOX" - if feature.name == "Total protein (BCA assay)" - physchem_descriptors[feature.id.to_s] ||= [] - physchem_descriptors[feature.id.to_s] << value - physchem_descriptors[feature.id.to_s].uniq! - else - dataset.add self, feature, value - end - dataset.save - dataset_ids << dataset.id - dataset_ids.uniq! + dataset.add self, feature, value else warn "Unknown feature type '#{feature.category}'. Value '#{value}' not inserted." end + dataset_ids << dataset.id + dataset_ids.uniq! end end -- cgit v1.2.3