summaryrefslogtreecommitdiff
path: root/application.rb
diff options
context:
space:
mode:
authorgebele <gebele@in-silico.ch>2016-09-23 09:54:08 +0000
committergebele <gebele@in-silico.ch>2016-09-23 09:54:08 +0000
commitf2912140b930dbedd4dde5dfbf955a47e32e84a3 (patch)
tree3f6e865c23c42f7d8e4961945e3138238bd056cd /application.rb
parentd160d2c5be9ea52b9b5e9f8a4895e6ccf464c938 (diff)
stage commit before tablesorter theme fix; deactivated coating input; added uniprot link for Proteomics
Diffstat (limited to 'application.rb')
-rw-r--r--application.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/application.rb b/application.rb
index 86fdb1f..5df466c 100644
--- a/application.rb
+++ b/application.rb
@@ -1,6 +1,7 @@
require 'rdiscount'
$ambit_search = "http://data.enanomapper.net/substance?type=name&search="
+
configure :development do
$logger = Logger.new(STDOUT)
end
@@ -22,6 +23,8 @@ get '/predict/?' do
prediction_models.each{|m| m.model[:feature_selection_algorithm_parameters]["category"] == "P-CHEM" ? @prediction_models[0] = m : @prediction_models[1] = m}
@prediction_models.each_with_index{|m,idx| idx == 0 ? m[:pc_model] = true : m[:pcp_model] = true}
nanoparticles = OpenTox::Nanoparticle.all.select{|n| n.core["name"] == "Au" || n.core["name"] == "Ag"}
+ ## helper for preselect nanos with more than 12 pc_descriptors but take too much time for now
+ #example = nanoparticles.collect{|n| n if n.physchem_descriptors.size > 16 && (arr = n.physchem_descriptors.collect{|k,v| OpenTox::Feature.find(k).category == "P-CHEM"}; arr.size > 12 )}.compact
example = nanoparticles.collect{|n| n if n.physchem_descriptors.size > 16}.compact
pcp = example.sample
@example_pcp = pcp