summaryrefslogtreecommitdiff
path: root/views/significant_fragments.haml
diff options
context:
space:
mode:
Diffstat (limited to 'views/significant_fragments.haml')
-rw-r--r--views/significant_fragments.haml124
1 files changed, 63 insertions, 61 deletions
diff --git a/views/significant_fragments.haml b/views/significant_fragments.haml
index 7301f53..5dbf9b1 100644
--- a/views/significant_fragments.haml
+++ b/views/significant_fragments.haml
@@ -1,68 +1,70 @@
%link{ :href=>"/stylesheets/screen.css", :media=>"screen, projection", :rel=>"stylesheet", :type=>"text/css"}
/TODO put smiles in div if compound image is not available, prevent overlay to table
-.content
- %button{:id=>"closebutton", :onclick=>"parent.$('#iframe_details').bPopup().close();parent.$('#iframe_overview').bPopup().close();"}
- X
-- if @type =~ /classification/i
- .significant_fragments{:style=>"padding:0.5em;min-height:400px"}
- %h2{:style=>"margin:0px;margin-left:8px;"}
- Significant fragments:
+.content{:style=>"margin-top:0;"}
+ - if @type =~ /classification/i
+ .significant_fragments{:style=>"padding:0.5em;height:100%"}
+ %button{:id=>"closebutton", :onclick=>"parent.$('#iframe_details').bPopup().close();parent.$('#iframe_overview').bPopup().close();"}
+ X
+ %h2{:style=>"margin-left:8px;"}
+ Significant fragments:
- %img{:src=>"#{@compound.uri}/image", :alt=>"#{@compound.smiles}", :title=>"#{@compound.smiles}", :width=>"300px", :heigth=>"300px"}
- - if !@significant_fragments.empty?
- %table{:id => "sf1"}
- %tr
- / @value_map => hash; interpret the effect
- %th{:style=>"border:2px solid #E6E6E6;"}
- Predominantly in compounds with activity "inactive"
- %th{:style=>"border:2px solid #E6E6E6;"}
- p value
- - @significant_fragments.each do |fragments|
- / fragments == [effect, smarts, pValue]
- / fragments[0] = effect
- /- $logger.debug "effect:\t#{fragments[0]}\n"
- - if fragments[0] == @value_map.index("inactive")
- %tr
- %td
- / fragments[1] = smarts
- = fragments[1]
- %td
- /fragments[2] = pValue
- = fragments[2]
- %tr
- %td
- %br
- %tr
- %th{:style=>"border:2px solid #E6E6E6;"}
- Predominantly in compounds with activity "active"
- %th{:style=>"border:2px solid #E6E6E6;"}
- p value
- - @significant_fragments.each do |fragments|
- / fragments == [effect, smarts, pValue]
- - if fragments[0] == @value_map.index("active")
+ %img{:src=>"#{@compound.uri}/image", :alt=>"#{@compound.smiles}", :title=>"#{@compound.smiles}", :width=>"300px", :heigth=>"300px"}
+ - if !@significant_fragments.empty?
+ %table{:id => "sf1"}
+ %tr
+ / @value_map => hash; interpret the effect
+ %th{:style=>"border:2px solid #E6E6E6;"}
+ Predominantly in compounds with activity "inactive"
+ %th{:style=>"border:2px solid #E6E6E6;"}
+ p value
+ - @significant_fragments.each do |fragments|
+ / fragments == [effect, smarts, pValue]
+ / fragments[0] = effect
+ /- $logger.debug "effect:\t#{fragments[0]}\n"
+ - if fragments[0] == @value_map.index("inactive")
+ %tr
+ %td
+ / fragments[1] = smarts
+ = fragments[1]
+ %td
+ /fragments[2] = pValue
+ = fragments[2]
+ %tr
+ %td
+ %br
+ %tr
+ %th{:style=>"border:2px solid #E6E6E6;"}
+ Predominantly in compounds with activity "active"
+ %th{:style=>"border:2px solid #E6E6E6;"}
+ p value
+ - @significant_fragments.each do |fragments|
+ / fragments == [effect, smarts, pValue]
+ - if fragments[0] == @value_map.index("active")
+ %tr
+ %td
+ = fragments[1]
+ %td
+ = fragments[2]
+
+ - if @type =~ /regression/i
+ .descriptors{:style=>"padding:0.5em;height:100%"}
+ %button{:id=>"closebutton", :onclick=>"parent.$('#iframe_details').bPopup().close();parent.$('#iframe_overview').bPopup().close();"}
+ X
+ %h2{:style=>"margin:0px;margin-left:8px;"}
+ Descriptors:
+
+ %img{:src=>"#{@compound.uri}/image", :alt=>"#{@compound.smiles}", :title=>"#{@compound.smiles}", :width=>"300px", :heigth=>"300px"}
+ - if !@significant_fragments.empty?
+ %table{:id => "sf2"}
+ %tr
+ %th{:style=>"border:2px solid #E6E6E6;"}
+ Descriptor
+ %th{:style=>"border:2px solid #E6E6E6;"}
+ value
+ - @significant_fragments.each do |fragments|
%tr
%td
- = fragments[1]
+ = fragments[0]
%td
- = fragments[2]
-
-- if @type =~ /regression/i
- .descriptors{:style=>"padding:0.5em;min-height:400px"}
- %h2{:style=>"margin:0px;margin-left:8px;"}
- Descriptors:
-
- %img{:src=>"#{@compound.uri}/image", :alt=>"#{@compound.smiles}", :title=>"#{@compound.smiles}", :width=>"300px", :heigth=>"300px"}
- - if !@significant_fragments.empty?
- %table{:id => "sf2"}
- %tr
- %th{:style=>"border:2px solid #E6E6E6;"}
- Descriptor
- %th{:style=>"border:2px solid #E6E6E6;"}
- value
- - @significant_fragments.each do |fragments|
- %tr
- %td
- = fragments[0]
- %td
- = fragments[1][0].round(3)
+ = fragments[1][0].round(3)