diff options
-rw-r--r-- | VERSION | 2 | ||||
-rw-r--r-- | qmrf_report.rb | 14 | ||||
-rw-r--r-- | views/prediction.haml | 25 |
3 files changed, 29 insertions, 12 deletions
@@ -1 +1 @@ -1.2.0 +1.3.0 diff --git a/qmrf_report.rb b/qmrf_report.rb index b52e618..e5fbdf3 100644 --- a/qmrf_report.rb +++ b/qmrf_report.rb @@ -31,6 +31,20 @@ def qmrf_report id report.change_catalog :authors_catalog, :firstauthor, {:name => "Christoph Helma", :affiliation => "in silico toxicology gmbh", :contact => "Rastatterstr. 41, CH-4057 Basel", :email => "info@in-silico.ch", :number => "1", :url => "www.in-silico.ch"} report.ref_catalog :qmrf_authors, :authors_catalog, :firstauthor + if prediction_model.species =~ /TD50/ + # Date of QMRF update(s) 2.3 + report.value "qmrf_date_revision", "#{Time.parse("2014-12-05").strftime('%d %B %Y')}" + # QMRF update(s) 2.4 + report.value "qmrf_revision", "Q29-44-39-423" + end + + if prediction_model.species =~ /Rodent/ + # Date of QMRF update(s) 2.3 + report.value "qmrf_date_revision", "#{Time.parse("2014-12-05").strftime('%d %B %Y')}" + # QMRF update(s) 2.4 + report.value "qmrf_revision", "Q28-43-38-420" + end + # Model developer(s) and contact details 2.5 report.change_catalog :authors_catalog, :modelauthor, {:name => "Christoph Helma", :affiliation => "in silico toxicology gmbh", :contact => "Rastatterstr. 41, CH-4057 Basel", :email => "info@in-silico.ch", :number => "1", :url => "www.in-silico.ch"} report.ref_catalog :model_authors, :authors_catalog, :modelauthor diff --git a/views/prediction.haml b/views/prediction.haml index 9cdedde..bb7c631 100644 --- a/views/prediction.haml +++ b/views/prediction.haml @@ -35,7 +35,10 @@ / show message about dbhit and measurements %p - %b Compound is part of the training dataset + :plain + This compound was part of the training dataset. <i>All</i> information </br> + from this compound was removed from the training data before the </br> + prediction, to obtain unbiased results. %p %b Measured activity: %br @@ -78,17 +81,17 @@ = "#{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(/,/, ",<br>") - - if !prediction[:warnings].blank? - %b Warnings: - - prediction[:warnings].uniq.each do |warning| + -#%p + - if !prediction[:info].blank? + %b Info: %br - %p=warning.sub(/,/, ",<br>") - /%p=warning.sub(/substances/, "substances<br>").sub(/prediction\:/, "prediction\:<br>") + %p=prediction[:info].sub(/\'.*\'/,"").sub(/,/, ",<br>") + - if !prediction[:warnings].blank? + %b Warnings: + - prediction[:warnings].uniq.each do |warning| + %br + %p=warning.sub(/,/, ",<br>") + /%p=warning.sub(/substances/, "substances<br>").sub(/prediction\:/, "prediction\:<br>") - else %br - if !prediction[:info].blank? |