From 06fc914653face2c58fd4e6c47161cb03e217582 Mon Sep 17 00:00:00 2001 From: Christoph Helma Date: Sun, 8 May 2016 12:22:58 +0200 Subject: default validations fixed --- scripts/mmol2-log10.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'scripts') diff --git a/scripts/mmol2-log10.rb b/scripts/mmol2-log10.rb index 0c99a0b..f28ff8f 100755 --- a/scripts/mmol2-log10.rb +++ b/scripts/mmol2-log10.rb @@ -3,6 +3,7 @@ require_relative '../lib/lazar' include OpenTox newfile = ARGV[0].sub(/.csv/,"_log10.csv") p newfile +i = 1 CSV.open(newfile, "wb") do |csv| CSV.read(ARGV[0]).each do |line| smi,mmol = line @@ -11,7 +12,10 @@ CSV.open(newfile, "wb") do |csv| mmol = -Math.log10(mmol.to_f) csv << [smi, mmol] else - csv << [smi, "-log10(#{mmol})"] + #csv << [smi, "-log10(#{mmol})"] + p "Line #{i}: '#{mmol}' is not a numeric value." + csv << [smi, ""] end + i += 1 end end -- cgit v1.2.3