From 8e4cd2f6654de5b88cdad91eb0c5050be13222f1 Mon Sep 17 00:00:00 2001 From: Christoph Helma Date: Mon, 12 Dec 2016 12:46:24 +0100 Subject: modena import workarounds --- lib/nanoparticle.rb | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'lib/nanoparticle.rb') 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." -- cgit v1.2.3