summaryrefslogtreecommitdiff
path: root/views/batch.haml
diff options
context:
space:
mode:
authorgebele <gebele@in-silico.ch>2015-10-29 18:20:39 +0000
committergebele <gebele@in-silico.ch>2015-10-29 18:20:39 +0000
commitefd241beab11fbfc200f0c32ffb9e198ed406c83 (patch)
tree71537f1341066f44ef2bbb6f65211e825bade68d /views/batch.haml
parent95236e48e8a1da009e6b5ab1789f0de37dde36f5 (diff)
added mg/kg_bw/day
Diffstat (limited to 'views/batch.haml')
-rw-r--r--views/batch.haml5
1 files changed, 3 insertions, 2 deletions
diff --git a/views/batch.haml b/views/batch.haml
index ec987c4..f593188 100644
--- a/views/batch.haml
+++ b/views/batch.haml
@@ -18,6 +18,7 @@
/ key = compound, values = array of arrays with model, prediction
- @batch.each do |key, values|
- compound = key
+ - mw = compound.molecular_weight
%tr
%td{:style=>"vertical-align:top;"}
%p= compound.svg
@@ -34,7 +35,7 @@
%p
/ TODO fix scientific notation from database
%b Measured activity:
- = prediction[:value].numeric? ? "#{prediction[:value].round(3)} (#{model.unit})" : prediction[:value]
+ = prediction[:value].numeric? ? "#{'%.2e' % prediction[:value]} (#{model.unit}) | #{'%.2e' % compound.mmol_to_mg(prediction[:value], mw)} (mg/kg_bw/day)" : prediction[:value]
%p Compound is part of the training dataset
- elsif prediction[:neighbors].size > 0
%p
@@ -44,7 +45,7 @@
%br
%b Prediction:
/ TODO scientific notation
- = prediction[:value].numeric? ? "#{'%.2e' % prediction[:value]} (#{model.unit})" : prediction[:value]
+ = prediction[:value].numeric? ? "#{'%.2e' % prediction[:value]} (#{model.unit}) | #{'%.2e' % compound.mmol_to_mg(prediction[:value], mw)} (mg/kg_bw/day)" : prediction[:value]
%br
/ TODO probability
%b Confidence: