diff options
author | gebele <gebele@in-silico.ch> | 2017-11-06 14:37:21 +0000 |
---|---|---|
committer | gebele <gebele@in-silico.ch> | 2017-11-06 14:37:21 +0000 |
commit | 66334c4479e993fdf75535629700c84edbc7ba6c (patch) | |
tree | 94a3c20eaa4935ac8ee0763dc356cdaedd0715f9 /views | |
parent | f9f3faf930a9c348d81646dd9ef60e48821444a7 (diff) |
various small fixes
Diffstat (limited to 'views')
-rw-r--r-- | views/prediction.haml | 27 |
1 files changed, 18 insertions, 9 deletions
diff --git a/views/prediction.haml b/views/prediction.haml index 872ee1e..4660112 100644 --- a/views/prediction.haml +++ b/views/prediction.haml @@ -63,7 +63,8 @@ =hash[:matches].blank? ? "none" : hash[:matches].join("; ") / check for prediction %p - - if prediction[:neighbors] and !prediction[:value].nil? + / regression + - if prediction[:value] %b.title= ("Lazar #{@models[i].endpoint.gsub('_', ' ').downcase} (#{@models[i].species}):" if sa_prediction) %p / check for database hit @@ -118,16 +119,24 @@ =prediction[:warnings].join("</br>") - else - %p - if !prediction[:info].blank? - :plain - This compound was part of the training dataset. <i>All</i> information </br> - from this compound was removed from the training data before the </br> - prediction, to obtain unbiased results. + %p + :plain + This compound was part of the training dataset. <i>All</i> information </br> + from this compound was removed from the training data before the </br> + prediction, to obtain unbiased results. + %p + %b Measured activity: + %br + - if prediction[:measurements].is_a?(Array) + = (type == "Regression") ? prediction[:measurements].collect{|value| "#{value.delog10.signif(3)} (#{unit})</br>#{@compound.mmol_to_mg(value.delog10).signif(3)} #{unit =~ /mmol\/L/ ? "(mg/L)" : "(mg/kg_bw/day)"}"}.join("</br>") : prediction[:measurements].join(", ") + - else + = (type == "Regression") ? "#{prediction[:measurements].delog10.signif(3)} (#{unit})</br>#{@compound.mmol_to_mg(prediction[:measurements].delog10).signif(3)} #{(unit =~ /\b(mmol\/L)\b/) ? "(mg/L)" : "(mg/kg_bw/day)"}" : prediction[:measurements] - if !prediction[:warnings].blank? - %b Warnings: - %br - =prediction[:warnings].join("</br>") + %p + %b Warnings: + %br + =prediction[:warnings].join("</br>") / show Cramer rules if checked - if @toxtree == true |