summaryrefslogtreecommitdiff
path: root/views/prediction.haml
diff options
context:
space:
mode:
authorChristoph Helma <helma@in-silico.de>2010-01-09 18:59:26 +0100
committerChristoph Helma <helma@in-silico.de>2010-01-09 18:59:26 +0100
commit08103ef7fca40d0dd6c6813caea56eaf0e0af9ea (patch)
tree4712d4b477686faad522a2fe647b20c7c5cb097d /views/prediction.haml
parent95b9cb55b313e003f0d20d26aa12e3a2282c529a (diff)
first demonstration version for lazar
Diffstat (limited to 'views/prediction.haml')
-rw-r--r--views/prediction.haml64
1 files changed, 11 insertions, 53 deletions
diff --git a/views/prediction.haml b/views/prediction.haml
index 15718b3..2b11d88 100644
--- a/views/prediction.haml
+++ b/views/prediction.haml
@@ -1,58 +1,16 @@
-&rarr;
-%a{ :href => "/#{params[:id]}" } Enter structure
-&rarr; Prediction
-%hr
-
-%h1
- = @lazar.endpoint.sub(/^.*[#|\/](.*)$/,'\1')
-
-Endpoint:
-= @lazar.endpoint
%p
- Model:
- = File.join(@@config[:services]["opentox-model"],params[:id])
-%p
- Compound:
- = @compound.uri
-
-.prediction
+ %a{ :href => "/predict" } New prediction
+.predictions
%table
%tr
- %th Structure
- %th Measured activity
%th
- %br Prediction
- %br (Confidence)
- %tr
- %td
- %img{:src => "http://cactus.nci.nih.gov/chemical/structure/#{URI.encode(@compound.smiles)}/image", :alt => "#{@compound.smiles}"}
- %td
- = '-' if @measured_activity.nil?
- = @measured_activity
- %td
- - if @classification.nil?
- = '-' if @classification.nil?
- - else
- %br= @classification
+ %img{:src => @compound.image_uri, :alt => @compound.smiles}
+ %br= @identifier
+ - @predictions.each do |p|
+ %td
+ %b
+ = p[:title] + ":"
+ = p[:prediction]
%br
- (
- = sprintf("%.3f", @confidence.to_s.to_f)
- )
-
--
--#
--# %tr
--# %th{:colspan => 4} Neighbors
--# %tr
--# %th Structure
--# %th Similarity
--# %th Measured activity
--#
--# - @lazar['neighbors']['neighbor'].each do |neighbor|
--# %tr
--# %td
--# %img{:src => "http://cactus.nci.nih.gov/chemical/structure/#{URI.encode(neighbor['smiles'])}/image", :alt => "#{neighbor['smiles']}"}
--# %td=# neighbor['similarity']
--# %td=# neighbor['activity']
-
--# %a{:href => "/neighbors", :lazar => @lazar } Show neighbors
+ Confidence:
+ = p[:confidence]