summaryrefslogtreecommitdiff
path: root/lib/nanoparticle.rb
diff options
context:
space:
mode:
authorChristoph Helma <helma@in-silico.ch>2016-12-12 12:46:24 +0100
committerChristoph Helma <helma@in-silico.ch>2016-12-12 12:46:24 +0100
commit8e4cd2f6654de5b88cdad91eb0c5050be13222f1 (patch)
treedf52e4730b9cc60f7e94e15cf6337543e437f93d /lib/nanoparticle.rb
parent2176251f76703cc9953a408938e846de026b3d4c (diff)
modena import workarounds
Diffstat (limited to 'lib/nanoparticle.rb')
-rw-r--r--lib/nanoparticle.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/nanoparticle.rb b/lib/nanoparticle.rb
index 02d9a89..06db4d2 100644
--- a/lib/nanoparticle.rb
+++ b/lib/nanoparticle.rb
@@ -40,6 +40,12 @@ module OpenTox
properties[feature.id.to_s] << value
properties[feature.id.to_s].uniq!
when "TOX"
+ if feature.name.match("Cell Viability Assay") and !feature.name.match("SLOPE") # -log10 transformation
+ value = -Math.log10(value)
+ feature.unit = "-log10(#{feature.unit})" unless feature.unit.match "log10"
+ feature.warnings += ["-log10 transformed values"] unless feature.warnings.include? "-log10 transformed values"
+ feature.save
+ end
dataset.add self, feature, value
else
warn "Unknown feature type '#{feature.category}'. Value '#{value}' not inserted."