Sha256: 40c9d92dce1dea710640d31f4ca9ee57a9f5ec7ee270f42b5f56f632ff72724a
Contents?: true
Size: 394 Bytes
Versions: 6
Compression:
Stored size: 394 Bytes
Contents
#!/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
Version data entries
6 entries across 6 versions & 1 rubygems
Version | Path |
---|---|
lazar-1.2.1 | scripts/mg2mmol.rb |
lazar-1.2.0 | scripts/mg2mmol.rb |
lazar-1.1.3 | scripts/mg2mmol.rb |
lazar-1.1.0 | scripts/mg2mmol.rb |
lazar-1.0.1 | scripts/mg2mmol.rb |
lazar-1.0.0 | scripts/mg2mmol.rb |