summaryrefslogtreecommitdiff
path: root/views
diff options
context:
space:
mode:
authorgebele <gebele@in-silico.ch>2013-09-11 14:03:17 +0200
committergebele <gebele@in-silico.ch>2013-09-11 14:03:17 +0200
commit6bac36708c0eb868ba311dcd099b6c32047f90ac (patch)
tree23526f92c901af1c3c9eea43509e9821ec7f63b3 /views
parent923d668270c0e9b0133a203f67abec465317ed7f (diff)
data_entries to logger output
Diffstat (limited to 'views')
-rw-r--r--views/neighbors.haml8
-rw-r--r--views/prediction.haml3
2 files changed, 9 insertions, 2 deletions
diff --git a/views/neighbors.haml b/views/neighbors.haml
index 51ddb9d..ceef79c 100644
--- a/views/neighbors.haml
+++ b/views/neighbors.haml
@@ -83,17 +83,21 @@
- count = 0
- p.compounds.each do |neighbor_compound|
/ prevent conversion of nil
- - c = p.data_entries[count][2] != nil ? p.data_entries[count][2] : ''
+ - c = p.data_entries[count][2] != nil ? p.data_entries[count][2] : ''
+ - $logger.debug "inspect c :#{c}\n"
- case c
- when /(0|false)/
- c = "non-carcinogen"
- when /(1|true)/
- c = "carcinogen"
+ - else
+ - c = Array.new
+ - c[0] = p.data_entries[count][2]
%tr
%td.compound
%img{:src=>"#{neighbor_compound.uri}/image", :alt=>"Compound image not available", :width=>"150px"}
%td{:class => c[0]}
- = c #p.data_entries[count][2]
+ = c[0] #p.data_entries[count][2]
%td{:class => c[0]}
= p.data_entries[count][3] != nil ? p.data_entries[count][3].round(3) : "Not enough similar compounds in training dataset."
%td
diff --git a/views/prediction.haml b/views/prediction.haml
index 21d1bfe..c4ef460 100644
--- a/views/prediction.haml
+++ b/views/prediction.haml
@@ -32,10 +32,13 @@
- @@predictions.each do |pa|
/ prediction of one model
- pa.each do |p|
+ - $logger.debug "inspect p: #{p.inspect}\n"
+ - $logger.debug "inspect data_entries: #{p.data_entries}\n"
/ p.data_entries > 1 = neighbors available
- p.data_entries.length > 1 ? @@neighbors_available = p.data_entries.length : @@neighbors_available
/ prevent conversion of nil
- c = p.data_entries[0][0] != nil ? p.data_entries[0][0] : ''
+ - $logger.debug "inspect c: #{c.inspect}\n"
- case c
- when /(0|false)/
- c = "non-carcinogen"