diff options
author | mr <mr@mrautenberg.de> | 2011-07-12 11:45:36 +0200 |
---|---|---|
committer | mr <mr@mrautenberg.de> | 2011-07-12 11:45:36 +0200 |
commit | 425cbf28a4686e59e9e46b9987f1e3d8348f39a1 (patch) | |
tree | 374c6ea622dc419a2cc3d5d0f6a846f4de0f0ac0 | |
parent | 8f750e73832be3cccba8e53548e5ce7ffde2014b (diff) |
fix broken prediction details https://github.com/opentox/toxcreate/issues/49
-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 |