summaryrefslogtreecommitdiff
path: root/helper.rb
diff options
context:
space:
mode:
authorChristoph Helma <helma@in-silico.ch>2011-08-04 10:24:38 +0000
committerChristoph Helma <helma@in-silico.ch>2011-08-04 10:24:38 +0000
commit4f83500afb33612cadd7084470ab9b42dfa59cf2 (patch)
tree9616f318aa7d6dc33181d31c6d87729e543cba9e /helper.rb
parent91b70cba5d1d0045b0db0d9c77f867e68e61fe2e (diff)
activity highlighting and significant features fixed
Diffstat (limited to 'helper.rb')
-rw-r--r--helper.rb10
1 files changed, 5 insertions, 5 deletions
diff --git a/helper.rb b/helper.rb
index 408f8bc..943a182 100644
--- a/helper.rb
+++ b/helper.rb
@@ -51,20 +51,20 @@ helpers do
haml :js_link, :locals => {:name => name, :destination => destination, :method => "toggle"}, :layout => false
end
- def sort(descriptors)
+ def sort(descriptors,value_map)
features = {:activating => [], :deactivating => []}
descriptors.each do |d|
- if d[OT.effect] =~ TRUE_REGEXP
+ if value_map[d[OT.effect]] =~ TRUE_REGEXP
features[:activating] << {:smarts => d[OT.smarts],:p_value => d[OT.pValue]}
- elsif d[OT.effect] =~ FALSE_REGEXP
+ elsif value_map[d[OT.effect]] =~ FALSE_REGEXP
features[:deactivating] << {:smarts => d[OT.smarts],:p_value => d[OT.pValue]}
end
end
features
end
- def compound_image(compound,descriptors)
- haml :compound_image, :locals => {:compound => compound, :features => sort(descriptors)}, :layout => false
+ def compound_image(compound,descriptors,value_map)
+ haml :compound_image, :locals => {:compound => compound, :features => sort(descriptors,value_map)}, :layout => false
end
def activity_markup(activity)