From 4f83500afb33612cadd7084470ab9b42dfa59cf2 Mon Sep 17 00:00:00 2001 From: Christoph Helma Date: Thu, 4 Aug 2011 10:24:38 +0000 Subject: activity highlighting and significant features fixed --- views/lazar.haml | 4 ++-- views/neighbors.haml | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'views') diff --git a/views/lazar.haml b/views/lazar.haml index 3f1d030..2912567 100644 --- a/views/lazar.haml +++ b/views/lazar.haml @@ -18,7 +18,7 @@ %th Supporting information %tr - %td.image= compound_image(@compound,@prediction.descriptors(@compound)) + %td.image= compound_image(@compound,@prediction.descriptors(@compound),@value_map) %td= activity_markup(@prediction.value(@compound)) %td= sprintf('%.03g', @prediction.confidence(@compound)) %td @@ -40,7 +40,7 @@ %tr#fragments{ :style => "display: none;" } %td{:colspan => '4'} = hide_link('#fragments') - = haml :feature_table, :locals => {:features => sort(@prediction.descriptors(@compound))}, :layout => false + = haml :feature_table, :locals => {:features => sort(@prediction.descriptors(@compound),@value_map)}, :layout => false %tbody#neighbors = haml :neighbors, :locals => {:neighbors => @prediction.neighbors(@compound), :page => @page}, :layout => false diff --git a/views/neighbors.haml b/views/neighbors.haml index 2df9230..3f1dccd 100644 --- a/views/neighbors.haml +++ b/views/neighbors.haml @@ -13,8 +13,8 @@ - neighbor_id += 1 - compound = OpenTox::Compound.new(neighbor[OT.compound]) %tr - %td.image= compound_image(compound,@prediction.descriptors(compound)) - %td= activity_markup(neighbor[OT.measuredActivity]) + %td.image= compound_image(compound,@prediction.descriptors(compound),@value_map) + %td= activity_markup(@value_map[neighbor[OT.measuredActivity].to_i]) %td= sprintf('%.03g', neighbor[OT.similarity]) %td %ul @@ -39,5 +39,5 @@ %tr{:id => "fragments#{neighbor_id}", :style => "display: none;" } %td{:colspan => '4'} = hide_link("#fragments#{neighbor_id}") - = haml :feature_table, :locals => {:features => sort(@prediction.descriptors(compound))}, :layout => false + = haml :feature_table, :locals => {:features => sort(@prediction.descriptors(compound),@value_map)}, :layout => false -- cgit v1.2.3