diff options
author | Christoph Helma <helma@in-silico.ch> | 2016-05-13 13:38:24 +0200 |
---|---|---|
committer | Christoph Helma <helma@in-silico.ch> | 2016-05-13 13:38:24 +0200 |
commit | c90644211e214a50f6fdb3a936bf247f45f1f4be (patch) | |
tree | 9ae3f0b33feb55f3904c4d7a08e39567223b07aa /lib/import.rb | |
parent | b8bb12c8a163c238d7d4387c1914e2100bb660df (diff) |
compound tests fixed
Diffstat (limited to 'lib/import.rb')
-rw-r--r-- | lib/import.rb | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/lib/import.rb b/lib/import.rb index 3c6966e..2dcc361 100644 --- a/lib/import.rb +++ b/lib/import.rb @@ -39,7 +39,6 @@ module OpenTox :source => np["compound"]["URI"], ) np["bundles"].keys.each do |bundle_uri| - #datasets[bundle_uri].substance_ids << nanoparticle.id nanoparticle["dataset_ids"] << datasets[bundle_uri].id end bundle = datasets[np["bundles"].keys.first].id if np["bundles"].size == 1 @@ -59,7 +58,7 @@ module OpenTox end else feature = klass.find_or_create_by( - :name => "#{study["protocol"]["category"]["title"]} #{study["protocol"]["endpoint"]}", + :name => effect["endpoint"], :unit => effect["result"]["unit"], :category => study["protocol"]["topcategory"], :conditions => effect["conditions"] @@ -69,11 +68,7 @@ module OpenTox end nanoparticle.save end - datasets.each do |u,d| - d.feature_ids.uniq! - d.substance_ids.uniq! - d.save - end + datasets.each { |u,d| d.save } end =begin |