summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgebele <gebele@in-silico.ch>2013-09-27 16:55:28 +0200
committergebele <gebele@in-silico.ch>2013-09-27 16:55:28 +0200
commite015957c317d311d0a579e68f8ff2f327a011fa3 (patch)
treec4b4576c92829c06c838e4540a22d5af2c2d0d4f
parentda701f22287f855b499145c181106f3736392d47 (diff)
use value map for sf
-rw-r--r--application.rb25
-rw-r--r--public/stylesheets/screen.css2
-rw-r--r--public/stylesheets/screen.sass11
-rw-r--r--views/predict.haml67
-rw-r--r--views/significant_fragments.haml15
5 files changed, 79 insertions, 41 deletions
diff --git a/application.rb b/application.rb
index 0bbf18a..5ac5186 100644
--- a/application.rb
+++ b/application.rb
@@ -68,8 +68,19 @@ get '/prediction/:model_uri/:type/:compound_uri/fingerprints/?' do
# collect all features from feature_dataset
@features = feature_dataset.features.collect{|f| f }
- # search for each fingerprint in all features and collect feature values(smarts, pValue, effect)
+ # search for each fingerprint in all features and collect feature values( effect, smarts, pValue )
@fingerprint_values.each{ |fi, v| @features.each{ |f| @significant_fragments << [f[RDF::OT.effect].to_i, f[RDF::OT.smarts], f[RDF::OT.pValue]] if fi == f[RDF::OT.smarts] } }
+
+ # pass value_map, important to interprete effect value
+ prediction_feature_uri = ""
+ model.parameters.each {|p|
+ if p[RDF::DC.title].to_s == "prediction_feature_uri"
+ prediction_feature_uri = p[RDF::OT.paramValue].object
+ end
+ }
+ prediction_feature = OpenTox::Feature.find prediction_feature_uri
+ @value_map = prediction_feature.value_map
+
else #regression
feature_calc_algo = ""
model.parameters.each {|p|
@@ -128,11 +139,23 @@ get '/prediction/:model_uri/:type/:neighbor/significant_fragments/?' do
# pass feature uris if value > 0
@feat.each do |f|
+ # search relevant features
if f[0] > 0
f = OpenTox::Feature.find f[1]
+ # pass relevant features with [ effect, smarts, pValue ]
@significant_fragments << [f[RDF::OT.effect].to_i, f[RDF::OT.smarts], f[RDF::OT.pValue].to_f.round(3)]
end
end
+ # pass value_map, important to interprete effect value
+ prediction_feature_uri = ""
+ model.parameters.each {|p|
+ if p[RDF::DC.title].to_s == "prediction_feature_uri"
+ prediction_feature_uri = p[RDF::OT.paramValue].object
+ end
+ }
+ prediction_feature = OpenTox::Feature.find prediction_feature_uri
+ @value_map = prediction_feature.value_map
+
else # regression
# find a value in feature dataset by compound and feature
@values = []
diff --git a/public/stylesheets/screen.css b/public/stylesheets/screen.css
index 6850732..afd55d7 100644
--- a/public/stylesheets/screen.css
+++ b/public/stylesheets/screen.css
@@ -1 +1 @@
-body{background-image:url("/images/gray_jean.png");overflow:scroll;font-family:sans-serif}body a{text-decoration:none;font-weight:bold;color:#000}body img{border:0}body h2{padding-top:12px;text-shadow:#fff 1px 1px 0;font-size:x-large;color:#f55}.logo img{float:left;display:inline;margin-right:1em}.logo h1{display:inline;width:80%}.logo img.ote{width:100px;height:50px;display:inline;float:right}.logo hr{margin:0.5em}.content{background-image:url("/images/gray_jean.png")}.content h1{margin:0.3em;text-shadow:#fff 1px 1px 0;font-size:x-large;font-family:Verdana;display:inline}.content .arrow{margin:8px 0px 5px 20px}.content .back{display:inline}.content #back-top{z-index:100;position:fixed;bottom:3%;margin-left:91%}.content #back-top a:hover{color:#bbb}.content fieldset#top{border:0;padding:10px;background-color:#c5c1e4;-moz-border-radius-topleft:25px;-webkit-border-top-left-radius:25px;border-top-left-radius:25px;-moz-border-radius-topright:25px;-webkit-border-top-right-radius:25px;border-top-right-radius:25px;-webkit-background-clip:border;-moz-background-clip:border;background-clip:border-box;-webkit-box-shadow:1px 1px 1px #fff inset,-1px -1px 5px rgba(0,0,0,0.3) inset;-moz-box-shadow:1px 1px 1px #fff inset,-1px -1px 5px rgba(0,0,0,0.3) inset;box-shadow:1px 1px 1px #fff inset,-1px -1px 5px rgba(0,0,0,0.3) inset}.content fieldset#top a#linkInsert{display:block;width:100%;height:2em}.content fieldset#top #appletContainer{padding:10px}.content fieldset#middle{border:0;padding:10px;background-color:#c5c1e4;-webkit-box-shadow:1px 1px 1px #fff inset,-1px -1px 5px rgba(0,0,0,0.3) inset;-moz-box-shadow:1px 1px 1px #fff inset,-1px -1px 5px rgba(0,0,0,0.3) inset;box-shadow:1px 1px 1px #fff inset,-1px -1px 5px rgba(0,0,0,0.3) inset}.content fieldset#middle a#linkModels{display:block;width:100%;height:2em}.content fieldset#middle #endpoint{padding-top:2em}.content fieldset#middle #model a{display:inline;font-weight:normal}.content fieldset#middle #details_0{background-color:#e6e5f3;-webkit-box-shadow:1px 1px 1px #fff inset,-1px -1px 5px rgba(0,0,0,0.3) inset;-moz-box-shadow:1px 1px 1px #fff inset,-1px -1px 5px rgba(0,0,0,0.3) inset;box-shadow:1px 1px 1px #fff inset,-1px -1px 5px rgba(0,0,0,0.3) inset;padding:1em}.content fieldset#middle #details_1{background-color:#e6e5f3;-webkit-box-shadow:1px 1px 1px #fff inset,-1px -1px 5px rgba(0,0,0,0.3) inset;-moz-box-shadow:1px 1px 1px #fff inset,-1px -1px 5px rgba(0,0,0,0.3) inset;box-shadow:1px 1px 1px #fff inset,-1px -1px 5px rgba(0,0,0,0.3) inset;padding:1em}.content fieldset#middle #details_2{background-color:#e6e5f3;-webkit-box-shadow:1px 1px 1px #fff inset,-1px -1px 5px rgba(0,0,0,0.3) inset;-moz-box-shadow:1px 1px 1px #fff inset,-1px -1px 5px rgba(0,0,0,0.3) inset;box-shadow:1px 1px 1px #fff inset,-1px -1px 5px rgba(0,0,0,0.3) inset;padding:1em}.content fieldset#middle #details_3{background-color:#e6e5f3;-webkit-box-shadow:1px 1px 1px #fff inset,-1px -1px 5px rgba(0,0,0,0.3) inset;-moz-box-shadow:1px 1px 1px #fff inset,-1px -1px 5px rgba(0,0,0,0.3) inset;box-shadow:1px 1px 1px #fff inset,-1px -1px 5px rgba(0,0,0,0.3) inset;padding:1em}.content fieldset#middle #details_4{background-color:#e6e5f3;-webkit-box-shadow:1px 1px 1px #fff inset,-1px -1px 5px rgba(0,0,0,0.3) inset;-moz-box-shadow:1px 1px 1px #fff inset,-1px -1px 5px rgba(0,0,0,0.3) inset;box-shadow:1px 1px 1px #fff inset,-1px -1px 5px rgba(0,0,0,0.3) inset;padding:1em}.content fieldset#bottom{border:0;background-color:#c5c1e4;padding:10px;margin-bottom:5em;-webkit-box-shadow:1px 1px 1px #fff inset,-1px -1px 5px rgba(0,0,0,0.3) inset;-moz-box-shadow:1px 1px 1px #fff inset,-1px -1px 5px rgba(0,0,0,0.3) inset;box-shadow:1px 1px 1px #fff inset,-1px -1px 5px rgba(0,0,0,0.3) inset;-moz-border-radius-bottomleft:25px;-webkit-border-bottom-left-radius:25px;border-bottom-left-radius:25px;-moz-border-radius-bottomright:25px;-webkit-border-bottom-right-radius:25px;border-bottom-right-radius:25px;-webkit-background-clip:border;-moz-background-clip:border;background-clip:border-box}.content fieldset#bottom input#predict{margin-left:1em}.content .predictions{background-color:#c5c1e4;padding:10px;text-align:justify;-webkit-box-shadow:1px 1px 1px #fff inset,-1px -1px 5px rgba(0,0,0,0.3) inset;-moz-box-shadow:1px 1px 1px #fff inset,-1px -1px 5px rgba(0,0,0,0.3) inset;box-shadow:1px 1px 1px #fff inset,-1px -1px 5px rgba(0,0,0,0.3) inset;-moz-border-radius-topleft:25px;-webkit-border-top-left-radius:25px;border-top-left-radius:25px;-moz-border-radius-bottomleft:25px;-webkit-border-bottom-left-radius:25px;border-bottom-left-radius:25px;-moz-border-radius-topright:25px;-webkit-border-top-right-radius:25px;border-top-right-radius:25px;-moz-border-radius-bottomright:25px;-webkit-border-bottom-right-radius:25px;border-bottom-right-radius:25px;-webkit-background-clip:border;-moz-background-clip:border;background-clip:border-box}.content .overview{background-image:url("/images/gray_jean.png");padding:12px;margin-top:1em;margin-bottom:1em;text-align:left;-webkit-box-shadow:1px 1px 1px #fff inset,-1px -1px 5px rgba(0,0,0,0.3) inset;-moz-box-shadow:1px 1px 1px #fff inset,-1px -1px 5px rgba(0,0,0,0.3) inset;box-shadow:1px 1px 1px #fff inset,-1px -1px 5px rgba(0,0,0,0.3) inset;-moz-border-radius-topleft:25px;-webkit-border-top-left-radius:25px;border-top-left-radius:25px;-moz-border-radius-topright:25px;-webkit-border-top-right-radius:25px;border-top-right-radius:25px;-webkit-background-clip:border;-moz-background-clip:border;background-clip:border-box}.content .overview a:hover{color:#f55}.content .overview caption{text-align:left}.content .overview #overview tr td{background-color:#fff;border:1px solid #dad9c7;padding-left:1em;padding-top:0.5em}.content .overview #overview tr td #compound{width:200px}.content .overview #overview tr td b.c{color:#d42200}.content .overview #overview tr td b.n{color:#5c8533}.content .overview #overview tr td .confidence{display:inline}.content .error{background-color:#c5c1e4;padding:15px;-webkit-box-shadow:1px 1px 1px #fff inset,-1px -1px 5px rgba(0,0,0,0.3) inset;-moz-box-shadow:1px 1px 1px #fff inset,-1px -1px 5px rgba(0,0,0,0.3) inset;box-shadow:1px 1px 1px #fff inset,-1px -1px 5px rgba(0,0,0,0.3) inset;-moz-border-radius-topleft:25px;-webkit-border-top-left-radius:25px;border-top-left-radius:25px;-moz-border-radius-bottomleft:25px;-webkit-border-bottom-left-radius:25px;border-bottom-left-radius:25px;-moz-border-radius-topright:25px;-webkit-border-top-right-radius:25px;border-top-right-radius:25px;-moz-border-radius-bottomright:25px;-webkit-border-bottom-right-radius:25px;border-bottom-right-radius:25px;-webkit-background-clip:border;-moz-background-clip:border;background-clip:border-box}.content .error .message{margin-top:1em;padding:1em;border:2px solid #f55;background-color:#fff;color:#f55;-moz-border-radius-topleft:25px;-webkit-border-top-left-radius:25px;border-top-left-radius:25px;-moz-border-radius-bottomleft:25px;-webkit-border-bottom-left-radius:25px;border-bottom-left-radius:25px;-moz-border-radius-topright:25px;-webkit-border-top-right-radius:25px;border-top-right-radius:25px;-moz-border-radius-bottomright:25px;-webkit-border-bottom-right-radius:25px;border-bottom-right-radius:25px;-webkit-background-clip:border;-moz-background-clip:border;background-clip:border-box}.content #closebutton{color:#f55;margin-left:98%;padding:0}.details{width:98%;background-color:#c5c1e4;-moz-border-radius-bottomleft:5px;-webkit-border-bottom-left-radius:5px;border-bottom-left-radius:5px;-moz-border-radius-bottomright:5px;-webkit-border-bottom-right-radius:5px;border-bottom-right-radius:5px;-webkit-background-clip:border;-moz-background-clip:border;background-clip:border-box;-webkit-box-shadow:1px 1px 1px #fff inset,0px -1px 2px rgba(0,0,0,0.3) inset;-moz-box-shadow:1px 1px 1px #fff inset,0px -1px 2px rgba(0,0,0,0.3) inset;box-shadow:1px 1px 1px #fff inset,0px -1px 2px rgba(0,0,0,0.3) inset}.details a:hover{color:#f55}.details img{display:inline;float:left;margin:0.5em}.significant_fragments{width:98%;margin-bottom:2em;background-color:#c5c1e4;-moz-border-radius-bottomleft:5px;-webkit-border-bottom-left-radius:5px;border-bottom-left-radius:5px;-moz-border-radius-bottomright:5px;-webkit-border-bottom-right-radius:5px;border-bottom-right-radius:5px;-webkit-background-clip:border;-moz-background-clip:border;background-clip:border-box;-webkit-box-shadow:1px 1px 1px #fff inset,0px -1px 2px rgba(0,0,0,0.3) inset;-moz-box-shadow:1px 1px 1px #fff inset,0px -1px 2px rgba(0,0,0,0.3) inset;box-shadow:1px 1px 1px #fff inset,0px -1px 2px rgba(0,0,0,0.3) inset}.significant_fragments img{display:inline;float:left;margin:0.5em}.significant_fragments table#sf1{text-align:left}.significant_fragments table#sf1 td{padding:0.2em}.descriptors{width:98%;margin-bottom:2em;background-color:#c5c1e4;-moz-border-radius-bottomleft:5px;-webkit-border-bottom-left-radius:5px;border-bottom-left-radius:5px;-moz-border-radius-bottomright:5px;-webkit-border-bottom-right-radius:5px;border-bottom-right-radius:5px;-webkit-background-clip:border;-moz-background-clip:border;background-clip:border-box;-webkit-box-shadow:1px 1px 1px #fff inset,0px -1px 2px rgba(0,0,0,0.3) inset;-moz-box-shadow:1px 1px 1px #fff inset,0px -1px 2px rgba(0,0,0,0.3) inset;box-shadow:1px 1px 1px #fff inset,0px -1px 2px rgba(0,0,0,0.3) inset}.descriptors img{display:inline;float:left;margin:0.5em}.descriptors table#sf2{text-align:left}.descriptors table#sf2 td{padding:0.2em}.results{background-image:url("/images/gray_jean.png");overflow-x:auto;overflow-y:hidden;margin-top:2em;margin-bottom:2em;-webkit-box-shadow:1px 1px 1px #fff inset,0px -1px 2px rgba(0,0,0,0.3) inset;-moz-box-shadow:1px 1px 1px #fff inset,0px -1px 2px rgba(0,0,0,0.3) inset;box-shadow:1px 1px 1px #fff inset,0px -1px 2px rgba(0,0,0,0.3) inset}.results a:hover{color:#f55}.results .tablesorter{width:100%;text-align:left}.results .tablesorter thead{background-color:#e6e5f3}.results .tablesorter thead tr th.header{background-image:url("/images/bg.gif");background-repeat:no-repeat;background-position:center left;cursor:pointer;padding-left:20px;border:1px solid #dad9c7;margin-left:-1px}.results .tablesorter thead tr th.headerSortDown{background-image:url("/images/desc.gif");background-color:#c5c1e4}.results .tablesorter thead tr th.headerSortUp{background-image:url("/images/asc.gif");background-color:#c5c1e4}.results .tablesorter tbody tr td{padding-left:1em;-webkit-box-shadow:1px 1px 1px #fff inset,0px -1px 2px rgba(0,0,0,0.3) inset;-moz-box-shadow:1px 1px 1px #fff inset,0px -1px 2px rgba(0,0,0,0.3) inset;box-shadow:1px 1px 1px #fff inset,0px -1px 2px rgba(0,0,0,0.3) inset}.results .tablesorter tbody .compound{width:200px;padding:0.2em}.results .tablesorter tbody .n{color:#5c8533}.results .tablesorter tbody .c{color:#d42200}input#predict{border:0px;background-color:#c5c1e4;margin:0;padding:0}.tooltip{background-color:#fff;border:2px solid #ccc;font-size:0.5em;padding:1em;display:none;z-index:50}.footer{margin:20px 0 20px 0}
+body{background-image:url("/images/gray_jean.png");overflow:scroll;font-family:sans-serif}body a{text-decoration:none;font-weight:bold;color:#000}body img{border:0}body h2{padding-top:12px;text-shadow:#fff 1px 1px 0;font-size:x-large;color:#f55}.logo img{float:left;display:inline;margin-right:1em}.logo h1{display:inline;width:80%}.logo img.ote{width:100px;height:50px;display:inline;float:right}.logo hr{margin:0.5em}.content{background-image:url("/images/gray_jean.png")}.content h1{margin:0.3em;text-shadow:#fff 1px 1px 0;font-size:x-large;font-family:Verdana;display:inline}.content .arrow{margin:8px 0px 5px 20px}.content .back{display:inline}.content #back-top{z-index:100;position:fixed;bottom:3%;margin-left:91%}.content #back-top a:hover{color:#bbb}.content fieldset#top{border:0;padding:10px;background-color:#c5c1e4;-moz-border-radius-topleft:25px;-webkit-border-top-left-radius:25px;border-top-left-radius:25px;-moz-border-radius-topright:25px;-webkit-border-top-right-radius:25px;border-top-right-radius:25px;-webkit-background-clip:border;-moz-background-clip:border;background-clip:border-box;-webkit-box-shadow:1px 1px 1px #fff inset,-1px -1px 5px rgba(0,0,0,0.3) inset;-moz-box-shadow:1px 1px 1px #fff inset,-1px -1px 5px rgba(0,0,0,0.3) inset;box-shadow:1px 1px 1px #fff inset,-1px -1px 5px rgba(0,0,0,0.3) inset}.content fieldset#top a#linkInsert{display:block;width:100%;height:2em}.content fieldset#top #appletContainer{padding:10px}.content fieldset#middle{border:0;padding:10px;background-color:#c5c1e4;-webkit-box-shadow:1px 1px 1px #fff inset,-1px -1px 5px rgba(0,0,0,0.3) inset;-moz-box-shadow:1px 1px 1px #fff inset,-1px -1px 5px rgba(0,0,0,0.3) inset;box-shadow:1px 1px 1px #fff inset,-1px -1px 5px rgba(0,0,0,0.3) inset}.content fieldset#middle a#linkModels{display:block;width:100%;height:2em}.content fieldset#middle #endpoint{padding-top:2em}.content fieldset#middle #model a{display:inline;font-weight:normal}.content fieldset#middle #details_0{background-color:#e6e5f3;-webkit-box-shadow:1px 1px 1px #fff inset,-1px -1px 5px rgba(0,0,0,0.3) inset;-moz-box-shadow:1px 1px 1px #fff inset,-1px -1px 5px rgba(0,0,0,0.3) inset;box-shadow:1px 1px 1px #fff inset,-1px -1px 5px rgba(0,0,0,0.3) inset;padding:1em}.content fieldset#middle #details_0 a:hover{color:#f55}.content fieldset#middle #details_1{background-color:#e6e5f3;-webkit-box-shadow:1px 1px 1px #fff inset,-1px -1px 5px rgba(0,0,0,0.3) inset;-moz-box-shadow:1px 1px 1px #fff inset,-1px -1px 5px rgba(0,0,0,0.3) inset;box-shadow:1px 1px 1px #fff inset,-1px -1px 5px rgba(0,0,0,0.3) inset;padding:1em}.content fieldset#middle #details_1 a:hover{color:#f55}.content fieldset#middle #details_2{background-color:#e6e5f3;-webkit-box-shadow:1px 1px 1px #fff inset,-1px -1px 5px rgba(0,0,0,0.3) inset;-moz-box-shadow:1px 1px 1px #fff inset,-1px -1px 5px rgba(0,0,0,0.3) inset;box-shadow:1px 1px 1px #fff inset,-1px -1px 5px rgba(0,0,0,0.3) inset;padding:1em}.content fieldset#middle #details_2 a:hover{color:#f55}.content fieldset#middle #details_3{background-color:#e6e5f3;-webkit-box-shadow:1px 1px 1px #fff inset,-1px -1px 5px rgba(0,0,0,0.3) inset;-moz-box-shadow:1px 1px 1px #fff inset,-1px -1px 5px rgba(0,0,0,0.3) inset;box-shadow:1px 1px 1px #fff inset,-1px -1px 5px rgba(0,0,0,0.3) inset;padding:1em}.content fieldset#middle #details_3 a:hover{color:#f55}.content fieldset#middle #details_4{background-color:#e6e5f3;-webkit-box-shadow:1px 1px 1px #fff inset,-1px -1px 5px rgba(0,0,0,0.3) inset;-moz-box-shadow:1px 1px 1px #fff inset,-1px -1px 5px rgba(0,0,0,0.3) inset;box-shadow:1px 1px 1px #fff inset,-1px -1px 5px rgba(0,0,0,0.3) inset;padding:1em}.content fieldset#middle #details_4 a:hover{color:#f55}.content fieldset#bottom{border:0;background-color:#c5c1e4;padding:10px;margin-bottom:5em;-webkit-box-shadow:1px 1px 1px #fff inset,-1px -1px 5px rgba(0,0,0,0.3) inset;-moz-box-shadow:1px 1px 1px #fff inset,-1px -1px 5px rgba(0,0,0,0.3) inset;box-shadow:1px 1px 1px #fff inset,-1px -1px 5px rgba(0,0,0,0.3) inset;-moz-border-radius-bottomleft:25px;-webkit-border-bottom-left-radius:25px;border-bottom-left-radius:25px;-moz-border-radius-bottomright:25px;-webkit-border-bottom-right-radius:25px;border-bottom-right-radius:25px;-webkit-background-clip:border;-moz-background-clip:border;background-clip:border-box}.content fieldset#bottom input#predict{margin-left:1em}.content .predictions{background-color:#c5c1e4;padding:10px;text-align:justify;-webkit-box-shadow:1px 1px 1px #fff inset,-1px -1px 5px rgba(0,0,0,0.3) inset;-moz-box-shadow:1px 1px 1px #fff inset,-1px -1px 5px rgba(0,0,0,0.3) inset;box-shadow:1px 1px 1px #fff inset,-1px -1px 5px rgba(0,0,0,0.3) inset;-moz-border-radius-topleft:25px;-webkit-border-top-left-radius:25px;border-top-left-radius:25px;-moz-border-radius-bottomleft:25px;-webkit-border-bottom-left-radius:25px;border-bottom-left-radius:25px;-moz-border-radius-topright:25px;-webkit-border-top-right-radius:25px;border-top-right-radius:25px;-moz-border-radius-bottomright:25px;-webkit-border-bottom-right-radius:25px;border-bottom-right-radius:25px;-webkit-background-clip:border;-moz-background-clip:border;background-clip:border-box}.content .overview{background-image:url("/images/gray_jean.png");padding:12px;margin-top:1em;margin-bottom:1em;text-align:left;-webkit-box-shadow:1px 1px 1px #fff inset,-1px -1px 5px rgba(0,0,0,0.3) inset;-moz-box-shadow:1px 1px 1px #fff inset,-1px -1px 5px rgba(0,0,0,0.3) inset;box-shadow:1px 1px 1px #fff inset,-1px -1px 5px rgba(0,0,0,0.3) inset;-moz-border-radius-topleft:25px;-webkit-border-top-left-radius:25px;border-top-left-radius:25px;-moz-border-radius-topright:25px;-webkit-border-top-right-radius:25px;border-top-right-radius:25px;-webkit-background-clip:border;-moz-background-clip:border;background-clip:border-box}.content .overview a:hover{color:#f55}.content .overview caption{text-align:left}.content .overview #overview tr td{background-color:#fff;border:1px solid #dad9c7;padding-left:1em;padding-top:0.5em}.content .overview #overview tr td #compound{width:200px}.content .overview #overview tr td b.c{color:#d42200}.content .overview #overview tr td b.n{color:#5c8533}.content .overview #overview tr td .confidence{display:inline}.content .error{background-color:#c5c1e4;padding:15px;-webkit-box-shadow:1px 1px 1px #fff inset,-1px -1px 5px rgba(0,0,0,0.3) inset;-moz-box-shadow:1px 1px 1px #fff inset,-1px -1px 5px rgba(0,0,0,0.3) inset;box-shadow:1px 1px 1px #fff inset,-1px -1px 5px rgba(0,0,0,0.3) inset;-moz-border-radius-topleft:25px;-webkit-border-top-left-radius:25px;border-top-left-radius:25px;-moz-border-radius-bottomleft:25px;-webkit-border-bottom-left-radius:25px;border-bottom-left-radius:25px;-moz-border-radius-topright:25px;-webkit-border-top-right-radius:25px;border-top-right-radius:25px;-moz-border-radius-bottomright:25px;-webkit-border-bottom-right-radius:25px;border-bottom-right-radius:25px;-webkit-background-clip:border;-moz-background-clip:border;background-clip:border-box}.content .error .message{margin-top:1em;padding:1em;border:2px solid #f55;background-color:#fff;color:#f55;-moz-border-radius-topleft:25px;-webkit-border-top-left-radius:25px;border-top-left-radius:25px;-moz-border-radius-bottomleft:25px;-webkit-border-bottom-left-radius:25px;border-bottom-left-radius:25px;-moz-border-radius-topright:25px;-webkit-border-top-right-radius:25px;border-top-right-radius:25px;-moz-border-radius-bottomright:25px;-webkit-border-bottom-right-radius:25px;border-bottom-right-radius:25px;-webkit-background-clip:border;-moz-background-clip:border;background-clip:border-box}.content #closebutton{color:#f55;margin-left:98%;padding:0}.details{width:98%;background-color:#c5c1e4;-moz-border-radius-bottomleft:5px;-webkit-border-bottom-left-radius:5px;border-bottom-left-radius:5px;-moz-border-radius-bottomright:5px;-webkit-border-bottom-right-radius:5px;border-bottom-right-radius:5px;-webkit-background-clip:border;-moz-background-clip:border;background-clip:border-box;-webkit-box-shadow:1px 1px 1px #fff inset,0px -1px 2px rgba(0,0,0,0.3) inset;-moz-box-shadow:1px 1px 1px #fff inset,0px -1px 2px rgba(0,0,0,0.3) inset;box-shadow:1px 1px 1px #fff inset,0px -1px 2px rgba(0,0,0,0.3) inset}.details a:hover{color:#f55}.details img{display:inline;float:left;margin:0.5em}.significant_fragments{width:98%;margin-bottom:2em;background-color:#c5c1e4;-moz-border-radius-bottomleft:5px;-webkit-border-bottom-left-radius:5px;border-bottom-left-radius:5px;-moz-border-radius-bottomright:5px;-webkit-border-bottom-right-radius:5px;border-bottom-right-radius:5px;-webkit-background-clip:border;-moz-background-clip:border;background-clip:border-box;-webkit-box-shadow:1px 1px 1px #fff inset,0px -1px 2px rgba(0,0,0,0.3) inset;-moz-box-shadow:1px 1px 1px #fff inset,0px -1px 2px rgba(0,0,0,0.3) inset;box-shadow:1px 1px 1px #fff inset,0px -1px 2px rgba(0,0,0,0.3) inset}.significant_fragments img{display:inline;float:left;margin:0.5em}.significant_fragments table#sf1{text-align:left}.significant_fragments table#sf1 td{padding:0.2em}.descriptors{width:98%;margin-bottom:2em;background-color:#c5c1e4;-moz-border-radius-bottomleft:5px;-webkit-border-bottom-left-radius:5px;border-bottom-left-radius:5px;-moz-border-radius-bottomright:5px;-webkit-border-bottom-right-radius:5px;border-bottom-right-radius:5px;-webkit-background-clip:border;-moz-background-clip:border;background-clip:border-box;-webkit-box-shadow:1px 1px 1px #fff inset,0px -1px 2px rgba(0,0,0,0.3) inset;-moz-box-shadow:1px 1px 1px #fff inset,0px -1px 2px rgba(0,0,0,0.3) inset;box-shadow:1px 1px 1px #fff inset,0px -1px 2px rgba(0,0,0,0.3) inset}.descriptors img{display:inline;float:left;margin:0.5em}.descriptors table#sf2{text-align:left}.descriptors table#sf2 td{padding:0.2em}.results{background-image:url("/images/gray_jean.png");overflow-x:auto;overflow-y:hidden;margin-top:2em;margin-bottom:2em;-webkit-box-shadow:1px 1px 1px #fff inset,0px -1px 2px rgba(0,0,0,0.3) inset;-moz-box-shadow:1px 1px 1px #fff inset,0px -1px 2px rgba(0,0,0,0.3) inset;box-shadow:1px 1px 1px #fff inset,0px -1px 2px rgba(0,0,0,0.3) inset}.results a:hover{color:#f55}.results .tablesorter{width:100%;text-align:left}.results .tablesorter thead{background-color:#e6e5f3}.results .tablesorter thead tr th.header{background-image:url("/images/bg.gif");background-repeat:no-repeat;background-position:center left;cursor:pointer;padding-left:20px;border:1px solid #dad9c7;margin-left:-1px}.results .tablesorter thead tr th.headerSortDown{background-image:url("/images/desc.gif");background-color:#c5c1e4}.results .tablesorter thead tr th.headerSortUp{background-image:url("/images/asc.gif");background-color:#c5c1e4}.results .tablesorter tbody tr td{padding-left:1em;-webkit-box-shadow:1px 1px 1px #fff inset,0px -1px 2px rgba(0,0,0,0.3) inset;-moz-box-shadow:1px 1px 1px #fff inset,0px -1px 2px rgba(0,0,0,0.3) inset;box-shadow:1px 1px 1px #fff inset,0px -1px 2px rgba(0,0,0,0.3) inset}.results .tablesorter tbody .compound{width:200px;padding:0.2em}.results .tablesorter tbody .n{color:#5c8533}.results .tablesorter tbody .c{color:#d42200}input#predict{border:0px;background-color:#c5c1e4;margin:0;padding:0}.tooltip{background-color:#fff;border:2px solid #ccc;font-size:0.5em;padding:1em;display:none;z-index:50}.footer{margin:20px 0 20px 0}
diff --git a/public/stylesheets/screen.sass b/public/stylesheets/screen.sass
index 9af4cdb..bce863d 100644
--- a/public/stylesheets/screen.sass
+++ b/public/stylesheets/screen.sass
@@ -92,27 +92,36 @@ body
//background-image: url("/images/gray_jean.png")
+box-shadow(1px 1px 1px rgba(white, 1) inset, -1px -1px 5px rgba(black, 0.3) inset)
padding: 1em
+ a:hover
+ color: #FF5555
#details_1
background-color: adjust-lightness($ist-color, 10%)
//background-image: url("/images/gray_jean.png")
+box-shadow(1px 1px 1px rgba(white, 1) inset, -1px -1px 5px rgba(black, 0.3) inset)
padding: 1em
+ a:hover
+ color: #FF5555
#details_2
background-color: adjust-lightness($ist-color, 10%)
//background-image: url("/images/gray_jean.png")
+box-shadow(1px 1px 1px rgba(white, 1) inset, -1px -1px 5px rgba(black, 0.3) inset)
padding: 1em
+ a:hover
+ color: #FF5555
#details_3
background-color: adjust-lightness($ist-color, 10%)
//background-image: url("/images/gray_jean.png")
+box-shadow(1px 1px 1px rgba(white, 1) inset, -1px -1px 5px rgba(black, 0.3) inset)
padding: 1em
+ a:hover
+ color: #FF5555
#details_4
background-color: adjust-lightness($ist-color, 10%)
//background-image: url("/images/gray_jean.png")
+box-shadow(1px 1px 1px rgba(white, 1) inset, -1px -1px 5px rgba(black, 0.3) inset)
padding: 1em
-
+ a:hover
+ color: #FF5555
fieldset#bottom
border: 0
background-color: $ist-color
diff --git a/views/predict.haml b/views/predict.haml
index d515902..8831c56 100644
--- a/views/predict.haml
+++ b/views/predict.haml
@@ -71,20 +71,22 @@
- @detail_count = 0
// TODO order models by echa endpoint
#endpoint
- %b Acute toxicity to fish (lethality):
- @models.each do |model|
- model_title = model.title.split("_").last(2)[0]
- - if model_title =~ /LC50/i
+ - model_t = model.title.gsub("_", " ")
+ - case model_title
+ - when /LC50/i
+ %b Acute toxicity to fish (lethality):
- @detail_count +=1
%div{:id => model_title}
%input{:type => "checkbox", :name => "selection[#{model_title}]", :id => "selection[#{model_title}]", :value => true, :disabled => false}
%label{:for => "selection[#{model_title}]"}
- = model.title.gsub("_", " ")
+ = model_t
%a{:href=>"#details", :id => "linkDetails#{model_title}", :title=>"#{model_title} details", :style=>"font-size:small;"}
[Details]
:javascript
- $("a#linkDetails#{@detail_count}").click(function () {
+ $("a#linkDetails#{model_title}").click(function () {
$("#details_#{@detail_count}").toggle();
//document.location = document.location + "#" + "details";
});
@@ -94,30 +96,29 @@
//%p= "Training Dataset:\t#{model[RDF::OT.trainingDataset]}"
%p Algorithm: Lazar
%p Type: regression
- %p Training compounds: integer
- %p Descriptors: Fminer
+ %p Training compounds: 580
+ %p{:style=>"display:inline;"} Descriptors:
+ %a{:href=>"https://services.in-silico.ch/algorithm/descriptor/physchem", :title=>"link opens in new window.", :target=>"_blank"} Physico-chemical (PC)properties
//%p= "Training Dataset:\t#{model[RDF::OT.trainingDataset]}"
//%p= "Feature Dataset:\t#{model[RDF::OT.featureDataset]}"
- %h3 Validation:
- %a{:href => "#"}
+ /%h3 Validation:
+ -#%a{:href => "#"}
Detailed report link
- %p Number of predictions: integer
- %p Correct predictions: %
- %br
- %b Carcinogenicity:
- - @models.each do |model|
- - model_title = model.title.split("_").last(2)[0]
- - if model_title =~ /hamster|rodent/i
+ /%p Number of predictions: integer
+ /%p Correct predictions: %
+ - when /hamster/i
+ %br
+ %b Carcinogenicity:
- @detail_count +=1
%div{:id => model_title}
%input{:type => "checkbox", :name => "selection[#{model_title}]", :id => "selection[#{model_title}]", :value => true, :disabled => false}
%label{:for => "selection[#{model_title}]"}
= model.title.gsub("_", " ")
- %a{:href=>"#details", :id => "linkDetails#{@detail_count}", :title=>"#{model_title} details", :style=>"font-size:small;"}
+ %a{:href=>"#details", :id => "linkDetails#{model_title}", :title=>"#{model_title} details", :style=>"font-size:small;"}
[Details]
:javascript
- $("a#linkDetails#{@detail_count}").click(function () {
+ $("a#linkDetails#{model_title}").click(function () {
$("#details_#{@detail_count}").toggle();
//document.location = document.location + "#" + "details";
});
@@ -127,21 +128,20 @@
//%p= "Training Dataset:\t#{model[RDF::OT.trainingDataset]}"
%p Algorithm: Lazar
%p Type: classification
- %p Training compounds: integer
- %p Descriptors: Fminer
+ %p Training compounds: 86
+ %p{:style=>"display:inline;"} Descriptors:
+ %a{:href=>"http://www.maunz.de/libfminer2-bbrc-doc/", :title=>"link opens in new window.", :target=>"_blank"} Fminer backbone refinement classes
//%p= "Training Dataset:\t#{model[RDF::OT.trainingDataset]}"
//%p= "Feature Dataset:\t#{model[RDF::OT.featureDataset]}"
%h3 Validation:
- %a{:href => "#"}
+ %a{:href => "http://lazar-services.in-silico.ch/validation/report/crossvalidation/22", :title=>"Link opens in new window.", :target=>"_blank"}
Detailed report link
- %p Number of predictions: integer
- %p Correct predictions: %
+ /%p Number of predictions: integer
+ /%p Correct predictions: %
%br
- %br
- %b Mutagenicity:
- - @models.each do |model|
- - model_title = model.title.split("_").last(2)[0]
- - if model_title =~ /Mutagenicity/i
+ - when /mutagenicity/i
+ %br
+ %b Mutagenicity:
- @detail_count +=1
%div{:id => model_title}
%input{:type => "checkbox", :name => "selection[#{model_title}]", :id => "selection[#{model_title}]", :value => true, :disabled => false}
@@ -151,7 +151,7 @@
[Details]
:javascript
- $("a#linkDetails#{@detail_count}").click(function () {
+ $("a#linkDetails#{model_title}").click(function () {
$("#details_#{@detail_count}").toggle();
//document.location = document.location + "#" + "details";
});
@@ -161,15 +161,16 @@
//%p= "Training Dataset:\t#{model[RDF::OT.trainingDataset]}"
%p Algorithm: Lazar
%p Type: classification
- %p Training compounds: integer
- %p Descriptors: Fminer
+ %p Training compounds: 828
+ %p{:style=>"display:inline;"} Descriptors:
+ %a{:href=>"http://www.maunz.de/libfminer2-bbrc-doc/", :title=>"link opens in new window.", :target=>"_blank"} Fminer backbone refinement classes
//%p= "Training Dataset:\t#{model[RDF::OT.trainingDataset]}"
//%p= "Feature Dataset:\t#{model[RDF::OT.featureDataset]}"
%h3 Validation:
- %a{:href => "#"}
+ %a{:href => "http://lazar-services.in-silico.ch/validation/report/crossvalidation/25", :title=>"Link opens in new window.", :target=>"_blank"}
Detailed report link
- %p Number of predictions: integer
- %p Correct predictions: %
+ /%p Number of predictions: integer
+ /%p Correct predictions: %
%br
diff --git a/views/significant_fragments.haml b/views/significant_fragments.haml
index 5bb4c31..7301f53 100644
--- a/views/significant_fragments.haml
+++ b/views/significant_fragments.haml
@@ -12,17 +12,22 @@
- if !@significant_fragments.empty?
%table{:id => "sf1"}
%tr
+ / @value_map => hash; interpret the effect
%th{:style=>"border:2px solid #E6E6E6;"}
- Predominantly in compounds with activity "non-active"
+ Predominantly in compounds with activity "inactive"
%th{:style=>"border:2px solid #E6E6E6;"}
p value
- @significant_fragments.each do |fragments|
- / fragments == [1||2, smarts, pValue]
- - if fragments[0] == 1
+ / fragments == [effect, smarts, pValue]
+ / fragments[0] = effect
+ /- $logger.debug "effect:\t#{fragments[0]}\n"
+ - if fragments[0] == @value_map.index("inactive")
%tr
%td
+ / fragments[1] = smarts
= fragments[1]
%td
+ /fragments[2] = pValue
= fragments[2]
%tr
%td
@@ -33,8 +38,8 @@
%th{:style=>"border:2px solid #E6E6E6;"}
p value
- @significant_fragments.each do |fragments|
- / fragments == [1||2, smarts, pValue]
- - if fragments[0] == 2
+ / fragments == [effect, smarts, pValue]
+ - if fragments[0] == @value_map.index("active")
%tr
%td
= fragments[1]