diff options
author | mr <mr@mrautenberg.de> | 2010-12-06 12:17:53 +0100 |
---|---|---|
committer | mr <mr@mrautenberg.de> | 2010-12-06 12:17:53 +0100 |
commit | 04c0b50d08292f2754e1d2a6ac00a644f251f593 (patch) | |
tree | fc3f4b8c4cb30c2982d4b9218e01dfb8098b9cac /views | |
parent | cd7fba8dea7a4db4f39b71d46b43e6ac944a0bc1 (diff) |
clean before merge
Diffstat (limited to 'views')
-rw-r--r-- | views/about.haml | 4 | ||||
-rw-r--r-- | views/create.haml | 17 | ||||
-rw-r--r-- | views/csv_format.haml | 19 | ||||
-rw-r--r-- | views/delete.haml | 25 | ||||
-rw-r--r-- | views/features.haml | 13 | ||||
-rw-r--r-- | views/layout.haml | 36 | ||||
-rw-r--r-- | views/predict.haml | 25 | ||||
-rw-r--r-- | views/prediction.haml | 16 | ||||
-rw-r--r-- | views/style.sass | 92 | ||||
-rw-r--r-- | views/tasks.haml | 21 | ||||
-rw-r--r-- | views/validation.haml | 264 |
11 files changed, 0 insertions, 532 deletions
diff --git a/views/about.haml b/views/about.haml deleted file mode 100644 index da0f836..0000000 --- a/views/about.haml +++ /dev/null @@ -1,4 +0,0 @@ -%p - A demonstration application for the - %a{:href => "http://www.opentox.org"} OpenTox - framework. diff --git a/views/create.haml b/views/create.haml deleted file mode 100644 index 9477210..0000000 --- a/views/create.haml +++ /dev/null @@ -1,17 +0,0 @@ -.upload - %form{ :action => url_for('/upload'), :method => "post", :enctype => "multipart/form-data" } - %ol - %li - %label{:for => 'endpoint'}Enter endpoint name: - %input{:type => 'text', :name => 'endpoint', :id => 'endpoint'} - %li - %label{:for => 'file'} - Upload training data in CSV format: - %input{:type => 'file', :name => 'file', :id => 'file'} - ( - = link_to "formatting instructions ", 'csv_format' - ) - %li - %input{ :type => "submit", :value => "Create model"} - = link_to "Cancel", 'create' - diff --git a/views/csv_format.haml b/views/csv_format.haml deleted file mode 100644 index 0943c2f..0000000 --- a/views/csv_format.haml +++ /dev/null @@ -1,19 +0,0 @@ -= link_to "Back to model creation", 'create' -%p - The input file should contain two columns, separated by a comma. Enter in the first column the chemical structure in - = link_to "SMILES", "http://en.wikipedia.org/wiki/Simplified_molecular_input_line_entry_specification" - format, in the second column the activity classification (1: active, 0: inactive). -%p Example: -%p - %code - %br CC(=O)Nc1ccc(O)cc1, 1 - %br O=c1[nH]cnc2[nH]ncc12, 1 - %br CCCCNc1cc(cc(c1Oc2ccccc2)S(=O)(=O)N)C(=O)O, 1 - %br CC(C)(C)NCC(O)COc1cccc2NC(=O)CCc12, 1 - %br CN(C)CCCC1(OCc2cc(C#N)ccc21)c3ccc(F)cc3, 1 - %br CCC(CC)CCN1C(=O)CN=C(C2CCCCC2F)c3cc(Cl)ccc13, 0 - %br CCN(CC)CC(=O)Nc1c(C)cccc1C, 0 - %br CC(C)(C)NCC(O)COc1cccc2CC(O)C(O)Cc12, 0 - %br CN1CCCC1c2cccnc2, 0 - -%p You can create input files in Excel and export them as CSV files with the "Save As" option from the menu, selecting the CSV (comma delimited) format. diff --git a/views/delete.haml b/views/delete.haml deleted file mode 100644 index 88457e0..0000000 --- a/views/delete.haml +++ /dev/null @@ -1,25 +0,0 @@ -%hr -%p - You are going to remove the - = @model['name'] - model permanently! -%p Enter your username/password if you are sure or cancel the operation. - -%form{ :action => "/#{params[:id]}", :method => "post" } - %input{:type => 'hidden', :name => "_method", :value => "delete"} - - %table - %tr - %th Username: - %td - %input{:type => "text", :name => "username"} - %tr - %th Password: - %td - %input{:type => "text", :name => "password"} - - %tr - %td - %input{:type => "submit", :value => "Delete"} - %td - %a{:href => '/'} Cancel diff --git a/views/features.haml b/views/features.haml deleted file mode 100644 index 55f53f3..0000000 --- a/views/features.haml +++ /dev/null @@ -1,13 +0,0 @@ -%a{:href => "create"}Select/create dataset -→ Select endpoint -%p Dataset #{@dataset_uri} contains more than one endpoint. -%p Please select an endpoint to predict: -%form{ :action => 'create', :method => "post" } - %input{:type => :hidden, :name => :dataset_uri, :value => @dataset_uri} - %p - %select{:name => "feature_uri"} - - @features.each do |uri,title| - %option{:value => uri} #{title} - %input{ :type => "submit", :value => "Select"} - %a{:href => 'create'} Cancel - diff --git a/views/layout.haml b/views/layout.haml deleted file mode 100644 index 5426c34..0000000 --- a/views/layout.haml +++ /dev/null @@ -1,36 +0,0 @@ -!!! -%html{:xmlns => "http://www.w3.org/1999/xhtml", "xml:lang" => "en", :lang => "en"} - - %head - %meta{'http-equiv' => 'Content-Type', :content => 'text/html'} - %title ToxModel - %link{:rel=>'stylesheet', :href=>'stylesheets/style.css', :type => "text/css"} - - %body - %h1 ToxModel - - .index - %ul - %li{:class => ("selected" if /create/ =~ request.path )} - = link_to "Create", "/create" - %li{:class => ("selected" if /predict/ =~ request.path )} - = link_to "Predict", "/predict" - %li{:class => ("selected" if /tasks/ =~ request.path )} - = link_to "Tasks", "/tasks" - %li{:class => ("selected" if /about/ =~ request.path )} - = link_to "About", "/about" - - .content - - - if flash[:notice] - .notice - = flash[:notice] - - = yield - - .footer - © - %a{:href => 'http://www.in-silico.ch'} in silico toxicology - 2009, powered by - %a{:href => 'http://www.opentox.org'} OpenTox - diff --git a/views/predict.haml b/views/predict.haml deleted file mode 100644 index 7c4b980..0000000 --- a/views/predict.haml +++ /dev/null @@ -1,25 +0,0 @@ -.upload - - unless @models.nil? - %form{ :action => url_for('/predict'), :method => "post", :enctype => "multipart/form-data" } - %ol - %li - %label{:for => 'identifier'}Enter a compound identifier: - %input{:type => 'text', :name => 'identifier', :id => 'identifier'} - (Name, InChI, Smiles, CAS, ...) - %li - %label{:for => 'model'}Choose one or more prediction models: - %ul - - @models.each do |model| - - yaml = RestClient.get model, :accept => 'application/x-yaml' - - yaml = YAML.load yaml - %br - -# %input{:type => 'checkbox', :name => 'model_uri', :value => model} - -# %input{:type => 'checkbox', :name => "selection[#{model}]", :value => true} - %input{:type => 'checkbox', :name => "selection[#{model}]", :value => true, :id => 'model'} - = yaml[:endpoint].split(/#/).last - - %li - %p - %input{ :type => "submit", :value => "Predict"} - = link_to 'Cancel', '/' - diff --git a/views/prediction.haml b/views/prediction.haml deleted file mode 100644 index aa84fee..0000000 --- a/views/prediction.haml +++ /dev/null @@ -1,16 +0,0 @@ -%p - = link_to "New prediction", "/predict" -.predictions - %table - %tr - %th - %img{:src => @compound.image_uri, :alt => @compound.smiles} - %br= @identifier - - @predictions.each do |p| - %td - %b - = p[:title] + ":" - = p[:prediction] - %br - Confidence: - = p[:confidence] diff --git a/views/style.sass b/views/style.sass deleted file mode 100644 index 4d29ddd..0000000 --- a/views/style.sass +++ /dev/null @@ -1,92 +0,0 @@ -!bg_color = #FFFFF3 -!fg_color = #36648B -!body_color = #ECF1EF -!text_color = black - -body - background-color = !body_color - color = !text_color - height: 100% - padding: 1em - - h1 - text-align: right - - .index - - ul - margin: 0 - padding: 0 - white-space: nowrap - list-style-type: none - - li - margin: 0 - padding: 0 - display: inline - border-right: 1px solid - color = !bg_color - border-top: 1px solid - color = !bg_color - background-color = !fg_color - padding-left: 0.5em - padding-right: 0.5em - - a - text-decoration: none - color = !bg_color - &:hover - color = !bg_color - - li.selected - font-weight: bolder - background-color= !bg_color - border: 1px solid - color = !fg_color - border-bottom: 1px solid - color = !bg_color - a - color = !fg_color - - - .content - background-color = !bg_color - height: 100% - padding: 0.5em - border: 1px solid - color = !fg_color - - .notice - background-color = !body_color - margin: 2% - padding: 1% - border: 1px solid red - - .upload - text-align: left - form - li - clear: left - label - width: 20em - float: left - margin-right: 0.5em - display: block - - .predictions - :text-align center - table - background-color: white - :border-spacing 0 - :border-collapse collapse - :margin 0 - :border 1px solid - - th - :border 0 - :margin 2% - td - :border 1px solid - :padding 2% - - .footer diff --git a/views/tasks.haml b/views/tasks.haml deleted file mode 100644 index 3de21b5..0000000 --- a/views/tasks.haml +++ /dev/null @@ -1,21 +0,0 @@ -%table - %tr - %th Task - %th Resource - %th Status - %th Started - %th Finished - - @tasks.each do |t| - -# This is inefficient - make only 1 query to the task service and save variables - %tr - %td= t.uri - %td= t.resource - %td= t.status - %td= t.created_at - %td= t.finished_at - -# %td - - case t.status - - when /created|started/ - %form{:name => "cancel", :action => url_for("/task/cancel"), :method => 'post'} - %input{:type => 'hidden', :name => 'uri', :value => t.uri} - %input{:type => "submit", :value => "Cancel"} diff --git a/views/validation.haml b/views/validation.haml deleted file mode 100644 index d1af379..0000000 --- a/views/validation.haml +++ /dev/null @@ -1,264 +0,0 @@ -= "-> " -%a{ :href => "/validation/#{params[:id]}" } Validation - -%h1 - = @model['name'].capitalize.gsub(/_/,' ') - validation - -Created on -= @model['created_at'] -by -= @model['user'] -( -%a{ :href => @model['validation']['details_uri'] } Prediction details -) - -%h3 Predictions weighted by confidence index -%p - %em Best indication of the overall performance - -%table - %tr - %th - True positive predictions - %td - tp - %td - = sprintf("%0.2f",@summary[:weighted][:tp].to_f) - %tr - %th - True negative predictions - %td - tn - %td - = sprintf("%0.2f",@summary[:weighted][:tn].to_f) - %tr - %th - False positive predictions - %td - fp - %td - = sprintf("%0.2f",@summary[:weighted][:fp].to_f) - %tr - %th - False negative predictions - %td - fn - %td - = sprintf("%0.2f",@summary[:weighted][:fn].to_f) - %tr - %th - Sensitivity (true positive rate) - %td - tp/(tp+fn) - %td - = (100*@summary[:weighted][:tp].to_f/(@summary[:weighted][:tp].to_f+@summary[:weighted][:fn].to_f)).round/100.00 - %tr - %th - Specificity (true negative rate) - %td - tn/(tn+fp) - %td - = (100*@summary[:weighted][:tn].to_f/(@summary[:weighted][:tn].to_f+@summary[:weighted][:fp].to_f).to_f).round/100.00 - %tr - %th - Positive predictivity - %td - tp/(tp+fp) - %td - = (100*@summary[:weighted][:tp].to_f/(@summary[:weighted][:tp].to_f+@summary[:weighted][:fp].to_f).to_f).round/100.00 - %tr - %th - Negative predictivity - %td - tn/(tn+fn) - %td - = (100*@summary[:weighted][:tn].to_f/(@summary[:weighted][:tn].to_f+@summary[:weighted][:fn].to_f).to_f).round/100.00 - %tr - %th - False positive rate - %td - fp/(tp+fn) - %td - = (100*@summary[:weighted][:fp].to_f/(@summary[:weighted][:tp].to_f+@summary[:weighted][:fn].to_f).to_f).round/100.00 - %tr - %th - False negative rate - %td - fn/(tn+fp) - %td - = (100*@summary[:weighted][:fn].to_f/(@summary[:weighted][:tn].to_f+@summary[:weighted][:fp].to_f).to_f).round/100.00 - %tr - %th - Accuracy (concordance) - %td - (tp+tn)/(tp+fp+tn+fn) - %th - = (100*(@summary[:weighted][:tp].to_f+@summary[:weighted][:tn].to_f)/(@summary[:weighted][:tp].to_f+@summary[:weighted][:tn].to_f+@summary[:weighted][:fn].to_f+@summary[:weighted][:fp].to_f).to_f).round/100.00 - - -%h3 Predictions within the applicability domain -%p - %em Hard cutoff at confidence > 0.025 - -%table - %tr - %th - True positive predictions - %td - tp - %td - = @summary[:within_ad][:tp].to_i - %tr - %th - True negative predictions - %td - tn - %td - = @summary[:within_ad][:tn].to_i - %tr - %th - False positive predictions - %td - fp - %td - = @summary[:within_ad][:fp].to_i - %tr - %th - False negative predictions - %td - fn - %td - = @summary[:within_ad][:fn].to_i - %tr - %th - Sensitivity (true positive rate) - %td - tp/(tp+fn) - %td - = (100*@summary[:within_ad][:tp].to_i/(@summary[:within_ad][:tp].to_i+@summary[:within_ad][:fn].to_i).to_f).round/100.00 - %tr - %th - Specificity (true negative rate) - %td - tn/(tn+fp) - %td - = (100*@summary[:within_ad][:tn].to_i/(@summary[:within_ad][:tn].to_i+@summary[:within_ad][:fp].to_i).to_f).round/100.00 - %tr - %th - Positive predictivity - %td - tp/(tp+fp) - %td - = (100*@summary[:within_ad][:tp].to_i/(@summary[:within_ad][:tp].to_i+@summary[:within_ad][:fp].to_i).to_f).round/100.00 - %tr - %th - Negative predictivity - %td - tn/(tn+fn) - %td - = (100*@summary[:within_ad][:tn].to_i/(@summary[:within_ad][:tn].to_i+@summary[:within_ad][:fn].to_i).to_f).round/100.00 - %tr - %th - False positive rate - %td - fp/(tp+fn) - %td - = (100*@summary[:within_ad][:fp].to_i/(@summary[:within_ad][:tp].to_i+@summary[:within_ad][:fn].to_i).to_f).round/100.00 - %tr - %th - False negative rate - %td - fn/(tn+fp) - %td - = (100*@summary[:within_ad][:fn].to_i/(@summary[:within_ad][:tn].to_i+@summary[:within_ad][:fp].to_i).to_f).round/100.00 - %tr - %th - Accuracy (concordance) - %td - (tp+tn)/(tp+fp+tn+fn) - %th - = (100*(@summary[:within_ad][:tp].to_i+@summary[:within_ad][:tn].to_i)/(@summary[:within_ad][:tp].to_i+@summary[:within_ad][:tn].to_i+@summary[:within_ad][:fn].to_i+@summary[:within_ad][:fp].to_i).to_f).round/100.00 - -%h3 All predictions -%p - %em Poor indication of the overall performance. Depends predominatly on the fraction of compounds within the applicability domain. - -%table - %tr - %th - True positive predictions - %td - tp - %td - = @summary[:all][:tp].to_i - %tr - %th - True negative predictions - %td - tn - %td - = @summary[:all][:tn].to_i - %tr - %th - False positive predictions - %td - fp - %td - = @summary[:all][:fp].to_i - %tr - %th - False negative predictions - %td - fn - %td - = @summary[:all][:fn].to_i - %tr - %th - Sensitivity (true positive rate) - %td - tp/(tp+fn) - %td - = (100*@summary[:all][:tp].to_i/(@summary[:all][:tp].to_i+@summary[:all][:fn].to_i).to_f).round/100.00 - %tr - %th - Specificity (true negative rate) - %td - tn/(tn+fp) - %td - = (100*@summary[:all][:tn].to_i/(@summary[:all][:tn].to_i+@summary[:all][:fp].to_i).to_f).round/100.00 - %tr - %th - Positive predictivity - %td - tp/(tp+fp) - %td - = (100*@summary[:all][:tp].to_i/(@summary[:all][:tp].to_i+@summary[:all][:fp].to_i).to_f).round/100.00 - %tr - %th - Negative predictivity - %td - tn/(tn+fn) - %td - = (100*@summary[:all][:tn].to_i/(@summary[:all][:tn].to_i+@summary[:all][:fn].to_i).to_f).round/100.00 - %tr - %th - False positive rate - %td - fp/(tp+fn) - %td - = (100*@summary[:all][:fp].to_i/(@summary[:all][:tp].to_i+@summary[:all][:fn].to_i).to_f).round/100.00 - %tr - %th - False negative rate - %td - fn/(tn+fp) - %td - = (100*@summary[:all][:fn].to_i/(@summary[:all][:tn].to_i+@summary[:all][:fp].to_i).to_f).round/100.00 - %tr - %th - Accuracy (concordance) - %td - (tp+tn)/(tp+fp+tn+fn) - %th - = (100*(@summary[:all][:tp].to_i+@summary[:all][:tn].to_i)/(@summary[:all][:tp].to_i+@summary[:all][:tn].to_i+@summary[:all][:fn].to_i+@summary[:all][:fp].to_i).to_f).round/100.00 |