diff options
author | Christoph Helma <helma@in-silico.ch> | 2010-11-24 13:10:52 +0100 |
---|---|---|
committer | Christoph Helma <helma@in-silico.ch> | 2010-11-24 13:10:52 +0100 |
commit | 1952b3ed877e4791429512def5bd7102e4ba7a99 (patch) | |
tree | 624d3fde40b7abd2ae902e9635b1a1dcfa5df2b0 /helper.rb | |
parent | 99e3566a11a1d51df91a6d3d016e8ec260920020 (diff) |
opentox-ruby-api-wrapper renamed to opentox-ruby
Diffstat (limited to 'helper.rb')
-rw-r--r-- | helper.rb | 12 |
1 files changed, 10 insertions, 2 deletions
@@ -12,8 +12,16 @@ helpers do haml :js_link, :locals => {:name => name, :destination => destination, :method => "toggle"}, :layout => false end - def compound_image(compound,features) - haml :compound_image, :locals => {:compound => compound, :features => features}, :layout => false + def sort(descriptors) + features = {:activating => [], :deactivating => []} + + descriptors.each { |d| LOGGER.debug d.inspect; features[d[OT.effect].to_sym] << {:smarts => d[OT.smarts],:p_value => d[OT.pValue]} } + LOGGER.debug features.to_yaml + features + end + + def compound_image(compound,descriptors) + haml :compound_image, :locals => {:compound => compound, :features => sort(descriptors)}, :layout => false end def activity_markup(activity) |