diff options
author | Christoph Helma <helma@in-silico.ch> | 2016-05-08 12:22:58 +0200 |
---|---|---|
committer | Christoph Helma <helma@in-silico.ch> | 2016-05-08 12:22:58 +0200 |
commit | 06fc914653face2c58fd4e6c47161cb03e217582 (patch) | |
tree | f001a28b3970f67bf648f6d00e95791a063e7fd5 /scripts/mmol2-log10.rb | |
parent | 110b470a69f785f195cce21df7c07efa5c9ce61b (diff) |
default validations fixed
Diffstat (limited to 'scripts/mmol2-log10.rb')
-rwxr-xr-x | scripts/mmol2-log10.rb | 6 |
1 files changed, 5 insertions, 1 deletions
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 |