From 58bf485d18fc94e86365e03f24a62cb46977bd50 Mon Sep 17 00:00:00 2001 From: Christoph Helma Date: Tue, 31 May 2011 11:10:18 +0000 Subject: regression example dataset added --- views/help.haml | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) (limited to 'views') diff --git a/views/help.haml b/views/help.haml index 3d39641..4882380 100644 --- a/views/help.haml +++ b/views/help.haml @@ -85,8 +85,14 @@ %td 0 %p - Excel example file for download: - = link_to "hamster_carcinogenicity.xls", "/hamster_carcinogenicity.xls" + Excel examples for download: + %ul + %li + = link_to "hamster_carcinogenicity.xls", "/hamster_carcinogenicity.xls" + (classification) + %li + = link_to "EPAFHM.xls", "/EPAFHM.xls" + (regression) %h3 CSV example @@ -104,7 +110,13 @@ %br CN1CCCC1c2cccnc2, 0 %p - CSV example for download: - = link_to "hamster_carcinogenicity.csv", "/hamster_carcinogenicity.csv" + CSV examples for download: + %ul + %li + = link_to "hamster_carcinogenicity.csv", "/hamster_carcinogenicity.csv" + (classification) + %li + = link_to "EPAFHM.csv", "/EPAFHM.csv" + (regression) %p You can create CSV files in Excel: Create a sheet with two columns and export them as CSV file with the "Save As" option from the menu, selecting the CSV (comma delimited) format. -- cgit v1.2.3 From 305aa1146692f7b9a5c278f3cd4d0a843a1755bd Mon Sep 17 00:00:00 2001 From: mr Date: Thu, 16 Jun 2011 14:06:38 +0200 Subject: external links for classification validation --- views/classification_validation.haml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'views') diff --git a/views/classification_validation.haml b/views/classification_validation.haml index 41362ba..5649d7f 100644 --- a/views/classification_validation.haml +++ b/views/classification_validation.haml @@ -3,17 +3,17 @@ = sprintf("%.2f", model.correct_predictions.to_f) if model.correct_predictions = '%' %dt - %a{:href => "http://en.wikipedia.org/wiki/Receiver_operating_characteristic", :target => "_blank"} Weighted area under ROC: + %a{:href => "http://en.wikipedia.org/wiki/Receiver_operating_characteristic", :rel => "external"} Weighted area under ROC: %dd = sprintf("%.3f", model.weighted_area_under_roc.to_f) if model.weighted_area_under_roc %dt - %a{:href => "http://en.wikipedia.org/wiki/Sensitivity_and_specificity", :target => "_blank"} Specificity: + %a{:href => "http://en.wikipedia.org/wiki/Sensitivity_and_specificity", :rel => "external"} Specificity: %dd= sprintf("%.3f", model.specificity.to_f) if model.specificity %dt - %a{:href => "http://en.wikipedia.org/wiki/Sensitivity_and_specificity", :target => "_blank"} Sensitivity: + %a{:href => "http://en.wikipedia.org/wiki/Sensitivity_and_specificity", :rel => "external"} Sensitivity: %dd= sprintf("%.3f", model.sensitivity.to_f) if model.sensitivity %dt - %a{:href => "http://en.wikipedia.org/wiki/Confusion_matrix", :target => "_blank"} Confusion Matrix: + %a{:href => "http://en.wikipedia.org/wiki/Confusion_matrix", :rel => "external"} Confusion Matrix: %dd %table %tr -- cgit v1.2.3 From d829934eb8dd69c5380d2582bdf4f20f0ad4500f Mon Sep 17 00:00:00 2001 From: mr Date: Thu, 16 Jun 2011 14:47:24 +0200 Subject: add GMT to time information --- views/model.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'views') diff --git a/views/model.haml b/views/model.haml index b4b3c59..d5fbb24 100644 --- a/views/model.haml +++ b/views/model.haml @@ -36,7 +36,7 @@ %br %dt Started: - %dd= Time.parse(model.created_at.to_s).strftime("%m/%d/%Y - %I:%M:%S%p") if model.created_at + %dd= Time.parse(model.created_at.to_s).strftime("%m/%d/%Y - %I:%M:%S%p GMT") if model.created_at - if model.nr_compounds %dt Training compounds: %dd= model.nr_compounds -- cgit v1.2.3 From fe98831689d9658d723acd1f6dc77d2804bcf7fa Mon Sep 17 00:00:00 2001 From: mr Date: Thu, 16 Jun 2011 15:03:58 +0200 Subject: replace GMT with %Z --- views/model.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'views') diff --git a/views/model.haml b/views/model.haml index d5fbb24..c64d81e 100644 --- a/views/model.haml +++ b/views/model.haml @@ -36,7 +36,7 @@ %br %dt Started: - %dd= Time.parse(model.created_at.to_s).strftime("%m/%d/%Y - %I:%M:%S%p GMT") if model.created_at + %dd= Time.parse(model.created_at.to_s).strftime("%m/%d/%Y - %I:%M:%S%p %Z") if model.created_at - if model.nr_compounds %dt Training compounds: %dd= model.nr_compounds -- cgit v1.2.3 From a6bc5cd38c6880653fc4f30d1418ca8f664c9379 Mon Sep 17 00:00:00 2001 From: mr Date: Thu, 16 Jun 2011 15:39:38 +0200 Subject: add notice if there are no models --- views/models.haml | 2 ++ 1 file changed, 2 insertions(+) (limited to 'views') diff --git a/views/models.haml b/views/models.haml index 6724807..9ab2858 100644 --- a/views/models.haml +++ b/views/models.haml @@ -21,3 +21,5 @@ - if @models - @models.each do |model| = haml :model, :locals=>{:model=>model,:subjectstring=>subjectstring}, :layout => false +-if @models.size == 0 + .notice There are currently no models. You have to create a model first. -- cgit v1.2.3 From 2e79dc191027651acdda0e63c32da78a9c33148b Mon Sep 17 00:00:00 2001 From: mguetlein Date: Mon, 11 Jul 2011 14:02:59 +0200 Subject: modify error handling in toxcreate model creation --- views/model.haml | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'views') diff --git a/views/model.haml b/views/model.haml index c64d81e..d54150d 100644 --- a/views/model.haml +++ b/views/model.haml @@ -43,6 +43,11 @@ - if model.error_messages %dt Errors: %dd= model.error_messages + - if CONFIG[:logger]=="debug" + %dt Task: + %dd + %a{:href => "#{model.task_uri}", :rel => "external"} + = model.task_uri - if model.warnings %dt Warnings: %a{:href => "#", :id => "show_model_#{model.id}_warnings"} show -- cgit v1.2.3 From 6505452f82c04017911e1ca1713c9fd08b775249 Mon Sep 17 00:00:00 2001 From: mr Date: Wed, 13 Jul 2011 16:13:42 +0200 Subject: fix invalid HTML --- views/model.haml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'views') diff --git a/views/model.haml b/views/model.haml index d54150d..d2637c8 100644 --- a/views/model.haml +++ b/views/model.haml @@ -50,8 +50,9 @@ = model.task_uri - if model.warnings %dt Warnings: - %a{:href => "#", :id => "show_model_#{model.id}_warnings"} show - %dd{:id => "model_#{model.id}_warnings", :style => "display: none;"}= model.warnings + %dd + %a{:href => "#", :id => "show_model_#{model.id}_warnings"} show + %div{:id => "model_#{model.id}_warnings", :style => "display: none;"}= model.warnings %dt Algorithm: %dd= toggle_link("#lazar_description","lazar") - if model.type -- cgit v1.2.3 From 46451d215e87c8009c95a894522cb44b214e0e57 Mon Sep 17 00:00:00 2001 From: mr Date: Fri, 15 Jul 2011 12:21:01 +0200 Subject: crossvalidation confusion matrix multinominal --- views/classification_validation.haml | 59 +++++++++++++++++++++--------------- 1 file changed, 35 insertions(+), 24 deletions(-) (limited to 'views') diff --git a/views/classification_validation.haml b/views/classification_validation.haml index 5649d7f..f25a321 100644 --- a/views/classification_validation.haml +++ b/views/classification_validation.haml @@ -1,33 +1,44 @@ %dt Correct predictions: %dd - = sprintf("%.2f", model.correct_predictions.to_f) if model.correct_predictions - = '%' + = sprintf("%.2f", model.correct_predictions.to_f) if model.correct_predictions + = '%' %dt - %a{:href => "http://en.wikipedia.org/wiki/Receiver_operating_characteristic", :rel => "external"} Weighted area under ROC: + %a{:href => "http://en.wikipedia.org/wiki/Receiver_operating_characteristic", :rel => "external"} Weighted area under ROC: %dd - = sprintf("%.3f", model.weighted_area_under_roc.to_f) if model.weighted_area_under_roc + = sprintf("%.3f", model.weighted_area_under_roc.to_f) if model.weighted_area_under_roc %dt - %a{:href => "http://en.wikipedia.org/wiki/Sensitivity_and_specificity", :rel => "external"} Specificity: + %a{:href => "http://en.wikipedia.org/wiki/Sensitivity_and_specificity", :rel => "external"} Specificity: %dd= sprintf("%.3f", model.specificity.to_f) if model.specificity %dt - %a{:href => "http://en.wikipedia.org/wiki/Sensitivity_and_specificity", :rel => "external"} Sensitivity: + %a{:href => "http://en.wikipedia.org/wiki/Sensitivity_and_specificity", :rel => "external"} Sensitivity: %dd= sprintf("%.3f", model.sensitivity.to_f) if model.sensitivity %dt - %a{:href => "http://en.wikipedia.org/wiki/Confusion_matrix", :rel => "external"} Confusion Matrix: -%dd - %table - %tr - %td{:colspan => 2, :rowspan => 2} - %th{:colspan => 2} Measured - %tr - %th{:bgcolor => "#CCD2DC"} active - %th{:bgcolor => "#CCD2DC"} inactive - %tr - %th{:rowspan => 2} Predicted - %th{:bgcolor => "#CCD2DC"} active - %td= model.true_positives if model.true_positives - %td= model.false_positives if model.false_positives - %tr - %th{:bgcolor => "#CCD2DC"} inactive - %td= model.false_negatives if model.false_negatives - %td= model.true_negatives if model.true_negatives + %a{:href => "http://en.wikipedia.org/wiki/Confusion_matrix", :rel => "external"} Confusion Matrix: +- if model.confusion_matrix + - cm = YAML.load(model.confusion_matrix) + %dd + %table + %tr + %td{:colspan => 2, :rowspan => 2} + %th{:colspan => (cm.size - 1)} Measured + %tr + - (1..cm[0].size-1).each do |i| + %th{:bgcolor => "#CCD2DC"} + = cm[0][i] + %tr + %th{:rowspan => (cm.size - 1)} Predicted + - (0..cm[1].size-1).each do |i| + - if i == 0 + %th{:bgcolor => "#CCD2DC"} + = cm[1][i] + - else + %td= cm[1][i] + - if cm.size > 2 + - (2..cm.size-1).each do |i| + %tr + - (0..cm[i].size-1).each do |j| + - if j == 0 + %th{:bgcolor => "#CCD2DC"} + = cm[i][j] + - else + %td= cm[i][j] -- cgit v1.2.3 From 41945b3dc251ca00580916c3cbc7d26c2093ca89 Mon Sep 17 00:00:00 2001 From: Christoph Helma Date: Mon, 25 Jul 2011 16:25:10 +0000 Subject: text modifications as suggested by davids review --- views/create.haml | 17 ++++++++++++++--- views/layout.haml | 13 ++++++++++++- views/style.sass | 1 + 3 files changed, 27 insertions(+), 4 deletions(-) (limited to 'views') diff --git a/views/create.haml b/views/create.haml index 757adc2..11482c5 100644 --- a/views/create.haml +++ b/views/create.haml @@ -1,6 +1,12 @@ .input - This service creates + This service creates and validates new + %em= toggle_link("#classification","classification") + and + %em= toggle_link("#regression","regression") + structure-activity models from your experimental data. The models can be used to predict toxicity of new chemicals (e.g. for + %a{:href => "http://ec.europa.eu/environment/chemicals/reach/reach_intro.htm", :rel => "external"} REACH + purposes) and to reduce the need for animal testing. The following methods are currently available: %ul %li = toggle_link("#lazar_description","lazar") @@ -10,9 +16,14 @@ = toggle_link("#lazar_description","lazar") %em= toggle_link("#regression","regression") models (experimental) - from your uploaded datasets. Further modelling algorithms will be added in future versions. - + Further modelling algorithms will be added in future versions. + %p + To create a prediction model, you will need to upload training data that includes chemical structures and their measured toxicity values, in + = link_to "Excel", '/help' + or + = link_to "CSV", '/help' + file formats. Please read the = link_to "instructions for creating training datasets", '/help' before submitting. diff --git a/views/layout.haml b/views/layout.haml index 174db9f..6f6afcb 100644 --- a/views/layout.haml +++ b/views/layout.haml @@ -14,7 +14,7 @@ .logo %img{:src => "ToxCreate_rgb_72.png", :alt => 'ToxCreate', :align => 'right'}/ %br - Create and evaluate models to predict toxicity + Creates computational models to predict toxicity .index %ul %li{:class => ("selected" if /\/create|echa|ambit|feature/ =~ request.path )} @@ -47,7 +47,18 @@ = yield .footer + Disclaimer: ToxCreate uses state-of-the-art published and tested algorithms and methodologies with full validation information. However, just as with experimental measurements, computational predictions are subject to varying degrees of accuracy and uncertainty, so please read the full report carefully, particularly the validation information. No liability is accepted for any inaccuracy in predictions. + %p + - tag = `git tag`.split("\n").last + - tagdate = `git show #{tag}|grep Date`.chomp + Version: + = tag + , + = tagdate © %a{:href => 'http://www.in-silico.ch', :rel => "external"} in silico toxicology 2009-2011, powered by %a{:href => 'http://www.opentox.org', :rel => "external"} OpenTox + (a project funded by the + %a{:href => "http://cordis.europa.eu/fp7/"} 7th Framework Programme + of the European Commission) diff --git a/views/style.sass b/views/style.sass index ffae6a5..15ae256 100644 --- a/views/style.sass +++ b/views/style.sass @@ -220,6 +220,7 @@ body .footer margin: 0.5em padding: 0.5em + font-size: small .active color: red -- cgit v1.2.3 From 091957683d81ab84412581dea062e1294fc00a33 Mon Sep 17 00:00:00 2001 From: gebele Date: Tue, 26 Jul 2011 12:17:09 +0200 Subject: fp7 link to new window --- views/layout.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'views') diff --git a/views/layout.haml b/views/layout.haml index 6f6afcb..d20b964 100644 --- a/views/layout.haml +++ b/views/layout.haml @@ -60,5 +60,5 @@ 2009-2011, powered by %a{:href => 'http://www.opentox.org', :rel => "external"} OpenTox (a project funded by the - %a{:href => "http://cordis.europa.eu/fp7/"} 7th Framework Programme + %a{:href => "http://cordis.europa.eu/fp7/", :rel => "external"} 7th Framework Programme of the European Commission) -- cgit v1.2.3 From b8d1c67894585729573e4e7270141f36924d0ac7 Mon Sep 17 00:00:00 2001 From: Christoph Helma Date: Thu, 28 Jul 2011 15:45:44 +0000 Subject: sdf upload implemented --- views/create.haml | 11 ++++++---- views/help.haml | 61 +++++++++++++++++++++++++++++++++++++++++++++---------- 2 files changed, 57 insertions(+), 15 deletions(-) (limited to 'views') diff --git a/views/create.haml b/views/create.haml index 11482c5..72bb428 100644 --- a/views/create.haml +++ b/views/create.haml @@ -21,10 +21,11 @@ %p To create a prediction model, you will need to upload training data that includes chemical structures and their measured toxicity values, in = link_to "Excel", '/help' - or + , = link_to "CSV", '/help' - file formats. - Please read the + or + = link_to "SDF", '/help' + file formats. Please read the = link_to "instructions for creating training datasets", '/help' before submitting. @@ -35,8 +36,10 @@ %label{:for => 'file'} Upload training data in = link_to "Excel", '/help' - or + , = link_to "CSV", '/help' + or + = link_to "SDF", '/help' format: %input{:type => 'file', :name => 'file', :id => 'file', :size => '41'} %input{ :type => "submit", :value => "Create model"} diff --git a/views/help.haml b/views/help.haml index 4882380..2b39d6c 100644 --- a/views/help.haml +++ b/views/help.haml @@ -1,4 +1,5 @@ = link_to "Back to model creation", '/create' +%h2 Spreadsheets (Excel, CSV) %p Input files have two columns. Enter in the first column the chemical structure in %a{:href => "http://en.wikipedia.org/wiki/Simplified_molecular_input_line_entry_specification", :rel => "external"} SMILES @@ -97,17 +98,18 @@ %h3 CSV example .code - %code - %br SMILES, Hamster Carcinogenicity - %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 + %pre + :preserve + SMILES, Hamster Carcinogenicity + CC(=O)Nc1ccc(O)cc1, 1 + O=c1[nH]cnc2[nH]ncc12, 1 + CCCCNc1cc(cc(c1Oc2ccccc2)S(=O)(=O)N)C(=O)O, 1 + CC(C)(C)NCC(O)COc1cccc2NC(=O)CCc12, 1 + CN(C)CCCC1(OCc2cc(C#N)ccc21)c3ccc(F)cc3, 1 + CCC(CC)CCN1C(=O)CN=C(C2CCCCC2F)c3cc(Cl)ccc13, 0 + CCN(CC)CC(=O)Nc1c(C)cccc1C, 0 + CC(C)(C)NCC(O)COc1cccc2CC(O)C(O)Cc12, 0 + CN1CCCC1c2cccnc2, 0 %p CSV examples for download: @@ -120,3 +122,40 @@ (regression) %p You can create CSV files in Excel: Create a sheet with two columns and export them as CSV file with the "Save As" option from the menu, selecting the CSV (comma delimited) format. + +%h2 SDF + +%p + Currently ToxCreate supports + %a{:href => "http://en.wikipedia.org/wiki/Chemical_table_file#SDF", :rel => "external"} SDF + files with a single data item as shown below (multiple data items will raise an error). You can also download an example SDF file: + = link_to "hamster_carcinogenicity.sdf", "/hamster_carcinogenicity.sdf" + +.code + %pre + -# keep empty lines -they are required by SDF + :preserve + + + + + 6 6 0 0 0 0 0 0 0 0 1 V2000 + 1.3304 -1.0738 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 + 2.1104 0.0000 0.0000 N 0 0 0 0 0 0 0 0 0 0 0 0 + 3.3767 -0.4086 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 + 3.3767 -1.7390 0.0000 N 0 0 0 0 0 0 0 0 0 0 0 0 + 2.1104 -2.1509 0.0000 N 0 0 0 0 0 0 0 0 0 0 0 0 + 0.0000 -1.0738 0.0000 N 0 0 0 0 0 0 0 0 0 0 0 0 + 1 2 1 0 0 0 0 + 1 5 2 0 0 0 0 + 1 6 1 0 0 0 0 + 2 3 2 0 0 0 0 + 3 4 1 0 0 0 0 + 4 5 1 0 0 0 0 + M END + > <ActivityOutcome_CPDBAS_Hamster> + inactive + + $$$$ + + -- cgit v1.2.3 From 75a6e38a09f468e69dd1449e01f6ccdc3e34d718 Mon Sep 17 00:00:00 2001 From: Christoph Helma Date: Fri, 29 Jul 2011 12:11:05 +0000 Subject: SDF export with data items --- views/model.haml | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'views') diff --git a/views/model.haml b/views/model.haml index d2637c8..fe43a1f 100644 --- a/views/model.haml +++ b/views/model.haml @@ -71,6 +71,8 @@ , -#%a{:href => "#{model.training_dataset}.rdf"} RDF/XML -#%em (experts) , + %a{:href => "#{model.training_dataset}.sdf#{subjectstring}" } SDF + , %a{:href => "#{model.training_dataset}.yaml#{subjectstring}" } YAML %em (experts) - if model.feature_dataset @@ -80,6 +82,8 @@ -#, %a{:href => "#{model.feature_dataset}.xls#{subjectstring}"} Excel sheet , + %a{:href => "#{model.feature_dataset}.sdf#{subjectstring}"} SDF + , %a{:href => "#{model.feature_dataset}.yaml#{subjectstring}"} YAML %em (experts) - if model.uri -- cgit v1.2.3 From 351c6a84f83d2570660263ed43d0274ea86855e2 Mon Sep 17 00:00:00 2001 From: Christoph Helma Date: Fri, 29 Jul 2011 12:47:56 +0000 Subject: create page reordered --- views/create.haml | 41 +++++++++++++++++++++-------------------- 1 file changed, 21 insertions(+), 20 deletions(-) (limited to 'views') diff --git a/views/create.haml b/views/create.haml index 72bb428..b706484 100644 --- a/views/create.haml +++ b/views/create.haml @@ -1,31 +1,13 @@ .input - This service creates and validates new - %em= toggle_link("#classification","classification") - and - %em= toggle_link("#regression","regression") - structure-activity models from your experimental data. The models can be used to predict toxicity of new chemicals (e.g. for - %a{:href => "http://ec.europa.eu/environment/chemicals/reach/reach_intro.htm", :rel => "external"} REACH - purposes) and to reduce the need for animal testing. The following methods are currently available: - %ul - %li - = toggle_link("#lazar_description","lazar") - %em= toggle_link("#classification","classification") - models and - %li - = toggle_link("#lazar_description","lazar") - %em= toggle_link("#regression","regression") - models (experimental) - Further modelling algorithms will be added in future versions. - %p - To create a prediction model, you will need to upload training data that includes chemical structures and their measured toxicity values, in + You will need to upload training data that includes chemical structures and their measured toxicity values, in = link_to "Excel", '/help' , = link_to "CSV", '/help' or = link_to "SDF", '/help' - file formats. Please read the + file formats to create a prediction model. Please read the = link_to "instructions for creating training datasets", '/help' before submitting. @@ -57,6 +39,25 @@ = haml :endpoint, :layout => false = haml :unit, :layout => false + %p + This service creates and validates new + %em= toggle_link("#classification","classification") + and + %em= toggle_link("#regression","regression") + structure-activity models from your experimental data. The models can be used to predict toxicity of new chemicals (e.g. for + %a{:href => "http://ec.europa.eu/environment/chemicals/reach/reach_intro.htm", :rel => "external"} REACH + purposes) and to reduce the need for animal testing. The following methods are currently available: + %ul + %li + = toggle_link("#lazar_description","lazar") + %em= toggle_link("#classification","classification") + models and + %li + = toggle_link("#lazar_description","lazar") + %em= toggle_link("#regression","regression") + models (experimental) + Further modelling algorithms may be added in future versions. + .login_notice - if session[:username] == "guest" -- cgit v1.2.3 From 91b70cba5d1d0045b0db0d9c77f867e68e61fe2e Mon Sep 17 00:00:00 2001 From: mr Date: Tue, 2 Aug 2011 16:28:13 +0200 Subject: remove text 'user:' if no A&A --- views/layout.haml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'views') diff --git a/views/layout.haml b/views/layout.haml index d20b964..c76396d 100644 --- a/views/layout.haml +++ b/views/layout.haml @@ -31,8 +31,9 @@ .content .login_info - User: - %b= session[:username] + - if session[:username].size > 0 + User: + %b= session[:username] - if `hostname`.match(/ot-test/) .notice -- cgit v1.2.3 From 065a42d25e5bbace7af0e521d6fab0bb2bb030d6 Mon Sep 17 00:00:00 2001 From: mr Date: Wed, 3 Aug 2011 12:57:22 +0200 Subject: remove alt tag from progressbar --- views/model.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'views') diff --git a/views/model.haml b/views/model.haml index fe43a1f..f646dec 100644 --- a/views/model.haml +++ b/views/model.haml @@ -24,7 +24,7 @@ #{js} }); - %div{:id => "model_#{model.id}_progress", :class => "model_progress", :title => "#{percentage_completed}%", :alt => "#{percentage_completed}%"} + %div{:id => "model_#{model.id}_progress", :class => "model_progress", :title => "#{percentage_completed}%"} //= haml :model_progress, :locals=>{:percentage_completed=>percentage_completed}, :layout => false - if is_authorized(model.web_uri, "DELETE") %a{:href => url_for("/model/#{model.id}"), :id => "delete_#{model.id}", :class => 'delete_link'} -- cgit v1.2.3 From 4f83500afb33612cadd7084470ab9b42dfa59cf2 Mon Sep 17 00:00:00 2001 From: Christoph Helma Date: Thu, 4 Aug 2011 10:24:38 +0000 Subject: activity highlighting and significant features fixed --- views/lazar.haml | 4 ++-- views/neighbors.haml | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'views') diff --git a/views/lazar.haml b/views/lazar.haml index 3f1d030..2912567 100644 --- a/views/lazar.haml +++ b/views/lazar.haml @@ -18,7 +18,7 @@ %th Supporting information %tr - %td.image= compound_image(@compound,@prediction.descriptors(@compound)) + %td.image= compound_image(@compound,@prediction.descriptors(@compound),@value_map) %td= activity_markup(@prediction.value(@compound)) %td= sprintf('%.03g', @prediction.confidence(@compound)) %td @@ -40,7 +40,7 @@ %tr#fragments{ :style => "display: none;" } %td{:colspan => '4'} = hide_link('#fragments') - = haml :feature_table, :locals => {:features => sort(@prediction.descriptors(@compound))}, :layout => false + = haml :feature_table, :locals => {:features => sort(@prediction.descriptors(@compound),@value_map)}, :layout => false %tbody#neighbors = haml :neighbors, :locals => {:neighbors => @prediction.neighbors(@compound), :page => @page}, :layout => false diff --git a/views/neighbors.haml b/views/neighbors.haml index 2df9230..3f1dccd 100644 --- a/views/neighbors.haml +++ b/views/neighbors.haml @@ -13,8 +13,8 @@ - neighbor_id += 1 - compound = OpenTox::Compound.new(neighbor[OT.compound]) %tr - %td.image= compound_image(compound,@prediction.descriptors(compound)) - %td= activity_markup(neighbor[OT.measuredActivity]) + %td.image= compound_image(compound,@prediction.descriptors(compound),@value_map) + %td= activity_markup(@value_map[neighbor[OT.measuredActivity].to_i]) %td= sprintf('%.03g', neighbor[OT.similarity]) %td %ul @@ -39,5 +39,5 @@ %tr{:id => "fragments#{neighbor_id}", :style => "display: none;" } %td{:colspan => '4'} = hide_link("#fragments#{neighbor_id}") - = haml :feature_table, :locals => {:features => sort(@prediction.descriptors(compound))}, :layout => false + = haml :feature_table, :locals => {:features => sort(@prediction.descriptors(compound),@value_map)}, :layout => false -- cgit v1.2.3 From 004696cca244acd8ff0e078ee33ac09e3ebc03b0 Mon Sep 17 00:00:00 2001 From: mr Date: Thu, 4 Aug 2011 12:45:02 +0200 Subject: id for tasklinks (to fix doubled javascript) --- views/model.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'views') diff --git a/views/model.haml b/views/model.haml index f646dec..e688ae9 100644 --- a/views/model.haml +++ b/views/model.haml @@ -46,7 +46,7 @@ - if CONFIG[:logger]=="debug" %dt Task: %dd - %a{:href => "#{model.task_uri}", :rel => "external"} + %a{:href => "#{model.task_uri}", :id => "model_#{model.id}_task_link", :rel => "external"} = model.task_uri - if model.warnings %dt Warnings: -- cgit v1.2.3 From 304c4c484a062077bad08ca9fe3ed44d138c9416 Mon Sep 17 00:00:00 2001 From: Christoph Helma Date: Thu, 4 Aug 2011 13:55:58 +0000 Subject: feature highlighting and significant features fixed for generic classes and regression --- views/feature_table.haml | 12 ++++++++++-- views/lazar.haml | 2 +- views/lazar_algorithm.haml | 20 ++++++++++++++------ views/neighbors.haml | 2 +- views/prediction.haml | 4 ++-- views/significant_fragments.haml | 2 +- 6 files changed, 29 insertions(+), 13 deletions(-) (limited to 'views') diff --git a/views/feature_table.haml b/views/feature_table.haml index a8a153f..e75c818 100644 --- a/views/feature_table.haml +++ b/views/feature_table.haml @@ -2,7 +2,11 @@ - unless features[:activating].empty? %tr %th - activating + - if @value_map.empty? + activating + - else + predominatly in compounds with activity + = "\"#{@value_map[2]}\"" ( %a{:href => "http://www.daylight.com/dayhtml/doc/theory/theory.smarts.html", :rel => "external"} SMARTS ) @@ -15,7 +19,11 @@ - unless features[:deactivating].empty? %tr %th - deactivating + - if @value_map.empty? + deactivating + - else + predominatly in compounds with activity + = "\"#{@value_map[1]}\"" ( %a{:href => "http://www.daylight.com/dayhtml/doc/theory/theory.smarts.html", :rel => "external"} SMARTS ) diff --git a/views/lazar.haml b/views/lazar.haml index 2912567..870fcab 100644 --- a/views/lazar.haml +++ b/views/lazar.haml @@ -19,7 +19,7 @@ %tr %td.image= compound_image(@compound,@prediction.descriptors(@compound),@value_map) - %td= activity_markup(@prediction.value(@compound)) + %td= activity_markup(@prediction.value(@compound), @value_map) %td= sprintf('%.03g', @prediction.confidence(@compound)) %td %ul diff --git a/views/lazar_algorithm.haml b/views/lazar_algorithm.haml index 85823b5..e5b70f6 100644 --- a/views/lazar_algorithm.haml +++ b/views/lazar_algorithm.haml @@ -33,12 +33,20 @@ = toggle_link "#significant_fragments", "Significant fragments" are highlighted in the structure display as follows: %ul - %li - .active activating fragments - %li - .inactive deactivating fragments - %li - .inconclusive regions, where activating and deactivating fragments overlap + - if @value_map.empty? + %li + .active activating fragments + %li + .inactive deactivating fragments + %li + .inconclusive regions, where activating and deactivating fragments overlap + - else + %li + .active= "features that occur predominately in compounds with activity: \"#{@value_map[2]}\"" + %li + .inactive= "features that occur predominately in compounds with activity: \"#{@value_map[1]}\"" + %li + .inconclusive regions, where fragments from different classes overlap %li .other inert parts diff --git a/views/neighbors.haml b/views/neighbors.haml index 3f1dccd..e2d65fa 100644 --- a/views/neighbors.haml +++ b/views/neighbors.haml @@ -14,7 +14,7 @@ - compound = OpenTox::Compound.new(neighbor[OT.compound]) %tr %td.image= compound_image(compound,@prediction.descriptors(compound),@value_map) - %td= activity_markup(@value_map[neighbor[OT.measuredActivity].to_i]) + %td= activity_markup(neighbor[OT.measuredActivity], @value_map) %td= sprintf('%.03g', neighbor[OT.similarity]) %td %ul diff --git a/views/prediction.haml b/views/prediction.haml index 9bb3f76..682b979 100644 --- a/views/prediction.haml +++ b/views/prediction.haml @@ -16,7 +16,7 @@ - if p[:measured_activities] %br - p[:measured_activities].each do |a| - = activity_markup(a) + = activity_markup(a, @value_map) %br ( %a{:href => "#", :id => "linkTrainingData#{p.object_id}"} Measured activity @@ -29,7 +29,7 @@ - elsif p[:error] %br= p[:error] - else - = activity_markup(p[:prediction]) + = activity_markup(p[:prediction], @value_map) - if p[:confidence] %br ( diff --git a/views/significant_fragments.haml b/views/significant_fragments.haml index bd39826..8cddf43 100644 --- a/views/significant_fragments.haml +++ b/views/significant_fragments.haml @@ -5,6 +5,6 @@ = hide_link "#significant_fragments" ) %dd - Substructures that occur (statistically significant) more frequently in active or inactive compounds. Substuctures can take any shape (without cycles) and are determined with the + Substructures that occur (statistically significant) more frequently in one of the toxicity classes or correlate with quantitative toxicity values. Substuctures can take any shape (without cycles) and are determined with the %a{:href => "http://www.maunz.de/libfminer2-bbrc-doc/", :rel => "external"} fminer algorithm. -- cgit v1.2.3 From 8b63e71e9cb0c6b377e83f793370039410012ed4 Mon Sep 17 00:00:00 2001 From: Christoph Helma Date: Thu, 4 Aug 2011 14:37:44 +0000 Subject: highlighting warning for multiple classes --- views/feature_table.haml | 4 ++-- views/lazar_algorithm.haml | 20 +++++++++++++------- 2 files changed, 15 insertions(+), 9 deletions(-) (limited to 'views') diff --git a/views/feature_table.haml b/views/feature_table.haml index e75c818..7c57331 100644 --- a/views/feature_table.haml +++ b/views/feature_table.haml @@ -6,7 +6,7 @@ activating - else predominatly in compounds with activity - = "\"#{@value_map[2]}\"" + = "\"#{@value_map[@value_map.keys.sort.last]}\"" ( %a{:href => "http://www.daylight.com/dayhtml/doc/theory/theory.smarts.html", :rel => "external"} SMARTS ) @@ -23,7 +23,7 @@ deactivating - else predominatly in compounds with activity - = "\"#{@value_map[1]}\"" + = "\"#{@value_map[@value_map.keys.sort.first]}\"" ( %a{:href => "http://www.daylight.com/dayhtml/doc/theory/theory.smarts.html", :rel => "external"} SMARTS ) diff --git a/views/lazar_algorithm.haml b/views/lazar_algorithm.haml index e5b70f6..76a993b 100644 --- a/views/lazar_algorithm.haml +++ b/views/lazar_algorithm.haml @@ -32,23 +32,29 @@ %p = toggle_link "#significant_fragments", "Significant fragments" are highlighted in the structure display as follows: - %ul - - if @value_map.empty? + - if @value_map.empty? + %ul %li .active activating fragments %li .inactive deactivating fragments %li .inconclusive regions, where activating and deactivating fragments overlap - - else %li - .active= "features that occur predominately in compounds with activity: \"#{@value_map[2]}\"" + .other inert parts + - else + %ul + %li + .active= "features that occur predominately in compounds with activity: \"#{@value_map[@value_map.keys.sort.last]}\"" %li - .inactive= "features that occur predominately in compounds with activity: \"#{@value_map[1]}\"" + .inactive= "features that occur predominately in compounds with activity: \"#{@value_map[@value_map.keys.sort.first]}\"" %li .inconclusive regions, where fragments from different classes overlap - %li - .other inert parts + %li + .other inert parts + - if @value_map.size > 2 + .notice Incomplete implementation of feature highlighting and display of significant fragments. Only features for 2 classes are shown! + %p Please keep in mind that predictions are based on the measured activities of neighbors. -- cgit v1.2.3 From aa588fc87f1a892f3de903f5d60df68d4eaa6b52 Mon Sep 17 00:00:00 2001 From: mr Date: Thu, 4 Aug 2011 17:49:29 +0200 Subject: ul in p --- views/help.haml | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'views') diff --git a/views/help.haml b/views/help.haml index 2b39d6c..f602dff 100644 --- a/views/help.haml +++ b/views/help.haml @@ -87,13 +87,13 @@ %p Excel examples for download: - %ul - %li - = link_to "hamster_carcinogenicity.xls", "/hamster_carcinogenicity.xls" - (classification) - %li - = link_to "EPAFHM.xls", "/EPAFHM.xls" - (regression) +%ul + %li + = link_to "hamster_carcinogenicity.xls", "/hamster_carcinogenicity.xls" + (classification) + %li + = link_to "EPAFHM.xls", "/EPAFHM.xls" + (regression) %h3 CSV example @@ -113,13 +113,13 @@ %p CSV examples for download: - %ul - %li - = link_to "hamster_carcinogenicity.csv", "/hamster_carcinogenicity.csv" - (classification) - %li - = link_to "EPAFHM.csv", "/EPAFHM.csv" - (regression) +%ul + %li + = link_to "hamster_carcinogenicity.csv", "/hamster_carcinogenicity.csv" + (classification) + %li + = link_to "EPAFHM.csv", "/EPAFHM.csv" + (regression) %p You can create CSV files in Excel: Create a sheet with two columns and export them as CSV file with the "Save As" option from the menu, selecting the CSV (comma delimited) format. -- cgit v1.2.3