summaryrefslogtreecommitdiff
path: root/views/neighbors.haml
blob: 09dc6cfdfa7ea292bcbefe2e9c938d06056ea09a (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
%table
  %colgroup
    %col{:width => "25%"}
    %col{:width => "37%"}
    %col{:width => "37%"}
  - idx = 0
  - while idx < 10
    - @compound.neighbors.each do |n|
      - unless n.assays.empty?
        %tr
          %td{:valign => "top"}
            %br
              = n.name
              (
              = @compound.cosine(n).round(3)
              )
            %img{:src => n.image_uri}
          %td{:valign => "top"}
            %p{:id => "targets#{n.cid}"}
              :javascript
                hide("Measured gene/protein targets","#targets#{n.cid}", "/cid/#{n.cid}/targets");
            %p{:id => "nontargets#{n.cid}"}
              :javascript
                hide("Measured gene/protein non-targets","#nontargets#{n.cid}", "/cid/#{n.cid}/nontargets");
          %td{:valign => "top"}
            %p{:id => "assays#{n.cid}"}
              :javascript
                hide("Other active assays","#assays#{n.cid}", "/cid/#{n.cid}/other_active_assays");
            %p{:id => "inactive_assays#{n.cid}"}
              :javascript
                hide("Other inactive assays","#inactive_assays#{n.cid}", "/cid/#{n.cid}/other_inactive_assays");
        
        - idx += 1