From 19cec3d1d971c2028c57fdfe883820968db3fb50 Mon Sep 17 00:00:00 2001 From: rautenberg Date: Tue, 27 Sep 2016 16:48:34 +0200 Subject: add prediction_algorithm to 4.2 --- lib/report.rb | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/report.rb b/lib/report.rb index abdc49e..eaffc35 100644 --- a/lib/report.rb +++ b/lib/report.rb @@ -77,12 +77,15 @@ get "/report/:id/?" do # Endpoint Units 3.4 report.value "endpoint_units", "#{prediction_model.unit}" + model_type = model.class.to_s.gsub('OpenTox::Model::Lazar','') # Type of model 4.1 - report.value "algorithm_type", "#{model.class.to_s.gsub('OpenTox::Model::Lazar','')}" + report.value "algorithm_type", "#{model_type}" # Explicit algorithm 4.2 - report.change_catalog :algorithms_catalog, :algorithms_catalog_1, {:definition => "see Helma 2016 and lazar.in-silico.ch, submitted version: #{lazar_commit}", :description => "modified k-nearest neighbor classification with activity specific similarities, weighted voting and exhaustive enumeration of fragments and neighbors"} + report.change_catalog :algorithms_catalog, :algorithms_catalog_1, {:definition => "see Helma 2016 and lazar.in-silico.ch, submitted version: #{lazar_commit}", :description => "modified k-nearest neighbor #{model_type}"} report.ref_catalog :algorithm_explicit, :algorithms_catalog, :algorithms_catalog_1 + report.change_catalog :algorithms_catalog, :algorithms_catalog_2, {:definition => "see Helma 2016 and lazar.in-silico.ch, submitted version: #{lazar_commit}", :description => "#{model.prediction_algorithm.gsub('OpenTox::Algorithm::','').gsub('_',' ').titleize.gsub('.', ' with ')}"} + report.ref_catalog :algorithm_explicit, :algorithms_catalog, :algorithms_catalog_2 # Descriptors in the model 4.3 report.change_catalog :descriptors_catalog, :descriptors_catalog_1, {:description => "all statistically relevant paths are used for similarity calculation", :name => "linear fragmens (paths)", :publication_ref => "", :units => "true/false (i.e. present/absent)"} -- cgit v1.2.3