summaryrefslogtreecommitdiff
path: root/views/predicted_assays.haml
blob: 571b3123e9a000f51274d87674cd81a19679d771 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
%dl
  - @assays.sort{|a,b| [b["p_active"],b["p_inactive"]].max <=> [a["p_active"],a["p_inactive"]].max}.each do |assay|
    %dt
      %a{:href => "http://pubchem.ncbi.nlm.nih.gov/assay/assay.cgi?aid=#{assay["AID"]}", :rel => "external"} #{assay['Assay Name']}
      :javascript
        $('A[rel="external"]').each(function(){
          $(this).attr('target', 'external');
        });
    %dd
      Assay ID:
      %a{:href => "http://pubchem.ncbi.nlm.nih.gov/assay/assay.cgi?aid=#{assay["AID"]}", :rel => "external"} #{assay['AID']}
      :javascript
        $('A[rel="external"]').each(function(){
          $(this).attr('target', 'external');
        });
    %dd
      p_active:
      = assay["p_active"].to_f.round(3)
    %dd
      p_inactive:
      = assay["p_inactive"].to_f.round(3)