blob: 48a55ce6c89cacd27068bfdbcee120e2d12d21ea (
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
|
.predictions
.back
%h1
%img{:src=>"/images/arrow_left_float.png", :alt=>"arrow"}
%a{:href => to('/predict')} New Prediction
.results
%h2= "Selected Entpoints: "
- @prediction_models.each do |m|
%a{:href => "#results_#{m.title}", :id => "link#{m.title}"}
= m.title
:javascript
$("a#link#{m.title}").click(function () {
$("#results_#{m.title}").toggle();
});
#results{:id=>"#{m.title}", :style=>"display: none"}
%h2= "Prediction Uri: "
- @predictions.each do |p|
%p= p.uri
%h2= "Predicted Compound: "
- @prediction_compound.each do |compound|
%img{:src=>"#{compound.uri}/image", :alt=>compound.uri, :width=>"100px"}
%p= compound.smiles
%h2= "Prediction: "
- @prediction_values.each do |p|
%p= p[1]
%h2= "Confidence: "
%p= p[2]
%script{:src=>"/javascripts/jquery-latest.js"}
%script{:src=>"/javascripts/jquery.tablesorter.min.js"}
-#%script{:src=>"/javascripts/jquery.metadata.js"}
:javascript
$(document).ready(function(){
// call the tablesorter plugin
$("table").tablesorter({
widgets: ['zebra'],
// disable first column
headers: {
0: {sorter: false}
},
});
});
%h3= "Neighbours: "
%table{:class=>"tablesorter", :cellspacing=>"1"}
%thead
%tr
%th
= "compound"
%th
= "smiles"
%th
= "measured activity"
%th
= "similarity"
-#%tbody
- count = 0
- @prediction_neighbours_compounds.each do |neighbour_compound|
%tr
%td
%img{:src=>"#{neighbour_compound.uri}/image", :alt=>neighbour_compound.uri, :width=>"100px"}
%td= neighbour_compound.smiles
-#%h2= "Measured Activity: "
%td= @prediction_neighbours_values[0][count][0].inspect
-#%h2= "Smilarity: "
%td= @prediction_neighbours_values[0][count][3].inspect
- count += 1
|