summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgebele <gebele@in-silico.ch>2013-06-24 14:24:40 +0200
committergebele <gebele@in-silico.ch>2013-06-24 14:24:40 +0200
commit76d196bbda378c29ff9c35c96d85b47dc8dfa3cc (patch)
treefe7d1897c2ec44f822f9c70b317eb016e0adc9c5
parent6f58b77765518f31219e59fca01df5b8ee80701e (diff)
several minor changes: result,names
-rw-r--r--application.rb7
-rw-r--r--public/images/greendot.pngbin811 -> 0 bytes
-rw-r--r--public/images/reddot.pngbin726 -> 0 bytes
-rw-r--r--public/stylesheets/screen.css2
-rw-r--r--public/stylesheets/screen.sass96
-rw-r--r--views/neighbors.haml15
-rw-r--r--views/prediction.haml66
7 files changed, 62 insertions, 124 deletions
diff --git a/application.rb b/application.rb
index 5cc6763..ece622c 100644
--- a/application.rb
+++ b/application.rb
@@ -33,7 +33,7 @@ get '/prediction/:neighbor/details/?' do
task.wait
case task[RDF::OT.hasStatus]
when "Error"
- @names = "There are no names for this compound available."
+ @names = "No names for this compound available."
when "Completed"
@names = @compound_uri.names.join(",")
end
@@ -69,10 +69,12 @@ post '/predict/?' do
lazar = OpenTox::Algorithm.new File.join($algorithm[:uri],"lazar")
# gather models from service and compare if selected
#TODO compare selected by uri
+ $logger.debug params[:selection]
params[:selection].each do |model|
@mselected = model[0]
@mall = OpenTox::Model.all $model[:uri]
@mall.each do |m|
+ $logger.debug m.inspect
@@prediction_models << m if m.title =~ /#{@mselected}/
end
end
@@ -80,7 +82,8 @@ post '/predict/?' do
# predict with selected models
# results in prediction variable
# store prediction in array for better handling
- @@prediction_models.each do |m|
+ @@prediction_models.each do |m|
+ $logger.debug m.inspect
@prediction_uri = m.run :compound_uri => "#{@compound.uri}"
prediction = OpenTox::Dataset.new @prediction_uri
pa = []
diff --git a/public/images/greendot.png b/public/images/greendot.png
deleted file mode 100644
index 867dffa..0000000
--- a/public/images/greendot.png
+++ /dev/null
Binary files differ
diff --git a/public/images/reddot.png b/public/images/reddot.png
deleted file mode 100644
index 73ea745..0000000
--- a/public/images/reddot.png
+++ /dev/null
Binary files differ
diff --git a/public/stylesheets/screen.css b/public/stylesheets/screen.css
index 84f943a..5c2eb16 100644
--- a/public/stylesheets/screen.css
+++ b/public/stylesheets/screen.css
@@ -1 +1 @@
-body{background-image:url("/images/gray_jean.png");background-color:#ccf;overflow:scroll;font-family:sans-serif;min-width:800px;min-heigth:600px}body a{text-decoration:none;font-weight:bold;color:#000}.logo img{float:left;display:inline;margin-right:1em}.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 h2{text-shadow:#fff 1px 1px 0;font-size:x-large;color:#f55}.content .arrow{margin:5px 0px 5px 20px}.content .back{display:inline}.content .close{text-align:right}.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#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:center;-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 caption{text-align:left}.content .overview .result{display:inline}.content .overview #overview tr td{background-color:#fff;border:1px solid #dad9c7;padding-left:1em}.content .overview #overview tr td#compound{width:200px}.content .overview #overview tr td.ctrue{padding-top:0.5em}.content .overview #overview tr td.cfalse{padding-top:0.5em}.content .overview #overview tr td.c1{padding-top:0.5em}.content .overview #overview tr td.c0{padding-top:0.5em}.content .overview #overview tr td.c0 .confidence{display:inline}.content .error{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 .error error{border:2px solid #f55;background-color:#fff;color:#f55}.content #closebutton{margin-left:95%;padding:0;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}.details{margin-bottom:2em;background-image:url("/images/gray_jean.png");-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}.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 .tablesorter{width:100%}.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{-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 tr td.compound{width:200px}.results .tablesorter tbody tr td.cfalse{text-align:center;color:#5c8533}.results .tablesorter tbody tr td.ctrue{text-align:center;color:#d42200}.results .tablesorter tbody tr td.c0{text-align:center;color:#5c8533}.results .tablesorter tbody tr td.c1{text-align:center;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");background-color:#ccf;overflow:scroll;font-family:sans-serif;min-width:800px;min-heigth:600px}body a{text-decoration:none;font-weight:bold;color:#000}.logo img{float:left;display:inline;margin-right:1em}.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 h2{text-shadow:#fff 1px 1px 0;font-size:x-large;color:#f55}.content .arrow{margin:5px 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#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:center;-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 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: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 .error error{border:2px solid #f55;background-color:#fff;color:#f55}.content #closebutton{margin-left:95%;padding:0;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}.details{margin-bottom:2em;background-image:url("/images/gray_jean.png");-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}.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 .tablesorter{width:100%}.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{-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}.results .tablesorter tbody .n{text-align:center;color:#5c8533}.results .tablesorter tbody .c{text-align:center;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 52d5c6b..943eb6b 100644
--- a/public/stylesheets/screen.sass
+++ b/public/stylesheets/screen.sass
@@ -2,10 +2,6 @@
@import compass/css3
$bg-color: #CCCCFF
-$bg-color-div: #C5C1E4
-//$ist-color: #B9DCFF
-$i-color: #C8AB37
-//$ist-color: adjust-lightness($i-color, 17%)
$ist-color: #C5C1E4
body
@@ -15,7 +11,6 @@ body
font-family: sans-serif
min-width: 800px
min-heigth: 600px
-
a
text-decoration: none
font-weight: bold
@@ -26,46 +21,32 @@ body
float: left
display: inline
margin-right: 1em
- h1
- //position: relative
- //top: 6px
- //left: 20px
-
.content
-
background-image: url("/images/gray_jean.png")
-
h1
margin: 0.3em
text-shadow: #FFF 1px 1px 0
font-size: x-large
font-family: Verdana
display: inline
-
h2
text-shadow: #FFF 1px 1px 0
font-size: x-large
color: #FF5555
-
.arrow
margin: 5px 0px 5px 20px
-
.back
display: inline
-
- .close
- text-align: right
-
+ //.close
+ //text-align: right
#back-top
z-index: 100
position: fixed
bottom: 3%
margin-left: 91%
-
a:hover
color: #bbb
-
fieldset#top
a#linkInsert
display: block
@@ -78,12 +59,8 @@ body
+border-top-right-radius(25px)
+background-clip(border-box)
+box-shadow(1px 1px 1px rgba(white, 1) inset, -1px -1px 5px rgba(black, 0.3) inset)
-
#appletContainer
padding: 10px
-
-
-
fieldset#middle
a#linkModels
display: block
@@ -93,14 +70,11 @@ body
padding: 10px
background-color: $ist-color
+box-shadow(1px 1px 1px rgba(white, 1) inset, -1px -1px 5px rgba(black, 0.3) inset)
-
#endpoint
padding-top: 2em
-
#model a
display: inline
font-weight: normal
-
fieldset#bottom
border: 0
background-color: $ist-color
@@ -110,12 +84,8 @@ body
+border-bottom-left-radius(25px)
+border-bottom-right-radius(25px)
+background-clip(border-box)
- label
- //cursor: pointer
-
input#predict
margin-left: 1em
-
.predictions
background-color: $ist-color
padding: 10px
@@ -124,7 +94,6 @@ body
+border-left-radius(25px)
+border-right-radius(25px)
+background-clip(border-box)
-
.overview
background-image: url("/images/gray_jean.png")
padding: 12px
@@ -135,45 +104,22 @@ body
+border-top-left-radius(25px)
+border-top-right-radius(25px)
+background-clip(border-box)
-
caption
text-align: left
-
- .result
- display: inline
-
#overview tr td
background-color: white
border: 1px solid #dad9c7
padding-left: 1em
- #overview tr td#compound
- width: 200px
-
- #overview tr td.ctrue
- padding-top: 0.5em
- //background-color: adjust-lightness(#D42200, 20%)
- //+box-shadow(1px 1px 1px rgba(white, 1) inset, -1px -1px 5px rgba(black, 0.3) inset)
-
- #overview tr td.cfalse
padding-top: 0.5em
- //background-color: adjust-lightness(#5C8533, 15%)
- //+box-shadow(1px 1px 1px rgba(white, 1) inset, -1px -1px 5px rgba(black, 0.3) inset)
-
- #overview tr td.c1
- padding-top: 0.5em
- //background-color: adjust-lightness(#D42200, 20%)
- //+box-shadow(1px 1px 1px rgba(white, 1) inset, -1px -1px 5px rgba(black, 0.3) inset)
-
- #overview tr td.c0
- padding-top: 0.5em
- //background-color: adjust-lightness(#5C8533, 15%)
- //+box-shadow(1px 1px 1px rgba(white, 1) inset, -1px -1px 5px rgba(black, 0.3) inset)
+ #compound
+ width: 200px
+ b.c
+ color: #D42200
+ b.n
+ color: #5C8533
.confidence
display: inline
-
-
.error
- //height: 200px
background-color: $ist-color
padding: 10px
text-align: justify
@@ -181,23 +127,20 @@ body
+border-left-radius(25px)
+border-right-radius(25px)
+background-clip(border-box)
-
error
border: 2px solid #FF5555
background-color: #FFFFFF
color: #FF5555
-
+ // close button for iframe also in content class
#closebutton
margin-left: 95%
padding: 0
background-color: $ist-color
- //display: inline
+border-bottom-left-radius(5px)
+border-bottom-right-radius(5px)
-
+
.details
margin-bottom: 2em
- //height: 400px
background-image: url("/images/gray_jean.png")
+border-bottom-left-radius(25px)
+border-bottom-right-radius(25px)
@@ -210,7 +153,6 @@ body
margin-top: 2em
margin-bottom: 2em
+box-shadow(1px 1px 1px rgba(white, 1) inset, 0px -1px 2px rgba(black, 0.3) inset)
-
.tablesorter
width: 100%
thead
@@ -230,27 +172,18 @@ body
th.headerSortUp
background-image: url("/images/asc.gif")
background-color: $ist-color
-
-
tbody
tr td
+box-shadow(1px 1px 1px rgba(white, 1) inset, 0px -1px 2px rgba(black, 0.3) inset)
- tr td.compound
+ .compound
width: 200px
- tr td.cfalse
+ .n
text-align: center
color: #5C8533
- tr td.ctrue
+ .c
text-align: center
color: #D42200
- tr td.c0
- text-align: center
- color: #5C8533
- tr td.c1
- text-align: center
- color: #D42200
-
-
+
input#predict
border: 0px
background-color: $ist-color
@@ -267,4 +200,3 @@ input#predict
.footer
margin: 20px 0 20px 0
-
diff --git a/views/neighbors.haml b/views/neighbors.haml
index 01ffe29..027ac50 100644
--- a/views/neighbors.haml
+++ b/views/neighbors.haml
@@ -87,14 +87,19 @@
- p.compounds.each do |neighbor_compound|
/ prevent conversion of nil
- c = p.data_entries[count][2] != nil ? p.data_entries[count][2] : ''
+ - case c
+ - when /(0|false)/
+ - c = "non-carcinogen"
+ - when /(1|true)/
+ - c = "carcinogen"
%tr
%td.compound
%img{:src=>"#{neighbor_compound.uri}/image", :alt=>"", :width=>"100px"}
- %td{:class => "c"+c}
- = p.data_entries[count][2]
- %td{:class => "c"+c}
- = p.data_entries[count][3] != nil ? p.data_entries[count][3].round(3) : "No prediction result"
- %td{:class => "c"+c}
+ %td{:class => c[0]}
+ = c #p.data_entries[count][2]
+ %td{:class => c[0]}
+ = p.data_entries[count][3] != nil ? p.data_entries[count][3].round(3) : "Not enough similar compounds in training dataset."
+ %td
%a{:href => to("/prediction/#{CGI.escape(neighbor_compound.uri)}/details"), :id=>"link#{count_rs}#{count}", :target=>"details"}
%img{:src=>"/images/arrow_right_float.png", :alt=>"arrow"}
:javascript
diff --git a/views/prediction.haml b/views/prediction.haml
index bc8d96d..8ee5cdd 100644
--- a/views/prediction.haml
+++ b/views/prediction.haml
@@ -36,47 +36,45 @@
- p.data_entries.length > 1 ? @@neighbors_available = p.data_entries.length : @@neighbors_available
/ prevent conversion of nil
- c = p.data_entries[0][0] != nil ? p.data_entries[0][0] : ''
- / define color by class; number first is not allowed for css
- %td{:class => "c"+c}
+ - case c
+ - when /(0|false)/
+ - c = "non-carcinogen"
+ - when /(1|true)/
+ - c = "carcinogen"
+ %td
%b{:class => "title"}
= @@prediction_models[count].title
%br
%br
- .result
- - if c != ''
- - if c == 0||"false"
- %image{:src=>"/images/greendot.png"}
- - elsif c == 1||"true"
- %image{:src=>"/images/reddot.png"}
-
- %b Result:
- %b= p.data_entries[0][0] != nil ? p.data_entries[0][0] : "No prediction result"
- %a{:href=>"#result", :title=>"", :id=>"result"}
- %img{:src=>"/images/info_white.png"}
- .tooltip{:style=>"font-weight: normal; font-size: 1em; width: 50%; text-align: left;"}
- %dt
- Result
- %dd
- %code lazar
- calculates searches the training dataset for similar compounds (neighbors)
- and calculates the prediction from their measured activities. lazar
- calculates predictions using
- %ul
- %li a majority vote (weighted by compound similarity) for
- %em classification
- (
- %a{:href=>"http://www.in-silico.de/articles/modi020905.pdf"} original publication
- )
- %li a local QSAR model based on neighbors for
- %em regression
- (
- %a{:href=>"http://www.in-silico.de/articles/mh_tf.pdf"} original publication
- )
- Please keep in mind that predictions are based on the measured activities of neighbors.
+ %b Result:
+ %b{:class => c[0]}
+ = (c != '' ? c : "No prediction result.")
+ %a{:href=>"#result", :title=>"", :id=>"result"}
+ %img{:src=>"/images/info_white.png"}
+ .tooltip{:style=>"font-weight: normal; font-size: 1em; width: 50%; text-align: left;"}
+ %dt
+ Result
+ %dd
+ %code lazar
+ calculates searches the training dataset for similar compounds (neighbors)
+ and calculates the prediction from their measured activities. lazar
+ calculates predictions using
+ %ul
+ %li a majority vote (weighted by compound similarity) for
+ %em classification
+ (
+ %a{:href=>"http://www.in-silico.de/articles/modi020905.pdf"} original publication
+ )
+ %li a local QSAR model based on neighbors for
+ %em regression
+ (
+ %a{:href=>"http://www.in-silico.de/articles/mh_tf.pdf"} original publication
+ )
+ Please keep in mind that predictions are based on the measured activities of neighbors.
%br
.confidence
%b Confidence:
- = p.data_entries[0][1] != nil ? p.data_entries[0][1].round(3) : "No prediction result"
+ = p.data_entries[0][1] != nil ? p.data_entries[0][1].round(3) : ""
%a{:href=>"#confidence", :title=>"", :id=>"confidence"}
%img{:src=>"/images/info_white.png"}
.tooltip{:style=>"font-weight: normal; font-size: 1em; width: 50%; text-align: left;"}