summaryrefslogtreecommitdiff
path: root/views
diff options
context:
space:
mode:
authorgebele <gebele@in-silico.ch>2018-07-16 14:20:03 +0000
committergebele <gebele@in-silico.ch>2018-07-16 14:20:03 +0000
commit44d9ceb30f6f8649f2d6fc179a925302f14d8a05 (patch)
tree64e6b421f035ec24cb8e9ea55765406a824f12c0 /views
parent11a32e7c3326f9e411e60cdf5098d4f46b0ec11b (diff)
add mazzatorta
Diffstat (limited to 'views')
-rw-r--r--views/batch.haml10
-rw-r--r--views/predict.haml12
-rw-r--r--views/prediction.haml22
3 files changed, 37 insertions, 7 deletions
diff --git a/views/batch.haml b/views/batch.haml
index 1aa6779..165b64b 100644
--- a/views/batch.haml
+++ b/views/batch.haml
@@ -76,7 +76,7 @@
callback: function(data, pagination) {
var html = simpleTemplating(data);
$('#data-container_'+id).html(html);
- $('#data-container_'+id).css("min-height", $(window).height() + "px" );
+ //$('#data-container_'+id).css("min-height", $(window).height() + "px" );
}
});
} else if (span.className = "glyphicon glyphicon-menu-down"){
@@ -105,8 +105,12 @@
#result.panel{:id=>idx}
%div.row
%div.col-md-6
- %h5= (model == "Cramer") ? "Oral toxicity (Cramer rules)" : (m.endpoint =~ /Mutagenicity/i ? "Consensus mutagenicity" : "#{m.endpoint} (#{m.species})")
- #pager{:id=>idx}
+ - if model =~ /Mazzatorta/
+ %h5= "Lowest observed adverse effect level (LOAEL) (Mazzatorta) Rats"
+ #pager{:id=>idx}
+ - else
+ %h5= (model == "Cramer") ? "Oral toxicity (Cramer rules)" : (m.endpoint =~ /Mutagenicity/i ? "Consensus mutagenicity" : "#{m.endpoint} (#{m.species})")
+ #pager{:id=>idx}
%div.col-md-6.h5
%a.btn.btn-default.btn-xs.disabled{:id => "detailsbutton_#{idx}", :data=>{:toggle=>"collapse"}, :href=>"javascript:void(0)", :onclick=>"pagePredictions('#{task}','#{model}','#{idx}')", :style=>"font-size:small;"}
%span.glyphicon.glyphicon-menu-right
diff --git a/views/predict.haml b/views/predict.haml
index d638451..0afcc99 100644
--- a/views/predict.haml
+++ b/views/predict.haml
@@ -186,8 +186,8 @@
- @endpoints.each do |endpoint|
%div{:id=>endpoint.gsub(/\s+/, "_")}
%h4.head-back=endpoint
- - unless endpoint =~ /^Oral/
- - @models.select{|m| m.endpoint == endpoint}.each do |model|
+ - if endpoint !~ /^Oral|Mazzatorta/
+ - @models.select{|m| endpoint = endpoint.gsub("(lazar)","").strip if endpoint =~ /lazar/; m.endpoint == endpoint}.each do |model|
%div.row{:id => model.id,:style=>"margin-bottom:1em;"}
%span.col-lg-4.col-md-4.col-sm-4.col-xs-4
%input.check{:type => "checkbox", :name => "selection[#{model.id}]", :id => "selection[#{model.species.gsub(/\s+/, "_")}]", :value => true, :disabled => false}
@@ -223,12 +223,18 @@
});
}
}
- - else
+ - elsif endpoint =~ /^Oral/
%div.row{:id => "Cramer",:style=>"margin-bottom:1em;"}
%span.col-lg-4.col-md-4.col-sm-4.col-xs-4
%input.check{:type => "checkbox", :name => "selection[Cramer]", :id => "selection[Cramer]", :value => true, :disabled => false}
%label{:for => "selection[Cramer]"}
Cramer rules
+ - elsif endpoint =~ /Mazzatorta/
+ %div.row{:id => "Mazzatorta",:style=>"margin-bottom:1em;"}
+ %span.col-lg-4.col-md-4.col-sm-4.col-xs-4
+ %input.check{:type => "checkbox", :name => "selection[Mazzatorta]", :id => "selection[Mazzatorta]", :value => true, :disabled => false}
+ %label{:for => "selection[Mazzatorta]"}
+ Rats
%fieldset#bottom.well
%div.row
%div.col-md-2
diff --git a/views/prediction.haml b/views/prediction.haml
index b4b51ca..152efc9 100644
--- a/views/prediction.haml
+++ b/views/prediction.haml
@@ -23,6 +23,8 @@
- @model_types = {}
- @dbhit = {}
- toxtree = @predictions.pop if @toxtree == true
+ - mazzatorta = @predictions.find{|p| p["mazzatorta"]}
+ - @predictions.delete(mazzatorta) if mazzatorta
- unless @predictions.blank?
- @predictions.each_with_index do |prediction,i|
- if prediction["Consensus prediction"]
@@ -138,7 +140,7 @@
%br
=prediction[:warnings].join("</br>")
- / show Cramer rules if checked
+ / Cramer
- if @toxtree == true
%td{:style=>"vertical-align:top;white-space:nowrap;"}
%b.title Oral toxicity (Cramer rules)
@@ -151,6 +153,24 @@
%br
=toxtree.last["Cramer rules, with extensions"]
+ / Mazzatorta
+ - if mazzatorta
+ %td{:style=>"vertical-align:top;white-space:nowrap;"}
+ %b.title Lowest observed adverse effect level (LOAEL) (Rats) (Mazzatorta)
+ %p
+ - hash = mazzatorta["mazzatorta"]
+ - unless hash.keys.include?("warnings")
+ %b Prediction:
+ %br
+ = "#{hash[:mmol_prediction]} (mmol/kg_bw/day)"
+ %br
+ = "#{hash[:prediction]} (mg/kg_bw/day)"
+ - else
+ %b Warnings:
+ %br
+ = "#{hash[:warnings]}"
+
+
/ always show the neighbors table, message is given there. Except only Cramer is selected.
- unless @predictions.blank?
= haml :neighbors, :layout => false