summaryrefslogtreecommitdiff
path: root/views/neighbors.haml
diff options
context:
space:
mode:
authorgebele <gebele@in-silico.ch>2013-09-27 12:09:55 +0200
committergebele <gebele@in-silico.ch>2013-09-27 12:09:55 +0200
commitda701f22287f855b499145c181106f3736392d47 (patch)
tree557e91115066ff5f5188ee9c5fef3f855ea049ac /views/neighbors.haml
parent50d1d8bf543f02a7daaceae90d399c34fc48f48c (diff)
serveral minor changes;pass values active/inactive
Diffstat (limited to 'views/neighbors.haml')
-rw-r--r--views/neighbors.haml21
1 files changed, 12 insertions, 9 deletions
diff --git a/views/neighbors.haml b/views/neighbors.haml
index df03b85..7785eaa 100644
--- a/views/neighbors.haml
+++ b/views/neighbors.haml
@@ -42,9 +42,10 @@
sortList: [[2,1]]
});
});
- %h2= "Neighbors: "
+ /%h2= "Neighbors: "
- $logger.debug "neighbors compounds:\t#{p.data_entries[0]}\n"
- if p.data_entries[0][2] != nil && p.data_entries[0].size != 3
+ %h2= "Neighbors: "
%table{:id=>"#{count_rs}", :class=>"tablesorter", :cellspacing=>"1"}
%thead
%tr
@@ -90,22 +91,24 @@
/ prevent conversion of nil
- c = p.data_entries[count][2] != nil ? p.data_entries[count][2] : ''
- case c
- - when /(0|false|inactive)/
+ - when /(false|true|inactive|active)/i
+ - c = c
+ -#- when /(0|false|inactive)/
- c = "non-carcinogen"
- - when /(1|true|active)/
+ -#- when /(1|true|active)/
- c = "carcinogen"
- else
- - c = Array.new
- - c[0] = p.data_entries[count][2]
+ /- c = Array.new
+ - c = p.data_entries[count][2].round(3)
%tr
%td.compound
%img{:src=>"#{neighbor_compound.uri}/image", :alt=>"Compound image not available", :title=>"#{neighbor_compound.smiles}", :width=>"150px"}
- %td{:class => c[0]}
+ %td
- if c.class == String
= c
- else
- = c[0]
- %td{:class => c[0]}
+ = c
+ %td
= p.data_entries[count][3] != nil ? p.data_entries[count][3].round(3) : "Not enough similar compounds in training dataset."
%td
-#- if p.data_entries[count][3] != nil
@@ -129,7 +132,7 @@
});
});
- count += 1
- - else
+ -#- else
%h3
Not enough similar compounds in training dataset