diff options
author | mr <mr@mrautenberg.de> | 2011-07-12 11:43:53 +0200 |
---|---|---|
committer | mr <mr@mrautenberg.de> | 2011-07-12 11:43:53 +0200 |
commit | da05e77d831aa174adfa8d487345f2c6f3a80ec3 (patch) | |
tree | e965c5ae8964d78731df6cb476546024f7e9e3c6 /helper.rb | |
parent | 2e79dc191027651acdda0e63c32da78a9c33148b (diff) |
fix broken prediction details https://github.com/opentox/toxcreate/issues/49
Diffstat (limited to 'helper.rb')
-rw-r--r-- | helper.rb | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -53,7 +53,13 @@ helpers do def sort(descriptors) features = {:activating => [], :deactivating => []} - descriptors.each { |d| features[d[OT.effect].to_sym] << {:smarts => d[OT.smarts],:p_value => d[OT.pValue]} } + descriptors.each do |d| + if d[OT.effect] =~ TRUE_REGEXP + features[:activating] << {:smarts => d[OT.smarts],:p_value => d[OT.pValue]} + elsif d[OT.effect] =~ FALSE_REGEXP + features[:deactivating] << {:smarts => d[OT.smarts],:p_value => d[OT.pValue]} + end + end features end |