diff options
author | Christoph Helma <helma@in-silico.ch> | 2011-08-04 10:24:38 +0000 |
---|---|---|
committer | Christoph Helma <helma@in-silico.ch> | 2011-08-04 10:24:38 +0000 |
commit | 4f83500afb33612cadd7084470ab9b42dfa59cf2 (patch) | |
tree | 9616f318aa7d6dc33181d31c6d87729e543cba9e /helper.rb | |
parent | 91b70cba5d1d0045b0db0d9c77f867e68e61fe2e (diff) |
activity highlighting and significant features fixed
Diffstat (limited to 'helper.rb')
-rw-r--r-- | helper.rb | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -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) |