summaryrefslogtreecommitdiff
path: root/views/feature_table.haml
blob: daa04a0444347da88c2afaa015ec12b734651d29 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
%table
  - unless features[:activating].empty?
    %tr
      %th
        - if @value_map.empty?
          activating 
        - else
          predominatly in compounds with activity
          = "\"#{@value_map[@value_map.keys.sort.last]}\""
        (
        %a{:href => "http://www.daylight.com/dayhtml/doc/theory/theory.smarts.html", :rel => "external"} SMARTS
        )
      %th p value
    - if features[:activating]
      - features[:activating].sort{|a,b| b[:p_value] <=> a[:p_value] }.each do |f|
        %tr
          %td= f[:smarts]
          %td= f[:p_value]
  - unless features[:deactivating].empty?
    %tr
      %th
        - if @value_map.empty?
          deactivating
        - else
          predominatly in compounds with activity
          = "\"#{@value_map[@value_map.keys.sort.first]}\""
        (
        %a{:href => "http://www.daylight.com/dayhtml/doc/theory/theory.smarts.html", :rel => "external"} SMARTS
        )
      %th p value
    - if features[:deactivating]
      - features[:deactivating].sort{|a,b| b[:p_value] <=> a[:p_value] }.each do |f|
        %tr
          %td= f[:smarts]
          %td= f[:p_value]
  -if features[:deactivating].empty? and features[:activating].empty? and (features[:pc_features].size >= 1)
    %tr
      %th
        Descriptors
      %th
        Values
    - features[:pc_features].sort{|a,b| a[:feature] <=> b[:feature] }.each do |f|
      %tr
        %td= f[:feature]
        %td= f[:value].uniq.collect{|v| v.to_s  + " "}