diff options
author | Martin Gütlein <martin.guetlein@gmail.com> | 2010-02-17 10:01:06 +0100 |
---|---|---|
committer | Martin Gütlein <martin.guetlein@gmail.com> | 2010-02-17 10:01:06 +0100 |
commit | 76a9e2d17c2130829d5772c9c8d55072ab40ab58 (patch) | |
tree | 736670ea330c651880ff4396e139f0b00e701fbd /lazar.rb | |
parent | a787ecc2bff70ee705f09d3ba9b38b24394f5075 (diff) |
migrate when delete_all, dataset prediction fixed
Diffstat (limited to 'lazar.rb')
-rw-r--r-- | lazar.rb | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -3,9 +3,11 @@ class Lazar < Model attr_accessor :dataset, :predictions def classify(compound_uri) - - @dataset = OpenTox::Dataset.new - @predictions = {} + + unless @dataset + @dataset = OpenTox::Dataset.new + @predictions = {} + end lazar = YAML.load yaml compound = OpenTox::Compound.new(:uri => compound_uri) compound_matches = compound.match lazar[:features] @@ -50,6 +52,7 @@ class Lazar < Model :features => compound_matches } } } end + end def database_activity?(compound_uri) |