From b3ed4f0dbf47ed4986b7ff745324fbde20123631 Mon Sep 17 00:00:00 2001 From: gebele Date: Mon, 27 Aug 2018 11:33:10 +0000 Subject: updated to bs 4 --- views/prediction.haml | 193 ++++++++++++++++++++++++++------------------------ 1 file changed, 99 insertions(+), 94 deletions(-) (limited to 'views/prediction.haml') diff --git a/views/prediction.haml b/views/prediction.haml index 4181c22..1cddca6 100644 --- a/views/prediction.haml +++ b/views/prediction.haml @@ -1,95 +1,111 @@ :javascript $(document).ready(function(){ - $('[data-toggle="popover"]').popover(); + //$('[data-toggle="popover"]').popover(); $('.modal').on('hidden.bs.modal', function () { $(this).removeData('bs.modal'); }); + $('.modal').on('show.bs.modal', function(e){ + var button = $(e.relatedTarget); + var modal = $(this); + modal.find('.modal-content').load(button.data("remote")); + }); }); - -%div.well +%div.card %a.btn.btn-warning{:href => to('/predict')} - %i.glyphicon.glyphicon-menu-left + %span.fa.fa-caret-left New Prediction - / displays all prediction result in first table - %h3 Prediction Results: - %div.table-responsive - %table.table.table-bordered{:id=>"overview"} - %tbody - %tr - %td{:id=>"compound", :style=>"vertical-align:top;text-align:center;"} - %a.btn.btn-link{:href => "#details0", data: { toggle: "modal", remote: to("/prediction/#{CGI.escape(@compound.id.to_s)}/details"), :id=>"link01"}} - = @compound.svg - %p= @compound.smiles - - @model_types = {} - - @dbhit = {} - - @predictions.each_with_index do |prediction,i| - - type = @models[i].model.class.to_s.match("Classification") ? "Classification" : "Regression" - - @model_types[i] = type - - unit = @models[i].unit - %td{:style=>"vertical-align:top;white-space:nowrap;"} - %b{:class => "title"} - = "#{@models[i].endpoint.gsub('_', ' ')} (#{@models[i].species})" - - / check for prediction - - if prediction[:neighbors] and !prediction[:value].nil? - %p - / show model type (classification|regression) - %b Type: - = type - %p - / check for database hit - - if prediction[:info] =~ /\b(identical)\b/i - - @dbhit[i] = true - - / show message about dbhit and measurements +%div.card.bg-light + %div.card-body + %h3.card-title Prediction Results: + %div.table-responsive + %table.table.table-bordered{:id=>"overview"} + %tbody + %tr + %td.align-items-center{:id=>"compound"} + %a.btn.btn-link{:href => "#details0", data: { toggle: "modal", remote: to("/prediction/#{@compound.id}/details"), :id=>"link01"}} + = @compound.svg + %p= @compound.smiles + - @model_types = {} + - @dbhit = {} + - @predictions.each_with_index do |prediction,i| + - type = @models[i].model.class.to_s.match("Classification") ? "Classification" : "Regression" + - @model_types[i] = type + - unit = @models[i].unit + %td + %b{:class => "title"} + = "#{@models[i].endpoint.gsub('_', ' ')} (#{@models[i].species})" + + / check for prediction + - if prediction[:neighbors] and !prediction[:value].nil? %p - :plain - This compound was part of the training dataset. All information
- from this compound was removed from the training data before the
- prediction, to obtain unbiased results. + / show model type (classification|regression) + %b Type: + = type + %p + / check for database hit + - if prediction[:info] =~ /\b(identical)\b/i + - @dbhit[i] = true + + / show message about dbhit and measurements %p - %b Measured activity: - %br - - if prediction[:measurements].is_a?(Array) - = (type == "Regression") ? prediction[:measurements].collect{|value| "#{value.delog10.signif(3)} (#{unit})
#{@compound.mmol_to_mg(value.delog10).signif(3)} #{unit =~ /mmol\/L/ ? "(mg/L)" : "(mg/kg_bw/day)"}"}.join("
") : prediction[:measurements].join(", ") - - else - = (type == "Regression") ? "#{prediction[:measurements].delog10.signif(3)} (#{unit})
#{@compound.mmol_to_mg(prediction[:measurements].delog10).signif(3)} #{(unit =~ /\b(mmol\/L)\b/) ? "(mg/L)" : "(mg/kg_bw/day)"}" : prediction[:measurements] - - - else - - @dbhit[i] = false - - / show prediction - %p - %b Prediction: - / prediction popover - %a.btn.glyphicon.glyphicon-info-sign{:href=>"javascript:void(0)", :title=>"Prediction", :tabindex=>"0", data: {trigger:"focus", toggle:"popover", placement:"left", html:"true", content:"

lazar searches the training dataset for similar compounds (neighbors) and calculates the prediction from their experimental activities.

Classification:
Majority vote of neighbor activities weighted by similarity.

Regression:
Prediction from a local partial least squares regression model with neighbor activities weighted by similarity.

Original publication.


\"DOI\""}} - %br - = (type == "Regression") ? "#{prediction[:value].delog10.signif(3)} (#{unit})
#{@compound.mmol_to_mg(prediction[:value].delog10).signif(3)} #{(unit =~ /\b(mmol\/L)\b/) ? "(mg/L)" : "(mg/kg_bw/day)"}" : prediction[:value] + :plain + This compound was part of the training dataset. All information
+ from this compound was removed from the training data before the
+ 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})
#{@compound.mmol_to_mg(value.delog10).signif(3)} #{unit =~ /mmol\/L/ ? "(mg/L)" : "(mg/kg_bw/day)"}"}.join("
") : prediction[:measurements].join(", ") + - else + = (type == "Regression") ? "#{prediction[:measurements].delog10.signif(3)} (#{unit})
#{@compound.mmol_to_mg(prediction[:measurements].delog10).signif(3)} #{(unit =~ /\b(mmol\/L)\b/) ? "(mg/L)" : "(mg/kg_bw/day)"}" : prediction[:measurements] - / show prediction interval or probability + - else + - @dbhit[i] = false + + / show prediction %p - - if type == "Regression" - %b 95% Prediction interval: - - interval = (prediction[:prediction_interval].nil? ? nil : prediction[:prediction_interval]) - / prediction interval popover - %a.btn.glyphicon.glyphicon-info-sign{:href=>"javascript:void(0)", :title=>"Prediction intervall", :tabindex=>"0", data: {trigger:"focus", toggle:"popover", placement:"left", html:"true", content:"An estimate of prediction uncertainty. The \"real\" value should be with 95% probability within the prediction interval."}} - %br - = interval.nil? ? "--" : "#{interval[1].delog10.signif(3)} - #{interval[0].delog10.signif(3)} (#{unit})" + %b Prediction: + / prediction popover + %a.btn.fa.fa-info-circle{:href=>"javascript:void(0)", :title=>"Prediction", :tabindex=>"0", data: {trigger:"focus", toggle:"popover", placement:"left", html:"true", content:"

lazar searches the training dataset for similar compounds (neighbors) and calculates the prediction from their experimental activities.

Classification:
Majority vote of neighbor activities weighted by similarity.

Regression:
Prediction from a local partial least squares regression model with neighbor activities weighted by similarity.

Original publication.


\"DOI\""}} %br - = "#{@compound.mmol_to_mg(interval[1].delog10).signif(3)} - #{@compound.mmol_to_mg(interval[0].delog10).signif(3)} #{(unit =~ /\b(mmol\/L)\b/) ? "(mg/L)" : "(mg/kg_bw/day)"}" if !interval.nil? - - else - %b Probability: - / probability popover - %a.btn.glyphicon.glyphicon-info-sign{:href=>"javascript:void(0)", :title=>"Pobability", :tabindex=>"0", data: {trigger:"focus", toggle:"popover", placement:"left", html:"true", content:"Probability that the prediction belongs to one of the given classes."}} - - unless prediction[:probabilities].nil? + = (type == "Regression") ? "#{prediction[:value].delog10.signif(3)} (#{unit})
#{@compound.mmol_to_mg(prediction[:value].delog10).signif(3)} #{(unit =~ /\b(mmol\/L)\b/) ? "(mg/L)" : "(mg/kg_bw/day)"}" : prediction[:value] + + / show prediction interval or probability + %p + - if type == "Regression" + %b 95% Prediction interval: + - interval = (prediction[:prediction_interval].nil? ? nil : prediction[:prediction_interval]) + / prediction interval popover + %a.btn.fa.fa-info-circle{:href=>"javascript:void(0)", :title=>"Prediction intervall", :tabindex=>"0", data: {trigger:"focus", toggle:"popover", placement:"left", html:"true", content:"An estimate of prediction uncertainty. The \"real\" value should be with 95% probability within the prediction interval."}} %br - = "#{prediction[:probabilities].keys[0]}: #{prediction[:probabilities].values[0].signif(3)}" - - if prediction[:probabilities].size == 2 + = interval.nil? ? "--" : "#{interval[1].delog10.signif(3)} - #{interval[0].delog10.signif(3)} (#{unit})" + %br + = "#{@compound.mmol_to_mg(interval[1].delog10).signif(3)} - #{@compound.mmol_to_mg(interval[0].delog10).signif(3)} #{(unit =~ /\b(mmol\/L)\b/) ? "(mg/L)" : "(mg/kg_bw/day)"}" if !interval.nil? + - else + %b Probability: + / probability popover + %a.btn.fa.fa-info-circle{:href=>"javascript:void(0)", :title=>"Pobability", :tabindex=>"0", data: {trigger:"focus", toggle:"popover", placement:"left", html:"true", content:"Probability that the prediction belongs to one of the given classes."}} + - unless prediction[:probabilities].nil? %br - = "#{prediction[:probabilities].keys[1]}: #{prediction[:probabilities].values[1].signif(3)}" - - / show warnings and info - %p + = "#{prediction[:probabilities].keys[0]}: #{prediction[:probabilities].values[0].signif(3)}" + - if prediction[:probabilities].size == 2 + %br + = "#{prediction[:probabilities].keys[1]}: #{prediction[:probabilities].values[1].signif(3)}" + + / show warnings and info + %p + - if !prediction[:info].blank? + %b Info: + %br + %p=prediction[:info].sub(/\'.*\'/,"").sub(/,/, ",
") + - if !prediction[:warnings].blank? + %b Warnings: + - prediction[:warnings].uniq.each do |warning| + %p=warning #.sub(/,/, ",
") + /%p=warning.sub(/substances/, "substances
").sub(/prediction\:/, "prediction\:
") + - else + %br - if !prediction[:info].blank? %b Info: %br @@ -97,24 +113,13 @@ - if !prediction[:warnings].blank? %b Warnings: - prediction[:warnings].uniq.each do |warning| - %p=warning #.sub(/,/, ",
") - /%p=warning.sub(/substances/, "substances
").sub(/prediction\:/, "prediction\:
") - - else - %br - - if !prediction[:info].blank? - %b Info: - %br - %p=prediction[:info].sub(/\'.*\'/,"").sub(/,/, ",
") - - if !prediction[:warnings].blank? - %b Warnings: - - prediction[:warnings].uniq.each do |warning| - %br - %p=warning.sub(/,/, ",
") + %br + %p=warning.sub(/,/, ",
") - / always show the neighbors table, message is given there - = haml :neighbors, :layout => false, :model_type => @model_types, :dbhit => @dbhit +/ always show the neighbors table, message is given there += haml :neighbors, :layout => false, :model_type => @model_types, :dbhit => @dbhit -%div.modal.fade{:id=>"details0", :role=>"dialog"} - %div.modal-dialog.modal-lg +%div.modal.fade{:id=>"details0", :tabindex=>"-1", :role=>"dialog"} + %div.modal-dialog.modal-lg{:role=>"document"} %div.modal-content -- cgit v1.2.3 From e3ae34a75ed7a503078c3c2cdf95f1500d6e2b73 Mon Sep 17 00:00:00 2001 From: gebele Date: Mon, 27 Aug 2018 13:36:06 +0000 Subject: reactivate popover --- views/prediction.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'views/prediction.haml') diff --git a/views/prediction.haml b/views/prediction.haml index 1cddca6..47e83fa 100644 --- a/views/prediction.haml +++ b/views/prediction.haml @@ -1,6 +1,6 @@ :javascript $(document).ready(function(){ - //$('[data-toggle="popover"]').popover(); + $('[data-toggle="popover"]').popover(); $('.modal').on('hidden.bs.modal', function () { $(this).removeData('bs.modal'); }); -- cgit v1.2.3 From 5a3be4190688bc8240327930b3e953b09ecc9d9e Mon Sep 17 00:00:00 2001 From: gebele Date: Tue, 28 May 2019 14:25:52 +0000 Subject: before clean up --- views/prediction.haml | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) (limited to 'views/prediction.haml') diff --git a/views/prediction.haml b/views/prediction.haml index 47e83fa..2a315f9 100644 --- a/views/prediction.haml +++ b/views/prediction.haml @@ -16,14 +16,14 @@ New Prediction %div.card.bg-light %div.card-body - %h3.card-title Prediction Results: + %h3.card-title Prediction: %div.table-responsive %table.table.table-bordered{:id=>"overview"} %tbody %tr %td.align-items-center{:id=>"compound"} %a.btn.btn-link{:href => "#details0", data: { toggle: "modal", remote: to("/prediction/#{@compound.id}/details"), :id=>"link01"}} - = @compound.svg + = embedded_svg(@compound.svg, :title=>"click for details") %p= @compound.smiles - @model_types = {} - @dbhit = {} @@ -71,9 +71,9 @@ %br = (type == "Regression") ? "#{prediction[:value].delog10.signif(3)} (#{unit})
#{@compound.mmol_to_mg(prediction[:value].delog10).signif(3)} #{(unit =~ /\b(mmol\/L)\b/) ? "(mg/L)" : "(mg/kg_bw/day)"}" : prediction[:value] - / show prediction interval or probability + / show prediction interval or probability + - if type == "Regression" %p - - if type == "Regression" %b 95% Prediction interval: - interval = (prediction[:prediction_interval].nil? ? nil : prediction[:prediction_interval]) / prediction interval popover @@ -82,7 +82,12 @@ = interval.nil? ? "--" : "#{interval[1].delog10.signif(3)} - #{interval[0].delog10.signif(3)} (#{unit})" %br = "#{@compound.mmol_to_mg(interval[1].delog10).signif(3)} - #{@compound.mmol_to_mg(interval[0].delog10).signif(3)} #{(unit =~ /\b(mmol\/L)\b/) ? "(mg/L)" : "(mg/kg_bw/day)"}" if !interval.nil? - - else + %p + %b Confidence: + %br + = prediction[:confidence] + - else + %p %b Probability: / probability popover %a.btn.fa.fa-info-circle{:href=>"javascript:void(0)", :title=>"Pobability", :tabindex=>"0", data: {trigger:"focus", toggle:"popover", placement:"left", html:"true", content:"Probability that the prediction belongs to one of the given classes."}} @@ -92,6 +97,10 @@ - if prediction[:probabilities].size == 2 %br = "#{prediction[:probabilities].keys[1]}: #{prediction[:probabilities].values[1].signif(3)}" + %p + %b Confidence: + %br + = prediction[:confidence] / show warnings and info %p -- cgit v1.2.3 From be9d7e0dd360328d3ef7db77128527c40819cc1c Mon Sep 17 00:00:00 2001 From: gebele Date: Mon, 17 Jun 2019 10:21:24 +0000 Subject: add PubChem links for compound cid --- views/prediction.haml | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'views/prediction.haml') diff --git a/views/prediction.haml b/views/prediction.haml index 2a315f9..23d27ba 100644 --- a/views/prediction.haml +++ b/views/prediction.haml @@ -25,6 +25,10 @@ %a.btn.btn-link{:href => "#details0", data: { toggle: "modal", remote: to("/prediction/#{@compound.id}/details"), :id=>"link01"}} = embedded_svg(@compound.svg, :title=>"click for details") %p= @compound.smiles + %p + %a{:href=>PUBCHEM_CID_URI+@compound.cid, :rel => "external"} + PubChem + %span.fa.fa-xs.fa-external-link - @model_types = {} - @dbhit = {} - @predictions.each_with_index do |prediction,i| -- cgit v1.2.3 From 091e0c3d84223bb7513c88cbac103d0aaee1a32c Mon Sep 17 00:00:00 2001 From: gebele Date: Mon, 17 Jun 2019 14:20:54 +0000 Subject: show only last warning --- views/prediction.haml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'views/prediction.haml') diff --git a/views/prediction.haml b/views/prediction.haml index 23d27ba..a7bd982 100644 --- a/views/prediction.haml +++ b/views/prediction.haml @@ -113,10 +113,10 @@ %br %p=prediction[:info].sub(/\'.*\'/,"").sub(/,/, ",
") - if !prediction[:warnings].blank? + - warning = prediction[:warnings].last %b Warnings: - - prediction[:warnings].uniq.each do |warning| - %p=warning #.sub(/,/, ",
") - /%p=warning.sub(/substances/, "substances
").sub(/prediction\:/, "prediction\:
") + %br + %p=warning#.sub(/,/, ",
") - else %br - if !prediction[:info].blank? @@ -124,10 +124,10 @@ %br %p=prediction[:info].sub(/\'.*\'/,"").sub(/,/, ",
") - if !prediction[:warnings].blank? + - warning = prediction[:warnings].last %b Warnings: - - prediction[:warnings].uniq.each do |warning| - %br - %p=warning.sub(/,/, ",
") + %br + %p=warning#.sub(/,/, ",
") / always show the neighbors table, message is given there = haml :neighbors, :layout => false, :model_type => @model_types, :dbhit => @dbhit -- cgit v1.2.3 From 86a45822c29cef7fb84871416427f96782e4ecf5 Mon Sep 17 00:00:00 2001 From: gebele Date: Fri, 5 Jul 2019 08:26:18 +0000 Subject: reorder validation statistics --- views/prediction.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'views/prediction.haml') diff --git a/views/prediction.haml b/views/prediction.haml index a7bd982..bde2397 100644 --- a/views/prediction.haml +++ b/views/prediction.haml @@ -11,7 +11,7 @@ }); }); %div.card - %a.btn.btn-warning{:href => to('/predict')} + %a.btn.btn-outline-info{:href => to('/predict')} %span.fa.fa-caret-left New Prediction %div.card.bg-light -- cgit v1.2.3 From 5490f6214f3a22216f7980c7d46f6d9fe10a4924 Mon Sep 17 00:00:00 2001 From: gebele Date: Thu, 11 Jul 2019 15:59:13 +0000 Subject: simplify js code;reorder js code; --- views/prediction.haml | 12 ------------ 1 file changed, 12 deletions(-) (limited to 'views/prediction.haml') diff --git a/views/prediction.haml b/views/prediction.haml index bde2397..fe1e487 100644 --- a/views/prediction.haml +++ b/views/prediction.haml @@ -1,15 +1,3 @@ -:javascript - $(document).ready(function(){ - $('[data-toggle="popover"]').popover(); - $('.modal').on('hidden.bs.modal', function () { - $(this).removeData('bs.modal'); - }); - $('.modal').on('show.bs.modal', function(e){ - var button = $(e.relatedTarget); - var modal = $(this); - modal.find('.modal-content').load(button.data("remote")); - }); - }); %div.card %a.btn.btn-outline-info{:href => to('/predict')} %span.fa.fa-caret-left -- cgit v1.2.3 From 87fc7e8997306f7edb74d5282ad337c5c3c48b1c Mon Sep 17 00:00:00 2001 From: gebele Date: Thu, 18 Jul 2019 13:55:40 +0000 Subject: removed awstats;model details without separation buttons;restructured details table;adjust info with warning;reordered positive first --- views/prediction.haml | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) (limited to 'views/prediction.haml') diff --git a/views/prediction.haml b/views/prediction.haml index fe1e487..3631f10 100644 --- a/views/prediction.haml +++ b/views/prediction.haml @@ -13,10 +13,11 @@ %a.btn.btn-link{:href => "#details0", data: { toggle: "modal", remote: to("/prediction/#{@compound.id}/details"), :id=>"link01"}} = embedded_svg(@compound.svg, :title=>"click for details") %p= @compound.smiles - %p - %a{:href=>PUBCHEM_CID_URI+@compound.cid, :rel => "external"} - PubChem - %span.fa.fa-xs.fa-external-link + - if @compound.cid && @compound.cid != "0" + %p + %a{:href=>PUBCHEM_CID_URI+@compound.cid, :rel => "external"} + PubChem + %span.fa.fa-xs.fa-external-link - @model_types = {} - @dbhit = {} - @predictions.each_with_index do |prediction,i| @@ -93,25 +94,25 @@ %b Confidence: %br = prediction[:confidence] - + / show warnings and info %p - - if !prediction[:info].blank? + - unless @dbhit[i] || prediction[:info].blank? %b Info: %br %p=prediction[:info].sub(/\'.*\'/,"").sub(/,/, ",
") - - if !prediction[:warnings].blank? + - unless prediction[:warnings].blank? - warning = prediction[:warnings].last %b Warnings: %br %p=warning#.sub(/,/, ",
") - else %br - - if !prediction[:info].blank? + - unless @dbhit[i] || prediction[:info].blank? %b Info: %br %p=prediction[:info].sub(/\'.*\'/,"").sub(/,/, ",
") - - if !prediction[:warnings].blank? + - unless prediction[:warnings].blank? - warning = prediction[:warnings].last %b Warnings: %br -- cgit v1.2.3 From 1546e77e9b2796f20215caa23f06822c96be27ee Mon Sep 17 00:00:00 2001 From: gebele Date: Mon, 5 Aug 2019 09:48:54 +0000 Subject: ensure xhr requests are https to avoid mixed content issue in browsers --- views/prediction.haml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'views/prediction.haml') diff --git a/views/prediction.haml b/views/prediction.haml index 3631f10..19f5caf 100644 --- a/views/prediction.haml +++ b/views/prediction.haml @@ -1,5 +1,5 @@ %div.card - %a.btn.btn-outline-info{:href => to('/predict')} + %a.btn.btn-outline-info{:href => "//#{ENV['VIRTUAL_HOST']}/predict"} %span.fa.fa-caret-left New Prediction %div.card.bg-light @@ -10,7 +10,7 @@ %tbody %tr %td.align-items-center{:id=>"compound"} - %a.btn.btn-link{:href => "#details0", data: { toggle: "modal", remote: to("/prediction/#{@compound.id}/details"), :id=>"link01"}} + %a.btn.btn-link{:href => "#details0", data: { toggle: "modal", remote: "//#{ENV['VIRTUAL_HOST']}/prediction/#{@compound.id}/details", :id=>"link01"}} = embedded_svg(@compound.svg, :title=>"click for details") %p= @compound.smiles - if @compound.cid && @compound.cid != "0" -- cgit v1.2.3 From 270bddf5081671cd1905d6cce6eb3659159f573a Mon Sep 17 00:00:00 2001 From: gebele Date: Fri, 16 Aug 2019 09:49:53 +0000 Subject: change hostname method --- views/prediction.haml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'views/prediction.haml') diff --git a/views/prediction.haml b/views/prediction.haml index 19f5caf..44d5fa8 100644 --- a/views/prediction.haml +++ b/views/prediction.haml @@ -1,5 +1,5 @@ %div.card - %a.btn.btn-outline-info{:href => "//#{ENV['VIRTUAL_HOST']}/predict"} + %a.btn.btn-outline-info{:href => "//#{$host_with_port}/predict"} %span.fa.fa-caret-left New Prediction %div.card.bg-light @@ -10,7 +10,7 @@ %tbody %tr %td.align-items-center{:id=>"compound"} - %a.btn.btn-link{:href => "#details0", data: { toggle: "modal", remote: "//#{ENV['VIRTUAL_HOST']}/prediction/#{@compound.id}/details", :id=>"link01"}} + %a.btn.btn-link{:href => "#details0", data: { toggle: "modal", remote: "//#{$host_with_port}/prediction/#{@compound.id}/details", :id=>"link01"}} = embedded_svg(@compound.svg, :title=>"click for details") %p= @compound.smiles - if @compound.cid && @compound.cid != "0" -- cgit v1.2.3