summaryrefslogtreecommitdiff
path: root/views
diff options
context:
space:
mode:
authorChristoph Helma <helma@in-silico.ch>2011-08-04 13:55:58 +0000
committerChristoph Helma <helma@in-silico.ch>2011-08-04 13:55:58 +0000
commit304c4c484a062077bad08ca9fe3ed44d138c9416 (patch)
tree17ecb7dfa918e5c35acf2979899fd195985c45d2 /views
parent4f83500afb33612cadd7084470ab9b42dfa59cf2 (diff)
feature highlighting and significant features fixed for generic classes and regression
Diffstat (limited to 'views')
-rw-r--r--views/feature_table.haml12
-rw-r--r--views/lazar.haml2
-rw-r--r--views/lazar_algorithm.haml20
-rw-r--r--views/neighbors.haml2
-rw-r--r--views/prediction.haml4
-rw-r--r--views/significant_fragments.haml2
6 files changed, 29 insertions, 13 deletions
diff --git a/views/feature_table.haml b/views/feature_table.haml
index a8a153f..e75c818 100644
--- a/views/feature_table.haml
+++ b/views/feature_table.haml
@@ -2,7 +2,11 @@
- unless features[:activating].empty?
%tr
%th
- activating
+ - if @value_map.empty?
+ activating
+ - else
+ predominatly in compounds with activity
+ = "\"#{@value_map[2]}\""
(
%a{:href => "http://www.daylight.com/dayhtml/doc/theory/theory.smarts.html", :rel => "external"} SMARTS
)
@@ -15,7 +19,11 @@
- unless features[:deactivating].empty?
%tr
%th
- deactivating
+ - if @value_map.empty?
+ deactivating
+ - else
+ predominatly in compounds with activity
+ = "\"#{@value_map[1]}\""
(
%a{:href => "http://www.daylight.com/dayhtml/doc/theory/theory.smarts.html", :rel => "external"} SMARTS
)
diff --git a/views/lazar.haml b/views/lazar.haml
index 2912567..870fcab 100644
--- a/views/lazar.haml
+++ b/views/lazar.haml
@@ -19,7 +19,7 @@
%tr
%td.image= compound_image(@compound,@prediction.descriptors(@compound),@value_map)
- %td= activity_markup(@prediction.value(@compound))
+ %td= activity_markup(@prediction.value(@compound), @value_map)
%td= sprintf('%.03g', @prediction.confidence(@compound))
%td
%ul
diff --git a/views/lazar_algorithm.haml b/views/lazar_algorithm.haml
index 85823b5..e5b70f6 100644
--- a/views/lazar_algorithm.haml
+++ b/views/lazar_algorithm.haml
@@ -33,12 +33,20 @@
= toggle_link "#significant_fragments", "Significant fragments"
are highlighted in the structure display as follows:
%ul
- %li
- .active activating fragments
- %li
- .inactive deactivating fragments
- %li
- .inconclusive regions, where activating and deactivating fragments overlap
+ - if @value_map.empty?
+ %li
+ .active activating fragments
+ %li
+ .inactive deactivating fragments
+ %li
+ .inconclusive regions, where activating and deactivating fragments overlap
+ - else
+ %li
+ .active= "features that occur predominately in compounds with activity: \"#{@value_map[2]}\""
+ %li
+ .inactive= "features that occur predominately in compounds with activity: \"#{@value_map[1]}\""
+ %li
+ .inconclusive regions, where fragments from different classes overlap
%li
.other inert parts
diff --git a/views/neighbors.haml b/views/neighbors.haml
index 3f1dccd..e2d65fa 100644
--- a/views/neighbors.haml
+++ b/views/neighbors.haml
@@ -14,7 +14,7 @@
- compound = OpenTox::Compound.new(neighbor[OT.compound])
%tr
%td.image= compound_image(compound,@prediction.descriptors(compound),@value_map)
- %td= activity_markup(@value_map[neighbor[OT.measuredActivity].to_i])
+ %td= activity_markup(neighbor[OT.measuredActivity], @value_map)
%td= sprintf('%.03g', neighbor[OT.similarity])
%td
%ul
diff --git a/views/prediction.haml b/views/prediction.haml
index 9bb3f76..682b979 100644
--- a/views/prediction.haml
+++ b/views/prediction.haml
@@ -16,7 +16,7 @@
- if p[:measured_activities]
%br
- p[:measured_activities].each do |a|
- = activity_markup(a)
+ = activity_markup(a, @value_map)
%br
(
%a{:href => "#", :id => "linkTrainingData#{p.object_id}"} Measured activity
@@ -29,7 +29,7 @@
- elsif p[:error]
%br= p[:error]
- else
- = activity_markup(p[:prediction])
+ = activity_markup(p[:prediction], @value_map)
- if p[:confidence]
%br
(
diff --git a/views/significant_fragments.haml b/views/significant_fragments.haml
index bd39826..8cddf43 100644
--- a/views/significant_fragments.haml
+++ b/views/significant_fragments.haml
@@ -5,6 +5,6 @@
= hide_link "#significant_fragments"
)
%dd
- Substructures that occur (statistically significant) more frequently in active or inactive compounds. Substuctures can take any shape (without cycles) and are determined with the
+ Substructures that occur (statistically significant) more frequently in one of the toxicity classes or correlate with quantitative toxicity values. Substuctures can take any shape (without cycles) and are determined with the
%a{:href => "http://www.maunz.de/libfminer2-bbrc-doc/", :rel => "external"} fminer
algorithm.