diff options
author | gebele <gebele@in-silico.ch> | 2013-09-27 16:55:28 +0200 |
---|---|---|
committer | gebele <gebele@in-silico.ch> | 2013-09-27 16:55:28 +0200 |
commit | e015957c317d311d0a579e68f8ff2f327a011fa3 (patch) | |
tree | c4b4576c92829c06c838e4540a22d5af2c2d0d4f /views | |
parent | da701f22287f855b499145c181106f3736392d47 (diff) |
use value map for sf
Diffstat (limited to 'views')
-rw-r--r-- | views/predict.haml | 67 | ||||
-rw-r--r-- | views/significant_fragments.haml | 15 |
2 files changed, 44 insertions, 38 deletions
diff --git a/views/predict.haml b/views/predict.haml index d515902..8831c56 100644 --- a/views/predict.haml +++ b/views/predict.haml @@ -71,20 +71,22 @@ - @detail_count = 0 // TODO order models by echa endpoint #endpoint - %b Acute toxicity to fish (lethality): - @models.each do |model| - model_title = model.title.split("_").last(2)[0] - - if model_title =~ /LC50/i + - model_t = model.title.gsub("_", " ") + - case model_title + - when /LC50/i + %b Acute toxicity to fish (lethality): - @detail_count +=1 %div{:id => model_title} %input{:type => "checkbox", :name => "selection[#{model_title}]", :id => "selection[#{model_title}]", :value => true, :disabled => false} %label{:for => "selection[#{model_title}]"} - = model.title.gsub("_", " ") + = model_t %a{:href=>"#details", :id => "linkDetails#{model_title}", :title=>"#{model_title} details", :style=>"font-size:small;"} [Details] :javascript - $("a#linkDetails#{@detail_count}").click(function () { + $("a#linkDetails#{model_title}").click(function () { $("#details_#{@detail_count}").toggle(); //document.location = document.location + "#" + "details"; }); @@ -94,30 +96,29 @@ //%p= "Training Dataset:\t#{model[RDF::OT.trainingDataset]}" %p Algorithm: Lazar %p Type: regression - %p Training compounds: integer - %p Descriptors: Fminer + %p Training compounds: 580 + %p{:style=>"display:inline;"} Descriptors: + %a{:href=>"https://services.in-silico.ch/algorithm/descriptor/physchem", :title=>"link opens in new window.", :target=>"_blank"} Physico-chemical (PC)properties //%p= "Training Dataset:\t#{model[RDF::OT.trainingDataset]}" //%p= "Feature Dataset:\t#{model[RDF::OT.featureDataset]}" - %h3 Validation: - %a{:href => "#"} + /%h3 Validation: + -#%a{:href => "#"} Detailed report link - %p Number of predictions: integer - %p Correct predictions: % - %br - %b Carcinogenicity: - - @models.each do |model| - - model_title = model.title.split("_").last(2)[0] - - if model_title =~ /hamster|rodent/i + /%p Number of predictions: integer + /%p Correct predictions: % + - when /hamster/i + %br + %b Carcinogenicity: - @detail_count +=1 %div{:id => model_title} %input{:type => "checkbox", :name => "selection[#{model_title}]", :id => "selection[#{model_title}]", :value => true, :disabled => false} %label{:for => "selection[#{model_title}]"} = model.title.gsub("_", " ") - %a{:href=>"#details", :id => "linkDetails#{@detail_count}", :title=>"#{model_title} details", :style=>"font-size:small;"} + %a{:href=>"#details", :id => "linkDetails#{model_title}", :title=>"#{model_title} details", :style=>"font-size:small;"} [Details] :javascript - $("a#linkDetails#{@detail_count}").click(function () { + $("a#linkDetails#{model_title}").click(function () { $("#details_#{@detail_count}").toggle(); //document.location = document.location + "#" + "details"; }); @@ -127,21 +128,20 @@ //%p= "Training Dataset:\t#{model[RDF::OT.trainingDataset]}" %p Algorithm: Lazar %p Type: classification - %p Training compounds: integer - %p Descriptors: Fminer + %p Training compounds: 86 + %p{:style=>"display:inline;"} Descriptors: + %a{:href=>"http://www.maunz.de/libfminer2-bbrc-doc/", :title=>"link opens in new window.", :target=>"_blank"} Fminer backbone refinement classes //%p= "Training Dataset:\t#{model[RDF::OT.trainingDataset]}" //%p= "Feature Dataset:\t#{model[RDF::OT.featureDataset]}" %h3 Validation: - %a{:href => "#"} + %a{:href => "http://lazar-services.in-silico.ch/validation/report/crossvalidation/22", :title=>"Link opens in new window.", :target=>"_blank"} Detailed report link - %p Number of predictions: integer - %p Correct predictions: % + /%p Number of predictions: integer + /%p Correct predictions: % %br - %br - %b Mutagenicity: - - @models.each do |model| - - model_title = model.title.split("_").last(2)[0] - - if model_title =~ /Mutagenicity/i + - when /mutagenicity/i + %br + %b Mutagenicity: - @detail_count +=1 %div{:id => model_title} %input{:type => "checkbox", :name => "selection[#{model_title}]", :id => "selection[#{model_title}]", :value => true, :disabled => false} @@ -151,7 +151,7 @@ [Details] :javascript - $("a#linkDetails#{@detail_count}").click(function () { + $("a#linkDetails#{model_title}").click(function () { $("#details_#{@detail_count}").toggle(); //document.location = document.location + "#" + "details"; }); @@ -161,15 +161,16 @@ //%p= "Training Dataset:\t#{model[RDF::OT.trainingDataset]}" %p Algorithm: Lazar %p Type: classification - %p Training compounds: integer - %p Descriptors: Fminer + %p Training compounds: 828 + %p{:style=>"display:inline;"} Descriptors: + %a{:href=>"http://www.maunz.de/libfminer2-bbrc-doc/", :title=>"link opens in new window.", :target=>"_blank"} Fminer backbone refinement classes //%p= "Training Dataset:\t#{model[RDF::OT.trainingDataset]}" //%p= "Feature Dataset:\t#{model[RDF::OT.featureDataset]}" %h3 Validation: - %a{:href => "#"} + %a{:href => "http://lazar-services.in-silico.ch/validation/report/crossvalidation/25", :title=>"Link opens in new window.", :target=>"_blank"} Detailed report link - %p Number of predictions: integer - %p Correct predictions: % + /%p Number of predictions: integer + /%p Correct predictions: % %br diff --git a/views/significant_fragments.haml b/views/significant_fragments.haml index 5bb4c31..7301f53 100644 --- a/views/significant_fragments.haml +++ b/views/significant_fragments.haml @@ -12,17 +12,22 @@ - if !@significant_fragments.empty? %table{:id => "sf1"} %tr + / @value_map => hash; interpret the effect %th{:style=>"border:2px solid #E6E6E6;"} - Predominantly in compounds with activity "non-active" + Predominantly in compounds with activity "inactive" %th{:style=>"border:2px solid #E6E6E6;"} p value - @significant_fragments.each do |fragments| - / fragments == [1||2, smarts, pValue] - - if fragments[0] == 1 + / fragments == [effect, smarts, pValue] + / fragments[0] = effect + /- $logger.debug "effect:\t#{fragments[0]}\n" + - if fragments[0] == @value_map.index("inactive") %tr %td + / fragments[1] = smarts = fragments[1] %td + /fragments[2] = pValue = fragments[2] %tr %td @@ -33,8 +38,8 @@ %th{:style=>"border:2px solid #E6E6E6;"} p value - @significant_fragments.each do |fragments| - / fragments == [1||2, smarts, pValue] - - if fragments[0] == 2 + / fragments == [effect, smarts, pValue] + - if fragments[0] == @value_map.index("active") %tr %td = fragments[1] |