summaryrefslogtreecommitdiff
path: root/mg2mmol.rb
diff options
context:
space:
mode:
Diffstat (limited to 'mg2mmol.rb')
-rw-r--r--mg2mmol.rb17
1 files changed, 0 insertions, 17 deletions
diff --git a/mg2mmol.rb b/mg2mmol.rb
deleted file mode 100644
index dc6b953..0000000
--- a/mg2mmol.rb
+++ /dev/null
@@ -1,17 +0,0 @@
-#!/usr/bin/env ruby
-require_relative '../lazar/lib/lazar'
-include OpenTox
-newfile = ARGV[0].sub(/.csv/,"_mmol.csv")
-p newfile
-CSV.open(newfile, "wb") do |csv|
- CSV.read(ARGV[0]).each do |line|
- smi,mg = line
- if mg.numeric?
- c = Compound.from_smiles smi
- mmol = c.mg_to_mmol mg.to_f
- csv << [smi, mmol]
- else
- csv << [smi, mg.gsub(/mg/,'mmol')]
- end
- end
-end