summaryrefslogtreecommitdiff
path: root/views/index.haml
blob: c8481c3a74d7e6965f42e6a0379836c5ef268678 (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
!!! 5
= @compound.neighbors.size
%table
  %tr
    %th Structure
    %th Properties
    %th Targets
    %th Assays
  - @compound.neighbors.each do |neighbor|
    %tr
      %td
        = neighbor.name
        %img{:src => neighbor.image}
        %dl
          %dt Similarity
          %dd
            = neighbor.tanimoto
      %td
        %dl
          - neighbor.properties.each do |p,v|
            %dt 
              = p
            %dd
              = v
      %td
        %dl
          %dt Similarity
          %dd
            = neighbor.target_similarity @compound.neighbors.first
          %dt Targets
          %dd
            = neighbor.targets.uniq
          %dt Total
          %dd
            = neighbor.targets.size + neighbor.non_targets.size
      %td
        %dl
          %dt Similarity
          %dd
            = neighbor.assay_similarity @compound.neighbors.first
          %dt Active
          %dd
            = neighbor.active_assays.collect{|a| a["Assay Name"]}
          %dt Total
          %dd
            = neighbor.active_assays.size + neighbor.inactive_assays.size
            =# neighbor.inactive_assays.collect{|a| a["Assay Name"]}